Closed hbuckle closed 3 years ago
We do not support copying logins on Azure SQL.
The Copy commands are meant for SQL Server migrations, primarily on-premises. At this time there are no plans to support migrating objects with Azure SQL DB.
This would be a whole new command - Copy-DbaDbContainedUser I believe
we should actually catch that error prior if possible, too. perhaps we should have an azureopt-in instead of an azure opt out like we have now?
Just to be clear, it is server logins I want to copy, not contained database users. It's required for failover groups
I believe the statement in case 9
should work, it just needs to be applied to versionMajor 15
ahh we do it a different way for the older ones. we will accept a PR if you'd liek to make it.
I looked into fixing this bug but there are further issues than the system view being used to fetch the login.
There is no workaround that fits the intent of "Copy-DbaLogin", so perhaps the AzureUnsupported flag should be added to make this clear.
Ok, I will open a PR to add the AzureUnsupported flag and then close this.
Environmental information
SQL Server:
Report
Copy-DbaLogin fails on an Azure Sql Server Looking at the code it's only checking for versions 0,8,9 and the default command does not work on Azure (sys.server_principals is not supported)
Host used
Errors Received