cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Anywhere 17: Transaction log file location

fvestjens
Participant
1,800

Is there a way in the database to determine the location of the transaction log file? Maybe a database variable like @@servername?

Accepted Solutions (0)

Answers (1)

Answers (1)

VolkerBarth
Contributor

The file pathes of the according database files are available via database properties, such as

select db_property('LogName'), db_property('LogMirrorName');

You can also use db_extended_property('File', ...) with the specified dbspace names.

fvestjens
Participant
0 Kudos

Tnx, that did it

Breck_Carter
Participant

In addition to Volker's answer about retrieving the log filespec, you can change the log filespec with the dblog.exe utility.

Physically, the database.log location is stored inside the database.db file. That prevents mistakes from being made... when starting a database file, the SQL Anywhere server always knows exactly where the log file is located.

You have to stop the database before running dblog.exe... it is one of the few programs that can change the database.db file directly without going through the SQL Anywhere server.

fvestjens
Participant
0 Kudos

I did know that. In our setups it is even located at another disk. Separated from the DB file.

In a backup event I needed to copy the backed up transaction log file yymmddAA.log to another server. That's why I needed the location in the database.