This file contains 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
# Generating config files and using it later as a deployment template | |
New-DBOConfig -Configuration @{ DeploymentMethod = 'SingleTransaction'; SqlInstance = 'devInstance'; Database = 'MyDB' } | Export-DBOConfig '.\dev.json' | |
Get-DBOConfig -Path '.\dev.json' -Configuration @{ SqlInstance = 'prodInstance' } | Export-DBOConfig '.\prod.json' | |
Install-DBOPackage Deploy.zip -ConfigurationFile .\dev.json | |
Install-DBOPackage Deploy.zip -ConfigurationFile .\prod.json | |
# Extract current config from a package | |
Get-DBOPackage Deploy.zip | Export-DBOConfig '.\prod.json' | |
# Use existing configuration from a package and apply it to a different package |
This file contains 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
<?xml version="1.0" ?> | |
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<TargetConnectionString></TargetConnectionString> | |
<ProfileVersionNumber>1</ProfileVersionNumber> | |
<AllowIncompatiblePlatform>True</AllowIncompatiblePlatform> | |
<CreateNewDatabase>False</CreateNewDatabase> | |
<ExcludeObjectTypes>Permissions;RoleMembership</ExcludeObjectTypes> | |
<ExcludeLogins>True</ExcludeLogins> | |
<IgnorePermissions>True</IgnorePermissions> |
This file contains 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
[Cmdletbinding()] | |
Param ( | |
$SourceServer, | |
$TargetServer = $SourceServer, | |
$SourceDatabaseName, | |
$TargetDatabaseName, | |
$Path, | |
$PublishXml = '.\publish.xml', | |
[switch]$IncludeData | |
) |
This file contains 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
Param ( | |
$Server, | |
$Database, | |
$Path, | |
[switch]$IncludeData | |
) | |
# Prepare extraction properties string | |
$exportProperties = "/p:IgnorePermissions=True /p:IgnoreUserLoginMappings=True" # Ignore permissions definition | |
if ($IncludeData) { | |
$exportProperties += " /p:ExtractAllTableData=True" #Extract data |
NewerOlder