Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 reduce size of db

Author  Topic 

pmccann1
Posting Yak Master

107 Posts

Posted - 2006-10-04 : 10:32:10
how do i make a database smaller

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-10-04 : 10:34:56
Read about DBCC SHRINKDATABASE in BOL.
Also check the auto-shrink option in database options.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

pmccann1
Posting Yak Master

107 Posts

Posted - 2006-10-04 : 10:39:35
i tried that but i am still getting the error about the primary database being full
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-10-04 : 10:55:16
Please post the scenario..your current machine configuration (OS, SQL Server edition, version etc.), backup strategy implemented, database options set, so that we can guide you more precisely.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

pmccann1
Posting Yak Master

107 Posts

Posted - 2006-10-04 : 11:16:35
SQL7

DATA FILE :
AUTOMATICALLY GROW (5MB)
UNRESTRICTED FILEGROWTH

TRANACTION LOG :
AUTOMATICALLY GROW (1MB)
UNRESTRICTED FILEGROWTH
Go to Top of Page

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2006-10-04 : 11:49:42
What is the original question? Did you start with the error about PRIMARY being full? Or do you need to reclaim diskspace?
Go to Top of Page

pmccann1
Posting Yak Master

107 Posts

Posted - 2006-10-04 : 11:57:47
bit of both to be honest
Go to Top of Page

dboiler1
Starting Member

39 Posts

Posted - 2006-10-04 : 12:11:05
To shrink LDF files do the following:

1. Open SQL Query Analyzer and run the following command:
use dbname
backup log dbname with truncate_only

2. Go to SQL and shrink the db using defaults.

Works great.

Dave

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-10-04 : 14:51:34
"Works great"

See:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Database%20Shrinking,Shrink,Shrinking

for some caveats on using SHRINK.

Kristen
Go to Top of Page
   

- Advertisement -