How use the backupset of RMAN  to restore and recover on a new machine.

How use the backupset of RMAN  to restore and recover on a new machine.

— backup database on source database.


run
{allocate channel c1 device type disk;
backup incremental level 0 format '/u02/rman/db_full_%U.bkp' tag 'level0' database plus archivelog;
backup current controlfile format '/u02/rman/ctl .bak';
backup spfile format '/u02/rman/spfile.bak';
release channel c1;
}

–make the directory on target database servers


cd /u01/app/oracle/admin/trsendb
mkdir {adump,bdump,cdump,dpdump,udump,pfile}
mkdir -p /u02/oradata/trsendb
mkdir -p /u02/fra
mkdir -p /u02/rman

–query the DBID  parameter on source target database.

SQL> select dbid from v$database;
      DBID
----------
 701555330

–copy the password file and backup files from source database servers to the target

–Begin the restore and recover actions.

1.startup nomount;


[oracle@scmadmin dbs]$ more inittrsendb.ora 
db_name=trsendb
[oracle@scmadmin dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 13 17:51:54 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area  263090176 bytes
Fixed Size            2252256 bytes
Variable Size          205521440 bytes
Database Buffers       50331648 bytes
Redo Buffers            4984832 bytes

2.set DBID on the rman command.


RMAN> set dbid 701555330
executing command: SET DBID

3.restore spfile from backup files


RMAN> restore spfile from '/u02/rman/spfile.bak';
Starting restore at 13-JUN-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=429 device type=DISK
channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u02/rman/spfile.bak
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 13-JUN-17

[oracle@scmadmin dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 13 17:54:45 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create pfile from spfile;
File created.

4.restore ctl file from backup files


RMAN> startup force nomount;
Oracle instance started
Total System Global Area    2137886720 bytes
Fixed Size                     2254952 bytes
Variable Size                704645016 bytes
Database Buffers            1426063360 bytes
Redo Buffers                   4923392 bytes

RMAN> restore controlfile from '/u02/rman/ctl .bak';
Starting restore at 13-JUN-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=467 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:01:05
output file name=/u02/oradata/trsendb/control01.ctl
output file name=/u02/oradata/trsendb/control02.ctl
output file name=/u02/oradata/trsendb/control03.ctl
Finished restore at 13-JUN-17

RMAN> startup mount; 
database is already started
database mounted
released channel: ORA_DISK_1

5.restore database files  from backup files.


RMAN> restore database;
Starting restore at 14-JUN-17
Starting implicit crosscheck backup at 14-JUN-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=699 device type=DISK
Crosschecked 200 objects
Finished implicit crosscheck backup at 14-JUN-17
Starting implicit crosscheck copy at 14-JUN-17
using channel ORA_DISK_1
Finished implicit crosscheck copy at 14-JUN-17
searching for all files in the recovery area
cataloging files...
no files cataloged
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u02/oradata/trsendb/system01.dbf
......
channel ORA_DISK_1: restoring datafile 00042 to /u02/oradata/trsendb/INSAGTIDX01.DBF
channel ORA_DISK_1: reading from backup piece /u02/rman/db_full_ras6mv30_1_1.bkp
channel ORA_DISK_1: piece handle=/u02/rman/db_full_ras6mv30_1_1.bkp tag=LEVEL0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:39:09
Finished restore at 14-JUN-17

5.restore archivelog files from backup files.


RMAN> restore archivelog all;
Starting restore at 14-JUN-17
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=672
channel ORA_DISK_1: restoring archived log
......
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=727
channel ORA_DISK_1: reading from backup piece /u02/rman/db_full_r9s6mv25_1_1.bkp
channel ORA_DISK_1: piece handle=/u02/rman/db_full_r9s6mv25_1_1.bkp tag=LEVEL0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:03:16
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=728
channel ORA_DISK_1: reading from backup piece /u02/rman/db_full_rcs6mv4p_1_1.bkp
channel ORA_DISK_1: piece handle=/u02/rman/db_full_rcs6mv4p_1_1.bkp tag=LEVEL0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore com

6.recover database 


RMAN> recover database;
Starting recover at 14-JUN-17
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 728 is already on disk as file /u02/arch/trsendb/1_728_900862466.dbf
archived log file name=/u02/arch/trsendb/1_728_900862466.dbf thread=1 sequence=728
unable to find archived log
archived log thread=1 sequence=729
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 06/14/2017 09:45:30
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 729 and starting SCN of 30373588

RMAN> recover database until scn 30373588;--这个scn点的数据是不包括在内的
Starting recover at 14-JUN-17
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 14-JUN-17

7.open database


SQL> select open_mode from v$database;
OPEN_MODE
--------------------
MOUNTED

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> alter database open resetlogs;
Database altered.


 

Use LOGMINER tool Explain the Fact for 11gR2

Use LOGMINER tool Explain the Fact for 11gR2
Today,the developer said that have update not commit or rollback on last friday.
The execute sql statment as follows:
update TEST.TEST l set l.TEST3=l.TEST3+497500 ,l.TEST1=l.TEST1-497500 where l.accountid=11111;

Now,I only Mining log information by LOGMNR tools.

first,create logmnr user as follows:
create user logmnr identified by logmnr;
grant dba to logmnr;

second,Processing related log files through dbms_logmnr package.
–add logfile

begin
dbms_logmnr.add_logfile(‘/u02/backup/1_4596_909679324.dbf’,dbms_logmnr.new);
end;

BEGIN
dbms_logmnr.add_logfile(logfilename=>’/u02/backup/1_4597_909679324.dbf’,options=>dbms_logmnr.ADDFILE);
dbms_logmnr.add_logfile(logfilename=>’/u02/backup/1_4598_909679324.dbf’,options=>dbms_logmnr.ADDFILE);
dbms_logmnr.add_logfile(logfilename=>’/u02/backup/1_4599_909679324.dbf’,options=>dbms_logmnr.ADDFILE);
dbms_logmnr.add_logfile(logfilename=>’/u02/backup/1_4600_909679324.dbf’,options=>dbms_logmnr.ADDFILE);
dbms_logmnr.add_logfile(logfilename=>’/u02/backup/1_4601_909679324.dbf’,options=>dbms_logmnr.ADDFILE);
dbms_logmnr.add_logfile(logfilename=>’/u02/backup/1_4602_909679324.dbf’,options=>dbms_logmnr.ADDFILE);
dbms_logmnr.add_logfile(logfilename=>’/u02/backup/1_4603_909679324.dbf’,options=>dbms_logmnr.ADDFILE);
dbms_logmnr.add_logfile(logfilename=>’/u02/backup/1_4604_909679324.dbf’,options=>dbms_logmnr.ADDFILE);
dbms_logmnr.add_logfile(logfilename=>’/u02/backup/1_4605_909679324.dbf’,options=>dbms_logmnr.ADDFILE);
dbms_logmnr.add_logfile(logfilename=>’/u02/backup/1_4606_909679324.dbf’,options=>dbms_logmnr.ADDFILE);
END;
/

–start lomgnr to analysis logfile.

begin
dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog);
end;

–fetch result

select * from v$logmnr_contents where ROW_ID=’AAAWMSAAYAAAI5IAAc’
AND TABLE_NAME=’TEST’;

select * from v$logmnr_contents where xidsqn=’232628′ and xidusn=’3′;
16305539053 2016/8/29 15:39:18 35 3 232628 23000300B48C0300 35 3 232628 23000300B48C0300 START 6 0 0 AAAWMSAAAAAAAAAAAA UNKNOWN UNKNOWN UNKNOWN 0 0 0 UNKNOWN 1 1 4729 859310 16 3 0 0 0 0 0 0 0 0 0 set transaction read write; 0x001279.000d1cae.0010 0 0 0 139461264 139461265
16305539053 2016/8/29 15:39:18 35 3 232628 23000300B48C0300 35 3 232628 23000300B48C0300 UPDATE 3 0 TEST TEST TEST 2 TABLE TEST AAAWMSAAYAAAI5IAAc UNKNOWN UNKNOWN UNKNOWN 0 0 0 UNKNOWN 1 1 4729 859310 16 3 0 0 0 3 24 36424 212082 0 90898 update “TEST”.”TEST” set “TEST3” = ‘796500’, “TEST1” = ‘0’ where “TEST3” = ‘299000’ and “TEST1” = ‘497500’ and ROWID = ‘AAAWMSAAYAAAI5IAAc’; update “TEST”.”TEST” set “TEST3” = ‘299000’, “TEST1” = ‘497500’ where “TEST3” = ‘796500’ and “TEST1” = ‘0’ and ROWID = ‘AAAWMSAAYAAAI5IAAc’; 0x001279.000d1cae.0010 0 0 no supplemental log data found 3 139461266 139461267
16305541778 16305539053 16305541778 2016/8/29 15:39:24 2016/8/29 15:39:18 2016/8/29 15:39:24 35 3 232628 23000300B48C0300 35 3 232628 23000300B48C0300 COMMIT 7 0 0 AAAAAAAAAAAAAAAAAA UNKNOWN UNKNOWN UNKNOWN 0 0 0 UNKNOWN 1 1 4729 865420 16 3 0 0 0 3 0 0 0 0 0 commit; 0x001279.000d348c.0010 0 0 0 139469162 139469163 16305541778 16305541778

note:(execute sql was converted at oracle)

update “TEST”.”TEST” set “TEST3” = ‘796500’, “TEST1” = ‘0’
where “TEST3” = ‘299000’ and “TEST1” = ‘497500’ and ROWID = ‘AAAWMSAAYAAAI5IAAc’;

–stop logmnr

begin
dbms_logmnr.end_logmnr;
end;

LogMiner informations for details:
1.Oracle LogMiner, which is part of Oracle Database, enables you to query online and archived redo log files through a SQL interface.
2.it can be used as a powerful data auditing tool, and also as a sophisticated data analysis tool.

logminer coniguration:
1.The source database is the database that produces all the redo log files that you want LogMiner to analyze.
2.The mining database is the database that LogMiner uses when it performs the analysis.
3.The LogMiner dictionary allows LogMiner to provide table and column names, instead of internal object IDs, when it presents the redo log data that you request.If without a dictionary, LogMiner returns internal object IDs and presents data as binary data.
note:The dictionary file come from the source database that generates the redo log files that logminer will analyze.

the logminer dictionary including(informations details for view the oracle org documents):
1.using the onine catalog

EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);

2.extracting a logminer dictionary to the redo log files

EXECUTE DBMS_LOGMNR_D.BUILD(OPTIONS=> DBMS_LOGMNR_D.STORE_IN_REDO_LOGS);

3.extracting the logminer dictionary to a flat file

EXECUTE DBMS_LOGMNR_D.BUILD(‘dictionary.ora’, ‘/oracle/database/’, DBMS_LOGMNR_D.STORE_IN_FLAT_FILE);

V$LOGMNR_CONTENTS:
1.We must successfully start logminer befor you can query v$logmnr_contents.
2.Every time you query V$LOGMNR_CONTENTS, LogMiner analyzes the redo log files for the data you request.
3.The amount of memory consumed by the query is not dependent on the number of rows that must be returned to satisfy a query.
4.The time it takes to return the requested data is dependent on the amount and type of redo log data that must be mined to find that data.

V$LOGMNR_LOGS:
we can query the V$LOGMNR_LOGS view to determine which redo log files have been manually or automatically added to the list of redo log files for LogMiner to analyze.

reference the oracle 11g online help:
Using LogMiner to Analyze Redo Log Files

ORACLE 11g DBMS_DATAPUMP使用

oracle 提供的imp/impdp/exp/expdp,实际上都是调用dbms_datapump和dbms_metadata里的api来实现导入导出的功能,具体里面的function用法可参考官方文档里的PL/SQL Packages and Types Reference这本书

利用工具导出metadata
expdp trsenzhang/trsenzhang DUMPFILE= all-2016-05-06.dmp LOGFILE=schema_medata_201600506.log DIRECTORY=DIR_DP CONTENT=METADATA_ONLY SCHEMAS=’ETLUSER’,’ITMUSER’,’MGMT_VIEW’,’MAXXI_WXPAY’,’TESTREADONLY’,’MAXXI_SELUSER’,’THIG_SECURITY_ADMIN’,’THIG_KMS’,’THIG_MONITOR’,’THIG_UI’,’THIG_REPORT’,’THIG_SAMDP’,’THIG_QUERY’,’THIG_KEY’,’THIG_OWNER’,’VIRTCARD’,’THIG_ONLINES’,’THIG_BATCH’
利用如下工具进行导入,并且进行remap_schema和remap_tablespace,过滤统计信息
脚本里的信息$uuname1是通过shell里的变量传递,具体脚本可参看http://www.trsenzhangdb.com/?page_id=401 里的use_dbmsdatapump_api_import脚本

DECLARE
dp NUMBER;
BEGIN
–sepcified operation,job mode
dp := DBMS_DATAPUMP.open (operation=> ‘IMPORT’ , job_mode=> ‘SCHEMA’);
DBMS_DATAPUMP.add_file (handle=> dp, filename => ‘ORACLE.DMP’, directory => ‘DUMP_DIR’,filetype=>1);
dbms_datapump.add_file(handle => dp,filename => ‘oracle20160511_2.LOG’,directory => ‘DUMP_DIR’,filetype=>3);
DBMS_DATAPUMP.METADATA_TRANSFORM(handle => dp,name => ‘SEGMENT_ATTRIBUTES’,value => 0);
dbms_datapump.metadata_filter(dp, ‘EXCLUDE_PATH_EXPR’, ‘IN (”STATISTICS”)’);

dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’ETLUSER’,’ETLUSER_TEST01′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’ITMUSER’,’ITMUSER_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’MGMT_VIEW’,’MGMT_VIEW_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’MAXXI_WXPAY’,’MAXXI_WXPAY_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’TESTREADONLY’,’TESTREADONLY_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’MAXXI_SELUSER’,’MAXXI_SELUSER_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_SECURITY_ADMIN’,’THIG_SECURITY_ADMIN_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_KMS’,’THIG_KMS_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_MONITOR’,’THIG_MONITOR_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_UI’,’THIG_UI_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_REPORT’,’THIG_REPORT_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_SAMDP’,’THIG_SAMDP_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_QUERY’,’THIG_QUERY_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_KEY’,’THIG_KEY_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_OWNER’,’THIG_OWNER_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’VIRTCARD’,’VIRTCARD_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_ONLINES’,’THIG_ONLINES_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_SCHEMA’,’THIG_BATCH’,’THIG_BATCH_$uuname1′);

dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’USERS’,’USERS_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_MASTER_TBL’,’SVC_MASTER_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_OTHER_TBL’,’SVC_OTHER_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_SUM_FILE_TBL’,’SVC_SUM_FILE_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_TXN_MISC_TBL’,’SVC_TXN_MISC_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_ONLTXN_TBL’,’SVC_ONLTXN_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_TRANS_TBL’,’SVC_TRANS_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_TXNIO_TBL’,’SVC_TXNIO_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_MASTER_IDX’,’SVC_MASTER_IDX_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_OTHER_IDX’,’SVC_OTHER_IDX_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_SUM_FILE_IDX’,’SVC_SUM_FILE_IDX_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_TXN_MISC_IDX’,’SVC_TXN_MISC_IDX_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_ONLTXN_IDX’,’SVC_ONLTXN_IDX_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_TRANS_IDX’,’SVC_TRANS_IDX_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_VIRTCARD_TBL’,’SVC_VIRTCARD_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’PAY_ONLTXN_TBL’,’PAY_ONLTXN_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’PAY_ONLTXN_IDX’,’PAY_ONLTXN_IDX_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’PAY_MASTER_TBL’,’PAY_MASTER_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’PAY_MASTER_IDX’,’PAY_MASTER_IDX_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_HISTORY_TBL’,’SVC_HISTORY_TBL_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’SVC_HISTORY_IDX’,’SVC_HISTORY_IDX_$uuname1′);
dbms_datapump.metadata_remap(dp,’REMAP_TABLESPACE’,’TRSENZHANG_TBL’,’TRSENZHANG_TBL_$uuname1′);
DBMS_DATAPUMP.start_job (dp);
DBMS_DATAPUMP.detach (dp);
END;
/

Ora-39127: Unexpected Error from Call to Export_string :=Sys.Dbms_cube_exp

Oracle Database – Enterprise Edition – Version 11.2.0.4 to 11.2.0.4 [Release 11.2]

Information in this document applies to any platform.

A) Export data pump gives following error :
ORA-39127: unexpected error from call to export_string
:=SYS.DBMS_CUBE_EXP.schema_info_exp(‘SYSTEM’,0,1,’11.01.00.00.00′,newblock)
ORA-06550: line 1, column 13:
PLS-00201: identifier ‘SYS.DBMS_CUBE_EXP’ must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
ORA-06512: at “SYS.DBMS_METADATA”, line 5929

B) Export gives following error
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 14:
PLS-00201: identifier ‘SYS.DBMS_CUBE_EXP’ must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_info_exp

C) Export / Export datapump gives following error:
ORA-39127: unexpected error from call to export_string :=SYS.DBMS_AW_EXP.INSTANCE_EXTENDED_INFO_EXP(‘AW$XWDEVKIT’,’APPS’,1,2,0,’APPS’,1,’11.02.00.00.00′,newblock)
ORA-37002: Oracle OLAP failed to initialize. Please contact Oracle OLAP technical support.
ORA-37582: The EXPRESS AW version 2008 is different than the Oracle version 11020003.

CAUSE:
Oracle OLAP is not installed or not configured properly.

SOLUTION
To implement the solution, please execute the following steps:
To avoid this problem, perform relational exports excluding OLAP’s Analytic Workspaces.
1) You might want to make a full backup of your database before attempting the following steps.

2) Remove workspace package from export:
a. Connect sys/password as sysdba
b. create table sys.exppkgact$_backup as select * from sys.exppkgact$; (Backup package before deleting it)
c. delete from sys.exppkgact$ where package = ‘DBMS_CUBE_EXP’ and schema= ‘SYS’;
d. delete from sys.exppkgact$ where package = ‘DBMS_AW_EXP’and schema= ‘SYS’;
e. commit;
3) Run the export.