Oracle 查询数据库、服务器地址信息
Oracle 查询数据库、服务器地址信息

Oracle 查询数据库、服务器地址信息

select ‘连接数’ as labelname, ‘当前有’ || to_char(count(1)) || ‘个到此数据库的连接’ as info from v$session union all
select ‘用户名’ as labelname, user as info from dual union all
SELECT ‘数据库名’ as labelname, NAME as info FROM V$DATABASE union all
SELECT ‘服务器名’ as labelname, host_name FROM v$instance union all
select ‘版本信息’ as labelname, “BANNER” as info from v$version where rownum = 1;

发表评论