Solved

sybase command show - values for trans log usage

Posted on 2010-08-13
7
1,030 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Facing problems with you memory card? Cannot access your memory card? All stored data, images, videos are lost? If these are your questions...than this small article might help you out in retrieving your lost or inaccessible data.
Cloud-based technologies and services will continue to grow in popularity in 2017 thanks to the simple, scalable and cost-effective solutions they deliver. Here are three areas where cloud adoption is poised to really take off.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

10 Experts available now in Live!

Get 1:1 Help Now