我用了下边这个方法 ,但是还没成功,这是怎么回事啊 ???????--Create the backup device for the full MyNwind backup. USE masterEXEC sp_addumpdevice 'disk', 'MyTempDB_1', 'c:\mssql7\backup\MyTempDB_1.dat'-- Back up the full tempdb database. BACKUP DATABASE tempdb TO MyTempDB_1但是系统却给出下面的提示 : (1 row(s) affected)'Disk' device added. Server: Msg 3147, Level 16, State 1, Line 8 Backup and restore operations are not allowed on database tempdb. Server: Msg 3013, Level 16, State 1, Line 8 Backup or restore operation terminating abnormally.请高手解释一下 ,多谢 !!!!!!!
Server: Msg 3147, Level 16, State 1, Line 8 Backup and restore operations are not allowed on database tempdb. 备份和恢复操作不允许在tempdb数据库上。所以,你改成自己建的数据库再试试,应该可以。 Server: Msg 3013, Level 16, State 1, Line 8 Backup or restore operation terminating abnormally.
CDatabase db;
CString s1;
s1.Format("ODBC;UID=sa;PWD=%s","wei147");
db.Open("odbcname",false,false,s1);
s1.Format("backup database report to disk='e:\\report.bak\\backs.dat'"); //备份到E:\report.bak\backs.dat
db.ExecuteSQL(s1);
恢复:
恢复时用户不能打开要恢复的数据库
CDatabase db1;
s1.Format("ODBC;UID=sa;PWD=%s","wei147");
db1.Open("odbcname",false,false,s1);
s1.Format("restore database report from disk='c:\\report.bak\\backs.dat'");
db1.ExecuteSQL(s1);
db1.Close();
ODBC做的
USE masterEXEC sp_addumpdevice 'disk', 'MyTempDB_1', 'c:\mssql7\backup\MyTempDB_1.dat'-- Back up the full tempdb database.
BACKUP DATABASE tempdb TO MyTempDB_1但是系统却给出下面的提示 :
(1 row(s) affected)'Disk' device added.
Server: Msg 3147, Level 16, State 1, Line 8
Backup and restore operations are not allowed on database tempdb.
Server: Msg 3013, Level 16, State 1, Line 8
Backup or restore operation terminating abnormally.请高手解释一下 ,多谢 !!!!!!!
Backup and restore operations are not allowed on database tempdb.
备份和恢复操作不允许在tempdb数据库上。所以,你改成自己建的数据库再试试,应该可以。
Server: Msg 3013, Level 16, State 1, Line 8
Backup or restore operation terminating abnormally.