日期:2014-05-16  浏览次数:20452 次

数据库连接获得数据库、服务器的地址

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;
看这个