当前位置:网站首页>sql server备份以及还原的命令操作
sql server备份以及还原的命令操作
2022-06-29 18:27:00 【Chshyz】
SQL Server Management Studio备份和还原数据库的操作
环境:windows10、已经部署好sql server 2008 R2、能成功连接到数据库;

例如:备份class1数据库
BACKUP DATABASE [class1] TO DISK = N'D:\program files\sql server\MSSQLSERVER\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\class1.bak' WITH NOFORMAT, NOINIT, NAME = N'class1-完整 数据库 备份', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO

备份日志
BACKUP LOG [class1] TO DISK = N'D:\program files\sql server\MSSQLSERVER\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\class2.bak' WITH NOFORMAT, NOINIT, NAME = N'class1-事务日志 备份', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO

还原
RESTORE DATABASE [class1] FROM DISK = N'D:\program files\sql server\MSSQLSERVER\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\class2.bak' WITH FILE = 1, NOUNLOAD, STATS = 10
GO

边栏推荐
- postgis 生成 图形切割
- Sd6.22 summary of intensive training
- 报错[warning] Neural network inference was performed on socket ‘RGB’, depth frame is aligned to socket
- 山东大学项目实训(七)添加导航栏选择城市
- Sister Juan takes you to learn database -- 5-day sprint Day1
- Cannot retrieve repository metadata 处理记录
- PostGIS generate graphic cut
- Us judge ruled that the former security director of Uber accused of covering up hacking must face fraud charges
- Shell基本语法--流程控制
- 【日常训练】535. TinyURL 的加密与解密
猜你喜欢

Cannot retrieve repository metadata processing records

jdbc_ Related codes

报错Failed to allocate graph: MYRIAD device is not opened.

山东大学项目实训(六)点击事件展示折线图

Meta agent model can be migrated to resist attacks

Shandong University project training (VII) add navigation bar to select city

Adobe Premiere基础-不透明度(蒙版)(十一)

Mac: MySQL 66 questions, 20000 words + 50 pictures!

对强缓存和协商缓存的理解

Markdown knowledge comes gently
随机推荐
SD6.25集训总结
第02章_MySQL的数据目录
How to use the low code platform of the Internet of things for service management?
jdbc_相關代碼
MySQL Enterprise Development Specification
[Nanjing University] information sharing of the first and second postgraduate entrance examinations
Anfulai embedded weekly report no. 271: June 20, 2022 to June 26, 2022
6.29模拟赛总结
源码安装MAVROS
行程卡“摘星”热搜第一!刺激旅游产品搜索量齐上涨
Adobe Premiere foundation - sound adjustment (volume correction, noise reduction, telephone tone, pitch shifter, parameter equalizer) (XVIII)
报错[warning] Neural network inference was performed on socket ‘RGB’, depth frame is aligned to socket
山东大学项目实训(七)添加导航栏选择城市
数据分析基础--预测模型
Fluent's MSH grid learning
如何将OAK相机当做网络摄像头使用?
Adobe Premiere基础-不透明度(蒙版)(十一)
Notes on spintronics - zhangshufeng
Weibo comments on high-performance and high availability architecture design (module 5 of architecture practice camp)
RocketMQ的tag过滤和sql过滤