What are the challenges you face when working across database platforms? Take the survey

An error occurred while creating a temporary database

swinghouseswinghouse Posts: 120 Bronze 2
edited December 7, 2015 4:43AM in DLM Automation

In the past we've used Octopus Deploy plus SQL Automation Pack to deploy database changes to target SQL Servers. We're now migrating to SQL Release. Everything works fine on a test server but alas not on the production server - unfortuntately I didn't discover this until it was too late, i.e. when we needed to deploy database changes to production. (I had to resort to deploying via SQL Compare GUI - takes me back to database deployments of youre :) ).

What happens is that the Create Database step in our Octopus database deployment project fails with the following error description (taken from the deployment log in Octopus):
10:06:06 Info | VERBOSE: C:Program Files (x86)Red GateDLM Automation Suite
10:06:06 Info | 1SCSQLCompare.exe ended with exit code 126
10:06:11 Error | New-DatabaseRelease : SQLCompare.exe terminated with the exit code 126: Failed
10:06:11 Error | due to a SQL Server error.
10:06:11 Error | SQLCompare.exe produced this error output:
10:06:11 Error | Error: Comparison of 'Scripts.1jm431wj.i12' and 'Scripts.uebeooto.hey' failed:
10:06:11 Error | An error occurred while creating a temporary database.
10:06:11 Error | At C:Octopus TentacleWork20151117090338-967Script.ps1:54 char:12
10:06:11 Error | + $release = New-DatabaseRelease -Target $targetDB `
10:06:11 Error | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10:06:11 Error | + CategoryInfo : NotSpecified: (:) [New-DatabaseRelease], Termina
10:06:11 Error | tingException
10:06:11 Error | + FullyQualifiedErrorId : CompareSQLServerError,RedGate.SQLRelease.PowerSh
10:06:11 Error | ell.Commands.NewDatabaseReleaseCommand
10:06:11 Error | The remote script failed with exit code 1

What could be wrong?

Software versions:
Octopus Deploy v.
DLM Automation Suite v.
SQL Release v.



  • Options

    Do you have LocalDB installed alongside SQL Release? SQL Release will try and use LocalDB by default, so I'd double check that the user account running SQL Release has permissions to connect to LocalDB. You could try adding -Verbose to the SQL Release command to see if it provides any additional information.

    Another approach would be to use an instance of SQL Server for the temporary database. If you want to go down that route then you need to add the -TemporaryDatabaseServer switch, followed by a connection string. For example...
    -TemporaryDatabaseServer "Data Source=temp01"
    Software Engineer
    Redgate Software
  • Options
    swinghouseswinghouse Posts: 120 Bronze 2
    Hello Robert,

    I switched to a SQL Server instance for the temporary database. That resolved the issue for me.

    Thank you for the help!

Sign In or Register to comment.