备份
-- Create the backup device for the full MyNwind backup.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_2',
'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_2.dat'--Create the log backup device.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwindLog1',
'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwindLog1.dat'-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_2-- Update activity has occurred since the full database backup.-- Back up the log of the MyNwind database.
BACKUP LOG MyNwind
TO MyNwindLog1
-- Create the backup device for the full MyNwind backup.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_2',
'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_2.dat'--Create the log backup device.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwindLog1',
'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwindLog1.dat'-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_2-- Update activity has occurred since the full database backup.-- Back up the log of the MyNwind database.
BACKUP LOG MyNwind
TO MyNwindLog1
解决方案 »
- 求教一个SQL问题 请大家围观
- 请教一个sql问题高手帮帮忙!!!!!!
- 删除表中重复的记录
- 我能通过SQL2000的LOG文件(*.ldf)把数据库还原到几天前的样子吗?谢谢
- 数据库可以继承吗
- 在sql-server里,如何把字段中的部分文字替换成指定文字
- 你们的多媒体数据库是怎么弄的?放在数据库里还是放在数据库外面?
- SqlDumpExceptionHandler: 进程 55 发生了严重的异常 c0000005 EXCEPTION_ACCESS_VIOLATION。SQL Server 将终止该进程。
- 存储过程处理速度问题?
- 请教win98&win2000的数据安全问题? 能满意答复者给300分!(顺便要告诉我如何加分?)
- 牛人门,请问在单文挡应用中如何用ado建立与sqlserver连接;ado控件怎么用
- 在企业管理其中打不开数据库?
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();
VC++ODBC做的