• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1101
  • Last Modified:

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)


(1 row affected)
1 Solution
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)
SELECT LCT_ADMIN("logsegment_freepages",12)

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

You might try again after running dbcc tablealloc(syslogs) in that database.
Joe WoodhousePrincipal ConsultantCommented:
There's always

   sp_spaceused syslogs

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

motioneyeAuthor Commented:
Hi Troublesaga,
sysusages doesn't help me, do u know any iother way to have this report ?
You may fix syslogs table first and re-run your command, fixing syslogs table must in "single user mode"
1. kill all process in the target db
2.use master,sp_dboption 'db_name','single user',true
3.use db, checkpoint
4.SELECT LCT_ADMIN("logsegment_freepages",12)

Hope this may help:)
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.
Joe WoodhousePrincipal ConsultantCommented:
Just out of curiousity is there a reason sp_spaceused can't give you what you need?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now