Rename MSSQL Server Database

This article: http://www.elementkjournals.com/premier/showArticle.asp?aid=11048 provides three easy tsql commands to rename a sql server db. I've quoted it below; however, I strongly suspect that the scribble code will filter it out:


EXEC sp_dboption 'Training', 'Single User', 'TRUE'
EXEC sp_renamedb 'Training', 'Cybex-Plum-Test'
EXEC sp_dboption 'Cybex-Plum-Test', 'Single User', 'FALSE'
Run these in query analyzer, osql or whatever.
Related Scribbles:
  • MSSQL Table Analysis Queries
  • SQL Server


  • ID: 770
    Author:
    leonard
    Date Updated:
    2006-05-18 09:43:07
    Date Created:
    2006-05-10 14:44:09

    Edit

    Comments?
     >> Leonard Chan's Homepage  >> Scribble Web  >> Rename MSSQL Server Database
    leonard.lotus-land.ca is hosted by Perceptus Solutions Inc.