sql express 2008 r2恢复 [英] sql express 2008 r2 restore
问题描述
我正在开发项目,其中我使用visual c#作为前端和sql express 2008 r2反手。
现在我知道sql express数据库是数据大小限制是10 GB,所以我在达到选择限制时编写了数据库备份代码,并在备份成功后清空数据库。
我想知道什么是恢复备份文件的最佳方法,以便我的当前应用程序反手(我之前已经空了)不应该打扰。
是吗好吧,如果我在我当前的数据库中恢复相同,在这种情况下,我有问题,它是否会影响我的应用程序工作,因为我的应用程序是实时的,每15分钟后。 interval在数据库中存储了一些值。
我是否需要编写其他实用程序来查看旧数据..?
提前感谢.. !!
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..!!
推荐答案
解决方案我从某人那里得到了它...发布在这里以便有人遇到相同的情况可以得到提示..
一个存储实时数据的数据库(当前数据库)。
当涉及到一个大小时,它被转储(或复制mdf + ldf)归档。
并存储时间戳(FROM-TO)。
当需要数据时,相关的mdf作为新的离线数据库附加。
(您可以使用连接字符串将MDF文件附加到SQL Server。)
并使用该连接代替实时连接。
应用程序可以在在线数据库上顺利运行。
读取,加载等时
...
是从临时附件和详细信息完成的ched数据库文件。
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.
这篇关于sql express 2008 r2恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!