Unanswered: Varchar data type and current value of proc parameter help
I need help on two problem which I am facing in Ase 12.05.
1.Maximum allowed Varchar data type size is 255 charachters.
I wish to know how can I increase the size of the same or is there any alternative data type like text or long varchar which we have in higher version.My version of sybase is 12.05
2. how to get the current value of the parameters of stored procedure.I dont have monitoring features enabled. I need this for audit purpose. want to keep a record of number of time a procedure was called, the arguments passed during call,starttime and end time.
ad 1) in 12 you can create varchar higher than 255
create table t1 (ch varchar(300)), the maximum size depends on your pagesize;
keep in mind that your whole records must fit in one page - overhead.
ad 2) in higher version you could check the execution via mon tables, but with 12 I would change the procedure and include the statements you need.
create proc my proc
declare @start datetime,@end datetime
SET @start = getdate()
-- do stuff
-- so more stuff
SET @end = getdate()
insert into proc_log (getdate(),@start,@end)
where the proc_log could be something like
create table proc_log (
fid int identity, -- ever increasing value
Thanks for your valuable revert.
Would be great if you can please give me more insight on the same.
I dont have mon table.
I have already implemented the other solution but it is not feasible enough as I have more than 230 procs which accepts more than 7 parameters.
Hence, I need to do something dynamically.
My friend has posted a thread on the similar issue under heading
"Cannot use procedures paramaters dynamically"...I will try to use that solution and get back to you again.