A have a database on MS-SQL Server 2008 that is growing a lot, year by year.
What I want to do is: take some data and store in a XML file, and store this file in a table, at the same database.
Is this a good idea? Do you have any idea?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The standard approach is to setup a new database (probably on a different machine) which will be your archive database and run a stored procedure on schedule to move your records to the archive database (only records older that 2 years for example or what is suitable for your business problem). You will have to copy your table’s structure and keep both dbs synchronized. You can include in your sp only the biggest tables, usually only few of them are causing problems.
This way you can still access you archived data in proper manner and run queries against it. Storing the data in xml in your database doesn’t look like a good idea to me, since you will have hard times if you need your old data. Also it will give you a huge overhead on the disk space.