RSS‎ > ‎

SQL :: What command do we use to rename a db?

posted Aug 30, 2012, 5:03 AM by Ashish Jain
sp_renamedb ‘oldname’ , ‘newname’. If someone is using db it will not accept sp_renmaedb. In that case first bring db to single user using sp_dboptions. Use sp_renamedb to rename database. Use sp_dboptions to bring database to multi user mode.
Comments