SCSQL Clone LifeCycle job fails to lock and detach database
Applies to
SnapCenter Plug-In for SQL (SCSQL)
Issue
- SCSQL clone operations fail to detach and rename a database
- The below error message is logged in the SmSql_[JOB-ID].log flie
2021-01-08T02:05:12.7456187-08:00 DEBUG SmSql_11538 PID=[4180] TID=[69] Database [DATABASE_NAME] is going to be Offline...
2021-01-08T02:05:15.4487241-08:00 DEBUG SmSql_11538 PID=[4180] TID=[69] Detaching database [DATABASE_NAME]...
2021-01-08T02:05:15.4643359-08:00 DEBUG SmSql_11538 PID=[4180] TID=[69] RenameClone Enter
2021-01-08T02:05:35.8645534-08:00 ERROR SmSql_11538 PID=[4180] TID=[69] Exception in RenameClone : Rename failed for Database 'CLONE_NAME'.
2021-01-08T02:05:35.8645534-08:00 DEBUG SmSql_11538 PID=[4180] TID=[69] Detach Clone: CLONE_NAME
2021-01-08T02:06:26.0936100-08:00 DEBUG SmSql_11538 PID=[4180] TID=[69] Database [CLONE_NAME] is going to be Offline...
2021-01-08T02:06:30.3357704-08:00 DEBUG SmSql_11538 PID=[4180] TID=[69] Detaching database [CLONE_NAME]...
2021-01-08T02:06:30.3513832-08:00 ERROR SmSql_11538 PID=[4180] TID=[69] Rename clone operation failed: Rename failed for Database 'CLONE_NAME'.
2021-01-08T02:06:30.3513832-08:00 ERROR SmSql_11538 PID=[4180] TID=[69] Attaching original database: DATABASE_NAME
2021-01-08T02:06:30.3513832-08:00 DEBUG SmSql_11538 PID=[4180] TID=[69] Attaching database: [DATABASE_NAME]
2021-01-08T02:06:32.0435319-08:00 DEBUG SmSql_11538 PID=[4180] TID=[69] Removing dbname CLONE_NAME from tempclones list
2021-01-08T02:06:32.0435319-08:00 DEBUG SmSql_11538 PID=[4180] TID=[69] createClonedDatabase End
2021-01-08T02:06:32.0435319-08:00 ERROR SmSql_11538 PID=[4180] TID=[69] The database could not be exclusively locked to perform the operation.
2021-01-08T02:06:32.0435319-08:00 ERROR SmSql_11538 PID=[4180] TID=[69] Failed to refresh the clone. The database could not be exclusively locked to perform the operation.
2021-01-08T02:06:32.0435319-08:00 DEBUG SmSql_11538 PID=[4180] TID=[69] CreateClone Done...