html会话创建于,创建 HTTP 会话

create service "session"

type 'raw'

authorization off

user DBA

as call sp_session();

create or replace procedure sp_session()

begin

declare body long varchar;

declare sesid long varchar;

declare newsesid long varchar;

declare createtm timestamp;

declare lastaccesstm timestamp;

select connection_property('sessionid') into sesid;

if HTTP_VARIABLE('delete') is not null then

call sa_set_http_option('SessionID', null );

set body = '

Deleted ' || sesid

|| 'Start Again';

select body;

end if;

if sesid = '' then

set newsesid = set_session();

create variable request_count int;

set request_count = 0;

set body = '

Created sessionid ' || newsesid

|| ' Enter into Session';

else

select connection_property('sessionid') into sesid;

set request_count = request_count +1;

select connection_property('sessioncreatetime') into createtm;

select connection_property('sessionlasttime') into lastaccesstm;

set body = '

Session ' || sesid || ''

|| 'created ' || createtm || ''

|| 'last access ' || lastaccesstm || ''

|| '

REQUEST COUNT is '|| request_count || '


'

|| ' Enter into Session'

|| ' Delete Session';

end if;

select body;

end;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值