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
### PowerShell version:
Name Value
---- -----
PSVersion 5.1.17763.316
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.316
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
### dbatools Module version:
Name : dbatools
Path : E:\github\sqlcollaborative\dbatools.psm1
Version : 0.9.828
Running latest release of dbatools
Verified errors are not related to permissions
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.
SQL Server:
Microsoft SQL Server 2017 (RTM-CU13-OD) (KB4483666) -14.0.3049.1 (X64) Dec 15201811:16:42 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2016 Standard 10.0<X64> (Build 14393: ) (Hypervisor)
Errors Received
PSMessageDetails :
Exception : System.Management.Automation.MethodInvocationException: Exception calling "Alt er" with "0" argument(s): "Alter failed for Database 'test_dv_ss1'. "---> Mic
rosoft.SqlServer.Management.Smo.FailedOperationException: Alter failed for Dat
abase 'test_dv_ss1'.---> Microsoft.SqlServer.Management.Common.ExecutionFail
ureException: An exception occurred while executing a Transact-SQL statement o
r batch. ---> System.Data.SqlClient.SqlException: The operation cannot be perf
ormed on a database snapshot.
ALTER DATABASE statement failed.
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(Exec
uteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchExc
eption)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(S
tring sqlCommand, ExecutionTypes executionType, Boolean retry)
---End of inner exception stack trace ---
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(S
tring sqlCommand, ExecutionTypes executionType, Boolean retry)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(S
tringCollection sqlCommands, ExecutionTypes executionType, Boolean retry)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ExecuteNonQuery(StringCo
llection queries, Boolean includeDbContext, Boolean executeForAlter)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImplFinish(StringCo
llection alterQuery, ScriptingPreferences sp)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImplWorker()
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImpl()
---End of inner exception stack trace ---
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImpl()
at CallSite.Target(Closure , CallSite , Object )
---End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.ConvertToMethodInvocat
ionException(Exception exception, Type typeToThrow, String methodName, Int32 n
umArgs, MemberInfo memberInfo)
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site,
T0 arg0)
at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(Interp
retedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction
.Run(InterpretedFrame frame)
TargetObject :
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : FailedOperationException
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Set-DbaDbRecoveryModel<Process>,<No file>: line 141
at <ScriptBlock>,<No file>: line 1
PipelineIterationInfo : {}
Before submitting a bug report:
Copy-DbaDatabase
? You can replicate it usingBackup-DbaDatabase ... | Restore-DbaDatabase ...
SQL Server:
Errors Received
Steps to Reproduce
have a database snapshot on server
Expected Behavior
Skip recovery model change for snapshots
Actual Behavior
The text was updated successfully, but these errors were encountered: