?
Solved

sybase command show - values for trans log usage

Posted on 2010-08-13
7
Medium Priority
?
1,078 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

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 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hey fellow admins! This time, I have a little fairy tale for you. As many tales do, it starts boring and then gets pretty gory. I hope you like it. TL;DR: It is about an important security matter, you should read it if you run or administer Windows …
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 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