Wednesday, 25 February 2015

Create a new fixed size UNDO tablespace & Switch UNDO tablespace

Version:


Oracle 11.2.0.4



OS:


Windows



SQLs to create a new fixed size undo tablespace and switch to the new undo tablespace:


create undo tablespace UNDOTBS2 datafile 'D:\ORACLE\ORADATA\DB1\DATAFILE\UNDOTBS2_01.DBF' size 8g;

alter system set undo_tablespace = UNDOTBS2;



Oracle documentation on Managing Undo Tablespaces:


https://docs.oracle.com/cd/E11882_01/server.112/e25494/undo.htm#ADMIN11470

Alter the size of SYSAUX tablespace - SYSAUX tablespace is full Oracle 11g

Scenario:


SYSAUX tablespace is full.


Version:


Oracle 11.2.0.4


OS:

Windows


Solution:


There are 2 solutions:
1. Alter/increase the size of SYSAUX tablespace
2. Cleanup SYSAUX tablespace


Example:


Here is the example to alter/increase the size of SYSAUX tablespace (with autoextend and maximum size of the file to be 8GB):
(Please note that file_id here used is 2 for SYSAUX tablespace. Please verify the file_id for SYSAUX tablespace in DBA_DATA_FILES table before running this command)

alter database datafile 2 autoextend on next 10M maxsize 8G;


Oracle documentation on Changing Datafile Size:


http://docs.oracle.com/cd/B28359_01/server.111/b28310/dfiles003.htm#ADMIN11423

Tuesday, 24 February 2015

ORA-39142: incompatible version number 4.1 in dump file

os:


Windows


Reason for the error:


This error occurs when doing an import(impdp) into Oracle 11g(11.2.0.4) after doing an export from Oracle 12c(12.1.0.1). And it happens because version of EXPDP and IMPDP are imcompatible.


Solution:


When doing the export specify the parameter VERSION.
In this case you specify the version as 11.2 when doing the export, as you are trying to import into 11.2.
VERSION parameter should only be specified when doing the export.
If VERSION is specified when doing the import instead of export, it will still fail because import cannot recognize the dumpfile format.


Example:


expdp   hr   TABLES=hr.employees   VERSION=11.2   DIRECTORY=dump_dir    DUMPFILE=emp.dmp


Oracle documentation on VERSION parameter when doing export: