dbcc sqlper(logspace) | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

dbcc sqlper(logspace)

Hello When i make this instruction ;I see huge log database (log 12 G)
(log space used%)=99%
How do you do to empty this logfile and after shrink logfile
without disturb production environement
Thank you
Regards
BACKUP LOG WITH NO_LOG or TRUNCATE_ONLY and books online refers:
NO_LOG | TRUNCATE_ONLY

Removes the inactive part of the log without making a backup copy of it and truncates the log. This option frees space. Specifying a backup device is unnecessary because the log backup is not saved. NO_LOG and TRUNCATE_ONLY are synonyms. After backing up the log using either NO_LOG or TRUNCATE_ONLY, the changes recorded in the log are not recoverable. For recovery purposes, immediately execute BACKUP DATABASE.
Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Yes, Shrink willnot release the free space to OS. Trucate log after you do Shrink operation, You will get your log in MB size . Happy trucation !!!! <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ /> .<br /><br /><br />Once i had asked one query. How can we find log file usage from QA . I need output like<br />Total size :12GB<br />used :4GB .I never found any solution to this . Any one hav any idea ?<br /><br />rajiv<br />NewBie-23
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by gkrishn</i><br /><br />Yes, Shrink willnot release the free space to OS. Trucate log after you do Shrink operation, You will get your log in MB size . Happy trucation !!!! <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ /> .<br /><br /><br />Once i had asked one query. How can we find log file usage from QA . I need output like<br />Total size :12GB<br />used :4GB .I never found any solution to this . Any one hav any idea ?<br /><br />rajiv<br />NewBie-23<br /><hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote"><br /><br />Hi,<br />Provides statistics about the use of transaction-log space in all databases.<br />DBCC SQLPERF ( LOGSPACE )<br />this also server the same purpose<br />sp_helpdb yrdbname — returns space occupy for given db,creteddate,dbid,collation etc<br /><br /><br />Regards<br /><br /><br /><br />hsGoswami<br />[email protected]<br />"Humans don’t have Caliber to PASS TIME , Time it self Pass or Fail Humans" – by Hemant Goswami<br />
If you need a tailor-made output then you must use query to access sytem tables which is discouraged by MS in this case, so stick to the pre-supplied SPs. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>