Testing connectivity

After the SQL Server client is installed, you can verify whether it can connect to the SQL server.

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

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

  2. In the CMD window, enter either of the following command:

    • For the default instance:

      osql –h172.8.9.63 –Usa –PiMC123
      
    • For a custom instance:

      osql –h172.8.9.63\instancename –Usa –PiMC123
      

    In the previous commands, 172.8.9.63 is the IP address of the SQL server, sa and iMC123 are the username and password of the default superuser, and instancename is the name of the custom instance.

If the SQL command prompt is displayed, you successfully connected to the SQL server and entered the SQL command mode.

Figure 37: Testing connectivity