One of my customers has lost the global temporary table "satmp_request_profile" in their productive SQL Anywhere 1201 database. Now they cannot run our standard logging tools with sa_get_request_profile. Is there a way to recreate this particular table in a way that is compatible with sa_get_request_profile? I did a dummy recreate in my own database with DROP TABLE dbo.satmp_request_profile; CREATE GLOBAL TEMPORARY TABLE IF NOT EXISTS dbo.satmp_request_profile ( stmt_id INTEGER NOT NULL DEFAULT AUTOINCREMENT PRIMARY KEY, uses INTEGER NOT NULL, total_ms INTEGER NOT NULL, avg_ms INTEGER NOT NULL, max_ms INTEGER NOT NULL, prefix LONG VARCHAR NOT NULL ); but the sa_get_request_profile did not fill in the actual data. --Richard |
Your definition is almost correct... you need to add "not transactional" to the table definition. CREATE GLOBAL TEMPORARY TABLE IF NOT EXISTS dbo.satmp_request_profile ( stmt_id INTEGER NOT NULL DEFAULT AUTOINCREMENT PRIMARY KEY, uses INTEGER NOT NULL, total_ms INTEGER NOT NULL, avg_ms INTEGER NOT NULL, max_ms INTEGER NOT NULL, prefix LONG VARCHAR NOT NULL ) NOT TRANSACTIONAL; |