oracle 数据库中常用经典SQL查询(3)_Oracle数据库_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

oracle 数据库中常用经典SQL查询(3)

作者:黑客防线网安Oracle维护基地 来源:黑客防线网安Oracle维护基地 浏览次数:0

本篇关键词:Oracle数据库Oracle教程
黑客防线网安网讯:    IN ('db block gets',  'consistent gets') group by v$waitstat.class, v$waitstat.count  18。查看sga情况  SELECT NAME, BYTES FROM SYS.V_$SGASTAT ORDER BY...
    IN ('db block gets',
  'consistent gets') group by v$waitstat.class, v$waitstat.count
  18查看sga情况
  SELECT NAME, BYTES FROM SYS.V_$SGASTAT ORDER BY NAME ASC
  19查看catched object
  SELECT owner,              name,              db_link,              namespace,
  type,              sharable_mem,              loads,              executions,
  locks,              pins,              kept        FROM v$db_object_cache
  20。查看V$SQLAREA
  SELECT SQL_TEXT, SHARABLE_MEM, PERSISTENT_MEM, RUNTIME_MEM, SORTS,
  VERSION_COUNT, LOADED_VERSIONS, OPEN_VERSIONS, USERS_OPENING, EXECUTIONS,
  USERS_EXECUTING, LOADS, FIRST_LOAD_TIME, INVALIDATIONS, PARSE_CALLS, DISK_READS,
  BUFFER_GETS, ROWS_PROCESSED FROM V$SQLAREA
  21。查看object分类数量
  select decode (o.type#,1,'INDEX' , 2,'TABLE' , 3 , 'CLUSTER' , 4, 'VIEW' , 5 ,
  'SYNONYM' , 6 , 'SEQUENCE' , 'OTHER' ) object_type , count(*) quantity from
  sys.obj$ o where o.type# > 1 group by decode (o.type#,1,'INDEX' , 2,'TABLE' , 3
  , 'CLUSTER' , 4, 'VIEW' , 5 , 'SYNONYM' , 6 , 'SEQUENCE' , 'OTHER' ) union select
  'COLUMN' , count(*) from sys.col$ union select 'DB LINK' , count(*) from
  22。按用户查看object种类
  select u.name schema,   sum(decode(o.type#, 1, 1, NULL)) indexes,
  sum(decode(o.type#, 2, 1, NULL)) tables,   sum(decode(o.type#, 3, 1, NULL))
  clusters,   sum(decode(o.type#, 4, 1, NULL)) views,   sum(decode(o.type#, 5, 1,
  NULL)) synonyms,   sum(decode(o.type#, 6, 1, NULL)) sequences,
  sum(decode(o.type#, 1, NULL, 2, NULL, 3, NULL, 4, NULL, 5, NULL, 6, NULL, 1))
  others   from sys.obj$ o, sys.user$ u   where o.type# >= 1 and    u.user# =
  o.owner# and   u.name <> 'PUBLIC'   group by u.name    order by
  sys.link$ union select 'CONSTRAINT' , count(*) from sys.con$
  23。有关connection的相关信息
  1)查看有哪些用户连接
  select s.osuser os_user_name,    decode(sign(48 - command), 1, to_char(command),
  'Action Code #' || to_char(command) ) action,     p.program oracle_process,
  status session_status,    s.terminal terminal,    s.program program,
  s.username user_name, &nbs
  p;  s.fixed_
    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-13053-1.html
网站维护教程更新时间:2012-03-23 00:50:05  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer