Skip to Content
0

SYBASE IQ - Caching service or being able to set Session Variables

Feb 21 at 09:57 AM

37

avatar image

I would like to be able to set some application level configuration static data at the session level or global variables so that this data is available to any stored proc and eliminate some database access for these static data.

Is there a way of achieving this?

Thank you.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Avinash Kothare Feb 22 at 04:26 PM
0

If you want to pass information within a session from procedure to procedure or one batch to another you can use temporary table(s).

Make sure that you create temprary table with name specific to session with date and time stamp and then drop them when you disconnect.

Tables can be with columns and column types totally to suite your requirements.

In ASE (SAP/Sybase RDBMS) temporary tables created with # (hash/pound) sign are dropped by housekeeper task.

Not sure if SAP/Sybase IQ follows similar practice.

HTH

Avinash

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you Avinash.

I do not wish to pass data from one procedure to the other. I would like create some data and make it available to all the procedure very similar to 'Global Variables' or cached data. I am trying to avoid accessing database for very static data.

Regards

0
Tayeb Hadjou
Feb 26 at 02:15 PM
0

>In ASE (SAP/Sybase RDBMS) temporary tables created with # (hash/pound) sign are dropped by housekeeper task.

Same syntax works in SAP IQ. It creates local temporary tables. Once user connection ended, the local temp table is dropped.

https://help.sap.com/viewer/a8937bea84f21015a80bc776cf758d50/16.1.1.0/en-US/a619764084f21015b8039a8346dc622c.html

Be aware of this create temporary table option:

ON COMMIT {Delete | preserve} Rows: By default, the rows of a temporary table are deleted on COMMIT.

Share
10 |10000 characters needed characters left characters exceeded