You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected the command to run through, without any errors, since its actually doing what its supposed to do.
Actual Behavior
It failed with an exception message:
Line |
62567 | … $schemaUrns = $user.EnumOwnedObjects() | Where-Object Typ …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling "EnumOwnedObjects" with "0" argument(s): "Constructor on type
| 'Microsoft.SqlServer.Management.Smo.SqlObjectUnion' not found."
Environmental information
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
Please provide the output of the below script
PowerShell Version : 7.1.3
dbatools latest installed : 1.0.168
Culture of OS : en-GB
SQL Server:
/* Microsoft SQL Server 2017 (RTM-CU15) (KB4498951) - 14.0.3162.1 (X64) May 15 2019 19:14:30 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2016 Standard 10.0 <X64> (Build 14393: ) (Hypervisor) */
/*us_english*/
The text was updated successfully, but these errors were encountered:
Both are closed, issue should be fixed with SMO version 161.40241.8 and newer. @potatoqualitee - do you see a chance to use these SMO instead of those from SqlServer?
andreasjordan
changed the title
[Bug]
[Bug] Remove-DbaDbUser - failed with: Constructor on type 'Microsoft.SqlServer.Management.Smo.SqlObjectUnion' not found
Jul 6, 2021
Report
Remove-DbaDbUser gives an exception message, if executed through Powershell Core.
The user is still dropped, but it generates an exception.
Host used
Errors Received
Steps to Reproduce
Remove-DbaDbUser -SqlInstance SQLInstance -Database "Database-Name" -User "SomeUserName"
Expected Behavior
I expected the command to run through, without any errors, since its actually doing what its supposed to do.
Actual Behavior
It failed with an exception message:
Line |
62567 | … $schemaUrns = $user.EnumOwnedObjects() | Where-Object Typ …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling "EnumOwnedObjects" with "0" argument(s): "Constructor on type
| 'Microsoft.SqlServer.Management.Smo.SqlObjectUnion' not found."
Environmental information
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
Please provide the output of the below script
SQL Server:
/* Microsoft SQL Server 2017 (RTM-CU15) (KB4498951) - 14.0.3162.1 (X64) May 15 2019 19:14:30 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2016 Standard 10.0 <X64> (Build 14393: ) (Hypervisor) */
/*us_english*/
The text was updated successfully, but these errors were encountered: