Azure SQL数据库-为什么自动备份仍然不可用 [英] Azure SQL Database--Why auto backup still not available

查看:89
本文介绍了Azure SQL数据库-为什么自动备份仍然不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Azure SQL数据库10/25/2018 3:44:46 PM.超过24小时后,备份仍然无法恢复.

I created an Azure SQL Database 10/25/2018 3:44:46 PM. After over 24 hours backup is still not available to restore.

以下代码证明该数据库存在.

Following code proves that the database exist.

--> Get-AzureRmSqlDatabase `
    -ResourceGroupName $resourceGroupName `
    -ServerName $primaryServerName `
    -DatabaseName $pirmarydatabaseName 


ResourceGroupName             : edwpoctaiob
ServerName                    : productionedwpoc
DatabaseName                  : proddatabase
Location                      : eastus2
DatabaseId                    : 
Edition                       : Premium
CollationName                 : SQL_Latin1_General_CP1_CI_AS
CatalogCollation              : 
MaxSizeBytes                  : 5368709120
Status                        : Online
CreationDate                  : 10/25/2018 3:43:56 PM
CurrentServiceObjectiveId     : 00000000-0000-0000-0000-000000000000
CurrentServiceObjectiveName   : P1
RequestedServiceObjectiveName : P1
RequestedServiceObjectiveId   : 
ElasticPoolName               : 
EarliestRestoreDate           : 10/25/2018 3:44:46 PM
Tags                          : 
ResourceId                    : /subscriptions/xxxx/resourceGroups/edwpoctaiob/providers/Microsoft.Sql/servers/productionedwpoc/databases/proddatabase
CreateMode                    : 
ReadScale                     : Disabled
ZoneRedundant                 : False
Capacity                      : 125
Family                        : 
SkuName                       : Premium
LicenseType                   : 

但是备份仍然不可用.

--> Get-AzureRmSqlDatabaseGeoBackup `
    -ResourceGroupName $resourceGroupName `
    -ServerName $primaryServerName `
    -DatabaseName $pirmarydatabaseName
Get-AzureRmSqlDatabaseGeoBackup : 40647: Subscription 'xxxx' does not have the server 'productionedwpoc'.
At line:1 char:1
+ Get-AzureRmSqlDatabaseGeoBackup `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureRmSqlDatabaseGeoBackup], CloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Sql.Backup.Cmdlet.GetAzureRMSqlDatabaseGeoBackup

我什至通过GUI进行了检查,当我选择备份作为源时,该数据库不会显示.

I even checked via GUI and when I select the backup as source this database does not show up.

令人惊讶的是,如果我在其他服务器上运行此命令,则可以获得相同数据库的副本.

Surprisingly if I run this command on my other server I can get a copy of the same database. 

CREATE DATABASE Database2 AS COPY OF productionedwpoc.proddatabase;

问题:

  1. 为什么备份在24小时后仍然不可用?
  2. 当我通过TSQL进行复制时,备份来自哪里?

推荐答案

Hello,

You may be asking yourself, when automated backups should occur?

"Full database backups are created weekly, differential database backups are generally created every 12 hours, and transaction log backups are generally created every 5 - 10 minutes, with the frequency based on the performance level and amount of database activity. The first full backup is scheduled immediately after a database is created. It usually completes within 30 minutes, but it can take longer when the database is of a significant size"

https://docs.microsoft.com/zh-CN/azure/sql-database/sq l-database-automated-backups#how-to-ten-do-backups-happen

Source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-automated-backups#how-often-do-backups-happen


Try the following PowerShell cmdlet to get the earliest restore point: If you don’t get a restore point from the day you created the database, then contact Azure support.

Get-AzureRmSqlDatabaseRestorePoints -ResourceGroupName "resname" `


    -ServerName "yourservername" -DatabaseName "yourDBName"

 

When you perform a copy database the copy workflow does not restore from an automated backup but the data comes directly from the source database. Read comments on the following StackOverflow thread:

https://stackoverflow.com/questions/52610295/copy-database-on-azure-without-performance-jump
 
  

Hope this helps.

SQLCoffee.com

Alberto Morillo
SQLCoffee.com


这篇关于Azure SQL数据库-为什么自动备份仍然不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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