transaction/session id in SE7.2
Posted in 2003
Topics: Stored Procedures & SPL, Server Administration
Hi
I am using InformixSE7.2 (on linux) and have been trying to write a
stored procedure which, amongst other things, gets hold of the session
id. Ideally I would like the current transaction id but I haven't
found out how to get hold of that! This is the first time I've used
Informix so I'll apologise in advance if this is a very basic
question!
Inside my stored procedure I have:
...
define my_id integer;
...
let my_id = dbinfo('sessionid');
...
end procedure;
When I run this in dbaccess I get a syntax error, with the marker
pointing at that final semicolon and the message 554: Syntax
disallowed in this database server.
I have looked at the SQL reference, tutorial and syntax guides for 7.2
and can't see what's wrong - so maybe it is how my db is set up?
If someone can either tell me how to get hold of the transaction id or
sort out this syntax error I'd be super grateful.
TIA
Alex
DBINFO ('sessionid') is only available in the IDS engines
Alex wrote:
>
> Hi
>
> I am using InformixSE7.2 (on linux) and have been trying to write a
> stored procedure which, amongst other things, gets hold of the session
> id. Ideally I would like the current transaction id but I haven't
> found out how to get hold of that! This is the first time I've used
> Informix so I'll apologise in advance if this is a very basic
> question!
>
> Inside my stored procedure I have:
>
> ...
> define my_id integer;
> ...
> let my_id = dbinfo('sessionid');
> ...
> end procedure;
>
> When I run this in dbaccess I get a syntax error, with the marker
> pointing at that final semicolon and the message 554: Syntax
> disallowed in this database server.
>
> I have looked at the SQL reference, tutorial and syntax guides for 7.2
> and can't see what's wrong - so maybe it is how my db is set up?
>
> If someone can either tell me how to get hold of the transaction id or
> sort out this syntax error I'd be super grateful.
>
> TIA
> Alex
--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #