We recently had our Citrix server crash unexpectedly. When it came back up, there was a new issue -- every ODBC connection fails with "Catastrophic Failure" (0x8000FFFF). The issue is limited to Citrix / ICA connections; logging in as the same user via RDP works as usual.
The following code is my minimal test case (for wscript):
''// test_odbc.vbs
strConn = "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\files\;"
Set rs = CreateObject("ADODB.recordset")
strSQL = "SELECT * FROM myFile.csv"
wscript.echo "Press OK to Test"
''// This line breaks over Citrix, but not over Terminal Services
''// ----------------------
rs.open strSQL, strConn, 3,3
''// ----------------------
wscript.echo rs("a")
Any insight would be greatly appreciated.
Windows Server 2003 SP1, Citrix MetaFrame Presentation Server 4.0.
Clients include at least versions 10.2-11 running on 2000-Vista, OS X. ODBC error happens whether a DSN is used or not, on at least Access, MS-SQL, and CSV. Connections both through the SSL Gateway and directly. There have been a few users actually able to log in without trouble, but I can't pin down anything special about them.
Here is the ODBC trace of where things go bad. A good run and a bad run look identical, except that the bad run stops between the enter and exit of SQLDriverConnectW (and some of the repeating hex identifiers are different each time).
AppName 2adc-1f6c ENTER SQLAllocEnv
HENV * 4BFEF838
AppName 2adc-1f6c EXIT SQLAllocEnv with return code 0 (SQL_SUCCESS)
HENV * 0x4BFEF838 ( 0x02911c18)
AppName 2adc-1f6c ENTER SQLGetEnvAttr
SQLHENV 02911C18
SQLINTEGER 201 <unknown>
SQLPOINTER [Unknown attribute 201]
SQLINTEGER 4
SQLINTEGER * 0x0012DA2C
AppName 2adc-1f6c EXIT SQLGetEnvAttr with return code 0 (SQL_SUCCESS)
SQLHENV 02911C18
SQLINTEGER 201 <unknown>
SQLPOINTER [Unknown attribute 201]
SQLINTEGER 4
SQLINTEGER * 0x0012DA2C (1465596)
AppName 2adc-1f6c ENTER SQLAllocEnv
HENV * 4BFEF83C
AppName 2adc-1f6c EXIT SQLAllocEnv with return code 0 (SQL_SUCCESS)
HENV * 0x4BFEF83C ( 0x02911cc0)
AppName 2adc-1f6c ENTER SQLSetEnvAttr
SQLHENV 02911CC0
SQLINTEGER 201 <unknown>
SQLPOINTER [Unknown attribute 201]
SQLINTEGER -6
AppName 2adc-1f6c EXIT SQLSetEnvAttr with return code 0 (SQL_SUCCESS)
SQLHENV 02911CC0
SQLINTEGER 201 <unknown>
SQLPOINTER [Unknown attribute 201]
SQLINTEGER -6
AppName 2adc-1f6c ENTER SQLAllocConnect
HENV 02911CC0
HDBC * 0012E63C
AppName 2adc-1f6c EXIT SQLAllocConnect with return code 0 (SQL_SUCCESS)
HENV 02911CC0
HDBC * 0x0012E63C ( 0x02911d68)
AppName 2adc-1f6c ENTER SQLGetInfoW
HDBC 02911D68
UWORD 10 <SQL_ODBC_VER>
PTR 0x0012E608
SWORD 22
SWORD * 0x00000000
AppName 2adc-1f6c EXIT SQLGetInfoW with return code 0 (SQL_SUCCESS)
HDBC 02911D68
UWORD 10 <SQL_ODBC_VER>
PTR 0x0012E608
SWORD 22
SWORD * 0x00000000
AppName 2adc-1f6c ENTER SQLSetConnectAttrW
SQLHDBC 02911D68
SQLINTEGER 103 <SQL_ATTR_LOGIN_TIMEOUT>
SQLPOINTER 0x0000000F
SQLINTEGER -6
AppName 2adc-1f6c EXIT SQLSetConnectAttrW with return code 0 (SQL_SUCCESS)
SQLHDBC 02911D68
SQLINTEGER 103 <SQL_ATTR_LOGIN_TIMEOUT>
SQLPOINTER 0x0000000F (BADMEM)
SQLINTEGER -6
AppName 2adc-1f6c ENTER SQLDriverConnectW
HDBC 02911D68
HWND 00000000
WCHAR * 0x4BF78088 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x4BF78088
SWORD 2
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>
------ This is where the trace of failed connections ends -------
AppName 2adc-1f6c EXIT SQLDriverConnectW with return code 1 (SQL_SUCCESS_WITH_INFO)
HDBC 02911D68
HWND 00000000
WCHAR * 0x4BF78088 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x4BF78088
SWORD 2
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>
DIAG [01000] [Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to 'db_name'. (5701)
DIAG [01000] [Microsoft][ODBC SQL Server Driver][SQL Server]Changed language setting to us_english. (5703)
.... and the good run keeps going for a long ways ...