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
 General SQL Server Forums
 New to SQL Server Programming
 Reducing size of DB

Author  Topic 

velliraj
Yak Posting Veteran

59 Posts

Posted - 2008-07-24 : 03:23:04
Hi,
Our audit database is exceeding its size, we need to reduce the size.
I tried to shrink it by using this query
dbcc shrinkdatabase (iiswebappauditdb ,10)
but it is not working, because data actually occupies the space.
Please provide the solution.

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-07-24 : 03:25:55
if you want less data in your database why not archive old data into a seperate location?

Em
Go to Top of Page

velliraj
Yak Posting Veteran

59 Posts

Posted - 2008-07-24 : 05:43:12
Please explain how to archive the data from existing data base to other location
please help me on this we r facing severe prob.
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-07-24 : 05:47:46
well firstly it would be a business decision as to how much historical data to keep. if they insist on keeping the old data you can either add more space to cope with it or archive it and maintain it seperately. but again any archiving policy should surely be driven by business requirement?

if they don't require you to keep it all.... simply delete anything older than required.

What are the business rules here? how much do you need to keep?

Em
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2008-07-24 : 09:24:17
quote:
Originally posted by velliraj

Please explain how to archive the data from existing data base to other location
please help me on this we r facing severe prob.



I'm assuming "we r facing severe prob" means low on available disk??? Being reactive to something like this is not the best pratice. You need to proactively monitor your data, your resources and your processes to eliminate matters like this. Unless you had a recent, rare large data load, you should've seen this coming long before it became critical. elancaster gave you the proper direction for archiving or deleting data. It's all based on your business needs.

Do you have additional partitions on the server where you can move the data file(s) or maybe the log file? Is the log overgrown because you don't back it up (assuming full recovery mode)? Do you simply have the database set to not auto-grow but you do have available disk?

Terry
Go to Top of Page
   

- Advertisement -