hai,
I am working on ASP.NET 2003 with SQLServer2000. My application requires to be connected to the Database which is there in my Headoffice.
My SQLServerName is "MyDBServer\TestDB"
Database Name is "WebTO", UserID="******" and Password="******"
My Remote Server IP Address is "192.168.1.2" and its Static IP is "58.93.61.235"
I have specified the Connection string for my Remote Server as
"Provider=SQLOLEDB.1;Server=58.93.61.235\TestDB;UID=******;PWD=******;Database=WebTO"
(or)
"Provider=SQLOLEDB.1;Server=58.93.61.235\TestDB,1433;UID=******;PWD=******;Database=WebTO" (1433 is the Port number of the Remote SQLServer)
but it is giving the error " SQL Server does not exist or access denied".
if i execute the same application at my Headoffice (Remote Server) by changing the Connection string as
"Provider=SQLOLEDB.1;Server=192.168.1.2\TestDB;UID=******;PWD=******;Database=WebTO"
then, it is working fine.
Can anyone tell me where i went wrong or what i have to specify in my Connection string so that i can access my Remote Database Server.
Thanks in Advance,
Srinivas.
try
server=192.168.1.2,1433 ................... hope it will work
|||
192.168.1.2,1433 is also not working.
But, i don't know how can we access the Remote Server just by giving the IP without giving it's static IP.
|||did u try with the static ip
58.93.61.235,1433
My friend it seems that u aren't aware of my previos post where i have clearly mentioned that i have already tested with Static IP, 58.93.61.235,1433 but it is giving the error "SQL Server doesn't exist or access denied".
|||Hi Srinivas,
have you enabled remote connections on your sql server? one more thing why are you specifying provider=SQLOLEDB?
do take a look at this link >>>>http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_22604523.html, under the threadhttp://forums.asp.net/t/1118398.aspx
migth be helpful to you
thanks,
satish.
|||Hi Satish,
Thanks for ur reply.
Remote Connections on my SQL Server option is already in Enabled state. ( "Allow other SQL Servers to connect remotely to this SQL Server using RPC" check box is already in Checked state.)
And Regarding Provider=SQLOLEDB, when i am using OLEDB object, i need to provide the Provider information right?
And the link which u had given is asking to get registered in that site which is not a Free site.
Thank you.
Srinivas.
|||Hi,
The IP (192.168...) works because you are in LAN. Each machine can be connected with each other and the IP of the remote machine is setting to "192.168..." (You can useipconfig -all to check it in command prompt.) You can't use Query Analyzer to connect the romote database by your static IP neither. So, just assign your machine with your static IP and have a try.
Thanks.
No comments:
Post a Comment