Solved

SQL database  reducing database size

Posted on 2014-09-10
3
62 Views
Last Modified: 2015-03-11
We have a SQL database that is about to suck up the whole hard drive space.  We have identified tables we can remove and will do that.  The database is 180 gig.  My question:  after we delete tables, how best to recover disk space.  I have read about shrink and there seems to be some major pitfalls.  If I reduce DB by 40% how long will shrink take?  will reindexing help with fragmentation?  I need space for the transaction log file.  Please assist.

Thank you,
0
Comment
Question by:BUCKBERG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Accepted Solution

by:
Thomas Grassi earned 500 total points
ID: 40315089
1. Backup your database Full and transaction log files
2. create a new database same tables
3. Export the original database
4. Import into new database.
5. detach original database
6. delete the database files
7. rename new database to the original database name

Try shrink first to see what happens.

Always make a backup of the database and transaction log files before doing any of the above.
0
 
LVL 81

Expert Comment

by:David Johnson, CD, MVP
ID: 40315116
backup regularly to reduce the log files.. deleting tables is not really an alternative .. Disk space is cheap these days give it more space.
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 40315308
Which table(s) are the big ones?

Can you compress any large tables?  [Only Enterprise Edition (or Developer)]

Can you archive some data to another location?

Are the large table(s) on different filegroups?

Maybe?: ?Can you move any tables, such as log tables, to a slower, and there less expensive, storage?
0

Featured Post

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
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…

717 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