Created
August 9, 2012 16:49
-
-
Save jjhamshaw/3305817 to your computer and use it in GitHub Desktop.
powershell db copy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task BackupTestToQaDatabase { | |
try { | |
Invoke-Sqlcmd -InputFile $copySqlDatabase -ServerInstance $sqlserver -Database $databaseToBackUp -Username $databaseUsername -Password $databasePassword -QueryTimeout 240 -ErrorAction 'Stop' | |
} catch { | |
'##teamcity[buildStatus status='FAILURE' text='Build Failed']' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment