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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 rename db name

Author  Topic 

mikecao
Starting Member

2 Posts

Posted - 2002-01-23 : 23:04:58
I am going to backup my database 'A' and restore it as another database 'B'. After that, I will rename database 'A' to 'C' and 'B' to 'A'. I want the new database 'A' is my final live database.
I would like to know is there any issue I have to pay attention before I do it. Will this cause any data loss, include table, sp, diagrams, views ?

Nazim
A custom title

1408 Posts

Posted - 2002-01-23 : 23:37:11
why dont you copy Database 'A' to two new databases 'B' and 'C'
you can use DTS to do it. that should do what you are looking for.


--------------------------------------------------------------
Dont Tell God how big your Problem is , Tell the Problem how Big your God is
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-01-24 : 00:53:06
Just wondering... WHY?

If you backup and restore, it will be the same database. What is all of the name changing getting you?

-Chad

Go to Top of Page

mikecao
Starting Member

2 Posts

Posted - 2002-01-24 : 02:07:44
[quote]
Just wondering... WHY?

I am going to move my db 'A' from small driver to a big driver. It will take few hours to either copy db file or restore db. However, I cannot shutdown my service for few hours. In the case I need to backup (full and differential) db 'A' and restore to 'B' and after that rename db 'B' and 'A'.
Is there any better way to sovle my problem with only few minutes down time ?

Go to Top of Page

Nazim
A custom title

1408 Posts

Posted - 2002-01-24 : 02:36:26
you can use sp_attach_db, check BOL for furthur information .

quote:

I am going to move my db 'A' from small driver to a big driver. It will take few hours to either copy db file or restore db. However, I cannot shutdown my service for few hours. In the case I need to backup (full and differential) db 'A' and restore to 'B' and after that rename db 'B' and 'A'.



--------------------------------------------------------------
Dont Tell God how big your Problem is , Tell the Problem how Big your God is
Go to Top of Page
   

- Advertisement -