使用SQL 2005 SQLEXPRESS免費版時,無SQL Server Agent服務與Agent XPs無法設定排程。
故使用
sqlcmd來備份
f:backup.bat
=======主機名instance
name↓==========
@echo off
sqlcmd -S hostnameSQLEXPRESS -i
f:backup.sql
==========================
f:backup.sql
===========
BACKUP
DATABASE yourdb
TO DISK = 'C:Program FilesMicrosoft SQL
ServerMSSQL.1MSSQLBackupyourdb.bak'
with format
GO
===========
故使用
sqlcmd來備份
f:backup.bat
=======主機名instance
name↓==========
@echo off
sqlcmd -S hostnameSQLEXPRESS -i
f:backup.sql
==========================
f:backup.sql
===========
BACKUP
DATABASE yourdb
TO DISK = 'C:Program FilesMicrosoft SQL
ServerMSSQL.1MSSQLBackupyourdb.bak'
with format
GO
===========
全站熱搜
留言列表