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

Error using New-DlmDatabaseRelease cmdlet...

ewomackewomack Posts: 15
edited October 13, 2016 11:05AM in DLM Automation
UPDATE: Never mind - the issue was with PowerShell opening in a strange place. I was able to resolve this by re-opening PowerShell from a different location.

Hello.

I'm trying to use New-DlmDatabaseRelease for either a database to database release or a package to database release and I consistently see errors:

When using package to database code...
$test = New-DlmDatabaseConnection -ServerInstance "(local)" -Database "WidgetRelease"
$dbrelease = New-DlmDatabaseRelease -Source "C:packageWidgetShop.1.0.nupkg" -Target $test

The error looks like this:


New-DlmDatabaseRelease : SQLCompare.exe terminated with the exit code 0: Success, but with error output.
SQLCompare.exe produced this error output:
'[internal file path]'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
At line:2 char:14
+ $dbrelease = New-DlmDatabaseRelease -Source "C:packageWidgetShop.1.0.nupkg" -T ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (database 'Widge...erver '(local)':DatabaseConnection) [New-DlmDatabaseRelease], TerminatingException
+ FullyQualifiedErrorId : SuccessWithErrorOutput,RedGate.DLMAutomation.PowerShell.Commands.NewDlmDatabaseReleaseCommand


When using the following database to database code...
$DB1 = New-DlmDatabaseConnection -ServerInstance "(local)" -Database "WidgetDevelopment"
$DB2 = New-DlmDatabaseConnection -ServerInstance "(local)" -Database "WidgetRelease"
$dbRelease = New-DlmDatabaseRelease -Source $DB1 -Target $DB2

The error looks like this:

New-DlmDatabaseRelease : SQLCompare.exe terminated with the exit code 0: Success, but with error output.
SQLCompare.exe produced this error output:
'[internal file path]'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
At line:4 char:14
+ $dbRelease = New-DlmDatabaseRelease -Source $DB1 -Target $DB2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (database 'Widge...erver '(local)':DatabaseConnection) [New-DlmDatabaseRelease], TerminatingException
+ FullyQualifiedErrorId : SuccessWithErrorOutput,RedGate.DLMAutomation.PowerShell.Commands.NewDlmDatabaseReleaseCommand


I'm using Powershell ISE version 4.0 and SQL Server 2008 R2 on a Windows 7 Enterprise box. DLM Automation says Version 1.

Are other people experiencing this? Is there a setting to tell the CmdLet to not use a UNC path?

Comments

Sign In or Register to comment.