Home Dashboard Directory Help
Search

Unable to Rename Database Snapshot by Ganesh Babu


Status: 

Closed
 as By Design Help for as By Design


2
0
Sign in
to vote
Type: Bug
ID: 621879
Opened: 11/14/2010 9:23:53 PM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

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
Details
Sign in to post a comment.
Posted by Microsoft 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.
Sign in to post a workaround.