Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 5th, 2003, 08:04 AM
Registered User
 
Join Date: Nov 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Log file

From QA how can I check the present status of log file for a particular database?I want to check weather the log file is full or not?How much percentage it is full?And how can I take any action if the log file is full?
Everything should be done from QA?

Subhasish



 
Old November 6th, 2003, 09:09 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

execute in query Analyzer
to know the Size of Log File
sp_helpdb NameOfDataBase

to shrink search about
DBCC SHRINKDATABASE

Ahmed Ali
Software Developer
 
Old November 7th, 2003, 06:43 AM
Registered User
 
Join Date: Nov 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Mr. Ali
           Thanks.
But sp_helpdb can not give the picture of status about the log file/files.I want to know how much percentage the log file is filled up?
Does DBCC sqlperf(logspace) help me?
How can I take the back up of Log file and then shrink?I want to know thr syntax.
Asish

 
Old November 10th, 2003, 02:30 PM
Authorized User
 
Join Date: Jun 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try to do whatever you want to do with the log files, from "SQL Server Enterprise Manager": right click on the database and select the "All Tasks" / "Shrink Database" context menu. There you can se sizes and percentages.

If you press the "Files..." button on this dialog, you can see sizes and percentages for individual files. You can also shrink files. (i never did it though)

If you want to do all this from QA, you can monitor with "SQL Profiler" to see what happens behind the scenes when you use "Enterprise Manager" to see those sizes and do the shrinking. And look in BOL to find out more about the SQL commands that EM uses when it calculates sizes and shrinks the databases.

defiant.





Similar Threads
Thread Thread Starter Forum Replies Last Post
log file problem MunishBhatia SQL Server 2005 0 October 5th, 2007 04:22 AM
Can't get Log to write the Log.txt file jnbutler BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 3 July 31st, 2007 04:04 AM
backup transaction log file rohit_sant SQL Server 2000 3 September 26th, 2006 11:09 AM
Log file tsimsha Classic ASP Databases 1 April 30th, 2005 04:27 AM
Event log to a text file jackchua BOOK: ASP.NET Website Programming Problem-Design-Solution 2 May 17th, 2004 09:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.