Skip to content

Using ReuseFolderStructure causes errors while migrating Database #13

@dhrubomoy

Description

@dhrubomoy

Specifications

Source: Windows Server 2003
SQL Server Version: 2005

Destination: Windows Server 2008r2
SQL Server Version: 2008

Command: Copy-SqlDatabase -Source SourceName -Destination DestinationName -Verbose -BackupRestore -ReuseFolderstructure -NetworkShare \\fileshare\sql\migration -All -Force

Expected behavior

Database migration should complete

Actual Behavior

Shows whole bunch of errors. Like:

(1) Join-AdminUnc : Cannot process argument transformation on parameter 'filepath'. Cannot convert value to type System.String.
At C:\dbatools\Function\Copy-SqlDatabase.ps1:650 char:45...

(2) WARNING: Restore failed: Restore failed for Server 'Destination'.

(3) Copy-SqlDatabase : Failed to update DatabaseOwnershipChaining for False on something on Destination
At C:\dbatools\Functions\Copy-SqlDatabase.ps1:1039 char:3...

(4) Copy-SqlDatabase : Failed to update Trustworthy to False for something on Destination
At C:\dbatools\Functions\Copy-SqlDatabase.ps1:1039 char:3...

Workaround

Not using -ReuseFolderstructure seems to migrate database properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions