Script to Rename Database


CREATE DATABASE sqldbpool
–Solution – I
EXEC Sp_renamedb  ‘SQLDBPool’,  ‘Jugal’

–Solution – II
ALTER DATABASE sqldbpool MODIFY name=jugal 

Comments

3 responses to “Script to Rename Database”

  1. riddhi Mishra Avatar
    riddhi Mishra

    Thanks for providing us valuable information and increasing our knowledge

  2. Sai Ram Avatar
    Sai Ram

    We have to rename physical file names also. The above Procedure wont change file names.

Thanks for the comment, will get back to you soon… Jugal Shah