a VM can not recognize the SQL server running on separate VM
-
Thursday, November 15, 2012 8:00 PM
Hi Guys,
I'm experiencing some problems in configuring SQL Server 2008 R2 SP2 that running on Windows Server 2008 R2 Standard which is basically is a VM not physical one. I am planning to use this SQL for support my company web app which is ASP.NET based. I got some errors and one of them stating that the Virtual server can not contacting the SQL server that actually running on separate virtual one. [slUtilities.SQLQuery(rsExecute)] Cannot open database "SafetyLine Demo" requested by the login. The login failed. when I got this error appeared on the web app server log from the server that running an SQL server but no required database on it (the databases are exists on other VM), I tried to identify what wrong whit this VM and I went to the registry from this machine and I think there are nothing wrong. After that, I went to the other machine that has all required databases on it and changed some permission configuration and I restarted the sql service from this machine, but when I verify the machine from the one that doesnt have any required databases on it, still nothing fixed.
My question is: Is that possible for me configure the sql server and make it enable to communicate with other machine for only gain the required databases but no required databases installed on that machine?
Sorry my English so bad but I hope you can get my point.... a bit frustrating with this problem!
All Replies
-
Friday, November 16, 2012 10:24 AM
Hi Guys,
I'm experiencing some problems in configuring SQL Server 2008 R2 SP2 that running on Windows Server 2008 R2 Standard which is basically is a VM not physical one. I am planning to use this SQL for support my company web app which is ASP.NET based. I got some errors and one of them stating that the Virtual server can not contacting the SQL server that actually running on separate virtual one. [slUtilities.SQLQuery(rsExecute)] Cannot open database "SafetyLine Demo" requested by the login. The login failed. when I got this error appeared on the web app server log from the server that running an SQL server but no required database on it (the databases are exists on other VM), I tried to identify what wrong whit this VM and I went to the registry from this machine and I think there are nothing wrong. After that, I went to the other machine that has all required databases on it and changed some permission configuration and I restarted the sql service from this machine, but when I verify the machine from the one that doesnt have any required databases on it, still nothing fixed.
My question is: Is that possible for me configure the sql server and make it enable to communicate with other machine for only gain the required databases but no required databases installed on that machine?
Sorry my English so bad but I hope you can get my point.... a bit frustrating with this problem!
Yes, you can very well configure your application to communicate to a DB hosted on SQL Instance on a VM.
Once the SQL Instance is up and running on VM - restore\Attach your database.
Make sure you can ping IP OF VM from your application server.
Check if the port is open from all firewalls to be able to communicate. To check if port is open to communicate use Telnet.
To know which port is being used by SQL Server:-
SQL runs on which port: http://www.sqlservergeeks.com/blogs/sarab/sql-server-bi/104/sql-server-runs-on-which-port
find dynamic port being used by SQL:http://www.sqlservergeeks.com/blogs/sarab/sql-server-bi/105/how-to-find-the-dynamic-port-reserved-by-sql-server
Also make sure Browser service is running if you are using Named instance of SQL Server.
Once the connectivity is there your app can communicate to SQL just like it does to any Physically hosted SQL Instance.
Sarabpreet Singh Anand
This posting is provided , "AS IS" with no warranties, and confers no rights.
Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.
- Edited by Sarabpreet Singh AnandMVP Friday, November 16, 2012 10:24 AM
- Marked As Answer by gindo.henry89 Thursday, November 22, 2012 7:00 PM
-
Thursday, November 22, 2012 7:04 PMThanks for your help. I appreciated it!

