The information in this article applies to:
SUMMARYMicrosoft SQL Server versions 6.0 and 6.5 contain a 32-bit utility called ODBCPING.EXE that you can use to verify connectivity to MS SQL Server through Microsoft ODBC SQL Server drivers. MORE INFORMATION
The Odbcping.Exe utility is used to check whether ODBC and
the Microsoft SQL Server driver are properly installed by
connecting to a server using the ODBC SQL Server Driver.
c:\mssql\binn>odbcping -Sabc -Usa -Pxyz ODBCPING will return the following information on a successful connection: CONNECTED TO SQL SERVER The utility gives you SQL Server and driver version number information. ODBCPING was written with the assumption it would be used to test SQL Server driver data sources. If the /D switch is used to connect to a non-SQL Server driver ODBC data source, ODBCPING will print out the ODBC driver version, but will not print correct server information. If errors are encountered on the connect attempt, ODBCPING will correctly report the errors encountered. For example, issuing the following on a client that has the ODBC SDK sample applications installed: c:\mssql\binn>odbcping -Dsdk21-Access32 -Usa -Pxyz if a successful connect, results in the following output: CONNECTED TO SQL SERVER When the /S switch is specified, ODBCPING, will use the default network library specified in the SQL Client Configuration Utility. When the /D switch is specified, ODBCPING will use the network library defined in the data source. Users wanting to quickly test the basic setup of multiple network libraries can use the SQL Client Configuration Utility to set different network libraries as the default protocol, and test them using ODBCPING with the /S switch. For additional information regarding ODBC SQL Server Connection Parameters, please see the following article in the Microsoft Knowledge Base: Q137635 : INF: ODBC SQL Server Connection Parameters The utility serves as an alternative to the ODBC Test utility in the ODBC SDK package. It helps in loading different network libraries and testing the connectivity through ODBC. It also helps in verifying that the ODBC modules are installed and configured correctly. The limitation, however, is that it cannot be run in a Win16 (for example, Windows 3.1 or Windows for Workgroups) client environment. There is a limitation in using the 6.0 version of the ODBCPING utility to interpret connectivity errors. For example, if the ODBCPING utility is used to try to connect to a server which does not exist in the network, then the pfNative error does not get displayed, so you cannot interpret the actual source of the problem. For more information on interpreting pfNative code reported by connectivity errors, please see the following article in the Microsoft Knowledge Base: Q137634 : INF: ODBC SQL Server Network Messages The scenario can be illustrated by the following example: Using the 6.0 ODBCPING utility on an unsuccessful connection with named pipes reports the following error:
While the same error in the 6.5 ODBCPING returns the following information:
Additional query words: sql6 2.50 odbc windows nt err code
Keywords : kbinterop kbtool SSrvGen |
Last Reviewed: April 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |