From the course: Microsoft Azure Database Administrator Associate (DP-300) Cert Prep by Microsoft Press
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Backup and restore a database using T-SQL
From the course: Microsoft Azure Database Administrator Associate (DP-300) Cert Prep by Microsoft Press
Backup and restore a database using T-SQL
- Welcome back. This is Lesson 14.6, "Backup and Restore a Database Using T-SQL." Earlier in this lesson we talked about how to do database backups and restores using the tools. For example, SQL Server Management Studio. This video is about doing database backups and restores using T-SQL. But before we get into the T-SQL, the best way to do backups, database backups and restores with T-SQL, is to actually let the database backup and restore dialogue, write the T-SQL for you. So during the database backup and restore configuration, when you're walking through the wizard to either back up a restore database, there is a script button on the toolbar at the top of the dialogue box. Click that and it gives you different scripting options. Script to a new query window is what we want as that opens up a new query window with the T-SQL in it. Script to file saves the T-SQ to a .SQL file. Script to clipboard copies the generated T-SQL to the clipboard. And script to job creates a new SQL server…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Learning objectives1m 23s
-
(Locked)
Recommend a database backup and restore strategy4m 30s
-
(Locked)
Perform a database backup using database tools5m 24s
-
(Locked)
Perform a database restore using database tools4m 36s
-
(Locked)
Perform a database restore to a point in time4m 10s
-
Configure long-term backup retention3m 13s
-
(Locked)
Backup and restore a database using T-SQL4m 35s
-
(Locked)
Backup and restore to and from cloud storage6m 21s
-
(Locked)
-
-