relink database
有时候不想装software,有个偷懒的方法。在另外一台server上将software tar出来,解开后按以下步骤:1.oracle用户: relink all2.root 用户:运行root.sh[@more@]
DDL引起package失效后所碰到的错误-ora-04068
一个不算错误的错误。把应用重启就可以了。原因是长连接session在运行一个重编译的包后出错。[@more@]ORA-04068 Errors from User-Written and Oracle Packages [ID 106206.1]修改时间 07-AUG-2008 类型 BULLETIN 状态 PUBLISHED "Checked for relevance on 22-MAY-2008" Problem Description ------------------- You receive the following error from user-written and Oracle packages: ORA-04068 existing state of packages%s%s%s has been discarded Causes of ORA-4068 Errors ------------------
你想知道RMAN的恢复速度吗?
select sid, serial#, context,round(sofar/totalwork*100,2) "% Complete",substr(to_char(sysdate,'yymmdd hh24:mi:ss'),1,15) "Time Now",elapsed_secondsfrom v$session_longopswhere compnam = 'dbms_backup_restore'; --> for 8.0For Oracle8i and Oracle9i:SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"FROM V$SESSION_LONGOPSWHERE OPNAME LIKE 'RMAN%'AND OPNAME NOT LIKE '%aggregate%'AND TOTALWORK != 0AND SOFAR <> TOTALWORKRMAN use
用pl/sql实现批量处理
set serveroutput on size 1000000 format wrappeddeclarecursor c is select 'alter user ' || lower(username) || ' identified by '||lower(username) md_pwd 3 from dba_users where lower(username) in ('maps','readonly','ods_batch','mpsload','mapsuser') order by username; begin for r in c loop dbms_output.put_line(r.md_pwd); execute immediate r.md_pwd; end loop; end; /[@more@]
RAC 安装后listener/tnsnames的load balance配置(TAF)
NOTES 453293.1[@more@]R
你想知道用RMAN备份时输出到磁带的写速度吗?
SELECT MAX(effective_bytes_per_second) EPSFROM v$backup_sync_ioWHERE device_type <> 'DISK'AND open_time BETWEEN TO_DATE('2010-01-06 03:00:00','yyyy-mm-dd hh24:mi:ss') AND TO_DATE('2010-01-06 17:00:00','yyyy-mm-dd hh24:mi:ss')[@more@]
windows平台下oracle快速诊断的一些方法:
在服务器还可以登录的情况下,可以用以下快速方法获得占CPU的session的信息。1.在9i/10g手工启动statspack快照,收集信息。9i:exec perfstat.statspack.snap();10g:exec dbms_workload_repository.create_snapshot;2.利用一些进程监控工具如procexp.exe获得占cpu高的线程号.3.SELECT a.sql_hash_value FROM v$session a,v$process bWHERE a.paddr=b.addr AND b.spid=6012 (spid为上一点所获得的线程号)4.select sql_text from v$sqltext where hash_value='xxxx' order by piece;其中hash_value为第3点中所获得的sql_hash_value.至此拿到占
不用NID改DB_NAME
用改controlfile的方式也可以改名字[@more@]How to Determine and Rename/Change DB_NAME or ORACLE_SID/Instance Name [ID 15390.1] 修改时间 12-MAR-2009 类型 BULLETIN 状态 PUBLISHED In this Document Purpose Scope and Application How to Determine and Rename/Change DB_NAME or ORACLE_SID/Instance Name Find the current DB_NAME and ORACLE_SID: Modify a database to run under a new ORACLE_SID: Change the "db_name" for a Database ReferencesApplies to: Oracle Server Enterpri
纪念
1.儿子1岁1一个月零一天学会自己走路,不用辅助。2.2009年圣诞节,有意识的叫爸爸。3.2010年3月7日,会叫妈妈老了,写几个字记录一下。[@more@]
Getting ORA-01476 during execution of DBMS_STATS.GATHER_SCHEMA_STATS
这是在数据库升级到10.2.0.4以后做分析时碰到的问题。[@more@] Subject: Getting ORA-01476 during execution of DBMS_STATS.GATHER_SCHEMA_STATS Doc ID: 464440.1 Type: PROBLEM Modified Date : 30-MAR-2009 Status: MODERATED In this Document Symptoms Cause Solution This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process, and therefore has not been subject to an independent technical review. Applies to: Oracle Server - Enterp
ORA-20000 While Executing dbms_stats.gather_schema_stats
这篇文章,在于提醒不要用system,sys用户去创建其他schema的索引。[@more@]ORA-20000 While Executing dbms_stats.gather_schema_stats [ID 309834.1] 修改时间 08-NOV-2007 类型 PROBLEM 状态 MODERATED In this Document Symptoms Cause SolutionThis document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process, and therefore has not been subject to an independent technical review.Applies to: Oracle Server - Enterprise Edition - Version: 9.2.0.5This problem can occur on any
Flashback table article--From Oracle
http://www.oracle.com/technology/pub/articles/10gdba/week5_10gdba.html[@more@]Oracle Database 10g: The Top 20 Features for DBAs Join Oracle Magazine's 2003 "DBA of the Year" Arup Nanda over the next 20 weeks as he presents his list of the top Oracle Database 10g features for database administrators Follow along! Download Oracle Database 10gWeek 5Flashback Table Reinstating an accidentally dropped table is effortless using the Flashback Table feature in Oracle Database 10g Here's a scen
在open resetlogs之后,如果想恢复之前备份的数据怎么办?
具体解决方法如下:rman>list incarnation;rman>reset database incanation to..;[@more@]RMAN: Point-in-Time Recovery of a Backup From Before Last Resetlogs [ID 1070453.6] 修改时间 30-JUN-2009 类型 PROBLEM 状态 PUBLISHED "Checked for relevance on 30-Jun-2009" Problem Description: ==================== You would like to restore a database to a point-in-time, but the backup being used is from before the last resetlogs. The problem is that when a database is opene
awrddrpt.sql --生成不同时间内的对比统计报表--bug的修复
利用AWR的awrddrpt.sql,我们可以比较不同日期的相同时间段的数据库性能。具体可以参考:http://www.5ienet.com/note/html/ash_awr/oracle-create-awr-different-report.shtml这里要说明的是,如果数据库设的是/3gb /PAE,就不会设db_cache_size这个参数,而是db_block_buffer*db_block_size,在这种情况下,oracle就不会认识这种格式。已经从metalink的反馈中得知这是一个bug,所报的错误是:ERROR at line 1:ORA-01476: divisor is equal to zeroORA-06512: at "SYS.DBMS_SWRF_REPORT_INTERNAL", line 9515ORA-06512: at "S
datapump --- using network database link to export from source and put export file on target server
用以下方法就可以在另一台机器将dump文件导出--- in centmsq3 --- (target database)CREATE DIRECTORY dump_dir01 AS '/data/oracle/centmsq3/';GRANT READ,WRITE ON DIRECTORY dump_dir01 TO export;grant create database link to export;connect export/123 create database link centqprf_exp connect to export identified by export using 'centqprf';command:expdp export/export directory=dump_dir01 schemas=stddata_suplr dumpfile=prod_stddata_suplr.dmp logfile=prod_centmsq3_stddata_suplr.log network_link=centqprf_
flashback 处理案例一则 ORA-38760
在测试库上insert一张大表,报undo不够,加上空间不够,就像flashback回去,但shutdown immediate的时候又不想等那么长的时间,就abort了。结果发现:ORA-38760: This database instance failed to turn on flashback database以下是解决方法:[@more@]1.先flashback:SQL> FLASHBACK DATABASE TO RESTORE POINT WMOS_GOLD_COPY;Flashback complete.2.SQL> alter database flashback off;Database altered.3.SQL> alter database open resetlogs;alter database open resetlogs*ERROR at line 1:ORA-38760: This database instan
在rman catalog中获得某个日期各个数据文件的大小
select distinct(b.file#), a.datafile_blocks*8192/1024/1024/1024 from RC_BACKUP_DATAFILE a,DF bwhere a.db_name='DB_NAME'and a.completion_time>=to_date('20090810','yyyymmdd')and a.completion_time<to_date('20090811','yyyymmdd')and a.creation_change#=b.create_scn order by b.file#[@more@]
利用DBMS_REDEFINITION进行在线rebuild 表
来自metalink[@more@]Subject: How to Re-Organize a Table Online Doc ID: 177407.1 Type: BULLETIN Modified Date: 06-MAY-2009 Status: PUBLISHEDChecked for relevance on 06-May-2009PURPOSE Prior to Oracle9i, any table re-organizations and redefinitions forced the table to be offlined for the duration of the operation. From Oracle9i forward, table re-organizations and redefinitions can be performed online. This note explains how to reorganize a table online. NOTE: This note does not
create index --resource busy 中断后的处理
DECLAREisClean BOOLEAN;BEGINisClean := FALSE;WHILE isClean=FALSELOOPisClean := dbms_repair.online_index_clean(dbms_repair.all_index_id, dbms_repair.lock_wait);dbms_lock.sleep(10);END LOOP;END;/[@more@]
rman catalog中看回以前某一天数据库的数据文件大小 (除temp)
select sum(datafile_blocks*block_size)/1024/1024 from RC_BACKUP_DATAFILEwhere db_name='abc'and completion_time>=to_date('20081001','yyyymmdd')and completion_time<to_date('20081002','yyyymmdd')[@more@]