Is there an easy way to check if a database is up from the OS prompt? At a previous shop, there was a testdb.exe available in the Adabas version directory on OpenVMS. I don’t know if this was developed in-house or SAG provided but I cannot find the same thing in our Adabas directory on HP UX. Basically, I need to ensure the database is available before running a SYSOBJH session in Natural. I’m sure I can develop a workable solution in Natural but I was hoping there was already a way using Adabas utilities or a SAG provided means.
Thanks Wolfgang. I’ll check out each of these. I was using “adaopr db=1” but that alone returns a success code long before the database starts responding well for SYSOBJH. I’ll see if actually displaying data changes anything or parse the active from adashow to get my answer. Thanks a lot.
I am still getting a 3148 in SYSOBJH despite parsing " active" using the adashow option and when checking the return code from the adaopr option. I implemented the solution simply giving 5 minutes for the database to come up, which I’m sure is excessive. I’ll give detdbinfo a try as time permits and report back.
Below is the error I am getting. It is specifically reporting db1 as the problem. This is the only db I stop and start as part of the prod to dev restore. I’m running a test now using getdbinfo and will report on the results. Thanks.
SYSOBJH LOAD * LIB RN2 WHERE WORK /SAG/temp/rn2-natural-source.sag REPLACE ALL
LOAD * LIB SYSTEM WHERE WORK /SAG/temp/rn2-natural-source-ddm.sag REPLACE ALL
DISPLAY STATISTICS
STOP
LOGON SYSTEM
CATALL * ALL
LOGON RN2
CATALL * ALL
FIN
Error: -3148
Natural error 3148 occurred in line 660 of program OLNLNAT
Processing stopped!
Error detected in OLNLNAT.
Database 1 is not active or not accessible
SYSOBJH terminates with condition code 99
TERM
NAT9987 Natural session terminated abnormally - RC=99.