cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot open transaction log file -- The device is not ready

Former Member
15,253

I have created a local copy of my enterprise database and created a service on sqlanywhere that points to this database file. the log file is in the same folder where the database file is. When i start the service I get this error message:

Cannot open transaction log file -- The device is not ready

what am I doing wrong? I am new to sqlanywhere, any help would be much appreciated

Accepted Solutions (0)

Answers (4)

Answers (4)

MCMartin
Participant

Double check with

dblog "database-file-name"

if the transaction log file of your database really points to the local directory of the database. Maybe it appeared so on the productive server but used actual an absolute path. With the help of dblog you can even disable the transaction log for testing purposes.

Former Member
0 Kudos

How do i use this dblog untility? do I add this command to the service configuration? and is this the right syntax

dblog "database file name" do i have to use quotes. Please help

VolkerBarth
Contributor

Don't include DBLOG in the service configuration.

Instead you can use that on a command line (preferably when the database is not running, i.e. when your service is stopped).

In your case, that might be:

dblog c:\\DV\\Databasedv.db

or (in case the SQL Anywhere program dir is not in the PATH):

"%SQLANY11%\\bin32\\dblog" c:\\DV\\Databasedv.db
Former Member

I do not know how to vote but running the dblog utility surely helped. thanks to all who contributed. The dblog utility pointed me that my database file is pointing to log file on a drive that is not even there. I then went into sybase central - the sqlanywhere utility to manage the database and under tools - change log file settings I was able to change the drive from d to c. that did the trick. thanks to all

VolkerBarth
Contributor
0 Kudos

Glad you got it working!

To vote, simply click on the "upward hand" symbol in front of all answers.

To accept the answer that helped (the most), you may have a look at this FAQ.

VolkerBarth
Contributor
0 Kudos

BTW, I turned your answers into comments - as they seemed to be more like those...

To comment on a question or answer, you can use the "add new comment" button right below the question/answers.

To comment on a comment, you can use the "reply" button below each comment - that leads to hierarchical comments like this one:)

Former Member
0 Kudos

Volker: thank u very much, I was new to the forum and did not know the attiqutes. thanks for your reply and ur quick sa forum attiqutes 101

justin_willey
Participant

This one keeps on coming up - it could really do with a much clearer error message - "Database Log File X:\\blah.log does not exist" or something similar, you really have to go digging to find the problem, especially if it's a service that won't start.

http://sqlanywhere-forum.sap.com/questions/687/better-start-up-error-messages

Former Member

It really is very difficult to figure out from the message that is raised. I know as a developer that message could say that the drive your current log file is pointing to is not valid. it could give u a little more info.

VolkerBarth
Contributor

@Justin: You surely didn't want to add a self-link, right:)

I second your suggestion for a better error message in this situation.

justin_willey
Participant
0 Kudos

Thanks for spotting that Volker - link now fixed

jeff_albion
Product and Topic Expert
Product and Topic Expert
C:\\> net helpmsg 21
The device is not ready.

ERROR_NOT_READY - 21 (0x15) is the error return code from the Microsoft Windows Operating System when the SQL Anywhere engine tried to access the transaction log file. You can see all of the Microsoft Windows Operating System error codes here: http://msdn.microsoft.com/en-us/library/ms681381.aspx


Where is the transaction log actually being stored in relation to the database server process trying to start it? Is it on a removable device such as a flash card, external hard drive, or USB stick? Is it on a remote CIFS/SMB "network share"? Can you monitor the file access using a utility such as Microsoft Sysinternals Process Monitor to see if you get any errors logged accessing the file at that time?

(Note: We generally do NOT recommend running SQL Anywhere databases over a regular "network share" as doing so could manifest in errors such as the above - the database should instead be copied locally. See: http ://www.sybase.com/detail?id=1034790 for more details)

Former Member
0 Kudos

the service is running an instance of sqlanywhere on my local machine:

here are the full configurations:

C:Program FilesSQL Anywhere 11Bin64dbsrv11.exe

-x tcpip -n dv11Local -oe C:DVDatabasedv-db-startup-log.txt C:DVDatabasedv.db

the log file dv.log is also in DVDatabase folder.

I hope that will help

Former Member
0 Kudos

the service is running an instance of sqlanywhere on my local machine:

here are the full configurations:

C:Program FilesSQL Anywhere 11Bin64dbsrv11.exe

-x tcpip -n dv11Local -oe C:DVDatabasedv-db-startup-log.txt C:DVDatabasedv.db

the log file dv.log is also in DVDatabase folder.

I hope that will help