How to fix error log file without owning. I/O error fatal error: No such file or directory --- transaction rolled back Thanks! |
That's either Windows 7 SP1, or Windows 2008 SP1, correct?
This is not a supported version of SQL Anywhere on Windows 7/2008. EBF 9.0.2.3924 or higher must be installed - see: http://www.sybase.com/detail?id=1023009#footnote_4 You can download the Windows x86 9.0.2.3951 EBF here.
What happened to this database the last time it was shut down such that the database needs to undergo recovery? Did the computer lose power?
The error code 38 is the Microsoft Windows system error. The command: It sounds like the database file (database.db) is actually corrupt and the file system metadata on disk that provides the length of the file does not match the actual length of the database file on disk. This can happen in some particular power-loss scenarios or with some disk drivers that do not properly flush data to disk (See: http://dcx.sybase.com/index.html#1201/en/dbprogramming/server-deploy.html*pg-deploy-windows-registry-entries ). If it is available and valid, you should go to your backup, and apply the current transaction log to bring it up to date. There are also possible ways to salvage the corrupted database, but it's likely that you will lose data. If you wish to attempt this, you should contact Technical Support. (Note: for this specific scenario, it may not require a full salvage engagement). Aside: Microsoft is also aware of a general metadata disk flushing problem / 'torn writes' and is attempting to address some of these issues in their enhanced file system, ReFS. Read more about this file system here: http://blogs.msdn.com/b/b8/archive/2012/01/16/building-the-next-generation-file-system-for-windows-refs.aspx 1
To conclude, I applied as directed current log file in the copy of the database and it worked perfectly. Thank you. Below result: Starting database "DATABASE" (C: DATABASE DATABASE.DB) Fri Oct 19 2012 at 14:56 Database recovery in progress Last checkpoint at Mon Oct 15 2012 11:00 Checkpoint log ... Performance warning: Database file "C: DATABASE DATABASE.DB" Consists of five disk fragments Transaction log: database.log ... Rollback log ... Checkpointing ... Starting checkpoint of "DATABASE" (DATABASE.DB) Fri Oct 19 2012 at 15:02 Finished checkpoint of "DATABASE" (DATABASE.DB) Fri Oct 19 2012 at 15:02 Recovery complete Database "DATABASE" (DATABASE.DB) started at Fri Oct 19 2012 15:02 Performance warning: Page size too small for database "DATABASE" Database server started at Fri Oct 19 2012 15:02 Trying to start SharedMemory link ... SharedMemory link started successfully Trying to start NamedPipes link ... NamedPipes link started successfully Trying to start TDS (TCPIP) link ... TDS (TCPIP) communication link not started Now accepting requests
(19 Oct '12, 15:20)
Walmir Taques
|
Hi - you'll have to explain a bit more - when does this happen, what reports the error message? Also it would be useful to know which version you are using.
I am using the version of Adaptive Server Anywhere 9 (9.0.2.2542) Is being presented this error message when trying to start the database.
DOS error 38 is a bit vague - "Unable to complete the operation". It is going to be something to do with the ability of the database engine to access the db and log files properly. Two possibilities to check: 1 is the log file in the location the database is expecting it to be (you can check with dblog.exe) 2 could another process have locks on either of the files?
dblog.exe the run and gave the following details:
but what does that mean? using the command line (-f or-gr) to start the database displays error has the same message.
Can you try checking what file the database is looking for? The command line would be:
you may need to change the password (pwd) of course.
Correct is: dbinfo.exe -c "dbf=c:databasedatabase.db;uid=dba;pwd=sql", only for the connected database.
Thanks for spotting that! I've corrected usn to uid in mine.
I tried to run the command line but it did not work, I had to run as follows:
dbinfo.exe -c "dbf=c:databasedatabase.db;uid=dba;pwd=sql" instead of dbinfo.exe -c "dbf=c:databasedatabase.db;usn=dba;pwd=sql" And does not work because the database must be started
What do you get if you run
ie against the database not the log
dblog.exe the run and gave the following details:
C:>dblog.exe c:databasedatabase.db
Adaptive Server Anywhere Transaction Log Utility Version 9.0.2.2542 "c:databasedatabase.db" is using log file "database.log" "c:databasedatabase.db" is using no log mirror file Transaction log starting offset is 0442411716 Transaction log current relative offset is 0465403160
That confirms that the database is looking for a log file with the right name in the same folder as itself - which is what you have. Also the starting offsets match which is a good sign. However this:
Does suggest a problem with the log file. Does it translate to SQL successfully:
One other thing - when you tried to start with the -f swtich, did you still have the log file in the same folder as the db, if so that could have failed because a conflict when the engine tried to create a new log file.
Translated SQL successfully.
Running dbtran shows:
C: > dbtran c: database database.log c: database database.sql Adaptive Server Anywhere Log Translation Utility Version 9.0.2.2542 Transaction log "c: database database.log" starts at offset 0442411716 100% complete Transaction log ends at offset 0907814876
Sql file generated from 2.6 GBytes (how to use this file, what is?)
Yes, Running-f (without the log file).
Hi - the sql file is a translation of the log file into SQL statements - ie everything done to the database since the log file was last truncated. The fact that it translated without error suggests that there is nothing wrong with the log file.
I'm afraid I'm running out of suggestions here. Do you have another machine you can try this db and log file on? Do you have another db that you know is OK you can try on this machine? Otherwise you may have to open a support case with SAP, unless anyone else has any ideas?
I followed this link
http://www.sybase.com/detail?id=1010805
and still do not know how to solve. I requested a backup. I'll end up starting the db backup.