SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to continue our SQL agent scheduled daily backup in Azure?


How to continue our SQL agent scheduled daily backup in Azure?

Author
Message
onlo
onlo
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2885 Visits: 638
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.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (511K reputation)SSC Guru (511K reputation)SSC Guru (511K reputation)SSC Guru (511K reputation)SSC Guru (511K reputation)SSC Guru (511K reputation)SSC Guru (511K reputation)SSC Guru (511K reputation)

Group: General Forum Members
Points: 511671 Visits: 44297
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

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
xsevensinzx
xsevensinzx
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10948 Visits: 4170
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!

qur7
qur7
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3025 Visits: 983
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
onlo
onlo
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2885 Visits: 638
qur7 - Tuesday, October 24, 2017 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

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?


ALZDBA
ALZDBA
SSC Guru
SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)

Group: General Forum Members
Points: 71180 Visits: 9210
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


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


- How to prevent a sore throat after hours of presenting ppt ?


press F1 for solution, press shift+F1 for urgent solution :-D


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me Alien but most of the time this is me Hehe
qur7
qur7
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3025 Visits: 983
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
onlo
onlo
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2885 Visits: 638
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" ?
qur7
qur7
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3025 Visits: 983
onlo - Friday, October 27, 2017 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" ?

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.

qur7
qur7
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3025 Visits: 983
onlo - Friday, October 27, 2017 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" ?

Also, how are you doing your export first, using the portal , or from the SSMS tool.?

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search