Unable to Rename Database Snapshot - by Ganesh Babu

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


3
0
Sign in
to vote
ID 621879 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 11/14/2010 9:23:53 PM
Access Restriction Public

Description

I have a requirement to rename a database snapshot on SQL Server 2005 SP2. I am getting the following error -:

EXEC sp_renamedb 'ARSystemReporting', 'ARSystemReportingNew'

Msg 902, Level 16, State 1, Line 1
To change the NAME, the database must be in state in which a checkpoint can be executed.

Database Architecture.
Main OLTP system database mirrored to secondary. On the secondary created a database snapshot ARSystemRemedy applications are accessing the database. There is a situation to create another snapshot with ARSystemRemedy_New and drop the ARSystemRemedy and later rename the ARSystemRemedy_New to ARSystem.

I am doing this to reduce the downtime during the database snapshot creation time.

Thanks,
Ganesh
Sign in to post a comment.
Posted by Kevin [MSFT] on 11/17/2010 at 10:15 AM
Thanks for your report.
While I understand the usefulness of being able to rename database snapshots, the restriction is not limited to snapshots. The restriction is on any database in a read-only state.
The reason for the restriction is that the database name is recorded in the internal metadata of the database itself, and so we cannot change the name without violating the read-only status of the database.