Can anyone please help me..... I have my application running on a server and have two databases - one running on the same server where my app resides and other db running on another server.....
I have following details :
VPN connection:
Host : example.ex.com
user id : ex1
password : exxx
sqlserver connection:
Host : temp.ex.com
user id : tmp1
password : tmmmm
And I connected to the VPN and use the following connection string to access the database:
then I successfully get access to that databse....
But when I disconnect the VPN connection, I am not getting access to that databse using the above connection string.
can anyone please help me to solve this issue........I want to connect to that remote database even if I am not connected to that remote server over VPN....what changes I need to made in the connection string??? help me please.........
Please, make sure you are providing the IP Address instead of host name.
Data Source=190.190.200.100;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
When you use a VPN connection to access a SQL Server from a different network, and that SQL Server requires Windows Authentication, you present your 'hall pass', but the remote SQL Server contacts its' own network DC, and that DC does not know or trust your
'hall pass' since it had nothing to do with your initial login and verification.
Have the network admins on the remote set up a 'Trust' relationship between the Domains, where their DC will 'trust' the credentials ('hall pass') from your network. (This choice is a difficult one to push through the various levels of bureaucracies (for
good reasons).
Configure the Remote SQL Server to allow SQL Server authentication, and create a Login/Password on the remote server. Connect using that Login/Password.
Alternatively:
The work around for this is to use runas /user:"Domain\userid" /netonly "c:\program files\microsoft sql server\100\tools\binn\vsshell\common7\ide\ssms.exe"
In the next step it will ask for password and start the SSMS application. Then you can connect to the database in the windows authentication mode itself.
Yes I think so, and you can get one the way Decker Dong... has suggested. Please make sure that you are rights, contact the concerned Adminstrator Or DBA
if you do not have enough rights...
itsjp
Member
24 Points
103 Posts
connection string to get connected over VPN connetced server
Nov 19, 2012 04:45 AM|LINK
Hi,
Can anyone please help me..... I have my application running on a server and have two databases - one running on the same server where my app resides and other db running on another server.....
I have following details :
VPN connection:
Host : example.ex.com
user id : ex1
password : exxx
sqlserver connection:
Host : temp.ex.com
user id : tmp1
password : tmmmm
And I connected to the VPN and use the following connection string to access the database:
<add name="tmpCon" connectionString="Data Source=temp.ex.com;Database=tmpdatabase;User ID=tmp1;Password=tmmmm;" />
then I successfully get access to that databse....
But when I disconnect the VPN connection, I am not getting access to that databse using the above connection string.
can anyone please help me to solve this issue........I want to connect to that remote database even if I am not connected to that remote server over VPN....what changes I need to made in the connection string??? help me please.........
aarsh
Participant
1543 Points
428 Posts
Re: connection string to get connected over VPN connetced server
Nov 19, 2012 05:30 PM|LINK
Please, make sure you are providing the IP Address instead of host name.
Data Source=190.190.200.100;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
When you use a VPN connection to access a SQL Server from a different network, and that SQL Server requires Windows Authentication, you present your 'hall pass', but the remote SQL Server contacts its' own network DC, and that DC does not know or trust your 'hall pass' since it had nothing to do with your initial login and verification.
Alternatively:
The work around for this is to use runas /user:"Domain\userid" /netonly "c:\program files\microsoft sql server\100\tools\binn\vsshell\common7\ide\ssms.exe"
In the next step it will ask for password and start the SSMS application. Then you can connect to the database in the windows authentication mode itself.
Here are some relative posts:
http://stackoverflow.com/questions/2970673/connecting-to-sql-server-2005-on-another-domain-through-vpn-connection
http://www.sqlservercentral.com/Forums/Topic533415-1291-1.aspx#bm533510
http://dbaspot.com/ms-sqlserver/218788-sql-connection-over-vpn.html
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=57799
---
Please mark this post as an anwer if it solves your issue.
itsjp
Member
24 Points
103 Posts
Re: connection string to get connected over VPN connetced server
Nov 19, 2012 09:43 PM|LINK
Hi,
How do I get the IP address of that HostName??? IP address of that sqlserver???
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: connection string to get connected over VPN connetced server
Nov 20, 2012 12:24 AM|LINK
Hello,
Please click "Start" and turn to "Run", enter "cmd" and then ipconfig. You can see your IP address of your own.
And
Just ask your administrator about that.
For more configuration, you can see this:
http://forums.asp.net/t/1859580.aspx
aarsh
Participant
1543 Points
428 Posts
Re: connection string to get connected over VPN connetced server
Nov 21, 2012 05:42 AM|LINK
Yes I think so, and you can get one the way Decker Dong... has suggested. Please make sure that you are rights, contact the concerned Adminstrator Or DBA if you do not have enough rights...
Good luck