Solved

sybase command show - values for trans log usage

Posted on 2010-08-13
7
1,052 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Clean up a mailbox 5 161
Time optimization for insert/update in ultralite. 3 133
Could you give me a guidance on how to be actualized in Power Builder? 3 67
SQL Query Syntax 12 91
IT certifications are a concrete representation of continual learning on the part of the candidate.  Continual learning is necessary for the long term success of an IT professional, but are IT certifications the right path for you?
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

791 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