a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 67|回复: 0

[综合] Oracle常遇问题解析3

[复制链接]
发表于 2012-8-4 13:54:49 | 显示全部楼层 |阅读模式
10. 用什么语句查询字段呢? % R) D1 T0 s0 M% Y$ |6 d
desc table_name 可以查询表的结构
( K0 x$ x% Y4 a$ b/ Z5 b* c/ B$ tselect field_name,... from ... 可以查询字段的值 # [! Y3 d' M1 c. i4 `
select * from all_tables where table_name like '%'
, @' Z+ h/ K) l1 ~! kselect * from all_tab_columns where table_name='??'
; B0 W9 D- M2 j* F  l; [% e& e
6 a+ ]5 c5 I4 K11. 怎样得到触发器、过程、函数的创建脚本? ) A  O8 R' M; e% i( Z
desc user_source # O8 O) a. x2 n  R* b7 j
user_triggers + |2 W  l4 u0 M+ z" j
+ @. X* n! a+ ^  F3 I: a7 B
12. 怎样计算一个表占用的空间的大小? : J$ L5 C& X; o# J
select owner,table_name, / {+ ?1 X( g5 j4 @$ n" P) j4 d9 O
num_rows,
" X: C: J& t$ }blocks*aaa/1024/1024 "size m", 4 W% l0 m* z: h6 K
empty_blocks,
& e; w+ K( k9 O# g" v2 Y& p) E- m) Y2 plast_analyzed 2 M% q8 |! `. P5 l! V* i" p) Y  p
from dba_tables
+ k. d' Q5 O% ~' F4 Q0 lwhere table_name='xxx'; ! k2 H& u' E: U4 C1 L
here: aaa is the value of db_block_size ;
3 }: d  ]- ]* rxxx is the table name you want to check
3 o% o/ Y! O. {+ E' d $ s5 F/ w4 |+ T
13. 如何查看最大会话数?
0 ^1 y+ ]: T: ?, W" {* Wselect * from v$parameter where name like 'proc%';
* {. }# P/ c4 T2 u+ msql>
+ _( U0 D! J9 U. d9 \9 o1 r# Bsql> show parameter processes ) x, ]/ x3 }; \3 ~7 X8 R* l1 P
name type value
) ?/ V0 y8 b1 |+ Q& j( ]1 Q------------------------------------ ------- ------------------------------ 7 M0 v" Z5 I7 x" Z" k1 k
aq_tm_processes integer 1 - N3 m' Z( I  t1 r$ \; t1 c
db_writer_processes integer 1 0 R; Y" }; C+ c! A1 n+ K
job_queue_processes integer 4 ' b$ S* o: `7 C. K+ t
log_archive_max_processes integer 1 3 y! `- i. i9 Z% M) f# ^& `
processes integer 200 ( q: X: o: j/ z" q
这里为200个用户。 0 q: f3 t$ D! n" n/ f' s" H0 S
select * from v$license; ) k/ M# I) [% G3 N2 n! U
其中sessions_highwater纪录曾经到达的最大会话数
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-2 23:19 , Processed in 0.202064 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表