Hi,
Use the following SQL Query to rename the database name
using management studio.
ALTER DATABASE "old database name" MODIFY NAME = "new database
name"
IF SQL Not allowed to modify database name because it is in use. Than you can update it as following
1. Set
the database to single user only by following query
ALTER DATABASE "YourDatabaseName" SET
SINGLE_USER WITH
ROLLBACK IMMEDIATE
2. Now
you able to run database rename query
ALTER DATABASE
"old database name" MODIFY NAME = "new database
name"
3. Again
set the database to multiple user by using following query
ALTER DATABASE "YourDatabaeName" SET
MULTI_USER WITH
ROLLBACK IMMEDIATE
Its real use full query nilesh.
ReplyDeleteThank you for share
You are welcome. Please keep in touch will we be do better
ReplyDelete