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
Is this bug with Copy-DbaDatabase? You can replicate it using Backup-DbaDatabase ... | Restore-DbaDatabase ...
NOTE: Copy-DbaDatabase will not work in every environment and every situation. Instead, we try to ensure Backup & Restore work in your environment.
Environmental data
### PowerShell version:
Name Value
---- -----
PSVersion 5.1.17134.590
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.590
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
### dbatools Module version:
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.807\dbatools.psd1
Version : 0.9.807
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.754\dbatools.psd1
Version : 0.9.754
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.753\dbatools.psd1
Version : 0.9.753
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.752\dbatools.psd1
Version : 0.9.752
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.718\dbatools.psd1
Version : 0.9.718
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.519\dbatools.psd1
Version : 0.9.519
SQL Server:
Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) -14.0.3048.4 (X64) Nov 30201812:57:58 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2016 Datacenter 10.0<X64> (Build 14393: ) (Hypervisor)
Errors Received
writeErrorStream : True
PSMessageDetails :
Exception : System.Exception: Login failed. The login is from an untrusted domain and cannot be used with Integrated
authentication. ---> System.Data.SqlClient.SqlException: Login failed. The login is from an untrusted domain
and cannot be used with Integrated authentication.
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity,
SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword,
SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions,
SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean
applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options,
DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool,
DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions
userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions
userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject,
DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32
waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions
userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,
TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection,
TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection,
DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection,
DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at CallSite.Target(Closure , CallSite , Object )
---End of inner exception stack trace ---
TargetObject : AZ-EA-VM-SQL-01
CategoryInfo : ConnectionError: (AZ-EA-VM-SQL-01:PSObject) [Write-Error], Exception
FullyQualifiedErrorId : dbatools_Get-DbaDatabase,Stop-Function
ErrorDetails : Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Stop-Function, C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.754\allcommands.ps1: line 104625
at Get-DbaDatabase<Process>, C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.754\allcommands.ps1:
line 30007
at Get-DbaDbMasterKey<Process>, C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.754\allcommands.ps1:
line 33766
at <ScriptBlock>,<No file>: line 1
PipelineIterationInfo : {0,1}
Steps to Reproduce
/* Any T-SQL commands involved or used to produce test objects/data.*/
<# Provide exact (or sanitized) code to reproduce the error#>$SqlCredential=Get-CredentialGet-DbaDbMasterKey-SqlInstance $Instance-SqlCredential $SqlCredential-Database master
Expected Behavior
Connects to SQL Instance using the provided credentials.
Actual Behavior
Attempts to use integrated security.
Notes
I'll send a PR to fix this shortly.
The text was updated successfully, but these errors were encountered:
Before submitting a bug report:
Collect output of following command and paste below:
Copy-DbaDatabase
? You can replicate it usingBackup-DbaDatabase ... | Restore-DbaDatabase ...
Environmental data
SQL Server:
Errors Received
Steps to Reproduce
Expected Behavior
Connects to SQL Instance using the provided credentials.
Actual Behavior
Attempts to use integrated security.
Notes
I'll send a PR to fix this shortly.
The text was updated successfully, but these errors were encountered: