Solved

DBCC SHRINKDATABASE

Posted on 2006-07-14
2
795 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 42

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Show RTF format in an SSRS report 3 38
SQL Pivot table 2 42
Logical Operator should return Integer value in SSIS 9 34
access to sql migration 5 22
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

740 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