问题描述
目前,我每天都在生成SQL脚本,以获取SQL Azure数据库的备份.我需要使用一些免费软件自动化此过程.我该如何实现?
注意: - 我需要以SQL脚本的形式将备份到某些本地计算机.
推荐答案
选项1:运行一些代码/脚本以备份数据库
您可以使用SQLCMD实用程序运行SQL.
要安排此内容,只需使用Windows任务调度程序.
选项2:使用Azure数据同步
将本地数据库与您的SQL Azure数据库保持同步,例如恒定备份.
Library/Windowsazure/HH456371.aspx
选项3:使用BACPAC
Azure中有一个API可备份您的数据库为BACPAC格式.
Library/Windowsazure/HH335292.aspx
然后,Redgate工具允许您还原到本地SQL Server.
http://www.red-gate.com/products/dba/sql-azure-backup/
编辑
我创建了一个命令行工具,该工具将创建您的数据库的副本,然后使用Azure Management API返回BACPAC:
https://github.com/richorama/richorama/sqledatabasebackup
其他推荐答案
您可以尝试Redgate Azure SQL备份 http://www.red-gate.com/products/dba/sql-azure-backup/
也可以使用任务调度程序进行计划.
我已经写了一些关于如何做到这一点的想法: http://anttitech.wordpress.com/2011/11/11/azure-sql-backup-and-restore-scenarios-using-bacpac-exportimport/
其他推荐答案
SQL Azure数据库不支持SQL Server代理或作业.你可以, 但是,在本地SQL Server上运行SQL Server代理,并 连接到SQL Azure数据库.
来源: http://msdn.microsoft US/Library/Windowsazure/ee336245.aspx
SQL Server代理是Microsoft Windows服务,可执行 计划的管理任务,称为作业...例如 如果您想在每个工作日备份所有公司服务器 小时,您可以自动化此任务.安排备份以进行运行 22:00星期一至星期五
问题描述
Presently i am generating SQL scripts everyday to take the backup of SQL Azure database. I need to automate this process using some freeware. How can i achieve this?
Note:- I need to take the backup in form of SQL Script to some local machine.
推荐答案
Option 1: Run some code/script to backup the database
You could run the SQL using the SQLCMD utility.
http://msdn.microsoft.com/en-us/library/ms162773.aspx
To schedule this, just use the Windows Task Scheduler.
http://msdn.microsoft.com/en-us/library/bb756979.aspx
Option 2: Use Azure Data Sync
Keep a local database in sync with your SQL Azure database, like a constant backup.
http://msdn.microsoft.com/en-us/library/windowsazure/hh456371.aspx
Option 3: Use BacPac
There is an API available in Azure to backup your database to a BACPAC format.
http://msdn.microsoft.com/en-us/library/windowsazure/hh335292.aspx
A RedGate tool then allows you to restore to a local SQL Server.
http://www.red-gate.com/products/dba/sql-azure-backup/
Edit
I have since created a command line tool which will create a copy of your database, and back it up to BacPac using the Azure Management API:
https://github.com/richorama/SQLDatabaseBackup
其他推荐答案
You could try RedGate Azure Sql backup http://www.red-gate.com/products/dba/sql-azure-backup/
That can be also scheduled using Task Scheduler.
I have written some ideas on how to do that: http://anttitech.wordpress.com/2011/11/06/azure-sql-backup-and-restore-scenarios-using-bacpac-exportimport/
其他推荐答案
SQL Azure Database does not support SQL Server Agent or jobs. You can, however, run SQL Server Agent on your on-premise SQL Server and connect to SQL Azure Database.
Source: http://msdn.microsoft.com/en-us/library/windowsazure/ee336245.aspx
SQL Server Agent is a Microsoft Windows service that executes scheduled administrative tasks, which are called jobs...For example, if you want to back up all the company servers every weekday after hours, you can automate this task. Schedule the backup to run after 22:00 Monday through Friday
Source: http://msdn.microsoft.com/en-us/library/ms189237.aspx