odbcping Utility

Command Prompt Utilities

Command Prompt Utilities

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[\instance_name]
            | -Ddata_source
        }
        [-Ulogin_id]
        [-Ppassword]
    ]

Arguments

/?

Displays the odbcping syntax diagram.

-Sserver_name

Is the instance of Microsoft® SQL Server™ 2000 to connect to. Specify server_name to connect to the default instance of SQL Server 2000 on that server. Specify server_name\instance_name to connect to a named instance of SQL Server 2000 on that server. The connection is made without testing any ODBC data source.

-Ddata_source

Is the name of an ODBC data source defined to use the 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 displays the version of the SQL Server ODBC driver and the version of the instance of SQL Server to which it connected.

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

The odbcping utility is not installed by SQL Server 2000 Setup. The utility can be found in the x:\x86\Binn directory on the SQL Server 2000 compact disc.

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