Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-06-08 : 05:08:53
|
| Dear experts,is it possible to rename a database?I've tried with harsh suggesion from previous posts....--alter database Script modify name= script_testUse MasterGOAlter database Script Set Single_UserGOTHANK YOU VERY MUCHVinodEven you learn 1%, Learn it with 100% confidence. |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-06-08 : 05:13:49
|
| You can use sp_renamedb if you are doing this in SQL 2000.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-06-08 : 06:53:57
|
| Note that this will not change the physical names of the LDF/MDF files, nor the logical [internal] names, so you may also want to change those to keep them in step.Kristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-08 : 09:39:04
|
| Also make sure that renaming the database doesnt affect any application which connects to that dbMadhivananFailing to plan is Planning to fail |
 |
|
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2007-06-08 : 12:51:42
|
| you can use the sp_renamedb in 2005 also |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-06-08 : 14:34:25
|
| "you can use the sp_renamedb in 2005 also"Even though it is supported in SQL 2005 for backward compatibility, it is not a preferred method. In SQL 2005, one should make use of ALTER DATABASE statement for this.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|