oracle rman复制数据库
1.为什么复制只能进行不完全恢复?由于联机日志不能由rman进行备份,只能恢复由rman已备的归档日志。2.什么是复制当中的辅助数据库?rman将目标(主)数据库复制到该数据库实例的数据库。需要创建其参数文件,路径和口令文件,由于没有控制文件,所以须以nomount方式启动。2.什么是复制(duplicate)?从其他数据库的rman备份创建一个新数据库的过程。从rman角度来说,目标数据库被复制到副本数据库。3.步骤(1)执行目标数据库的全备,包括归档日志。run{allocate channel c1 type disk maxpiecesize 300m;backup database format 'c:ackupdf
9i,10g下v$sgastat中共享池的sum值与shared_pool_size的关系。
9i下,shared_pool_size不完全控制共享池中的所有组件,而只是控制大部分,因此,shared_pool_size获取的真正总和10g,shared_pool_size已经完全控制共享池中的所有组件,因此和v$sgastat值一致。[@more@]
analyze table/index validate structure加锁的问题
analyze table/index validate structure会加DML级S锁,因此可能会影响到正常的DML操作,如果该语句执行时间过长的话,后果会比较严重。[@more@]
某系统上一口气建立了20多个索引
问题描述:24颗CPU/48G内存的RAC系统上,只跑了一点应用,CPU却占到50%以上。查一下吧,我晕,全是一些大表全表扫描,表的个数也不多,全系统总共才400张,一看索引,基本上没建几个。这些SQL还真是缺索引,基本上是update,delete,select的简单sql,而且selectivity即佳,COST降得令人振奋,一个一个建吧,直至建了20多个索引。效果:效果不错,CPU降到20%左右了,那些select ** 内部又order by 的大型分页没办法了,算了,不管了,把这个去掉的话估计CPU要降到0了,呵呵。心情:这些开发大人,估计连索引是个啥都没弄清楚,哎,越来越趋向于
nid更改dbid时的NID-00135错误
Oracle Error :: NID-00135There are number active threadsCauseis that the database crashed the last time it was shut down.ActionEnsure that all threads are closed before retrying the operation. Start and open the database to perform crash recovery, then shut down with the NORMAL or IMMEDIATE options to close it cleanly. Finally, try running the utility again.[@more@]
刚发现10G的1点小变化,关于plan_table
10G在sys用户中已经建立好PLAN_TABLE$表,并把增,删,改,查的权限赋给了public,并在其上建立一PLAN_TABLE同义词。这下好了,什么都不用做了。直接按F5就可以看到执行计划了。呵呵[@more@]
solaris10下安装oracle10.2补丁,安装时找不到原先的10201软件。
安装10.2.0.3补丁时提示无法安装,找不到原来的10201软件,查看$ORACLE_BASE/inventory正常,一头雾水。原因:/var/opt/oracle目录的owner并不是oracle,晕倒。[@more@]
遭遇DFS LOCK HANDLE wait event,
RAC下的序列造成的,加大cache的大小会有所改善,以下是转载DFS LOCK HANDLE 是无法获得 global cache lock的handle时候所记录的等待事件,如果在RAC环境下使用sequence,2个实例都有并发的session使用sequence,这时有可能遭遇 DFS LOCK HANDLE等待。参考文档如下:http://www.pythian.com/blogs/383/sequences-in-oracle-10g-racSequences in Oracle 10g RACJanuary 31st, 2007 - by Christo Kutrovsky Just recently I got a call from a developer. He had a table with a primary key populated by a sequence, a timestamp column w
大表建索引,rman备份等耗费的时间通常比较长?还有多长时间才能执行完?
大表建索引,rman备份等耗费的时间通常比较长?还有多长时间才能执行完?利用v$session_longops的time_remaining列就可以得到这个估算值,>6秒钟的操作都会记录与此。select username,sid,opname,round(sofar*100 / totalwork,0)||'%' as progress,time_remainingfrom v$session_longopswhere time_remaining>0 and opname like 'xxx'; [@more@]
windows下oradim的pfile参数选项
windows环境下,%ORACLE_HOME%database下有spfile和pfile,用服务启动数据库时不用spfile启动数据库,只用pfile启动,原来oradim里有参数指定pfile,删掉重建服务就行了。[@more@]
10g em sys用户无法登录
现象:10G em环境,其它用户均可以以normal方式自动登录,而sys无法登录,原因:密码文件不存在。解决办法:unix:orapwd file=orapwSIDwin:orapwd file=pwdSID.ora[@more@]
commit时表内容清空
一客户打电话过来说,我的一张表,为什么插入一条数据,再提交,数据就没了,怎么回事呀?insert into faretemp values ('1','1',1,'1','1');commit;突然愣了一秒钟,接着才缓过劲来,是不是临时表呀?那哥们看了一下,“是的”。“这默认提交时数据就清掉了”。真是“我不做开发好多年,”[@more@]
idle_time超时,session变为'sniped' 问题
客户环境为weblogic连接池方式,误设置了idle_time profile资源限制参数,导致超时session变为snipped状态,只好手工alter system kill掉。Note:1061189.6"init.ora" resource_limit = true and idle_time set in profile.When idle_time exceeds, the session status becomes 'sniped' in v$session, butsniped sessions never get cleaned up.[@more@]
win 10.1下 ORA-25254: time-out in LISTEN while waiting for a message
Note:343978.1ORA-25254The AQ application is configured with the a dequeue timeout, which specifies the actual time it must wait for the arrival of messages. If there are no messages to be dequeued, the dequeue returns with a 25254, afer the specified timeout.Enterprise manager internally uses AQ mechanism for notification.In this case when the dequeue operation times out it reports ORA-25254.This is an informational alert and is non critical and thus can be ignored看来可以忽略掉。[@more@]
win 10.2.0.2下 WARNING: inbound connection timed out (ORA-3136)
1.set INBOUND_CONNECT_TIMEOUT_ =0 in listener.ora2. set SQLNET.INBOUND_CONNECT_TIMEOUT = 0 in sqlnet.ora of server.3. 重启监听[@more@]
win版下10.2.0.2下遭遇ora-600[kkslgbv0]
客户环境未用绑定变量,用websphere做的中间件,因此把cursor_sharing设为'SIMILAR',系统运行一段时间正常,但最近频繁出现ORA-00600: 内部错误代码, 参数: [kkslgbv0], [], [], [], [], [], [], [],没想到在win下遭遇了这个bug,于是把cursor_sharing设为exact,打算每晚刷新一遍共享池,但差不多一个小时就碰到ora-4031的错误了,很快系统就挂了,于是把其设为force,暂时正常。[@more@]
Rman Backup Fails: PLS-00302: component 'GETREQUIREDSCN' must be declared
Rman Backup Fails: PLS-00302: component 'GETREQUIREDSCN' must be declared客户数据库环境:10.1.0.2->10.1.0.5做的升级。原因分析:这是利用rman备份时产生的错误,原因是升级后未运行catpatch.sql脚本。SELECT comp_name, versionfrom dba_registry;可以看到组件的版本。[@more@]
查询dba_jobs_running慢的bug
前段时间在一台小型机上查询dba_jobs_running看正在执行的作业时俱慢,只好用dba_jobs代替,原来是个bug,oracle9.2版本,aix系统。Subject: Query on DBA_JOBS_RUNNING is Slow in Oracle 9.2 Doc ID: Note:240058.1 Type: PROBLEM Last Revision Date: 05-MAY-2004 Status: PUBLISHED fact: Oracle Server - Enterprise Edition 9.2symptom: Query on DBA_JOBS_RUNNING is slowcause: This problem is described in the Bug 2624130 - QUERY AGAINST DBA_JOBS_RUNNING IS USING CBO EVEN WHEN NO STATISITICSfix:Workaround:Use /*+ rule
oracle坏块问题及解决办法
http://blog.csdn.net/coolyl/archive/2004/11/27/195919.aspx[@more@]
windows下10.2.0.2 arc进程跟踪文件问题 kcrrwkx: nothing to do (start)
Subject: Lots of ARCH trace file generated in 10.2 Doc ID: Note:372364.1 Type: PROBLEM Last Revision Date: 27-JUN-2006 Status: PUBLISHED In this DocumentSymptomsCauseSolutionReferences--------------------------------------------------------------------------------Applies to: Oracle Server - Enterprise Edition - Version: 10.2.0.1.0This problem can occur on any platform.SymptomsTrace files are generated with following messages:*** SESSION ID156.1) 2006-06-04 12:49:53.306 kcrrwkx: nothing to do (st