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
 General SQL Server Forums
 New to SQL Server Programming
 rename and duplicate database in SQL2000

Author  Topic 

inlink5
Starting Member

2 Posts

Posted - 2008-10-22 : 21:55:39
hi, i am new to SQL2000. recently i am given a task to look after the SQL 2000 server. i need to do 2 things and hope u guy can help me out.

i have 2 database, i.e. v1.mdf/v1_log.ldf and v2.mdf/v2_log.ldf.
the latest is v2.

1) i need to rename v1 -> v3. how to do it? simply rename the file in windows?

2) i need to create a test DB call v3 from v2. meaning at the end i should have v3.mdf/v3_log.ldf.

any help is appreciated. thanks!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-22 : 23:51:17
1,use sp_rename system sp to rename a databse
http://doc.ddart.net/mssql/sql70/sp_ra-rz_11.htm

2,you mean make a copy of v2? then backup v2 and restore as new version.
Go to Top of Page

inlink5
Starting Member

2 Posts

Posted - 2008-10-23 : 04:02:21
how do u do step2?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-23 : 04:13:07
quote:
Originally posted by inlink5

how do u do step2?


from sql management studio, right click db and then select backup option. simialry you can also restore from sql mgmnt studio.
Go to Top of Page
   

- Advertisement -