Categotry Archives: oracle

清空Statistics History

0

Posted on by

看到SYSAUX表空间涨的很快,

主要是以下表

  • wri$_optstat_tab_history
  • wri$_optstat_ind_history
  • wri$_optstat_histhead_history
  • wri$_optstat_histgrm_history

经查是bug

Document 10279045.8 Slow Statistics purging (SYSAUX grows)


Document 8553944.8 SYSAUX tablespace grows


Document 14373728.8 Bug 14373728 – Old statistics not purged from SYSAUX tablespace


Document 11869207.8 Improvements to archived statistics purging / SYSAUX tablespace grows

 

解决如下:

1.

begin


for i in reverse 10..100


loop


dbms_stats.purge_stats(sysdate-i);


end loop;


end;


/

 

2.

exec DBMS_STATS.PURGE_STATS(DBMS_STATS.PURGE_ALL)

 

 

 

关闭TFA工具

0

Posted on by

在检查数据库的时候看到cpu负载比较高,原来是tfa check的时候占用的cpu比较多,因非核心系统,决定关闭掉。

用root执行。

	--检查状态

	/u01/app/11.2/grid/bin/tfactl status

	--自启动关闭

	/u01/app/11.2/grid/bin/tfactl disable

	--关闭tfa

	/u01/app/11.2/grid/bin/tfactl stop

 

RMAN-06820 During Backup at dataguard

0

Posted on by

在数据库版本 11.2.0.4 dataguard上备份有以下的错误:

	Starting backup at 2016-03-15 14:12:35

	RMAN-06820: WARNING: failed to archive current log at primary database

	ORACLE error from target database: 

	ORA-17629: Cannot connect to the remote database server

	ORA-17627: ORA-00942: table or view does not exist

 

需要把登入方式修改下

 

SOLUTION

Workaround

Do not use operating system authentication to login with RMAN. Use a username and password.

That is, do not use just the "/" (operating system authentication) connect to the standby database:

$ rman target /


Instead put in the username and password for the SYSDBA user:


$ rman sys/password

 

在线打补丁 opatch apply online

0

Posted on by

All OPatch versions after 11.1.0.6 are Online Patch aware.

The syntax to install an Online Patch is:

opatch apply online -connectString <SID>:<USERNAME>:<PASSWORD>:<NODE>


example:

$ opatch apply online -connectString db11202:sys:oracle -invPtrLoc /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
Invoking OPatch 11.2.0.1.4

Oracle Interim Patch Installer version 11.2.0.1.4
Copyright (c) 2010, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.1.4
OUI version : 11.2.0.2.0
OUI location : /u01/app/oracle/product/11.2.0/dbhome_1/oui
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2011-01-27_16-14-21PM.log

Patch history file: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch_history.txt

The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
ApplySession applying interim patch '10188727' to OH '/u01/app/oracle/product/11.2.0/dbhome_1'

Running prerequisite checks…
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: 

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '10188727' for restore. This might take a while…
Backing up files affected by the patch '10188727' for rollback. This might take a while…

Patching component oracle.rdbms, 11.2.0.2.0…
The patch will be installed on active database instances.
Installing and enabling the online patch 'bug10188727.pch', on database 'db11202'.

ApplySession adding interim patch '10188727' to inventory

Verifying the update…
Inventory check OK: Patch ID 10188727 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 10188727 are present in Oracle Home.

OPatch succeeded.

For RAC you can list all of the instances:

opatch apply online -connectString <SID>:<USERNAME>:<PASSWORD>:<NODE1>,<SID2>:<USERNAME>:<PASSWORD>:<NODE2>,…

The USERNAME and PASSWORD are those of a user that has SYSDBA privileges. 
The USERNAME and PASSWORD can be left blank if the OS user applying the patch has the SYSDBA privilege. 
To apply a patch only to local in the RAC environment, it is necessary to use '-local'.

 

 

 

参考:RDBMS Online Patching Aka Hot Patching (文档 ID 761111.1)

kcbgtcr_13 on active dataguard

0

Posted on by

今天在acitve dataguard上报出一个错误,在监控表空间时报出的,

经查为bug Bug 12848798 – OERI:kcbgtcr_13 on active dataguard [ID 12848798.8]

数据库版本为:11.2.0.3.5 

错误内容:

	ORA-00600: internal error code, arguments: [kcbgtcr_13], [], [], [], [], [], [], [], [], [], [], []

在查询V$或者X$会报出的。

下载补丁:12848798可解决

Affects:

Product (Component)

Oracle Server (Rdbms)

Range of versions believed to be affected

Versions >= 10.2 but BELOW 12.1

Versions confirmed as being affected

Platforms affected

Generic (all / most platforms affected)

Fixed:

The fix for 12848798 is first included in