how to connect to a remote SQL server on a different ip....from my local system....both are on same network

Hi

I am trying to connect to SQL server at a different location through vb code.....my local system n the server are on a same network....

Pls suggest me how to do that...what should be the connection string
LVL 1
dvsameerkumarAsked:
Who is Participating?
 
ispalenyConnect With a Mentor Commented:
Run svrnetcn.exe to see enabled protocols on server.
And cliconfg.exe to see enabled protocols on client.
0
 
ispalenyCommented:
Dim con As New ADODB.Connection
con.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=PutDatabaseHere;Data Source=PutServerHere"
 
0
 
dvsameerkumarAuthor Commented:
I have tried this...its still not retrieving the data....

But surprisingly, when I have tried this code to get connected to a sql on a different ip, its getting connected...

Do we need to do any settings on the server end for this....
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
ispalenyCommented:
Check
1. Client firewall
2. Server firewall
3. Network firewall
4. Server network settings
5. SQL Server network settings
6. Client SQL connector settings
7. SQL Server logon security settings
8. SQL Server security settings

You can start with commands
ping PutServerHere
(result OK:responding;result KO:it detects UDP connection blocked-not critical for MSSQL, but can identify network connection problems)
telnet PutServerHere 1433
(result OK:blank window;result KO:MSSQL is not listenning on a default port)
0
 
dvsameerkumarAuthor Commented:

hey when i typed  telnet PutServerHere 1433,

i got the following error....

Connecting To 10.190.88.13...Could not open a connection to host on port 1433 : Connect failed

What do i do now...

Please help
0
 
ispalenyCommented:
Is the SQL Server started?
Are you able to log on server console/TS ?
0
 
dvsameerkumarAuthor Commented:
yes on the server
0
 
ispalenyCommented:
And are you able to connect to the SQL Server locally?
0
 
dvsameerkumarAuthor Commented:
yes
0
 
ispalenyCommented:
dvsameerkumar stoped responding...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.