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
You're most likely to get "Invalid object name 'YourSchema.YourTable'". This happens because piping from Get-DbaRegServer to Invoke-DbaQuery while specifying -Database causes master to be queried, even when another database is specified.
Steps to Reproduce
Get-DbaRegServer|Invoke-DbaQuery-Database MyDb -Query "SELECT * FROM dbo.TableOnlyInMyDb"`
This issue happens even if you filter Get-DbaRegServer down to only return one server.
Please confirm that you are running the most recent version of dbatools
Tested on 2.1.23
Other details or mentions
Piping in the server names as strings does not cause this issue. You have to pipe from Get-DbaRegServer.
-Verbose adds no more useful information.
Make sure that you don't hit this issue, which I'm pretty sure my PR didn't fix.
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
5.1.19041.5007
SQL Server Edition and Build number
Doesn't seem to matter.
.NET Framework Version
Very recent.
The text was updated successfully, but these errors were encountered:
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
You're most likely to get "Invalid object name 'YourSchema.YourTable'". This happens because piping from
Get-DbaRegServer
toInvoke-DbaQuery
while specifying-Database
causesmaster
to be queried, even when another database is specified.Steps to Reproduce
This issue happens even if you filter
Get-DbaRegServer
down to only return one server.Please confirm that you are running the most recent version of dbatools
Tested on 2.1.23
Other details or mentions
Piping in the server names as strings does not cause this issue. You have to pipe from
Get-DbaRegServer
.-Verbose
adds no more useful information.Make sure that you don't hit this issue, which I'm pretty sure my PR didn't fix.
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
5.1.19041.5007
SQL Server Edition and Build number
Doesn't seem to matter.
.NET Framework Version
Very recent.
The text was updated successfully, but these errors were encountered: