?
Solved

DBCC SHRINKDATABASE

Posted on 2006-07-14
2
Medium Priority
?
806 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 2000 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

765 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