Saturday, February 13, 2010

ORA-07445: exception encountered: core dump [ktuGetExtTxnInfo()+00f0] [SIGSEGV] [ADDR:0x6FA] [PC:0x101FCE210] [Invalid permissions for mapped object]

Get the following bug after cloning 11.1.0.7.2 ORACLE_HOME

Sat Feb 13 22:48:58 2010
Exception [type: SIGSEGV, Invalid permissions for mapped object] [ADDR:0x6FA] [PC:0x101FCE210, ktuGetExtTxnInfo()+00f0]
Errors in file /opt/oracle/product/diag/rdbms/pd01dwh/pd01dwh1/trace/pd01dwh1_j000_1142998.trc (incident=90725):
ORA-07445: exception encountered: core dump [ktuGetExtTxnInfo()+00f0] [SIGSEGV] [ADDR:0x6FA] [PC:0x101FCE210] [Invalid permissions for mapped object] []
Incident details in: /opt/oracle/product/diag/rdbms/pd01dwh/pd01dwh1/incident/incdir_90725/pd01dwh1_j000_1142998_i90725.trc

It is bug 9328683 with ORACLE_HOME cloning and 11.1.0.7.2. Fixed by copying library libknlopt.a and relinking oracle.

Tuesday, February 9, 2010

ORA-28378: Wallet not open after setting the Master Key

I hit bug 7235187 today when I tried to set a TDE master key in a wallet created for OID authentication. Seems it will be fixed in 10.2.0.5 / 11.2. Workaround is to have two wallets.

# sqlnet.ora
WALLET_LOCATION=(SOURCE=(METHOD = FILE)(METHOD_DATA =(DIRECTORY = /opt/oracle/product/admin/xxx/wallet)))
ENCRYPTION_WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/opt/oracle/product/admin/xxx/wallet)))

# Try to create the key
SQL> ALTER SYSTEM SET ENCRYPTION KEY AUTHENTICATED BY "password";
ALTER SYSTEM SET ENCRYPTION KEY AUTHENTICATED BY "password"
*
ERROR at line 1:
ORA-28378: Wallet not open after setting the Master Key

Tuesday, February 2, 2010

DBA_FEATURE_USAGE_STATISTICS

# Did some research into view DBA_FEATURE_USAGE_STATISTICS. It is based on the following joins.

create or replace view dba_feature_usage_statistics as
select samp.dbid, fu.name, samp.version, detected_usages, total_samples,
decode(to_char(last_usage_date, 'MM/DD/YYYY, HH:MI:SS'),
NULL, 'FALSE',
to_char(last_sample_date, 'MM/DD/YYYY, HH:MI:SS'), 'TRUE',
'FALSE')
currently_used, first_usage_date, last_usage_date, aux_count,
feature_info, last_sample_date, last_sample_period,
sample_interval, mt.description
from wri$_dbu_usage_sample samp, wri$_dbu_feature_usage fu,
wri$_dbu_feature_metadata mt
where
samp.dbid = fu.dbid and
samp.version = fu.version and
fu.name = mt.name and
fu.name not like '_DBFUS_TEST%' and /* filter out test features */
bitand(mt.usg_det_method, 4) != 4 /* filter out disabled features */


Tables are initialised by procedure DBMS_FEATURE_REGISTER_ALLFEAT which calls the DBMS_FEATURE_USAGE package.

E.g

/**********************
* Audit Options
**********************/

declare
DBFUS_AUDIT_STR CONSTANT VARCHAR2(1000) :=
'select count(*), NULL, NULL from audit$ where exists ' ||
'(select 1 from v$parameter where name = ''audit_trail'' and ' ||
'upper(value) != ''FALSE'' and upper(value) != ''NONE'')';
begin
dbms_feature_usage.register_db_feature
('Audit Options',
dbms_feature_usage.DBU_INST_ALWAYS_INSTALLED,
NULL,
dbms_feature_usage.DBU_DETECT_BY_SQL,
DBFUS_AUDIT_STR,
'Audit options in use.');
end;

#Looks like feature usage collection is triggered by procedure DBMS_FEATURE_WCR_CAPTURE based on details in wri$_dbu_usage_sample, so updating that table can trigger collection.

update wri$_dbu_usage_sample set last_sample_date = last_sample_date -7, last_sample_date_num = last_sample_date_num - sample_interval
where dbid=1336168478 and version = '10.2.0.4.0';

Monday, February 1, 2010

An open database is not really open ?

SQL> startup
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 637537336 bytes
Database Buffers 1476395008 bytes
Redo Buffers 21798912 bytes
Database mounted.
Database opened.
SQL> exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED', 'TRUE');
BEGIN dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED', 'TRUE'); END;

*
ERROR at line 1:
ORA-01033: ORACLE initialization or shutdown in progress
ORA-06512: at "SYS.DBMS_ISCHED", line 3598
ORA-06512: at "SYS.DBMS_SCHEDULER", line 2881
ORA-06512: at line 1
Process ID: 6652282
Session ID: 1655 Serial number: 5


SQL> exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED', 'TRUE');

PL/SQL procedure successfully completed.

SQL>