Solved

sybase command show - values for trans log usage

Posted on 2010-08-13
7
1,069 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
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 

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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Article by: Justin
In light of the WannaCry ransomware attack that affected millions of Windows machines, you might wonder if your Mac needs protecting. Yes, it does and here is how to do it.
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

696 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