Testing connectivity

To test the connectivity between the client and the SQL Server database:

  1. Select Run from the Start menu, and then enter cmd in the Run dialog box.

  2. In the CMD window, enter one of the following commands:

    • For the default instance:

      osql –S 192.168.20.110 –U sa –P iMC123456
      
    • For a named instance:

      osql –S 192.168.20.110\instancename –U sa –P iMC123456
      

    In these commands, 192.168.20.110 is the IP address of the SQL Server database, sa and iMC123456 are the username and password of the default superuser, and instancename represents the named instance.

If the SQL command prompt is displayed, you have connected to the SQL Server database, as shown in Figure 34).

Figure 34: Testing connectivity