Skip to content

Automatically restores databases from ola hallengrens backups.

License

Notifications You must be signed in to change notification settings

GregWhiteDBA/MSSQLAutoRestore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

MSSQLAutoRestore

Automatically restores databases from ola hallengrens backups.

Usage: exec dbo.DatabaseRestoreTest @RunCheckDB = 'Y' ,@Database = 'TestDb' ,@BackupPath = 'G:\backups\servername\TestDb' ,@MoveFiles = 'Y' ,@MoveDataDrive = 'X:\Data' ,@MoveLogDrive = 'X:\Logs' ,@TestRestore ='Y'

@RunCheckDb (Y or N) will run Ola's standard dbcc check db and log to commandlog

@Database database name to restore, you can change this if you wanted to restore a different name

@BackupPath the root folder of the backup you want to restore, by default it will try the copy only backup. Still work to do on differentials.

@MoveFiles (Y or N) useful if you are restoring to a test server and want to restore different paths

@MoveDataDrive / @MoveLogDrive if @MoveFiles is Y then it will attempt to restore to these locations

@TestRestore (Y / N) if set to Y then will remove the database after the restore, ideal when testing restores.

About

Automatically restores databases from ola hallengrens backups.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published