首页  电脑故障排除  病毒安全 电脑基础知识  硬件知识  软件应用知识  操作系统知识  编程程序

美国编程网址 日本编程网址 法国编程网址 德国编程网址 韩国编程网址 香港编程网址 台湾编程网址

您的位置:首页>>编程程序>>Oracle

据说是世界上提问率最高的21个问题

 
据说是世界上提问率最高的21个问题
  
  RDBMSSUPPORT'sTOP21
OracleWorldwideTechnicalSupportanswersapproximately6000questions
aweek.IntheRDBMSsupportgroupwefindthereisoftenacommonthemeto
thequestions.Followingaresomeofthemostcommonlyaskedquestionsand
problemsencounteredintheRDBMStechnicalsupportgroup.Thesequestions
arebasedonproblemsencounteredbyrelativelynewDBA's.Alsoincluded
areanswersand/ortoolstohelpfurtheridentifytheproblem.
1.Q.WhatshouldIdoaboutthiswarning:"WarninginSQLPLUS"product
informationtablenotloaded"?
A.Run$ORACLE_HOME/sqlplus/admin/pupbld.sqlassystem(seeappendixof
sqlplusreferenceguidefordetails).
2.Q.HowcanusersberestrictedfromissuingDMLfromSQLPLUS(whenwithin
formstheyarerestrictedbutinSQLPLUStheyaren't)
A.UsetheProductUserProfiletableinSQLPLUS(createdbypupbld.sql.)
3.Q.Tryingtorestorefromafullexportandgetting"duplicatekeyin
index".Whyisthisoccurring?
A.TheDBwasnotreinitializedbeforeimport
recreateDB,runcatalog.sqlandexpvew.sql.
4.Q.Whyisperformanceslowonanparticularapplication?
A.RunEXPLAINPLANandTkproftogatherinfoaboutexecutionplanand
somestatistics(thisdoesn'tnecessarilysolvetheproblembutwill
helptoidentifyit).
5.Q.WhyisatablespacethathasbeendroppedstillintheData
Dictionary?
A.ItisprobablyintheDDas'invalid'...itwillremainthereunless
theDBisreinitialized.
6.Q.Ican'tcreateobjectsinnewtablespaces.What'swrong?
A.LookinDBA_ROLLBACK_SEGStobesurethereare2rollbacksegments.If
thereisn'tcreateanother(restartDBwithitaddedtoinit.oraif
itisprivate)beforecreatingobjects.
7.Q.Whyistheprivaterollbacksegmentthatwasjustcreatednotbeing
used?
A.Ifitisprivateitmustbeaddedtoinit.oraandtheDBrestarted
beforeitwillbeacquired.
8.Q.WhatdoIdowhenanapplicationishanging?
A.UseSQLDBAMonitorLocks(alsotablesandprocesses)todetermineif
thetable(orrow)islockedandreviewtracefilesandalert.logfor
errors(thisdoesn'tnecessarilysolvetheproblembutwillhelpto
identifyit).
9.Q.HowcanyoushrinkaRollbackSegment??(Orthevariation:aren't
RollbackSegmentsdeallocated?)
A.InV6rollbacksegmentsaren'tdeallocatedandyoumustdropand
recreateto"shrink"them...inV7youcanspecifyan"OPTIMALSIZE"
thattherollbacksegmentwillshrinkto.
10.Q.Howdoyoumovedatafromonetablespacetoanother?
A.Seepage3-3oftheV6UtilitiesGuide(youneedtorevoke,grant,
alteruser,imp)
11.Q.WhyisacreatedPublicRollbackSegmentnotusedbytheapplication?
A.Iftransactions/transactions_per_rollback_segmentislessthanone
thanonlyonerollback_segmentwillbeacquiredanditwillbesystem.
MaketherationofthetwobeequaltothenumberofRollbackSegments.
12.Q.Thedatabaseishanging,userscanlogon,butnotdoanywork.What
canIdo?
A.Checkwhetherthearchiverisstuck(alert.logwouldshowORA-255).
Eithermakespaceinthearchivaldestination,orchangethe
log_archive_destparameter.
13.Q.HowcanIgetafullerrorlisting?
A.Addtracingtoyoursessionbyissuingan
'altersessionsetsql_tracetrue'.
LookfortracefilesintheUSER_DUMP_DESTdirectory.
14.Q.Iremovedthedatafilebeforedroppingthetablespace.HowcanI
recoverfromthis?
A.1)shutdown
2)startupmount
3)alterdatabasedatafile'fullpath_of_removed_DF'offlinedrop
4)alterdatabaseopen
5)droptablespacets_nameincludingcontents
15.Q.IhaveDBAprivilegesandstillcan'tconnectinternal.Why?
A.'connectinternal'ischeckedattheOSlevel.InUnixitmeansthat
youruseridneedstobelistedattheDBAgroupinthe/etc/group
file.
16.Q.HowcanIcreateacopyofmydatabase?
A.Doafullexportofthedatabase,pre-createtheseconddatabase
includingtheneededtablespace,thenperformfullimport.
17.Q.Whyaresometablesmissingfromafullexport?
A.ObjectsownedbySYSarenotexported.Youshouldn'tbecreating
tablesassys.
18.Q.Whyis'Charactertypeconversion3to1notsupported'onanimport?
A.That'simporttellingyouit'stryingtoloadavarcharintoachar.
Youneedtogetav6exportofthev7databasebyusingthev6export
utilityagainstthev7database:
1)run'catexp6.sql'assysonthev7database(thiswillestablish
theviewsneededforav6export.
2)Fromthev6,setupTWO_TASKtopointtothev7database,then
performtheexport.
19.Q.WhatdoIdoifDroptablespaceishanginginv6?
A.MakesurethattheDC_parametersarehighenough.
dc_free_extents>selectcount(*)fromsys.fet$;
dc_used_extents>selectcount(*)fromsys.uet$;
row_cache_enqueue>=dc_free_extents+dc_used_extents;
20.Q.Howmanyblocksareactuallyusedbythedatainmytables?
A.Thisquerywillcountalltheblocksoccupiedbythetable'sdata:
selectcount(distinct(substr(ROWID,1,||
(substr(ROWID,15,4))
from
21.Q.HowcanIfindalltheduplicateentriesinatable?
A.select*fromreal_table_nameX
whererowid<(selectmax(ROWID)fromreal_table_namewherecol1=X.col1andcol2=X.col2.....);
  
  
  
  cyh 回复于:2003-06-01 16:24:14
看不懂啊
sysadm 回复于:2003-05-30 13:17:31
好,拜读
gsging 回复于:2003-05-31 08:38:11
虽然偶不懂oracle,但也up一下。
赛扬600 回复于:2003-05-31 08:58:49
谁能把上面的都翻译一下,让大家都看明白呀?
wolf2602 回复于:2003-05-31 10:27:21
好!
Anonymous 回复于:2003-05-31 13:31:16
up
kingbird 回复于:2003-06-01 12:42:34
不错,从哪搞的??
ohwww 回复于:2003-06-02 13:20:33
这么好的东西,请那位高手翻译一下啊
quicksand 回复于:2003-06-02 14:34:58
[quote:8048416a78="赛扬600"]谁能把上面的都翻译一下,让大家都看明白呀?[/quote:8048416a78]
赞同!!!!!!!!!
feijin 回复于:2003-06-02 14:45:39
[quote:17ac743746="kingbird"]不错,从哪搞的??[/quote:17ac743746]
从一个很古老的网站,好像基本停滞了
http://www.oradb.net/
debuger 回复于:2003-06-03 07:38:48
[由kingbird提供]
有朋友想要中版的,所以帮翻译一下,声明---完全是“据说是世界上提问率最高的21个问题”的翻译版,仅供想看中文的朋友。
1.Q:如何处理这个警告:“SQLPlus警告‘产品信息表没有被装载?’”
A:以system身份运行$oraHome\sqlplus\admin\pupbld.sql文件(可以查看sqlplus指南获得详细信息)
2.Q:如何限制用户使用sqlplus执行DML(如限制了用户在窗口中的操作但是没有限制在sqlplus中操作)
A:在sqlplus中使用pupbld.sql文件创建用户profile表
3.Q:从一个完全到处文件恢复数据库而且指定复制索引,但是有问题?
A:数据库在导入之前没有被重新初始化,重新创建数据库,执行catalog.sql和expvew.sql文件
4.Q:为什么执行一个具体的应用程序很慢???
A:可以执行EXPLANPLAN和TKprof命令收集关于执行计划和一些统计信息(这不能解决问题但是对鉴定问题所在有帮助)
5.Q:为什么已经被删除的表空间仍然在数据字典中?
A:它在数据字典中是无效的,他会一直存在知道重新初始化数据字典。
6.Q:我不能在标空间中创建新对象,什么错误??
A:查看DBA_ROLLBACK_SEGS,确定该表空间中是否有两个回滚段,如果没有在创建一个回滚段
7.Q:为什么创建好的私有回滚段不能使用??
A:如果是私有的回滚段必须添加到init.ora文件中而且要重新启动数据库
8.Q:为什么我执行一个程序,程序死了?
A:使用UseSQLDBA监测锁、表或者进程是否被锁定,再查看跟踪文件和alter.log文件。(这不能解决问题但是对鉴定问题所在有帮助)
9.Q:如何收缩一个回滚段??(或者变更:不释放回滚段)
A:在oracle6中不能释放回滚段,必须删除然后再重建,在oracle7以后版本可以制定“最佳值“,回滚段自己回收缩
10.Q:如何移动数据从一个表空间到另外一个表空间中?
A:查看V6版的实用工具指南的3-3页(你需要撤销,赋予,修改用户和导入)
11.Q:为什么创建的公共回滚段不能被程序使用?
A:如果事务/每个回滚段事务少于1个的话,那么就只有一个回滚段是有效的即系统回滚段;使回滚段的数量和事务相等
12Q:数据库已经挂起,为什么用户仍然能登录进取,但是不能做任何事情,我该怎么做?
A:监察是否在归档模式下(alert.log中应该给出ora-255警告)
或者给归档文件一些空间,或者改变log_archive_dest参数
13.Q:如何获得完整的错误信息?
A:执行'altersessionsetsql_tracetrue'以为你的会话添加追踪,查看踪文件(在user_dump_dest目录下)
14.Q:我在删除表空间之前删除了数据文件,我如何恢复??
A:1)关闭数据库服务
2)>startupmount
3)>alterdatabasedatafile'fullpath_of_removed_DF'offlinedrop
4)>alterdatabaseopen
5)>droptablespacetbs_nameincludingcontents
15.Q:我有DBA权限但是不能以internal登录,为什么?
A:'connectinternal'是在操作系统中验证,在Unix中你需要把用户添加到DBA组中在/etc/group文件。
16.Q:如何创建一个数据库的拷贝?
A:做一个数据库完全导出,然后再重新创建一个数据库要包含需要的表空间,然后执行完全导入
17.Q:为什么在完全导出时丢失了一些表??
A:SYS所有的对象不能被导出,你不应该创建sys模式的表
18.这个问题我很难用中文表达,他大概意思是想要用低版本的导入工具导入高版本的导出文件,步骤是:
1)在高版本中执行地版本的'catexp6.sql'(假设低版本的是oracle6)以建立低版本执行exp操作需要的视图
2)在低板本中安装TWO_TASK已指定到高版本的数据库上,然后执行导出操作。
19.Q:v6版本如何删除挂起的数据库服务中的表空间?
A:确定数据库的DC_parameters参数足够高
dc_free_extents>selectcount(*)fromsys.fet$;
dc_used_extents>selectcount(*)fromsys.uet$;
row_cache_enqueue>=dc_free_extents+dc_used_extents;
20.Q:表中真正使用了多少数据块?
A:这个查询回计算出所有表中的数据占用的数据块
selectcount(distinct(substr(rowid,1,(substr(rowid,15,4)))))
from????原文不全
21.Q:如何找出一个表中的所有复制条目?
A:select*fromreal_table_nameX
whererowid<(selectmax(rowid)fromreal_table_namewherecol1=X.col1andcol2=X.col2.....);
gototop 回复于:2003-06-03 08:32:28
够老
q30 回复于:2003-06-03 08:48:35
中英文对照,收了
03177766998 回复于:2003-06-05 22:18:45
up
engora_rain 回复于:2003-06-17 16:50:41
大家好!
  

查看上一页  返回分类首页 返回96PC首页  查看下一页

  版权所有:电脑知识大全 网站备案:粤ICP备07031496号  联系我们

友情链接:母婴知识  外贸商务网  娱乐频道  汽车维修知识  股票入门知识  游戏攻略秘籍  本站空间由安信网络提供