Solved

SQL 2000 database -  How to shrink and what to expect.

Posted on 2007-03-27
3
1,333 Views
Last Modified: 2008-01-09
Microsoft SQL 2000 database on Server 2003

My support people told me to "shrink my database".  I know how to perform this action but would like to know what to expect and what I should consider before doing this action as I have never done it on a live database.  I have only done this to static access databases.  I have 160G free on my server.

My database is currently 115G and should be around 30G.  My .ldf file ballooned from a normal of around 5G to 85G.  So I called the people who support the application which I am running and their support people said to shrink the database after a good backup.  My backup executed successfully last night.

1. Is shrinking a database this big going to eliminate access to the database for an extended period of time?
2. When I do shrink the database what options are recommended:
           Maximum free space in files after shrinking:  "default is 0%"
           Move pages to beginning of file before shrinking "unchecked"
           
3. Also is it recommended to leave the main database alone   .mdf and only shrink the .ldf file?
0
Comment
Question by:Sean Meyer
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 18800309
it seems like you are not backing up the log files, this is really a mistake unless you are ready to face the conseqquences once your db/system crashes.  in order to reclaim the spaces, use

http://sqlserver2000.databases.aspfaq.com/how-do-i-reclaim-space-in-sql-server.html
0
 
LVL 9

Author Comment

by:Sean Meyer
ID: 18800867
Thank you for that article!

Out of the 88G of space being allocated to the .ldf file only 320MB actually had data.

0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 18801135
Dont forgot to take regular backups of your Log
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

813 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

9 Experts available now in Live!

Get 1:1 Help Now