Checking Adabas DB status

Adabas 6.3.0
Natural 6.3.11
HP UX

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.

Thank you.

adashow nnn

where nnn is the dbid will print a bit of environmental information plus the
status (active / inactive)

adaopr db=nnn,di=act

(or any other command) will either print the requested information or return

%ADAOPR-E-ADA148, * ADABAS is not active or nucleus cannot be contacted

1 Like

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.

You can also use getdbinfo under …\Adabas Client Package\opt\tstprg.

This one can be used both locally and remote to check if a database is active and accessible.

getdbinfo 199

get platform and version info of database 199


Database   199 is active, V6.1.10.4 , Platforms = 21 ,opsys=UNIX/Windows, local access

Result if used remote:

get platform and version info of database 199


Database   199 is active, V6.1.10.4 , Platforms = 21 ,opsys=UNIX/Windows, remote access
1 Like

On linux this is

/$ACLDIR/$ACLVERS/tstprg/bin/getdbinfo <dbid>

and will give either

 get platform and version info of database 222

 Database   222 is active, V6.3.0.4 , Platforms = 21 ,opsys=UNIX/Windows, local access

for an active database.

For an inactive database it will give

 get platform and version info of database 221

 Database 221  -- ** Response code 148 from ADABAS for Open call

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.

Thanks Mogens and Wolfgang.

If getdbinfo replies ‘ok’ I would definitely expect the database to be ready.

Are you sure your SYSOBJH does not access another database that is not ready yet? It could be the FSEC file or similar(?).

Or FDIC ?

SYSOBJH by itself does not require any database access on OpenSystems.

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.

getdbinfo works perfectly. Thanks gentleman. Your help is greatly appreciated.