Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Monday, 7 May 2012

Script for Host and IP Information

REM: Script FOR Host and Ip Informations
REM: Author:  Kumar Menon
REM: Date Submitted: 07.09.2009
set feedback off
set termout on
set pagesize 56
set serveroutput on
set heading off
set linesize 3000
set feedback off
spool d:\hostnameip.wri
Prompt "Version Informations"
select * from v$version;
prompt "DB Character Informations"
select * from nls_database_parameters;
Prompt "Getting Ip Address and Hostname"
khost_name v$instance.host_name%type;
kip_address varchar2(60);
SELECT UTL_INADDR.GET_HOST_ADDRESS(khost_name) into kip_address FROM DUAL;
dbms_output.put_line('Actual IP Address of the DB Server...: ' || kip_address);
select host_name into khost_name from v$instance;
dbms_output.put_line('Actual Host Name of the DB...........: ' || khost_name);

spool off


Post a Comment