怎么样编写程序自动还原数据库,不是手工还原:)

virusshit 2003-08-24 10:43:14
最好要做成发布软件的形式:)
...全文
36 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
hp0773 2003-08-24
  • 打赏
  • 举报
回复
adocommand1.CommandText:='restore database yourdatabase from disk=''d:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\yd.back'' with replace';
try
adocommand1.Execute;
showmessage('恢复成功!');
except
showmessage('恢复失败!');
end;
hp0773 2003-08-24
  • 打赏
  • 举报
回复
adocommand1.CommandText:='restore database yourdatabase fromdisk=''d:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\yd.back'' with replace';
try
adocommand1.Execute;
showmessage('恢复成功!');
except
showmessage('恢复失败!');
end;
lxl 2003-08-24
  • 打赏
  • 举报
回复
备份
BACKUP DATABASE Northwind
TO DISK = 'c:\Northwind.bak'
恢复
RESTORE FILELISTONLY
FROM DISK = 'c:\Northwind.bak'

2,496

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧