Skip to content

Instantly share code, notes, and snippets.

@cmb69

cmb69/SQL.LOG

Created Feb 6, 2020
Embed
What would you like to do?
ODBC trace example
79217 2584-124c ENTER SQLSetEnvAttr
SQLHENV 0x0000000000000000
SQLINTEGER 201 <SQL_ATTR_CONNECTION_POOLING>
SQLPOINTER 2 <SQL_CP_ONE_PER_HENV>
SQLINTEGER 0
79217 2584-124c EXIT SQLSetEnvAttr with return code 0 (SQL_SUCCESS)
SQLHENV 0x0000000000000000
SQLINTEGER 201 <SQL_ATTR_CONNECTION_POOLING>
SQLPOINTER 2 <SQL_CP_ONE_PER_HENV>
SQLINTEGER 0
79217 2584-124c ENTER SQLAllocEnv
HENV * 0x000001D05B46F280
79217 2584-124c EXIT SQLAllocEnv with return code 0 (SQL_SUCCESS)
HENV * 0x000001D05B46F280 ( 0x000001D059ABA2B0)
79217 2584-124c ENTER SQLAllocConnect
HENV 0x000001D059ABA2B0
HDBC * 0x000001D05B46F288
79217 2584-124c EXIT SQLAllocConnect with return code 0 (SQL_SUCCESS)
HENV 0x000001D059ABA2B0
HDBC * 0x000001D05B46F288 ( 0x000001D059ABA390)
79217 2584-124c ENTER SQLConnectW
HDBC 0x000001D059ABA390
WCHAR * 0x000001D059AB2AA0 [ -3] "test\ 0"
SWORD -3
WCHAR * 0x00007FFB99FF21C0 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x00007FFB99FF21C0 [ -3] "******\ 0"
SWORD -3
79217 2584-124c EXIT SQLConnectW with return code 1 (SQL_SUCCESS_WITH_INFO)
HDBC 0x000001D059ABA390
WCHAR * 0x000001D059AB2AA0 [ -3] "test\ 0"
SWORD -3
WCHAR * 0x00007FFB99FF21C0 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x00007FFB99FF21C0 [ -3] "******\ 0"
SWORD -3
DIAG [01000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Der Datenbankkontext wurde in "TutorialDB" geändert. (5701)
DIAG [01000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Changed language setting to us_english. (5703)
79217 2584-124c ENTER SQLAllocHandle
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 0x000001D059ABA390
SQLHANDLE * 0x000001D05B458DE0
79217 2584-124c EXIT SQLAllocHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 0x000001D059ABA390
SQLHANDLE * 0x000001D05B458DE0 ( 0x000001D05E2D1EF0)
79217 2584-124c ENTER SQLGetInfoW
HDBC 0x000001D059ABA390
UWORD 8 <SQL_FETCH_DIRECTION>
PTR 0x00000024ECBFCEA4
SWORD 4
SWORD * 0x00000024ECBFCE00
79217 2584-124c EXIT SQLGetInfoW with return code 0 (SQL_SUCCESS)
HDBC 0x000001D059ABA390
UWORD 8 <SQL_FETCH_DIRECTION>
PTR 0x00000024ECBFCEA4 ( 0xCCCCCCCC000000BF)
SWORD 4
SWORD * 0x00000024ECBFCE00 (4)
79217 2584-124c ENTER SQLSetStmtOption
HSTMT 0x000001D05E2D1EF0
UWORD 6 <SQL_CURSOR_TYPE>
SQLPOINTER 3 <SQL_CURSOR_STATIC>
79217 2584-124c EXIT SQLSetStmtOption with return code 0 (SQL_SUCCESS)
HSTMT 0x000001D05E2D1EF0
UWORD 6 <SQL_CURSOR_TYPE>
SQLPOINTER 3 <SQL_CURSOR_STATIC>
79217 2584-124c ENTER SQLExecDirect
HSTMT 0x000001D05E2D1EF0
UCHAR * 0x0000100000269EA8 [ -3] "SELECT name FROM bug79217\ 0"
SDWORD -3
79217 2584-124c EXIT SQLExecDirect with return code 0 (SQL_SUCCESS)
HSTMT 0x000001D05E2D1EF0
UCHAR * 0x0000100000269EA8 [ -3] "SELECT name FROM bug79217\ 0"
SDWORD -3
79217 2584-124c ENTER SQLNumResultCols
HSTMT 0x000001D05E2D1EF0
SWORD * 0x000001D05B458DF0
79217 2584-124c EXIT SQLNumResultCols with return code 0 (SQL_SUCCESS)
HSTMT 0x000001D05E2D1EF0
SWORD * 0x000001D05B458DF0 (1)
79217 2584-124c ENTER SQLColAttribute
SQLHSTMT 0x000001D05E2D1EF0
SQLSMALLINT 1
SQLSMALLINT 1011 <SQL_DESC_NAME>
SQLPOINTER 0x000001D05B45C140
SQLSMALLINT 256
SQLSMALLINT * 0x00000024ECBFCC84
SQLPOINTER [Unknown attribute 1011]
79217 2584-124c EXIT SQLColAttribute with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x000001D05E2D1EF0
SQLSMALLINT 1
SQLSMALLINT 1011 <SQL_DESC_NAME>
SQLPOINTER 0x000001D05B45C140
SQLSMALLINT 256
SQLSMALLINT * 0x00000024ECBFCC84 (4)
SQLPOINTER [Unknown attribute 1011]
79217 2584-124c ENTER SQLColAttribute
SQLHSTMT 0x000001D05E2D1EF0
SQLSMALLINT 1
SQLSMALLINT 2 <SQL_DESC_CONCISE_TYPE>
SQLPOINTER 0x0000000000000000
SQLSMALLINT 0
SQLSMALLINT * 0x0000000000000000
SQLPOINTER 0x000001D05B45C250
79217 2584-124c EXIT SQLColAttribute with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x000001D05E2D1EF0
SQLSMALLINT 1
SQLSMALLINT 2 <SQL_DESC_CONCISE_TYPE>
SQLPOINTER 0x0000000000000000
SQLSMALLINT 0
SQLSMALLINT * 0x0000000000000000
SQLPOINTER 0x000001D05B45C250 (4294967287) <unknown>
79217 2584-124c ENTER SQLColAttribute
SQLHSTMT 0x000001D05E2D1EF0
SQLSMALLINT 1
SQLSMALLINT 1013 <SQL_DESC_OCTET_LENGTH>
SQLPOINTER 0x0000000000000000
SQLSMALLINT 0
SQLSMALLINT * 0x0000000000000000
SQLPOINTER [Unknown attribute 1013]
79217 2584-124c EXIT SQLColAttribute with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x000001D05E2D1EF0
SQLSMALLINT 1
SQLSMALLINT 1013 <SQL_DESC_OCTET_LENGTH>
SQLPOINTER 0x0000000000000000
SQLSMALLINT 0
SQLSMALLINT * 0x0000000000000000
SQLPOINTER [Unknown attribute 1013]
79217 2584-124c ENTER SQLBindCol
HSTMT 0x000001D05E2D1EF0
UWORD 1
SWORD 1 <SQL_C_CHAR>
PTR 0x000001D05B458E40
SQLLEN 51
SQLLEN * 0x000001D05B45C248
79217 2584-124c EXIT SQLBindCol with return code 0 (SQL_SUCCESS)
HSTMT 0x000001D05E2D1EF0
UWORD 1
SWORD 1 <SQL_C_CHAR>
PTR 0x000001D05B458E40
SQLLEN 51
SQLLEN * 0x000001D05B45C248 (0)
79217 2584-124c ENTER SQLExtendedFetch
HSTMT 0x000001D05E2D1EF0
UWORD 1 <SQL_FETCH_NEXT>
SQLLEN 1
SQLULEN * 0x00000024ECBFCD88
UWORD * 0x00000024ECBFCDA4
79217 2584-124c EXIT SQLExtendedFetch with return code 0 (SQL_SUCCESS)
HSTMT 0x000001D05E2D1EF0
UWORD 1 <SQL_FETCH_NEXT>
SQLLEN 1
SQLULEN * 0x00000024ECBFCD88 (1)
UWORD * 0x00000024ECBFCDA4 (0)
79217 2584-124c ENTER SQLFreeStmt
HSTMT 0x000001D05E2D1EF0
UWORD 1 <SQL_DROP>
79217 2584-124c EXIT SQLFreeStmt with return code 0 (SQL_SUCCESS)
HSTMT 0x000001D05E2D1EF0
UWORD 1 <SQL_DROP>
79217 2584-124c ENTER SQLDisconnect
HDBC 0x000001D059ABA390
79217 2584-124c EXIT SQLDisconnect with return code 0 (SQL_SUCCESS)
HDBC 0x000001D059ABA390
79217 2584-124c ENTER SQLFreeConnect
HDBC 0x000001D059ABA390
79217 2584-124c EXIT SQLFreeConnect with return code 0 (SQL_SUCCESS)
HDBC 0x000001D059ABA390
79217 2584-124c ENTER SQLFreeEnv
HENV 0x000001D059ABA2B0
79217 2584-124c EXIT SQLFreeEnv with return code 0 (SQL_SUCCESS)
HENV 0x000001D059ABA2B0
<?php
$db = odbc_connect('test', 'sa', 'test');
$res = odbc_exec($db, "SELECT name FROM bug79217");
var_dump(odbc_fetch_array($res));
odbc_close($db);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment