问题: SQL 2008 Express版本不能自动备份怎么办? 解决方案: 通过Windows的计划去实现SQL的备份,做成Backup.BAT文件被调用即可。代码如下: echo ------------------------------ >>C:\backup.log echo Backup Start at %date% %time% >>C:\backup.log reg add "HKEY_CURRENT_USER\Control Panel\International" /v sShortDate /t REG_SZ /d yyyyMMdd /f>nul NET USE Z: /DELETE /Y NET USE Z: \\192.168.0.237\ACCPAC_bak /PERSISTENT:YES net stop "SQL Server (SQLEXPRESS)" >>C:\backup.log md "Z:\%date%" >>C:\backup.log xcopy C:\ACCPAC_SQL_DATA "Z:\%date%" /e /y /r >>C:\backup.log net start "SQL Server (SQLEXPRESS)" >>C:\backup.log echo Backup End at %date% %time% >>C:\backup.log echo ------------------------------ >>C:\backup.log del Z:\backup.log /f copy C:\backup.log Z:\backup.log
|