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
This isn't quite a bug because there is not anything broken, per se, so I put it as a feature. But something that tripped us up when recreating security using Export-DbaUser was the user did not have its schema ownership scripted. If you have schema level permissions you are covered, but if you own the whole schema then the output is empty.
Is there a command that is similiar or close to what you are looking for?
Yes
Technical Details
If you stick this somewhere around line 362 it should cover it:
#Schema Ownership
foreach ($schema in $db.Schemas | Where-Object {$_.Owner -eq $dbuser.Name}) {
$outsql += "ALTER AUTHORIZATION ON SCHEMA::[{0}] TO [{1}]" -f $schema.Name, $schema.Owner
}
The text was updated successfully, but these errors were encountered:
Summarize Functionality
This isn't quite a bug because there is not anything broken, per se, so I put it as a feature. But something that tripped us up when recreating security using Export-DbaUser was the user did not have its schema ownership scripted. If you have schema level permissions you are covered, but if you own the whole schema then the output is empty.
Is there a command that is similiar or close to what you are looking for?
Yes
Technical Details
If you stick this somewhere around line 362 it should cover it:
The text was updated successfully, but these errors were encountered: