Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote Access to Sql Server failing

Status
Not open for further replies.

V2008

Programmer
Sep 11, 2008
37
US
Win XP and SQL Server 2005
I have following settings:
1)SQL Server Service is running under local system
2)Protocols for MSSQLServer
Shared memory enabled
Named Pipes enabled
TCP/IP enabled
via disabled
SQL Native Client Configuration
Client Protocols
Shared Memory enabled
TCP/IP enabled
Named Pipes enabled
VIA enabled
3)Firewall is enabled
4)Exceptions to windows firewall
Add Program SqlServr.exe(MSSQL.1)
Add Program SqlServr.exe(MSSQL.3)
Add Port Sql server TCP/IP 1433
Add Port SQL server Browser UDP 1434


I tried two different Connecting strings in code to access database from remote machine, both are failing
L"Provider=SQLOLEDB.1;Data Source=XXX.XXX.X.X,1433;Network Library=DBMSSOCN;Initial Catalog=Test;User ID=sa;Password=XXXXXX;"

OpenFromInitializationString(L"Provider=SQLOLEDB.1;Integrated Security=SSPI;User Id=sa;Password=XXXXXX;Persist Security Info=False;Initial Catalog=Test;Data Source=XXX.XXX.X.X;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False");

What am I missing?


 
What error are you getting?

"I'm living so far beyond my income that we may almost be said to be living apart
 
PLease tell me you aren't allowing access from your application using sa. Very very bad practice. sa has full admin rights, you do not want your users to have that kind of access.

I agree with hmckillop, what error are you getting.



"NOTHING is more important in a database than integrity." ESquared
 
Offcourse I am not using sa. This was just a test program.
Later on I found I could not ping from that machine.

I have not spend time afterwards.

I will get back if still it will not work.

Thank you for all your posts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top