odbcping Utility

The odbcping utility tests the integrity of an ODBC data source and the ability of the client to connect to a server.

Syntax

odbcping [/?] |
             [{ -Sserver_name | -Ddata_source } [-Ulogin_id] [-Ppassword ] ]

Arguments
/?
Displays the odbcping syntax diagram.
-Sserver_name
Is the name of a server to connect to. The connection is made without testing any ODBC data source.
-Ddata_source
Is the name of an ODBC data source defined to use the Microsoft® SQL Server™ ODBC driver. odbcping verifies that the data source is correct by using it to connect to the server named in the data source.
-Ulogin_id
Is a valid login ID for the server.
-Ppassword
Is the password for login_id.
Remarks

If the connection is successful, odbcping also displays the version of the SQL Server ODBC driver and the SQL Server to which it connected.

If the connection attempt fails, odbcping displays the error messages it receives from the SQL Server ODBC driver.

Examples
A. Verify connecting through a data source by using odbcping

odbcping /DMyDSN /Usa /PsaPassWord

  

B. Verify connecting directly to a server by using odbcping

odbcping /SMyServer /Usa /PsaPassWord

See Also

Connecting to a SQL Server Data Source


(c) 1988-98 Microsoft Corporation. All Rights Reserved.