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
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)
If issue is with Copy-DbaDatabase, using Backup-DbaDatabase | Restore-DbaDatabase still does not work
Note that we do not have the resources to make Copy-DbaDatabase work in every environment. Instead, we try to ensure Backup & Restore work in your enviornment.
Steps to Reproduce
/* Any T-SQL commands involved or used to produce test objects/data.*/
$cSQLInst="SERVER\INST"$cLoginName="DM\weinser-adm"$cDefaultDB="NewDB"# Windows Login.New-DbaLogin-SqlInstance $cSQLInst-Login $cLoginName-DefaultDatabase $cDefaultDB-Force -Verbose
Expected Behavior
Actual Behavior
VERBOSE: Performing the operation "Creating login [DM\weinser-adm] on SERVER\INST" on target "SERVER\INST".
VERBOSE: [12:59:50][New-DbaLogin] Adding as login type WindowsUser
VERBOSE: [12:59:50][New-DbaLogin] Failed to create [DM\weinser-adm] on SERVER\INST using SMO, trying T-SQL.
WARNING: [12:59:50][New-DbaLogin] Failed to add [DM\weinser-adm] to SERVER\INST. | Unclosed quotation mark after the character string '[DM\weinser-adm] FROM WINDOWS WITH CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF'.
Incorrect syntax near '[DM\weinser-adm] FROM WINDOWS WITH CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF'.
Environmental data
PowerShell:
SQL Server:
The text was updated successfully, but these errors were encountered:
Based on the verbose output, it seems that the login string that you have provided contains square brackets ('[login]'). The login name string should not contain those symbols.
Before submitting a bug report:
powershell -NoProfile
)Copy-DbaDatabase
, usingBackup-DbaDatabase | Restore-DbaDatabase
still does not workNote that we do not have the resources to make
Copy-DbaDatabase
work in every environment. Instead, we try to ensure Backup & Restore work in your enviornment.Steps to Reproduce
Expected Behavior
Actual Behavior
VERBOSE: Performing the operation "Creating login [DM\weinser-adm] on SERVER\INST" on target "SERVER\INST".
VERBOSE: [12:59:50][New-DbaLogin] Adding as login type WindowsUser
VERBOSE: [12:59:50][New-DbaLogin] Failed to create [DM\weinser-adm] on SERVER\INST using SMO, trying T-SQL.
WARNING: [12:59:50][New-DbaLogin] Failed to add [DM\weinser-adm] to SERVER\INST. | Unclosed quotation mark after the character string '[DM\weinser-adm] FROM WINDOWS WITH CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF'.
Incorrect syntax near '[DM\weinser-adm] FROM WINDOWS WITH CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF'.
Environmental data
The text was updated successfully, but these errors were encountered: