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

asked 20 Jun '13, 04:48

rlindner's gravatar image

rlindner
31113
accept rate: 0%

edited 20 Jun '13, 08:39

Mark%20Culp's gravatar image

Mark Culp
23.0k9129270


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;
permanent link

answered 20 Jun '13, 08:42

Mark%20Culp's gravatar image

Mark Culp
23.0k9129270
accept rate: 40%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×36
×11

question asked: 20 Jun '13, 04:48

question was seen: 566 times

last updated: 20 Jun '13, 08:42