sql如何实现数据备份和数据恢复功能?求代码...

2024-11-18 10:28:29
推荐回答(1个)
回答1:

数据库备份,给你看个例子,
'BACKUP DATABASE Test TO DISK=''e:\backup\test_full_A.bak'' WITH INIT'
详细出处参考:http://www.jb51.net/article/24358.htm
数据库恢复:
2、从备份中还原
-------------------------------------------------------------------------
restore headeronly from test_full_A.
restore database test_full_A. from bak1 with file=2 --从完全备份中恢复