查看Oracle数据库名和实例名的命令
查看名
sql> select name from v$database;
name
---------
orcl
sql> desc v$database;
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
dbid number
name varchar2(9)
created date
resetlogs_change# number
resetlogs_time date
prior_resetlogs_change# number
prior_resetlogs_time date
log_mode varchar2(12)
checkpoint_change# number
archive_change# number
controlfile_type varchar2(7)
controlfile_created date
controlfile_sequence# number
controlfile_change# number
controlfile_time date
open_resetlogs varchar2(11)
version_time date
open_mode varchar2(10)
protection_mode varchar2(20)
protection_level varchar2(20)
remote_archive varchar2(8)
activation# number
switchover# number
database_role varchar2(16)
archivelog_change# number
archivelog_compression varchar2(8)
switchover_status varchar2(20)
dataguard_broker varchar2(8)
guard_status varchar2(7)
supplemental_log_data_min varchar2(8)
supplemental_log_data_pk varchar2(3)
supplemental_log_data_ui varchar2(3)
force_logging varchar2(3)
platform_id number
platform_name varchar2(101)
recovery_target_incarnation# number
last_open_incarnation# number
current_scn number
flashback_on varchar2(18)
supplemental_log_data_fk varchar2(3)
supplemental_log_data_all varchar2(3)
db_unique_name varchar2(30)
standby_became_primary_scn number
fs_failover_status varchar2(21)
fs_failover_current_target varchar2(30)
fs_failover_threshold number
fs_failover_observer_present varchar2(7)
fs_failover_observer_host varchar2(512)
---------------------------------------
查看实例名
sql> select instance_name from v$instance;
instance_name
----------------
orcl
sql> desc v$instance;
名称 是否为空? 类型
----------------------------------------- -------- --------------
instance_number number
instance_name varchar2(16)
host_name varchar2(64)
version varchar2(17)
startup_time date
status varchar2(12)
parallel varchar2(3)
thread# number
archiver varchar2(7)
log_switch_wait varchar2(15)
logins varchar2(10)
shutdown_pending varchar2(3)
database_status varchar2(17)
instance_role varchar2(18)
active_state varchar2(9)
blocked varchar2(3)
上一篇: 一款纯css3实现的圆形旋转分享按钮旋转角度可自己调整
下一篇: 梳理知识