Replies: 2 comments
-
Be aware that this indicates you are within the PSDrive for SQL Server. This can cause issues with interacting with any module (not just dbatools). I would recommend testing on a new PowerShell session where the SQL Server module is not loaded, or if your script requires it load it after you import dbatools. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Shawn,
I followed your suggestion and it worked.
many thanks for your support.
…________________________________
Da: Shawn Melton ***@***.***>
Inviato: martedì 1 agosto 2023 19:15
A: dataplat/dbatools ***@***.***>
Cc: giumare ***@***.***>; Author ***@***.***>
Oggetto: Re: [dataplat/dbatools] dbatools: Copy-DbaDbTableData (Discussion #9049)
PS SQLSERVER:> Get-InstalledModule dbatools
Be aware that this indicates you are within the PSDrive for SQL Server. This can cause issues with interacting with any module (not just dbatools). I would recommend testing on a new PowerShell session where the SQL Server module is not loaded, or if your script requires it load it after you import dbatools.
—
Reply to this email directly, view it on GitHub<#9049 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BBVAI5WMN2YUC7VIEGJHIQDXTE2TVANCNFSM6AAAAAA3AAWALI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I’m not very handy with powershell.
Maybe someone found the same error.
I get a problem with the command Copy-DbaDbTableData
I receive a warning during execution of this script
$ServerSource = 'sqlsource' $ServerTarget = 'sqltarget' $DatabaseSource = 'Marketing' $DatabaseTarget = 'Marketing' $TabellaCompleta = '[Marketing].[dbo].[syst004_AverageCalculation]' Copy-DbaDbTableData -SqlInstance $ServerSource -Destination $ServerTarget -Database $DatabaseSource -DestinationDatabase $DatabaseTarget -Table $TabellaCompleta -Truncate -KeepIdentity -BatchSize 10000
WARNING: [18:09:00][Copy-DbaDbTableData] Something went wrong | Cannot convert the "System.Data.SqlClient.SqlConnection" value of type "System.Data.SqlClient.SqlConnection" to type "Microsoft.Data.SqlClient.SqlConnection".
Below is the powershell version that using with my client
Name Value
PSVersion 5.1.14393.5582
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.5582
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS SQLSERVER:> Get-InstalledModule dbatools
Version Name Repository Description
2.0.4 dbatools PSGallery The community module that enables SQL Server Pros to ...
thanks
giumare
Beta Was this translation helpful? Give feedback.
All reactions