Friday, July 26, 2013

ORA-01031: insufficient privileges while rebuilding index online

When rebuilding an index online Oracle will create a journal table in the schema where the index resides.

Thus said, you will get this error if you are trying to rebuilding an index thru a procedure using execute immediate even though you are the owner of the table/index/procedure.

You have to have direct grants on every operation when executing using execute immediate.

So, have "grant create table" "grant alter any index" and you should be good.

Tuesday, July 23, 2013

ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'

Got the following warning while upgrading 11.2.0.3.0 to 11.2.0.3.6
Oracle NoteID:1448337.1 says don't worry about it :)

OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'


Composite patch 16056266 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-07-23_16-15-40PM_1.log

Excerpt from Oracle Metalink note 1448337.1:

CAUSE

This warning is independent of the version of opatch used. 
Targets are defined more than once within the makefiles and this is just a warning that the second (later) definition is being used:

ins_srvm.mk:71: warning: overriding commands for target `libsrvmocr11.so'
ins_srvm.mk:34: warning: ignoring old commands for target `libsrvmocr11.so'

ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
env_precomp.mk:2115: warning: ignoring old commands for target `pcscfg.cfg'

If you check the $OH/install/make.log you will see that these warnings existed before patching i.e. after the original installation.  This is not an issue which the patch you are applying has introduced, simply a warning which opatch has correctly captured and is reporting back to the user.

SOLUTION

This is a warning only which opatch is reporting.  The Patch has applied successfully and the warning output can be safely ignored.

REFERENCES

Increasing VirtualBox VDI size...

Run the command vboxmanage with "modifyhd" parameter and the size in MB as follow if you ever want to increase the virtual size of your virtual box vdi size.

c:\VirtualBox>"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd OL6-112-Rac1.vdi --resize 51200
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Monday, July 22, 2013

Oracle Patches and Patchsets...

Refer to this Metalink ID 753736.1 for Quick Reference to RDBMS Database Patchset Patch Numbers

Wednesday, July 17, 2013

ORA-19625: error identifying file

Was getting the following error in one of our database backups.
Tried crosscheck archivelog all; and change archivelog all crosscheck; followed by delete expired archivelog all did not find this archive log at all.

RMAN-03002: failure of backup command at 07/16/2013 23:11:14
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /ora13/orafra/RH_PAY/archivelog/2013_03_07/o1_mf_1_82660_1TzwREeTB_.arc
ORA-17503: ksfdopn:4 Failed to open file /ora13/orafra/RH_PAY/archivelog/2013_03_07/o1_mf_1_82660_1TzwREeTB_.arc
ORA-17500: ODM err:File does not exist

Will have to research more to see where this file information got stuck.
Solution:
But for now I am going to go with SKIP INACCESSIBLE option in my backup script.

Tuesday, July 16, 2013

Netezza Database size

Below sql will give you the size used and allocated for each database in Netezza:

select orx.database::nvarchar(64) as "databasename" ,
       case when sum(sod.used_bytes) is null then 0 else sum(sod.used_bytes)/1073741824 end as "usedspace_gb",
       case when sum(sod.allocated_bytes) is null then 0 else sum(sod.allocated_bytes)/1073741824 end as "allocatedspace_gb"
  from _v_sys_object_dslice_info sod inner join _v_obj_relation_xdb orx on orx.objid = sod.tblid
 group by "databasename"
 order by "databasename";

Monday, July 15, 2013

ASM Disk Limits

Limits when configuring ASM Instance (meatlink Note ID:370921.1)
Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.1.0.7 [Release 10.1 to 11.1]

ASM imposes the following limits:

63 disk groups in a storage system

10,000 ASM disks in a storage system

2 terabyte maximum storage for each ASM disk (the Bug 6453944 allowed larger sizes, but that led to problems, see Note 736891.1 "ORA-15196 WITH ASM DISKS LARGER THAN 2TB")

40 exabyte maximum storage for each storage system

1 million files for each disk group

2.4 terabyte maximum storage for each file

Thursday, July 11, 2013

ORA-19643: datafile 6: incremental-start SCN is too recent

When you see that error in your RMAN backups then check the status of the file#. It might be OFFLINE.

Here is the RMAN Log showing that error:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on dev_7 channel at 07/10/2013 13:31:04
ORA-19643: datafile 6: incremental-start SCN is too recent
ORA-19640: datafile checkpoint is SCN 286109177130 time 01/28/2013 15:44:19

Recovery Manager complete.
[Major] From: ob2rman@ndhdbt3 "adm_t"  Time: 07/10/13 13:32:09
External utility reported error.

RMAN PID=9062

[Major] From: ob2rman@ndhdbt3 "adm_t"  Time: 07/10/13 13:32:09
The database reported error while performing requested operation.

RMAN-00571: ===========================================================
 RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
 RMAN-00571: ===========================================================
 RMAN-03009: failure of backup command on dev_7 channel at 07/10/2013 13:31:04
 ORA-19643: datafile 6: incremental-start SCN is too recent
 ORA-19640: datafile checkpoint is SCN 286109177130 time 01/28/2013 15:44:19

 Recovery Manager complete.

In my case, I know that we have to take this particular tablespace offline due to some issues and that was causing SCN check to be invalid.

select current_scn from v$database;
CURRENT_SCN
331472777523

So, I just have to ged rid of that tablespace to make my backups run successful.

ORA-23515: materialized views and/or their indices exist in the tablespace

Was trying to drop a tablespace that was not needed anymore and I receive this error:

drop tablespace ts1 including contents and datafiles cascade constraints;

ORA-23515: materialized views and/or their indices exist in the tablespace

Solution:
Run the following query to get the materialized views that it is talking about and drop them first and then you can drop the tablespace without any issues.

select 'drop materialized view '||owner||'.'||name||' PRESERVE TABLE;'
  from dba_registered_snapshots
 where name in (select table_name from dba_tables where tablespace_name = 'TS1');