备份日志
backup_log.bat
---------------------
osql -U sa -P 123456 -S localhost -d lgxswfc -i "d:\backup_log.sql"
backup_log.sql
------------
--backup log lgxswfc with no_log #截断不活动日志
--backup log lgxswfc to disk = 'd:\lgxswfc.log.bak' #备份到指定目录
--dbcc shrinkfile(lgxswfc_Log,TRUNCATEONLY) #空间释放给操作系统
--DBCC SHRINKDATABASE(LGXSWFC,NOTRUNCATE) #空间释不放给操作系统
备份数据库
backup_db.bat
------------
osql -U sa -P 123456 -S localhost -i "d:\backup_db.sql"
backup_db.sql
------------
backup database lgxswfc to disk='D:\0713.bak'
阅读(606) | 评论(0) | 转发(0) |