Breaking News
Loading...
24/10/2013

Check backup file and run DBCC auto

There is nothing to ensure that your backup could be restored unless you really restore it.

Here is the tip that we can automate the task using PowerShell.

The author has written a PowerShell script, for example:

F:\test-dr.ps1 SourceSQLInstanceName DestinationSQLServerInstanceName F:\


There are total 4 parameter:

  1. The PowerShell Script file path
  2. The Source SQL Server Instance
  3. The Destination SQL Server Instance
  4. The path that we will save the backup files


Refer: https://www.simple-talk.com/sql/database-administration/test-your-sql-server-backups-with-powershell/

And here is the errors I met while trying to run the script and the ways to fix them:
http://devnumbertwo.com/windows-powershell-the-file-is-not-digitally-signed-the-script-will-not-be-executed-on-the-system/
http://sqlmag.com/powershell/sql-server-and-powershell-faqs

0 comments:

Post a Comment

 
Toggle Footer