October 16, 2017 at 10:31 pm
Hi, we just migrated our SQL database to Azure.
However, I have no idea how to continue our SQL agent scheduled daily SQL Server database backup in Azure?
Any idea or suggestions?
Thanks.
October 20, 2017 at 5:48 pm
I'm going to bump this one for you because it seems like someone (not me) should be able to answer this off the top of their heads.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2017 at 10:00 pm
This may help, but note, I am mostly using Azure Data Warehouse, which does include Azure SQL Database, it's just uses it as part of the overall infrastructure.
I don't suspect it's much different in terms of backups. In the Azure portal, you have the ability to restore backups. Here is a direct quote from the documentation, on Azure SQL Server which summarizes it up for Azure Data Warehouse too.
Full database backups happen weekly, differential database backups generally happen every few hours, and transaction log backups generally happen every 5 - 10 minutes. 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. For example, the initial backup can take longer on a restored database or a database copy. After the first full backup, all further backups are scheduled automatically and managed silently in the background. The exact timing of all database backups is determined by the SQL Database service as it balances the overall system workload.
How Long?
- Basic service tier is 7 days.
- Standard service tier is 35 days.
- Premium service tier is 35 days.
Essentially, as soon as that database is created, the backups kick off automatically where you may not need to schedule them with an agent job. I do not know if you can adjust these nor schedule your own separately as you are already covered with the standard automated backup plan. I know in the past, you could export these to blob storage and then download them from there. If you need to recover, you should see a "Restore" icon on the main panel for your SQL resource, which will list the oldest and newest restore point. For example, my oldest is 7 days ago for Azure Data Warehouse, where my latest is today (when it was last resumed).
You also have additional backup options like the geo-backups and ability to get longer backup retention within the backup vaults for much longer than 35 days it seems depending on agreement/tiers.
Hope that helps!
October 24, 2017 at 8:14 am
Hi,
So let me take a crack at answering this. Please be mindful that I am no way azure expert here but have worked on it. In Azure, there is two type of databases; Azure DB as a service and Azure VM. Since you have not mentioned which type I will answer both for you.
If you are referring to SQL DB as a service, as mentioned earlier, as soon as DB is created the Backup schedule will kick in automatically by Azure: I believe the schedule has already been mentioned one of the posts above.
For Azure SQL Server VM, you setup your backup backups just like in a on-premises SQL server with scedule jobs or maintinance plans.
Hope it helps.
B
October 25, 2017 at 2:42 am
qur7 - Tuesday, October 24, 2017 8:14 AMHi,
So let me take a crack at answering this. Please be mindful that I am no way azure expert here but have worked on it. In Azure, there is two type of databases; Azure DB as a service and Azure VM. Since you have not mentioned which type I will answer both for you.If you are referring to SQL DB as a service, as mentioned earlier, as soon as DB is created the Backup schedule will kick in automatically by Azure: I believe the schedule has already been mentioned one of the posts above.
For Azure SQL Server VM, you setup your backup backups just like in a on-premises SQL server with scedule jobs or maintinance plans.
Hope it helps.
B
We are using Azure DB.
Today, I got errors when I tried to import (Import Data-tier Application) a BACPAC file generated from my Azure DB to my UAT server (SQL Server 2014, sp2), it says:
"Could not import package.
Waring SQL0: A project which specifiesMicrosoft Azure SQL Database v12 as the target platform may experiencecompatibility issue with SQL Server 2014."
Microsoft says it is an known issue but I don't know how to fix the problem.
https://social.technet.microsoft.com/Forums/WINDOWS/en-US/5b37d868-3106-4358-b7a6-a50d0890f079/sql-azure-import-of-bacpac-does-not-work-after-upgrade-to-v12?forum=ssdsgetstarted
Any idea?
October 25, 2017 at 3:46 am
This is a way where you can copy data to your AzureSQLDB ( provided you've already implemented the schema ) using Powershell
Write-Datatable can be found here https://gallery.technet.microsoft.com/scriptcenter/2fdeaf8d-b164-411c-9483-99413d6053ae
$Q = $('Select * from [{0}].[{1}];' -f $tb.Schema, $tb.Name )
Write-Verbose $('{0} - Reading data from [{1}].[{2}] ;' -f (get-date -Format 'yyyy-MM-dd HH:mm:ss') , $tb.Schema, $tb.Name ) ;
$Result = $db.ExecuteWithResults( $q )
$TsCopy = Get-Date
Write-DataTable -ServerInstance $TargetSQLServerName -Username $TargetUserName -Password $TargetPwd -Database $TargetDbName -TableName $tb.Name -Schema $tb.Schema -Data $Result.tables[0] -BatchSize 1000 ;
$TsCopyEnd = Get-Date
$nSec = (New-TimeSpan -Start $TsCopy -End $TsCopyEnd).TotalSeconds ;
Write-output $('{0} - Table [{1}].[{2}] exported to [{3}].[{4}] - {5} rows - Time needed {6}' -f (get-date -Format 'yyyy-MM-dd HH:mm:ss'), $tb.Schema, $tb.Name , $tb.Schema, $tb.Name, $Result.tables[0].Rows.Count, (get-date (( Get-Date -day 1 –month 1 -year 1900 -Hour 0 -Minute 0 -Second 0 ).addseconds( $nSec )) -format 'HH:mm:ss.fff') ) ;
Primitive, but it does the job.
TEST IT - TEST IT - TEST IT
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
October 25, 2017 at 6:41 am
Hi,
we can try few things. Please download SSMS 2017 version. It will just install the client tool and try the import from there. It has worked in my case.
Thanks
October 27, 2017 at 1:03 am
We use SQL Server Management Studio, version 17.3 but got the error I just mentioned.
Does "SSMS 2017 version" mean "SQL Server Management Studio, version 17.3" ?
October 27, 2017 at 7:57 am
onlo - Friday, October 27, 2017 1:03 AMWe use SQL Server Management Studio, version 17.3 but got the error I just mentioned.
Does "SSMS 2017 version" mean "SQL Server Management Studio, version 17.3" ?
So you are trying to import V12 from azure sql database to sql server 2014 version using client tool SSMS version 17.3? an d yes 17.3 is 2017 client tool.
October 27, 2017 at 8:03 am
onlo - Friday, October 27, 2017 1:03 AMWe use SQL Server Management Studio, version 17.3 but got the error I just mentioned.
Does "SSMS 2017 version" mean "SQL Server Management Studio, version 17.3" ?
Also, how are you doing your export first, using the portal , or from the SSMS tool.?
October 30, 2017 at 9:32 pm
I used SQL Server Management Studio v17.3.
I
October 31, 2017 at 6:27 am
onlo - Monday, October 30, 2017 9:32 PMI used SQL Server Management Studio v17.3.
I
In that case, try the import form SQLPackage.exe... if you have a 64 bit machine download the DACfx for the 64 bit and try the import from there.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply