Database Shrink | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Database Shrink

Hi, I have a database that is 2.7 gigs. If I look at the physical files,the mdf is 43k and the ldf is 2.6 gigs. I know that I don’t have much data in the database. I’ve tried "shrink" but nothing really changed. How can I "shrink" the ldf ? Is there a dump and reload. Thanks
Real
[email protected]
I think you Recovery Model is Full.
In that case, you have to backup transaction log before shink it.
Check BOL, for differents Recovery Models. Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
Take a look at:http://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=6593
Do you have any database maintenance jobs or DBREINDEX jobs seperately on this database which were scheduled to execute on regular basis? Which version of SQL you’re using if its SQL 7 then the shrink operation is not immediate and it depends on the execution of CHECKPOINT that occurs with BACKUP LOG statement. If its SQL 2000 on the next BACKUP LOG statement execution that will take care. 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.
If you are not doing transaction log backups, and you decide you dont need to keep transaction logs (ie, you are doing a full database backup and are happy to roll back to the most recent backup if needs be)..
You can set your recovery mode to simple. You can then BACKUP LOG … WITH TRUNCATE_ONLY to truncate the log quickly. Note that even in simple mode the logfile size will not be reduced to 0
Wow !!! I’m impressed by all of your responses. However I’m new to SQL Server and everything you are saying is like "Chinese" for me.
We have SQL Server 2000.
What is "Recovery mode" ? Where do I set this thing Thanks
Real
[email protected]
Check BOL (Books Online – its an HTMLHElp file in SQL Server bit of your Start Menu).
Always check BOL first as its a very good reference
Enterprise Manager–> Databases –> YouDatabase –> right click –> Properties –>Options Tab
Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
,…. and for updated books online downlaod fromhttp://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp here. [8D] 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.
]]>