Skip to content

Instantly share code, notes, and snippets.

@jhauge
Created August 14, 2017 19:23
Show Gist options
  • Save jhauge/811d92149e4422ea07e67dde80091c1b to your computer and use it in GitHub Desktop.
Save jhauge/811d92149e4422ea07e67dde80091c1b to your computer and use it in GitHub Desktop.
# This script pushes the database on to the dbserver in the script
# using the $fileName in arg, and names new database from $dbname in args
param($dbname, $fileName)
$dbserver = 'server.name.domain'
$username = 'username'
$password = 'password'
& sqlpackage /a:import /tsn:"$dbserver" /tdn:"$dbname" /tu:"$username" /tp:"$password" /sf:"$fileName"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment