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)
 Changing filename in sysfiles

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-05-18 : 08:20:59
Dejan writes "Hello, how can I change filename in sysfiles. I have one database 'FIRST' and I made first.bak file. I want to restore it on database 'SECOND' on different server (to make copy). I did it with MOVE , REPLACE .. and I want my new database to have filename = 'second_data' in sysfiles ( not 'first_data'). If I make several copies they all would have the same filename in sysaltfiles and sysfiles ('first_data' and 'first_log'). What to do?
Thanks for any advice - Dejan"

nr
SQLTeam MVY

12543 Posts

Posted - 2004-05-18 : 08:45:39
see MODIFY FILE on ALTER DATABASE

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

dejjan
Yak Posting Veteran

99 Posts

Posted - 2004-05-18 : 09:41:54
Thank you.

Dejan Jankovic
[database administrator]

ALCO banka A.D.
Beograd
Pozeska 65b
11030 Beograd
tel: [+381][11] 30 50 383
mob: [+381][64] 11 022 48
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2004-05-18 : 09:43:30
Address and phone numbers? Not sure that's such a good idea.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

dejjan
Yak Posting Veteran

99 Posts

Posted - 2004-05-19 : 02:49:26
Can I, somehow, change file_name during RESTORE operation. Without altering database. I do Restore every day, and I use that copy for practise. I can put ALTER DATABASE on the end of procedure which I use for restore. But, is there any other way.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2004-05-19 : 04:41:42
Afraid not. The restore doesn't allow a change of logical filename.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -