Solved

DBCC SHRINKDATABASE

Posted on 2006-07-14
2
800 Views
Last Modified: 2012-08-14
Hi

1)      Can I run DBBC SHRINKDATABASE command with users connected to the database to be shrunk?
2)      Any problem with data? Do I need to take a back up before running  DBBC SHRINKDATABASE?
3)      If I don’t have the options NOTRUNCATE/TRUNCATEONLY and I simply run:

DBCC SHRINKDATABASE (mydatabase, 10)

what happens to the files and data?

Thank you
Deepak
0
Comment
Question by:deepakee
[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
2 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17107103
>1)     Can I run DBBC SHRINKDATABASE command with users connected to the database to be shrunk?
yes

>2)     Any problem with data? Do I need to take a back up before running  DBBC SHRINKDATABASE?
no problem with data, you can be paranoid and take a backup

>3)     If I don’t have the options NOTRUNCATE/TRUNCATEONLY and I simply run:
it will try to get the database size down to 10MB, but not force it.

0
 
LVL 43

Accepted Solution

by:
Eugene Z earned 500 total points
ID: 17107124
1.
If a database is full or nearly full, and a large number of the tables in the database do not have clustered indexes, DBCC SHRINKDATABASE command may cause severe performance degradation for SQL Server 2000.
The performance may degrade to the point where queries do not return results in a timely fashion. It takes longer for new connections to connect, resulting in connection timeouts. SQL Server 2000 may appear to stop responding (hang).

2. not required - but fresh backup good to have

3.This example decreases the size of the files in the UserDB user database to allow 10 percent free space in the files of UserDB.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how the fundamental information of how to create a table.
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…

737 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