Question

I have a SQL Server database which has grown to more than 15GB in the past 5 years. Now my problem is disk space and the time it takes to run daily backups. What I want to know is how can I archive old records and reduce the size of the database without losing data?

Thanks in advance.

Était-ce utile?

La solution

15GB isn't very big and it should be possible to back it up quickly, even without doing anything special. Since disk space is much cheaper than almost any other technical resource - especially developer or DBA time - you need to ask if it's really worth designing an archiving solution, or do you just buy more disks.

More fundamentally, what does "archive" mean to you anyway? If you move the data somewhere else, it will still be taking up space and you will have to buy and maintain that space. Is it acceptable to put it on tape or DVD and forget about it, or will you be asked for it from time to time? If so, how often and what delay is acceptable when a user requests it? Are there any legal regulations that you need to follow? Should the data still be visible in your applications but just stored on a different disk? If so, does splitting the data even make sense?

Autres conseils

I'm looking at a similar problem, how to have "live" data in the main database and "finished" data in a second database.

Our current roll-your-own solution is a custom application to serialize/de-serialize data from the live db to the archive db, giving us two connection strings to access new and old data.

Our investigations into built-in solutions has come up with horizontal partitioning.

http://msdn.microsoft.com/en-gb/library/ms178148%28v=sql.105%29.aspx

Which doesn't limit the view of the data to the users but does allow you to split your data amongst physical disks by date.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top