Hi All,
Somewhat new to the (DevOps) game and have been handed a TFS/Team City/Redgate platform to work on.
The first issue that we have is (but I believe that it apples to other projects as well) a database deployment to an existing DB (what I would term as a Merge only applying the updates).
The error that we are receiving is
Use-DlmDatabaseRelease :Pre-Update schema check failed: The schema in the Database Release object (created at ) and database ‘db_name’ on server ‘servername’ are different, or static data is different.
At C:\Octopus…\script.ps1:59 char:1
+Use-DlmDatabaseRelease $DlmImport -DeployTo $databaseConnection -SkipPostUpdateS…
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidResult : ( [Use-DlmDatabaseRelease], TerminatingException
- FullyQualifiedErrorId : SchemasAndStaticDataAreNotIdentical,RedGate.SQLRelease.Powershell.Commands.UseDlmDatabaseReleaseCommand
I have tried the different options with the Use-DlmDatabaseRelease (-Skippre and -skippost in various combinations) with errors being generated no matter what I do.
I have however been able to get the following to run in a separate Powershell
$dbcon = New-DlmDatabaseConnection -ServerInstance ‘Servername’ -Database ‘db_name’
$package = ‘D:\Octopus\Packages\db_name.database\db_name.Database.10267.146.nupkg’
$release = New-DlmDatabaseRelease -Target $dbcon -Source $package
Sync-DlmDatabaseSchema -Source $release.Source - Target $dbcon
I make a change on the target data in a table that is linked to static data - run the above script - then check the target and the data has been corrected - so it works
However, why doesn’t the Use-dlmdatabaserelease commandlet work?
A colleague has said there was something about binary columns (and there is a varbinary in the schema) causing the compare to fail but I am unable to find any reference to this.
Apologies for posting this here as I know it is a RedGate issue - I have tried joining their forums but something has gone adrift and I cant post or log in?? and I have seen that RedGate are active on here
Thanks in advance for any help given
Steve
PS - The platform I am working on has no Internet connectivity so getting any logs in and out will be extremely laborious