a) Using sp_rename » Make sure that no user is using the database. » Make the database in the single user mode. You can do this by using sp_dboption. sp_dboption 'Pubs', 'single user', true » sp_rename Pubs, Library, Database Note : For renaming the database, you can also use sp_renamedb. sp_renamedb Pubs, Library » Bring back the database in multiuser mode sp_dboption 'Library', 'single user', false b) Using Detach & Attach sp_detach_db @dbname = N'Pubs' sp_attach_db @dbname = N'Library', @filename1 = N'd:\programfiles\MSSQL7\data\Pubs_Data.MDF', @filename2 = N'd:\program files\MSSQL7\data\Pubs_log.ldf'
Yes , it is a long time I have not use the sql command. when I read the post sp_dboption 'Pubs', 'single user', true » sp_rename Pubs, Library, Database I remember. Yes that is the right.
Now I prefer apache + php + linux backed by mysql. Mysql is powerful and the php cms are easy to find.