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
The command should run and mask all the tables according to the configuration file
Actual Behavior
The "ChangeDatabase" function fails inside the cmdlet, because in Azure SQL DB you cannot change database via this command but the connection should be established directly to the Database that you want to work on.
Since the cmdlet connects by default to the master DB, and not the database specified in the -Database parameter, all the masking queries fail since they're against the wrong database.
Proposed Solution
The cmdlet should connect directly to the DB specified in the -Database parameter, as opposed to connecting to master and then trying to switch databases with ChangeDatabase
This could pose an additional issue on premise, in case a user is trying to mask a database without having access to master
Before submitting a bug report:
powershell -NoProfile
)Copy-DbaDatabase
, usingBackup-DbaDatabase | Restore-DbaDatabase
still does not workSteps to Reproduce
After creating the Json file with New-DbaDbMaskingConfig, applying the Masking configuration to an Azure SQL DB Fails
Expected Behavior
The command should run and mask all the tables according to the configuration file
Actual Behavior
The "ChangeDatabase" function fails inside the cmdlet, because in Azure SQL DB you cannot change database via this command but the connection should be established directly to the Database that you want to work on.
Since the cmdlet connects by default to the master DB, and not the database specified in the -Database parameter, all the masking queries fail since they're against the wrong database.
Proposed Solution
The cmdlet should connect directly to the DB specified in the -Database parameter, as opposed to connecting to master and then trying to switch databases with ChangeDatabase
This could pose an additional issue on premise, in case a user is trying to mask a database without having access to master
Environmental data
Name Value
PSVersion 5.1.17763.316
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.316
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
The text was updated successfully, but these errors were encountered: