cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

I need to write a program to find out which database server is used, its ip address, its version and the databases within the server. How can i do that? Is there a config file or something similar which has all the information. Are there any APIs which i can use?

Please help me out here.

0 Likes
View Entire Topic
volker_borowski2
Active Contributor
0 Likes

Hi,

for an ABAP stack system, you need to define wich SID you like to query.

Then switch to user sidadm and execute "R3trans -d".

You can parse the resultfile "trans.log" for a lot of your required information.

Additional options are to switch to orasid and execute


sqlplus -s / as sysdba <<EndOfSql
select * from v\$version;
exit
EndOfSql

and parse the output.

Volker

Former Member
0 Likes

these scripts look interesting, but if they are not running on Oracle?

volker_borowski2
Active Contributor
0 Likes

Good point Eric,

well, in that case he is busted

But at least he is asking in the Oracle Forum, and depending on the trans.log output, he could open a switchcase with

sqlplus ...

xsql ...

dbaccess ...

Whatever the other DBs have as query tools

Volker

P.S.:

wait ... wasn't there a "tp getdbinfo ..." ? I'm @ HOME now, so no system to test... Can somebody fill in ?

Edited by: Volker Borowski on Aug 24, 2011 9:01 PM