Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am working on project in which I have used visual c# as front end and sql express 2008 r2 for backhand.

Now I know that sql express database is having data 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 backhand (which i have empty 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..?

thanks in advance..!!
Posted
Comments
Maciej Los 29-Jul-13 8:16am    
Your question is a bit confusing ;(
How do you want to save data integrity?

1 solution

the solution i got it from somebody.. posting here so that somebody if encountered with same situation can get the hint..

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900