I am working on project in which I have used visual c# as front end and SQL Server 2008 R2 Express for backend.
Now I know that SQL Server express database has a size limit is of 10 GB, so I have written the code for database backup when pick limit is reached and I empty the database once the backup is successful.
I want to know what will be best approach to restore the backup file so that my current applications backend (which I have emptied earlier) should not be disturb.
Is it okay if I restore the same in my current database, in that case I have question to ask does it affect my applications working, as my application is kind of real time and after every 15 min. interval stored some values in database.
Whether I need to write some other utility for seeing the old data..?
Every day around 50 MB of data is inserted into database, so it will take around 8 months to reach the pick size( as per my rough calculations). and as far as the nature of application is concern user will not going to use archive data frequently. please consider this and suggest me the approach.
thanks in advance..!!
Hope i got your question right, but consider the following suggestion for working:
one database ("Current DB") that stores the real-time data.
when it comes to a size, it is dumped (or copied mdf+ldf) to archive.
and stored with time stamps (FROM-TO).
When data is needed, the relevant mdf is attached as a new "offline" database.
(you can use a connection string to attach MDF file to an SQL Server.)
and use that connection instead of the live one.
The application can run smoothly on the On-line database.
while reading, loading etc...
is done from the temporary attached and detached database files.
Take a look at : Connection String to Connect to .MDF for how to Attach a MDF to SQL Server instance.