Solved

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

Posted on 2007-03-27
3
1,325 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
Comment Utility
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
Comment Utility
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
Comment Utility
Dont forgot to take regular backups of your Log
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

772 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

14 Experts available now in Live!

Get 1:1 Help Now