Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

In the past, I always installed SQL Server on the same machine as the server application that would be using it.

Now for the first time I need to install a MS SQL Server 2008 R2 DB instance on a separate system. One system has only the DB and another has everything else, but using the first system as a DB server. I installed Windows Server 2008 R2 in a VM and then duplicated it, and I will install SQL Server 2008 R2 on one of them.

Now i want to test the connectivity to the DB server from the other server. At first I just want to ping it. Then I would like to check that the other system can access the DB. Is it possible to "ping" the DB? Just to know "OK, I'm able to get access to the other system with the SQL Server 2008 R2 DB so now I can install Sharepoint or whatever I want"?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Install SQL Server Client Tools on the server without SQL Server installed, and use the osql utility to connect to the other machine. For example:

osql -E -S dbserver01.example.com -Q "SELECT TOP 10 * FROM sysobjects"

Here is the osql reference.

share|improve this answer
    
Hej thank you. But how can I find out the name? (dbserver01.example.com) of the other system/db? –  Klaus Mar 7 '12 at 15:48
    
Presumably since you set up both servers, you know each of their names, no? –  dsolimano Mar 7 '12 at 16:16
    
there is a standardinstallation and you get the standardname. I think the db server name must be "DBSERVER" but that not enough ^^ –  Klaus Mar 8 '12 at 7:17
    
and there is a db "testdb" in DBSERVER... but I cannot just type DBSERVER.testdb –  Klaus Mar 8 '12 at 7:36
    
Wait its working. I just have to type DBSERVER and then I have access to the other system db. Sry I tought thats too easy. Well its working... –  Klaus Mar 8 '12 at 10:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.