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 | |
( | |
[Parameter(Mandatory=$true)] | |
[string]$ProductionDB = $null, | |
[Parameter(Mandatory=$true)] | |
[string]$AcceptanceDB = $null, | |
[Parameter(Mandatory=$true)] | |
[string]$DatabaseServer = $null | |
) |
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 | |
( | |
[Parameter(Mandatory=$true)] | |
[string]$PackageFilePathPattern = $null, | |
[Parameter(Mandatory=$true)] | |
[string]$DatabaseServer = $null, | |
[Parameter(Mandatory=$true)] | |
[string]$DatabaseName = $null, | |
[Parameter(Mandatory=$false)] | |
[string]$DatabaseUserName = $null, |
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 | |
( | |
[Parameter(Mandatory=$true)] | |
[string]$PackageFilePathPattern = $null, | |
[Parameter(Mandatory=$true)] | |
[string]$DatabaseDeploymentResourcesPath = $null, | |
[Parameter(Mandatory=$true)] | |
[string]$DatabaseServer = $null, | |
[Parameter(Mandatory=$true)] | |
[string]$DatabaseName = $null, |
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 | |
( | |
[Parameter(Mandatory=$true)] | |
[string]$TargetDatabaseServer = $null, | |
[Parameter(Mandatory=$true)] | |
[string]$TargetDatabaseName = $null, | |
[Parameter(Mandatory=$false)] | |
[string]$TargetDatabaseUserName = $null, | |
[Parameter(Mandatory=$false)] | |
[string]$TargetDatabasePassword = $null, |
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 | |
( | |
[Parameter(Mandatory=$true)] | |
[string]$PackageFilePathPattern = $null, | |
[Parameter(Mandatory=$true)] | |
[string]$DatabaseServer = $null, | |
[Parameter(Mandatory=$true)] | |
[string]$DatabaseName = $null, | |
[Parameter(Mandatory=$false)] | |
[string]$DatabaseUserName = $null, |
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
# VSTS Redgate Build step does not have a field for DLM Dashboard integration | |
# However, by running this PS script after your build step you can register the package | |
# Replace localhost with the DLM Dashboard server | |
# If using a different port be sure to modify below | |
# Make sure the NuGet package will match whatever version numbers you are using in your build step | |
# Set the working directory of the powershell script to the VCS root, where the plugin creates the NuGet package. | |
$package = Import-DlmDatabasePackage –Path SqlServerCentral1.0.$env:BUILD_BUILDID.nupkg | |
Publish-DlmDatabasePackage $package –DlmDashboardUrl http://localhost:19528 |
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
# Script created 11/11/2016 by Alex Yates of DLM Consultants | |
# Shared freely, but a beer would be appreciated if you find this useful and we are ever in the same pub | |
# Full documentation for Redgate DLM Automation PowerShell cmdlets at: | |
# https://documentation.red-gate.com/display/DLMA2/Cmdlet+reference | |
# Variables (fill these in) | |
# Required - the location of your source code | |
$scriptsFolder = "C:\where\is\your\DB\source\code" | |
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
PRINT N'Creating TwilightSparkle database' | |
CREATE DATABASE TwilightSparkle | |
GO | |
USE TwilightSparkle | |
GO | |
PRINT N'Creating TwilightSparkle objects:' | |
PRINT N'Creating [dbo].[tblTheSame]' | |
CREATE TABLE [dbo].[tblTheSame] | |
( | |
[Numbers] [int] NULL, |
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
# This script uses cmdlets from Redgate DLM Automation, which is part of the SQL Toolbelt | |
# Documentation for these cmdlets is available at: | |
# https://documentation.red-gate.com/display/DLMA2/Cmdlet+reference | |
$sourceCode = "Documents/Ponies_dev/state" | |
$twilightSparkleDb = New-DlmDatabaseConnection -ServerInstance "myServer\myInstance" -Database "TwilightSparkle" | Test-DlmDatabaseConnection | |
$filterPath = "Documents\Ponies_dev\filters\TwilightSparkle.scpf" | |
Sync-DlmDatabaseSchema -Source $sourceCode -Target $twilightSparkleDb -filterPath $filterPath |
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
/****** Object: Table [dbo].[tblOnBothButDifferent] Script Date: 24/11/2016 13:58:43 ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE TABLE [dbo].[tblOnBothButDifferent]( | |
[Numbers] [INT] NULL, | |
[Words] [NVARCHAR](50) NULL, |