ORACLE常用问题
上一篇 / 下一篇 2009-08-17 18:03:33 / 个人分类:测试相关知识
ORACLE常用傻瓜问题1000问51Testing软件测试网5C^ l#Ib/J.t
i\
作者: CCBZZP51Testing软件测试网
Fg1^7e&\,se:E0l\
1. Oracle安装完成后的初始口令?51Testing软件测试网t%|Z {qT
internal/oracle
:\-RxV"GKz0 sys/change_on_install51Testing软件测试网6^2|#f~lAC
system/manager
!]"OSF(O1W0 scott/tiger51Testing软件测试网4r-u4Rg-m
sysman/oem_temp
N0cH1?/VWg02. ORACLE9IAS WEB CACHE的初始默认用户和密码?
Lhnm1AU0 administrator/administrator51Testing软件测试网+jx*hz R_
3. oracle 8.0.5怎么创建数据库?51Testing软件测试网 m"t%aK:b1E&^
用orainst。如果有motif界面,可以用orainst /m
$E7R?Pj#Mw
U04. oracle 8.1.7怎么创建数据库?51Testing软件测试网EKJ @+ih$@+j9x
dbassist
%[5R6e-z0R3W05. oracle 9i 怎么创建数据库?
dh9k `C+na0 dbca51Testing软件测试网O~ft;o.S`'W
6. oracle中的裸设备指的是什么?51Testing软件测试网&s*Gau Rth8]
裸设备就是绕过文件系统直接访问的储存空间51Testing软件测试网/Uy0g9w"AB)D,C e8i
7. oracle如何区分 64-bit/32bit 版本?
5|5iU bn |k0$ sqlplus '/ AS SYSDBA'51Testing软件测试网 X8T"r1I,|0E$^` H
SQL*Plus: Release 9.0.1.0.0 - Production on Mon Jul 14 17:01:09 2003
.@r!W/j(N-Y;]0(c) Copyright 2001 Oracle Corporation. All rights reserved。51Testing软件测试网M_ Wh%l
Connected to:
fv?7dp6a&rbXc0Oracle9i Enterprise Edition Release 9.0.1.0.0 - Production51Testing软件测试网Q
Dw)STQ9r
_@
With the Partitioning option
n{|f;`_$g0JServer Release 9.0.1.0.0 - Production
{)[bQ`U2Vzyx0SQL> select * from v$version;
"B [#jW(t0BANNER
!ROEy qfa0----------------------------------------------------------------51Testing软件测试网9H4]4jS,{hFP)l3EM
Oracle9i Enterprise Edition Release 9.0.1.0.0 - Production51Testing软件测试网;Y
~ i$Xh w9q
PL/SQL Release 9.0.1.0.0 - Production
/E![n(h3N?y0CORE 9.0.1.0.0 Production
2|2b(\a;Jl0TNS for Solaris: Version 9.0.1.0.0 - Production
"i B`9e!h,IH)K4Y0NLSRTL Version 9.0.1.0.0 - Production
7n:u{!n)r(M|#t(w0SQL>
Z1Q!t*z:\v7Va!f2}4j08. SVRMGR什么意思?
v9O8_.X6n0svrmgrl,Server Manager 9i下没有,已经改为用SQLPLUS了
;["z;B|q}ZH'Z0sqlplus /nolog 变为归档日志型的
a{l)C/aBhl09. 请问如何分辨某个用户是从哪台机器登陆ORACLE的?
` UI
wlBz1g+~Uxq0SELECT machine ,terminal FROM V$SESSION;51Testing软件测试网6f ETf"m
V
10. 用什么语句查询字段呢?
8P e,BE#Y%E#r0desc table_name 可以查询表的结构
yD_3sq0select field_name,... from ... 可以查询字段的值51Testing软件测试网3hFP+`4uL"j`pV
select * from all_tables where table_name like '%'
2@'x9g]?q0select * from all_tab_columns where table_name='??'51Testing软件测试网(_`0byv2^ ~K&n
11. 怎样得到触发器、过程、函数的创建脚本?51Testing软件测试网dV3p~7Gi-W`M
desc user_source51Testing软件测试网"CxObdgMfd@C
user_triggers51Testing软件测试网1g;['Wr d)W5G0I~
Jx{
12. 怎样计算一个表占用的空间的大小?51Testing软件测试网*Z5hg+cA rjt;J
select owner,table_name,NUM_ROWS,BLOCKS*AAA/1024/1024 "Size M",EMPTY_BLOCKS,LAST_ANALYZED
3MSPC _$T~yo0from dba_tables
O8\Vd+BFK;m0where table_name='XXX';
+v X8Cu Wd,X0Here: AAA is the value of db_block_size;
LKx7v1|f0hY0XXX is the table name you want to check51Testing软件测试网djDALY5}
h
13. 如何查看最大会话数?51Testing软件测试网)qO
K
{-q.u
SELECT * FROM V$PARAMETER WHERE NAME LIKE 'proc%';
rK%wfr|0SQL>51Testing软件测试网E
dQ7S
p0fO
SQL> show parameter processes
P+jD0?+S#BRc0NAME TYPE VALUE51Testing软件测试网;?7PX$lJdk-R
Sda^
------------------------------------ ------- ------------------------------51Testing软件测试网`c/\mrr-T8wl
aq_tm_processes integer 1
,i)|4iNjt
c0db_writer_processes integer 151Testing软件测试网,wq
v CB\8I,J4CY
job_queue_processes integer 4
_K@.c%S-u,h9T/ak0log_archive_max_processes integer 151Testing软件测试网}]'{Ux6[ `
processes integer 20051Testing软件测试网-q^.r0E1?({F(zN
这里为200个用户。
?3M'PYa4egV0Select * from v$license;
N+bN2B,O8F$PQ0其中sessions_highwater纪录曾经到达的最大会话数51Testing软件测试网)sC+aOw.Na
14. 如何查看系统被锁的事务时间?
:|4`0`a1nCv*ht0select * from v$locked_object ;51Testing软件测试网 VU;N%s"b5B
ut*o n
15. 如何以archivelog的方式运行oracle?
%ca LVA:sM,\0init.ora51Testing软件测试网,ge$bU mJ)@/M2V(X
log_archive_start = true
u,R$`&v