使用C#备份和还原Azure SQL数据库 [英] Backup and restore of Azure sql database using c#

查看:75
本文介绍了使用C#备份和还原Azure SQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Azure sql数据库备份到本地系统,然后将该备份还原到c#中的Azure sql数据库.有人可以帮我吗?有可能这样做吗?

I want to take backup of Azure sql database to my local system and then restore that backup to Azure sql database in c#. Can any body helps me out?Is it possible to do so?

推荐答案

Azure SQL数据库不支持按需创建.bak文件. Azure SQL DB 自动备份所有数据库使用本机备份使您能够及时将数据库还原到数据库保留期内的任何时间点.但是,这些备份不会公开,因此无法复制到本地系统.若要实现所需的功能,可以使用DACFx将BACPAC文件从Azure SQL数据库导出到本地系统,也可以将其从本地系统导入到SQL Azure数据库中. 本文可能是的帮助.

Azure SQL Database does not support creating .bak files on-demand. Azure SQL DB automatically backups up all databases using native backups to enable you to Point-in-Time restore your database to any point in time within the databases retention period. However, these backups are not exposed and cannot be copied to the local system. To achieve what you want you can export a BACPAC file from a Azure SQL database to the local system using DACFx and also import it into a SQL Azure database from the local system. This article may be of help.

这篇关于使用C#备份和还原Azure SQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆