Help - dbatools.io - Start-DbaMigration - Maintenance Plans and Custom Server roles not migrated
Verified issue does not already exist?
Yes
What error did you receive?
Hello, I just used Start-DbaMigration and noticed that my maintenance plan as well as a Server Role I had created did not make it to the destination server. I reviewed the verbose output and no mention of any issues. SSIS was installed and running. I used the BackupRestore(True) and Force (True) a shared path and source and destination parameters. All other objects made it ok. The server was rebooted post process completion.
Thanks
Steps to Reproduce
# provide your command(s) executed pertaining to dbatools
# please include variable values (redacted or fake if needed) for reference
$params = @{ Source = "SQLSTG01" Destination = "SQLEDTN01" SharedPath = "\ad.XXXXXX.org\shares\Backup\EA_Archive\Migration\SQLSTG01" BackupRestore = $true Force = $true } Start-DbaMigration @params -Verbose
Are you running the latest release?
Yes
Other details or mentions
Attached a file. Start-DbaMigration_output_20220713.txt
What PowerShell host was used when producing this error
Windows PowerShell ISE (powershell_ise.exe)
PowerShell Host Version
PS C:\Windows\system32> $PSVersionTable.PSVersion
Major Minor Build Revision
5 1 17763 2931
SQL Server Edition and Build number
Source: Microsoft SQL Server 2019 (RTM-CU16-GDR) (KB5014353) - 15.0.4236.7 (X64) May 29 2022 15:55:47 Copyright (C) 2019 Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2019 Datacenter 10.0 <X64> (Build 17763: ) (Hypervisor)
Destination: Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) Sep 24 2019 13:48:23 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2019 Datacenter 10.0 <X64> (Build 17763: ) (Hypervisor)
.NET Framework Version
Source: [System.Runtime.InteropServices.RuntimeInformation]::get_FrameworkDescription() .NET Framework 4.7.3946.0
Destination: [System.Runtime.InteropServices.RuntimeInformation]::get_FrameworkDescription() .NET Framework 4.7.3946.0
hi @DBAgnew , unfortunately we don't support migrating maintenance plans since forever (we tried and encountered a lot of issues). That's why the synopsis reports what we DO support """ Migrates SQL Server ALL databases, logins, database mail profiles/accounts, credentials, SQL Agent objects, linked servers, Central Management Server objects, server configuration settings (sp_configure), user objects in systems databases, system triggers and backup devices from one SQL Server to another. """
As for the server role, could you please post more details on that ? What kind of role was ?
niphlod,
This is the server role DDL,
CREATE LOGIN [PII_Admin] WITH PASSWORD=N'!?!?!?!?', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF; CREATE SERVER ROLE [PII-Tool-ServerRole-ReadOnly]; GRANT CONNECT ANY DATABASE TO [PII-Tool-ServerRole-ReadOnly];GRANT SELECT ALL USER SECURABLES TO [PII-Tool-ServerRole-ReadOnly];ALTER SERVER ROLE [PII-Tool-ServerRole-ReadOnly] ADD MEMBER [PII_Admin];
Thanks for response,
@niphlod / @potatoqualitee : I don't see any code to copy the server roles. It only copies the memberships. Or am I missing something?
i never did get that added, @andreasjordan. i ran out of steam and never got around to it if i recall
So I will change this to a feature request.
maybe this can get done in 2.0, i'll add a tag with a maybe
alas, not enough time