INF: Reading ODBC SQL Server Driver Network MessagesID: Q137634
|
This article discusses the meaning of the various pieces of information returned to SQLError if the Microsoft ODBC SQL Server driver encounters a network error when communicating with SQL Server, and how this information can offer insight into the cause of the problem.
If the Microsoft ODBC SQL Server driver encounters a network problem when communicating with SQL Server, it will return SQL_ERROR to the ODBC function call. If the application then calls SQLError, the driver will return information similar to the following:
szSqlState = "01000"
pfNativeError = 2
szErrorMsg = "[Microsoft][ODBC SQL Server Driver][dbnmpntw]
ConnectionOpen (CreateFile())"
The pfNative code and szErrorMsg string contain information that can
give you clues about the nature of the underlying network problem.
dbnmpntw - Win32 Named Pipes
dbmssocn - Win32 Winsock TCP/IP
dbmsspxn - Win32 SPX/IPX
dbmsvinn - Win32 Banyan Vines
dbmsrpcn - Win32 Multi-Protocol (Windows RPC)
dbnmp3 - Win16 Named Pipes
dbmssoc3 - Win16 Winsock TCP/IP
dbmsspx3 - Win16 SPX/IPX
dbmsvin3 - Win16 Banyan Vines
dbmsrpc3 - Win16 Multi-Protocol (Windows RPC)
Q116401 INFO: OS/2 SQL Server Run-Time and OS Error Codes
szSqlState = "01000"
pfNativeError = 2
szErrorMsg = "[Microsoft][ODBC SQL Server Driver][dbnmpntw]
ConnectionOpen (CreateFile())"
This indicates that the network error was received from the named pipe API function CreateFile.
If you reference Knowledge Base article Q116401, you
will see that this indicates the pfNative value of 2 is a 'File not found' error.
szSqlState = "01000"
pfNativeError = 1753
szErrorMsg = "[Microsoft][ODBC SQL Server Driver][dbmsrpcn]
ConnectionOpen (RpcEpResolveBinding())"
This indicates that the network error was received from the RPC API function RpcEpResolveBinding.
If you reference WINERROR.H, you will see that this indicates the pfNative value of 1753 is an
EPT_S_NOT_REGISTERED, or an 'Endpoint not registered' error.
szSqlState = "01000"
pfNativeError = 10061
szErrorMsg = "[Microsoft][ODBC SQL Server Driver][dbmssocn]
ConnectionOpen (connect())"
This indicates that the network error was received from the Winsock API function connect. If
you reference the Windows Socket Specification, you will see that this indicates the pfNative
value of 10061 is an WSAECONNREFUSED, or a 'Connection Refused' error.Additional query words: 2.5 sql6 windows nt
Keywords : kbother SSrvErr_Log SSrvProg
Version : winnt:6.0,6.5
Platform : winnt
Issue type :
Last Reviewed: June 30, 1999