Skip to content

Instantly share code, notes, and snippets.

@jjhamshaw
Created August 9, 2012 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjhamshaw/3305817 to your computer and use it in GitHub Desktop.
Save jjhamshaw/3305817 to your computer and use it in GitHub Desktop.
powershell db copy
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