Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how can I change the location the database.Log file

759 views
Skip to first unread message

Clarence

unread,
Mar 10, 2004, 3:39:51 PM3/10/04
to
I created the database in a folder X; now I moved the database.db file to a
different folder thinking that the log file was going to be created in the
new location (which was the behavior in SQL Anywhere 5,6,7,8). It look like
the database.log file can not be move ( I deleted folder X and the
database.db file could not be open, so I had to restore the deleted folder
and then it work fine). So how can I move the location of the database.log
file?

I am running SQL Anywhere 9.0.0 build(1108)


Breck Carter [TeamSybase]

unread,
Mar 10, 2004, 3:44:40 PM3/10/04
to
The location of the .LOG file is recorded inside the .DB file. One way to change it is to stop the
engine, and then run dblog.exe; see the Help for the parameters to use.

Breck

--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
bca...@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com

Clarence

unread,
Mar 10, 2004, 4:18:23 PM3/10/04
to
It did not work. I ran dblog -t c:\y\database.log database.db and it did
generated the database.log file in the X previous folder. I deleted the file
and ran it again a it did created again. Any other idea?

Regards,

Clarence

"Breck Carter [TeamSybase]" <NOSPAM_...@risingroad.com> wrote in
message news:h0vu40pvcqv5f0fov...@4ax.com...

Reg Domaratzki

unread,
Mar 10, 2004, 4:22:59 PM3/10/04
to
If you don't specify a full pathname for the log file, it will be relative
to the location of the database file. For example :

dblog -t database.log database.db

The log file will now be created in the same directory as the database file.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

"Clarence" <ccha...@arazozabrothers.com> wrote in message
news:404f861f@forums-1-dub...

Breck Carter [TeamSybase]

unread,
Mar 10, 2004, 5:24:00 PM3/10/04
to
Please show the *exact* command line you used, and what it displayed on screen.

Here is a Windows batch file which works:

"%ASANY9%\win32\dblog.exe" -t c:\temp\test.log test.db
pause

Here is what it displayed on screen:

C:\amisc\experiments\db9>"C:\Program Files\Sybase\SQL Anywhere 9\win32\dblog.exe
" -t c:\temp\test.log test.db
Adaptive Server Anywhere Transaction Log Utility Version 9.0.0.1270
"test.db" was using log file "test.log"
"test.db" is using no log mirror file
"test.db" is now using log file "c:\temp\test.log"
Transaction log starting offset is 0000384222
Transaction log current relative offset is 0000086492

When the following command was executed in ISQL:

SELECT DB_PROPERTY ( 'LogName' );

It displayed this:

DB_PROPERTY('LogName')
'c:\\temp\\test.log'

(And yes, Reg is correct, for maximum flexibility do *not* specify an explicit path, unless you want
the log to go on a different drive for performance)

Breck

Clarence

unread,
Mar 10, 2004, 8:36:43 PM3/10/04
to
It work fine.

I appreciate your help.

Regards,

Clarence

"Breck Carter [TeamSybase]" <NOSPAM_...@risingroad.com> wrote in

message news:oo4v40dvmhqop64bs...@4ax.com...

0 new messages