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 |
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. 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
(25 Nov '11, 10:53)
javedrehman
Replies hidden
2
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
(25 Nov '11, 11:07)
Volker Barth
1
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
(25 Nov '11, 12:01)
javedrehman
Replies hidden
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.
(25 Nov '11, 13:01)
Volker Barth
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:)
(25 Nov '11, 13:03)
Volker Barth
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
(01 Dec '11, 14:28)
javedrehman
|
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) 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
(25 Nov '11, 10:45)
javedrehman
|
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 1
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.
(01 Dec '11, 14:27)
javedrehman
1
@Justin: You surely didn't want to add a self-link, right:) I second your suggestion for a better error message in this situation.
(01 Dec '11, 16:39)
Volker Barth
Replies hidden
Thanks for spotting that Volker - link now fixed
(02 Dec '11, 15:49)
Justin Willey
|
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 |