A complete collection of Sql server Interview Questions,sql server performance,stored procedure, trigger,Sql query,security,ms sql server 2005,database backup,restore,free ebook,tutorials.
May 19, 2008
What command do we use to rename a db?
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.
No comments:
Post a Comment