51Testing软件测试网 P?Is3?plc7U
查看当前用户的缺省表空间51Testing软件测试网 kF$r|8Wl
7WX&]b]"F,V%b0SQL>select username,default_tablespace from user_users;-]?*b`-v`|0
#Ic'Obx"b;Y@N0查看当前用户的角色51Testing软件测试网6RjP:~I'n51Testing软件测试网;F2xK"|B%P#M/y+N
SQL>select * from user_role_privs;|sr2Oj051Testing软件测试网%lJpR-[cMb[
查看当前用户的系统权限和表级权限%L1U3K\l051Testing软件测试网j8Fs;|*WCN
SQL>select * from user_sys_privs;/@|3u'Uo,E8A6]051Testing软件测试网:R7`#`2n KZ
SQL>select * from user_tab_privs;51Testing软件测试网aBW-Rw!XId5H51Testing软件测试网|D.AX8^n
查看用户下所有的表&wHa|sI0
)}}T?c a7~(S0SQL>select * from user_tables;GC!j.q P1M@?{0
#Mjv&y&{ZVQQ0显示用户信息(所属表空间)7{J,V)tG)|w@0
`6A*AP0@:kY.U]\0select default_tablespace,temporary_tablespace51Testing软件测试网:c;fs:VT1^|(J3W-N51Testing软件测试网Z7qdqHR7\
from dba_users where username='GAME';51Testing软件测试网B^#IQ5j
?:^
u!o:l4~ xn}h01、用户5U0_Xo7[}bWP;j8J0
vW,K+Jt q;n0查看当前用户的缺省表空间51Testing软件测试网%R!B4tk
[*{"Z\51Testing软件测试网3^-M1\)\8pg/F8u3B
SQL>select username,default_tablespace from user_users;51Testing软件测试网"P'Cm#c;F'J
!]_ fD/K3x4cy0查看当前用户的角色51Testing软件测试网Mmh|Ry:@W!l
W{d&fG0UCWb!S0SQL>select * from user_role_privs;51Testing软件测试网-s7vSSWPKD51Testing软件测试网3g2rV~6i.e_d5KEN
查看当前用户的系统权限和表级权限,}'S_T.C P/Su0
b:HA+i0iR1|0SQL>select * from user_sys_privs;51Testing软件测试网4G%r'xwpX#]Q
y&R6E9bU O*jF${NZ0SQL>select * from user_tab_privs;51Testing软件测试网:wKgi+tA6q4K
)g;QM4J
w?&\
WC:A0显示当前会话所具有的权限51Testing软件测试网 c4B;@Blf~_
3v-Izl:BOAM0SQL>select * from session_privs;0R*z(Y*x+E3X U v0
uT.a0d#NO4UZ#c[L0显示指定用户所具有的系统权限.lPp3eHu0
Cs7]$r6gYr4m0SQL>select * from dba_sys_privs where grantee='GAME';51Testing软件测试网d_(`Y6u.j6O51Testing软件测试网i.C%y0s?;^@x9~
显示特权用户)q'ab2SWR3R.h%e051Testing软件测试网zp9e)]/v
select * from v$pwfile_users;51Testing软件测试网aU3t+gm(C
ai*lP9`r#z0显示用户信息(所属表空间)51Testing软件测试网 Qib-jF:j?/z(d;L4d
?T&E3xm8F9Y5XR:Bp8q0select default_tablespace,temporary_tablespace51Testing软件测试网 F(e["Yc9YjY51Testing软件测试网9~h&u\hXF-m4Yke
from dba_users where username='GAME';51Testing软件测试网r&f)A1F u}
kj1_
_#d9zm0显示用户的PROFILE51Testing软件测试网:Z(tE[F _P
t
J[8V,Ntj8T)v0select profile from dba_users where username='GAME';51Testing软件测试网Mv7fs.v/]51Testing软件测试网g3{K9E*]:m y
2、表t&KLn DV-G;}:{051Testing软件测试网DK'J&s;Gb#M/NJ
查看用户下所有的表{}?,qr_2[;V.V9{@2l0
A,O/ak/vpxI0SQL>select * from user_tables;51Testing软件测试网P$xO/H.jFO,{
h;|!O@4e,u0查看名称包含log字符的表51Testing软件测试网7[c4Mr$|;KK`I
Au
hDp.AU"\0SQL>select object_name,object_id from user_objects51Testing软件测试网ba/U^9P'{mz%H51Testing软件测试网&[G;QLyc
RT}
where instr(object_name,'LOG')>0;k7]2zJTVz0
,f,kF!XoK0查看某表的创建时间6}/vPY V*z|0K2yIq3k051Testing软件测试网$x^@f em{
SQL>select object_name,created from user_objects where object_name=upper('&table_name');g.Q!~#~d e8~0L(@&A0
QJ'n7\jvv
G0查看某表的大小51Testing软件测试网*gl-HMO!Q pe@51Testing软件测试网.b@,IA
DQ
SQL>select sum(bytes)/(1024*1024) as "size(M)" from user_segments&\Z5Tp8p5Cr051Testing软件测试网$H6us0|7}a^
where segment_name=upper('&table_name');51Testing软件测试网t\W6?B)rigV"RS
pk:yO.E%d0x{0查看放在ORACLE的内存区里的表_3Z1Qbm'HTC%R:C0
a1Td7}3{iIQ0SQL>select table_name,cache from user_tables where instr(cache,'Y')>0;51Testing软件测试网!Z \-I2mn
E:bch