Skip to content

Instantly share code, notes, and snippets.

@rockarts
Created August 9, 2011 22:06
Show Gist options
  • Save rockarts/1135326 to your computer and use it in GitHub Desktop.
Save rockarts/1135326 to your computer and use it in GitHub Desktop.
Builds a restore database script to execute with SQLCMD.
class Restore
def initialize(settings)
@settings = settings
end
def Build()
"#{@settings['sqlcmd']} -E -Q \" RESTORE DATABASE #{@settings['projectname']} FROM DISK = \'#{@settings['database_path']}#{@settings['projectname']}.bak\'\""
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment