0

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"?

dsolimano
  • 1,320
  • 2
  • 14
  • 26
Klaus
  • 31
  • 2

1 Answers1

2

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.

dsolimano
  • 1,320
  • 2
  • 14
  • 26
  • Hej thank you. But how can I find out the name? (dbserver01.example.com) of the other system/db? – Klaus Mar 07 '12 at 15:48
  • Presumably since you set up both servers, you know each of their names, no? – dsolimano Mar 07 '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 08 '12 at 07:17
  • and there is a db "testdb" in DBSERVER... but I cannot just type DBSERVER.testdb – Klaus Mar 08 '12 at 07: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 08 '12 at 10:33
  • Glad to hear it. I see you're new to ServerFault - if an answer solves your problem, you should "Accept" it by clicking on the check mark under the voting arrows to the left of the question. – dsolimano Mar 08 '12 at 13:05