Author |
Topic |
neubie
Starting Member
21 Posts |
Posted - 2008-11-26 : 22:42:23
|
hi there,as my subject, can I change name (or file) transaction log and data log, which is primary log?thanks |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
|
neubie
Starting Member
21 Posts |
Posted - 2008-11-27 : 00:37:47
|
yup..sorry if I made mistake, I think there are two different cases in one problem.btw, I'd tried to change name for log file and its file, but can't be executed |
|
|
neubie
Starting Member
21 Posts |
Posted - 2008-11-27 : 03:14:39
|
anyway, yes I can change name (if you refer to log name), but there is an error, in other words, I can change name, but sql don't recognize it. |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2008-11-27 : 03:55:36
|
What are you trying to do? I don't understand your question.--Gail ShawSQL Server MVP |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2008-11-27 : 05:20:16
|
>> I can change name, but sql don't recognize it.What do you mean by that?Can you post what you have tried and what the problem was.==========================================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. |
|
|
neubie
Starting Member
21 Posts |
Posted - 2008-11-27 : 23:47:17
|
ok, I think I have to explain all of story (progress) from beginning. then here we go:I've created new database with named NEW. I want my backup-database from another database (let say OLD) to be restored for NEW."problem" occur in this step, name of log file has changed (eg. NEW_data become OLD_data).Can I change it back?thanks |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2008-11-28 : 00:58:20
|
have a look at alter database modify file==========================================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. |
|
|
neubie
Starting Member
21 Posts |
Posted - 2008-11-28 : 03:42:16
|
quote: Originally posted by nr have a look at alter database modify file==========================================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.
what file? sorry, I'm really new. |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2008-11-28 : 04:02:52
|
If you want to just change the logical name of a file, the syntax is ALTER DATABASE ... MODIFY FILE ...Look up Alter Database in Books Online. The full syntax and all options are listed there.--Gail ShawSQL Server MVP |
|
|
neubie
Starting Member
21 Posts |
Posted - 2008-12-03 : 19:50:24
|
ok I'll try. thanks. |
|
|
|