Skip to content

Issue when running Invoke-DbaDataMasking #4970

Description

@MateoV97

Before submitting a bug report:

  • Ensure you are able to reproduce it on the latest released version (we release often)
  • Verified this bug is not already reported in an issue
  • Verified errors are not related to permissions
  • Can reproduce in a clean PowerShell session (clean = powershell -NoProfile)

Steps to Reproduce

 Invoke-DbaDbDataMasking -SqlInstance myinstance\SQL2017 -Database mydb -FilePath C:\Users\Desktop\DboJSON.json -Confirm:$false

Expected Behavior

Be able to quickly mask data in database

Actual Behavior

Load up error at each table is trying to mask, taking a long time to load and then masking data at each table.

The following exception occurred while trying to enumerate the collection: "An exception occurred while executing a Transact-SQL statement or batch.".
At line:57683 char:25
+                     if ($tableobject.Name -notin $db.Tables.Name) {
+                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : NotSpecified: (:) [], ExtendedTypeSystemException
   + FullyQualifiedErrorId : ExceptionInGetEnumerator

Environmental data

 - PowerShell: 
  PSVersion                      5.1.14393.2636                                                                                            
PSEdition                      Desktop                                                                                                   
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                   
BuildVersion                   10.0.14393.2636                                                                                           
CLRVersion                     4.0.30319.42000                                                                                           
WSManStackVersion              3.0                                                                                                       
PSRemotingProtocolVersion      2.3                                                                                                       
SerializationVersion           1.1.0. 
 - - SQL Server:  Microsoft SQL Server 2017 (RTM-GDR) (KB4293803) - 14.0.2002.14 (X64)   Jul 21 2018 07:47:45   Copyright (C) 2017 Microsoft Corporation  Developer Edition (64-bit) on Windows 10 Enterprise 2016 LTSB 10.0 <X64> (Build 14393: ) (Hypervisor) 

Metadata

Metadata

Assignees

Labels

bugs lifestaleStale Bot label used to identify issues that are no longer active and bot has closed them

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions