Link to home
Start Free TrialLog in
Avatar of dvsameerkumar
dvsameerkumar

asked on

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
Avatar of ispaleny
ispaleny
Flag of Czechia image

Dim con As New ADODB.Connection
con.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=PutDatabaseHere;Data Source=PutServerHere"
 
Avatar of dvsameerkumar
dvsameerkumar

ASKER

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....
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)

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
Is the SQL Server started?
Are you able to log on server console/TS ?
yes on the server
And are you able to connect to the SQL Server locally?
yes
ASKER CERTIFIED SOLUTION
Avatar of ispaleny
ispaleny
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
dvsameerkumar stoped responding...