Solved

sybase command show - values for trans log usage

Posted on 2010-08-13
7
1,015 Views
Last Modified: 2012-05-10
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>
0
Comment
Question by:motioneye
7 Comments
 
LVL 1

Expert Comment

by:troublesaga
ID: 33432727
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.
0
 
LVL 10

Expert Comment

by:bret
ID: 33434175
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.
0
 
LVL 24

Expert Comment

by:Joe Woodhouse
ID: 33440672
There's always

   sp_spaceused syslogs
   go

0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:motioneye
ID: 33451983
Hi Troublesaga,
sysusages doesn't help me, do u know any iother way to have this report ?
0
 
LVL 1

Accepted Solution

by:
grantry earned 500 total points
ID: 33509005
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:)
0
 
LVL 1

Expert Comment

by:troublesaga
ID: 33575151
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.
0
 
LVL 24

Expert Comment

by:Joe Woodhouse
ID: 33575172
Just out of curiousity is there a reason sp_spaceused can't give you what you need?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now