Have you been ODBCPing with SQL Server?

Learn the syntax and what the command does in Microsoft SQL Server.

Although SQL Server doesn't install the ODBCPing utility by default, you can use this utility to determine if ODBC is functioning correctly. The program is in the x86binn directory of the SQL Server 2000 CD. To install this locally on your server, copy the utility to your <Drive>:Program Files\Microsoft SQL Server\mssqlbinn directory.

The syntax for the odbcping command is:

ODBCPING [-?] | {{-Sserver | -Ddatasource} [-Ulogin] [-Ppassword],

where:

  • S is the server used in the connection;
  • D is the name of the data source;
  • U is the login ID; and
  • P is the password for that ID.

When you enter the command at the command prompt you should see a response similar to the following:

CONNECTED TO SQL SERVER
ODBC SQL Server Driver Version 2000.80.0100
SQL Server Version: Microsoft SQL Server 2000-8.00.100 (Intel x86)
<Date Time>
Copyright (c) 1988-2000 Microsoft Corporation
Etc.

When you use a Data Source Name you access the preset configuration to a server that is specified in the ODBC Data Source application found in the Administrative Tools folder. ODBCPING cannot be used for a default SQL Server installation, as it doesn't work for integrated security connections.


Barrie Sosinsky is president of consulting company Sosinsky and Associates (Medfield MA). He has written extensively on a variety of computer topics. His company specializes in custom software (database and Web related), training and technical documentation.


This was first published in March 2005

Dig deeper on SQL-Transact SQL (T-SQL)

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close