Link to home
Start Free TrialLog in
Avatar of motioneye
motioneyeFlag for Singapore

asked on

sybase command show - values for trans log usage

When I execute below command, sybase show me - values, how do I fix this to make sure sybase reported correct values ?

1> SELECT LCT_ADMIN("logsegment_freepages",12)
2>

 -----------
    -9788580

(1 row affected)
1>
Avatar of troublesaga
troublesaga

I think the correct value can be obtained from sysusage. I can check and tell you the exact query if just sysusage doesn't help.
I am sure this must also be reported correctly on the MDA tables.
There was an ASE bug CR 607448 open on this, but it was closed as unreproducible.  

If you can still reproduce it, could you turn on traceflag 7415, run it again, and post the output?

dbcc traceon(3604,7415)
go
SELECT LCT_ADMIN("logsegment_freepages",12)
go


Have you recently run DUMP TRAN WITH NO_LOG on this database?

You might try again after running dbcc tablealloc(syslogs) in that database.
Avatar of Joe Woodhouse
There's always

   sp_spaceused syslogs
   go

Avatar of motioneye

ASKER

Hi Troublesaga,
sysusages doesn't help me, do u know any iother way to have this report ?
ASKER CERTIFIED SOLUTION
Avatar of grantry
grantry

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can check segmap 4 from sysusages for your dbid to figure out the total size of the transaction log and then LCT_ADMIN('logsegment_freepages', dbid ) to get the space used in number of pages.
Just out of curiousity is there a reason sp_spaceused can't give you what you need?