Unanswered: 425 - Database is currently opened by another user
I'm using IDS 9.21 NT 4.0 as Operating System. I would like to automate the dbexport with batch file. But when I try to reun the dbexport command it Giving the Following Errors :
1) 425 - Database is currently opened by another user
2) 107 - ISAM error: record is locked.
But I can run the command after restarting the IDS. It may be cause of some Proccess going on. I need help to kill the process and restart the IDS without harm to the DB through batch file.
So that I can automate it. Any Plz help me. Thanx in advance.
One of the primary requirement for successful execution of dbexport job is that it needs database access in exclusive mode. A DBA need to monitor active sessions and plan dbexport job according to the least traffic situation in the database. A automated (batch process) may result in havoc of active sessions, should such batch process kill all those active sessions!
Anyway, you may fall upon steps outlined below to automate it.
1. output to aa.cmd without headings select 'onmode -z '||sid from sysmaster:syssessions ;
2. Run aa.cmd
3. Wait for some time. (example: sleep 10) Let the engine commit/rollback those active sessions having transactions.
4. Check for any remaining active sessions: select count(*) from sysmaster:syssessions;
5. If any sessions are active repeat steps 1 to 4
6. dbexport -d <database> -ss ...