Jon*_*ood 1 sql-server backup sql-server-express
我正在考虑在 VPS 上安装 SQL Server Express Edition。
我的理解是,在 Express Edition 的限制中,其中一些涉及便于备份的功能。
有人可以解释一些为此配置执行每日备份的选项吗?有没有直接的方法,还是我需要购买额外的软件?
(对不起,如果这个问题看起来很愚蠢。我是一名软件开发人员,根本不是数据库或管理员。)
您最好的选择是使用 ola Hallengren 的实用程序
从常见问题
How do I get started with the SQL Server Maintenance Solution on SQL Server Express?
SQL Server Express has no SQL Server Agent. Therefore, the execution of the stored procedures must be scheduled by using cmd files and Windows Scheduled Tasks. Follow these steps.
Download MaintenanceSolution.sql.
Execute MaintenanceSolution.sql. This script creates the stored procedures that you need.
Create cmd files to execute the stored procedures; for example:
sqlcmd -E -S .\SQLEXPRESS -d master -Q "EXECUTE dbo.DatabaseBackup @Databases = 'USER_DATABASES', @Directory = N'C:\Backup', @BackupType = 'FULL'" -b -o C:\Log\DatabaseBackup.txt
In Windows Scheduled Tasks, create tasks to call the cmd files.
Schedule the tasks.
Start the tasks and verify that they are completing successfully.
Run Code Online (Sandbox Code Playgroud)
另一种选择是使用DBATools Powershell 模块并创建和调度 powershell 脚本。
归档时间: |
|
查看次数: |
49 次 |
最近记录: |