The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.


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


asked 03 Sep '15, 06:55

M%20G's gravatar image

accept rate: 42%

edited 03 Sep '15, 06:58

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.

permanent link

answered 03 Sep '15, 07:51

Volker%20Barth's gravatar image

Volker Barth
accept rate: 32%

edited 03 Sep '15, 07:53

Thanks for your help

(04 Sep '15, 10:51) M G

> 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.

permanent link

answered 03 Sep '15, 08:00

Breck%20Carter's gravatar image

Breck Carter
accept rate: 21%

edited 03 Sep '15, 08:00

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 :)

(04 Sep '15, 10:55) M G
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 03 Sep '15, 06:55

question was seen: 285 times

last updated: 04 Sep '15, 10:56