Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Connecto to SQL server over internet

Author  Topic 

phucst
Starting Member

6 Posts

Posted - 2009-06-15 : 22:46:47
Hi every body, is there any one connected to SQl server over internet?
My application get data from hardware and try to connect to SQL server over internet (not LAN), save data to SQL server, i using SQL2000.
My string connection is follow (using oledb): "Provider=sqloledb;Data Source=113.22.35.152,1433;Initial Catalog=pubs;User ID=test;Password=sa;" error message is server not exist or deny,
I read in site http://www.connectionstrings.com/sql-server
Then i try to connect SQl in LAN by replace in two way
1 :"Data Source = 10.0.0.111" conneting success
2 : "Data Source = 10.0.0.111,1433" conneting fail"
i turned off firewall and any program may block network connecting
do any one know the connecting string with port parameter in SQL2000

malaytech2008
Yak Posting Veteran

95 Posts

Posted - 2009-06-16 : 02:16:34
please check the server ip u are passing.



Malay
Go to Top of Page

phucst
Starting Member

6 Posts

Posted - 2009-06-16 : 04:59:09
what must i Check server. i think if i pass ports parameter in string connection correspond with ports declare in SQL server Utility. it must work? at least in LAN.

String : "Provider=sqloledb;Data Source=10.0.0.111,1433;Initial Catalog=pubs;User ID=test;Password=sa;" it doesn't work

But String "Provider=sqloledb;Data Source=10.0.0.111;Initial Catalog=pubs;User ID=test;Password=sa;" it works

ports server TCP/IP in server utility is enable and value = 1433, not dynamic pord mode
Go to Top of Page

malaytech2008
Yak Posting Veteran

95 Posts

Posted - 2009-06-16 : 07:25:00
1433 is default port, no need to provide.

Malay
Go to Top of Page

phucst
Starting Member

6 Posts

Posted - 2009-06-16 : 12:01:51
i tried with many way
firts in LAN :
+ "Provider=sqloledb;Data Source=10.0.0.111,1433;Initial Catalog=pubs;User ID=test;Password=sa;" not work
+ "Provider=sqloledb;Data Source=10.0.0.111,1500;Initial Catalog=pubs;User ID=test;Password=sa;" with port parameter in SQl server utility (SQl2K) = 1500 --> it doesn't work
+ "Provider=sqloledb;Data Source=10.0.0.111;Initial Catalog=pubs;User ID=test;Password=sa;" it work :D
i don't know what's the problem ?, i try fix port not in dynamic port mode
Go to Top of Page

kfluffie
Posting Yak Master

103 Posts

Posted - 2009-06-16 : 12:30:46
For me it was enough to redirect port 1433 to my local IP in the router and then connect to my SQL Server through my external IP adress.

I am having trouble interpereting your sentences but are you connecting through your external IP?

Best regards,
KFluffie
Go to Top of Page

phucst
Starting Member

6 Posts

Posted - 2009-06-16 : 12:45:34
:D . I'm trying connect to SQL server over internet (Extenal IP ?) but it doesn't work
So, i first try to connect to SQL in Lan with and without port parameter
can you show me the correct string connection with port parameter (SQl2K and VS2005)
Go to Top of Page

kfluffie
Posting Yak Master

103 Posts

Posted - 2009-06-17 : 04:42:03
Hi,
access this page from your computer where SQL Server is installed and type port 1433:
http://www.canyouseeme.org/

Is it open correctly?
Go to Top of Page

phucst
Starting Member

6 Posts

Posted - 2009-06-17 : 11:04:02
check by that site, it doesn't open. but i think that this site often not correct
I tried this way: i open port 1433, turn off firewall (turn off SQL). then i tried with two application client and server over WAN(internet) with this port. they work properly.
After that i turn on SQL and try connect to SQL with this port (i also open port 1434 - UDP), i tried connect to SQL in two way(with and without port parameter), but it doesn't work .
Go to Top of Page

kfluffie
Posting Yak Master

103 Posts

Posted - 2009-06-18 : 05:20:46
I think the site is often correct and that your port isn't correctly open or correctel redirected.
Go to Top of Page

phucst
Starting Member

6 Posts

Posted - 2009-06-18 : 07:21:06
i'll try again, thanks
Go to Top of Page
   

- Advertisement -