forked from jeanron100/dbm_lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
showdbpro.sh
38 lines (32 loc) · 1.01 KB
/
showdbpro.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
sqlplus -s $DB_CONN_STR@$SH_DB_SID <<EOF
REM ------------------------------------------------------------------------
set pagesize 20
set feedback off
set verify off
set head on
alter session set nls_date_format='HH:MI:SS DD-MON-YY';
col host_name for a15
col instance_name format a11
col version format a15
col status format a8
col RAC for a5
col log_mode format a10
col platform_name format a20
set lines 150
PROMPT
--PROMPT --------------- Instance general information ------------------
select (select decode(value,'TRUE','YES','NO')from v\$option WHERE Parameter = 'Real Application Clusters') RAC,
(select log_mode||','||database_role from v\$database where rownum<2)log_mode,
(select platform_name from v\$database where rownum<2)platform_name,
inst_id, instance_name, host_name, version, status, startup_time
from gv\$instance
order by inst_id;
set pages 50
col property_name format a30
col property_value format a40
col description format a60
select *from database_properties;
PROMPT
EOF
exit