cancel
Showing results for 
Search instead for 
Did you mean: 

rename transaction log

Former Member
0 Kudos
2,771

Hi!

I have changed the database name (the database file) and I also want to change the name on the transaction log (I want to be able to choose the name myself) but I can not get it right, when I start up the database it still wants the transaction log with the old name, I would be happy if someone here could help me

Thanks in advance

MG

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

The name (and possibly location) of the transaction log is stored within the database, so you have to adapt that. You can use the builtin DBLOG tool for that purpose, say

"%SQLANY12%\\bin32\\dblog" -t MyNewDatabase.LOG MyNewDatabase.DB

When you use that command line and then rename the existing log (say, previously named "MyOriginalDatabase.log") to the new file name, it will be used continuously by the database. Otherwise, the existing log will be left as is, and a new log will be created with the new name.

Former Member
0 Kudos

Thanks for your help

Answers (1)

Answers (1)

Breck_Carter
Participant

> I want to be able to choose the name myself

It is OK (and often a good idea) to put the transaction log in a different location from the database file.

HOWEVER please think long and hard before naming the log file for xxx.db anything other than xxx.log... different names lead to confusion for other people, and when other people get confused they make mistakes... and those "other people" may be looking after your database when you are not around.

Former Member
0 Kudos

Well that is actually why I want to rename it. This database is a copy which should be used for demonstrations and therefore I do not want the transaction log to have a name "connecting" it with the original database 🙂 . So I am actually trying not to confuse people 🙂