Friday 13 December 2013

adoacorectl.sh: exiting with status 150 & exiting with status 204

Executing service control script:
/u01/applR12/inst/apps/TEST_linuxerp1/admin/scripts/adoacorectl.sh stop
script returned:
****************************************************

You are running adoacorectl.sh version 120.13

Stopping OPMN managed OACORE OC4J instance ...

adoacorectl.sh: exiting with status 150

adoacorectl.sh: check the logfile /u01/applR12/inst/apps/TEST_linuxerp1/logs/appl/admin/log/adoacorectl.txt for more information ..

Solution:


- Open a new shell and set your apps environment
- cd $ADMIN_SCRIPTS_HOME
- adopmnctl.sh stop
- Check if it is really down: ps -ef | grep -i opm
- Delete the following:

rm -fr $INST_TOP/ora/10.1.3/j2ee/oacore/persistence/*
rm -fr $INST_TOP/ora/10.1.3/j2ee/oafm/persistence/*
rm -fr $INST_TOP/ora/10.1.3/j2ee/forms/persistence/*

Oracle 12c installation on Linux5

Oracle Database 12c Release 1 (12.1) Installation On Oracle Linux 5

This Document describes the installation of Oracle Database 12c Release 1 (12.1) (64-bit) on Oracle Linux 5 (64-bit). 

Download Software

Download the Oracle software from OTN or MOS depending on your support status.

Unzip the files.

unzip linuxamd64_12c_database_1of2.zip
unzip linuxamd64_12c_database_2of2.zip 
You should now have a single directory called "database" containing installation files.

Hosts File

The "/etc/hosts" file must contain a fully qualified name for the server.
<IP-address>  <fully-qualified-machine-name>  <machine-name>
For example.
127.0.0.1       localhost.localdomain  localhost
192.168.1.112   12cdb.oracle.com    12cdb

Oracle Installation Prerequisites

Perform either the Automatic Setup or the Manual Setup to complete the basic prerequisites. The Additional Setup is required for all installations.

Automatic Setup

If you plan to use the "oracle-validated" package to perform all your prerequisite setup, issue the following command.
# yum install oracle-validated -y
All necessary prerequisites will be performed automatically.
Note. Earlier versions of Oracle Linux required manual setup of the Yum repository by following the instructions at http://public-yum.oracle.com.
It is probably worth doing a full update as well, but this is not strictly speaking necessary.
# yum update

Manual Setup

If you have not used the "oracle-validated" package to perform all prerequisites, you will need to manually perform the following setup tasks.
Add or amend the following lines in the "/etc/sysctl.conf" file. Keep any existing values if they are higher than those specified here.
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
Run the following command to change the current kernel parameters.
/sbin/sysctl -p
Add the following lines to the "/etc/security/limits.conf" file.
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    2047
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
Install the following packages if they are not already present.
# From Public Yum or ULN
yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i386 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i386 -y
yum install ksh -y
yum install libaio -y
yum install libaio.i386 -y
yum install libaio-devel -y
yum install libaio-devel.i386 -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i386 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i386 -y
yum install libXext -y
yum install libXext.i386 -y
yum install libXtst -y
yum install libXtst.i386 -y
yum install libX11 -y
yum install libX11.i386 -y
yum install libXau -y
yum install libXau.i386 -y
#yum install libxcb -y
#yum install libxcb.i386 -y
yum install libXi -y
yum install libXi.i386 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
Create the new groups and users.
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin

useradd -u 54321 -g oinstall -G dba,oper oracle
Uncomment the extra groups you require.

Additional Setup

The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.
passwd oracle
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
SELINUX=permissive
Once the change is complete, restart the server or run the following command.
# setenforce Permissive
If you have the Linux firewall enabled, you will need to disable or configure it, as shown here or here. To disable it, do the following.
# service iptables stop
# chkconfig iptables off
Create the directories in which the Oracle software will be installed.
mkdir -p /u01/app/oracle/product/12.1.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Unless you are working from the console, or using SSH tunnelling, login as root and issue the following command.
xhost +<machine-name>
Add the following lines at the end of the "/home/oracle/.bash_profile" file.
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=12cdb.oracle.com
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=cdb1

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Installation

Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.
DISPLAY=<machine-name>:0.0; export DISPLAY
Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.
./runInstaller
Proceed with the installation of your choice.

















Note. The "Database Configuration Assistant Complete" screen displays the Database Express 12c URL, which will be something like "https://12cdb.oracle.com:5500/em".

Post Installation

Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
cdb1:/u01/app/oracle/product/12.1.0/db_1:Y
If Database Express 12c is not working, check the XMLDB HTTP port. If it is 0, set it to the port you want to use.
SQL> SELECT dbms_xdb_config.gethttpsport FROM dual;

GETHTTPSPORT
------------
        5500

SQL> EXEC dbms_xdb_config.sethttpsport(5500);

PL/SQL procedure successfully completed.

SQL>

Common Errors


  • "error code 35" : The machine name in the "/etc/hosts" file is not correct. It needs an entry for the loopback adapter (localhost) and the machine name. If you are using DNS for name resolution, you still need the loopback adapter reference in this file.
  • "error code 37" : The DNS not working properly. You may also get this error is the "/etc/hosts" file is not configured correctly.
  • "sqlplus: error while loading shared libraries: libclntsh.so.12.1" : The prerequisites have not been met. Work through them again. Specifically, make sure the "gcc" package has been installed.
  • Listener fails to start - Typically this is due to incorrect name resolution. Make sure the "/etc/hosts" and/or DNS is configured correctly.
  • Linking errors - Almost always due to missing prerequisites. Review the setup sections.

11g to 12c Manual Upgrade

Install 12c Home(12.1.0.1):
then


Backup the database(11g) before starting the upgrade process. In the event of a failure, you will need this backup to allow you to recreate your starting point.
To run the new Pre-Upgrade Information Tool, copy the "preupgrd.sql" and "utluppkg.sql" scripts from the 12c home to a location accessible by the database that needs upgrading. In this example I used a directory under "/tmp".
$ mkdir -p /tmp/upgrade
$ cp /u01/app/oracle/product/12.1.0.1/db_1/rdbms/admin/preupgrd.sql /tmp/upgrade
$ cp /u01/app/oracle/product/12.1.0.1/db_1/rdbms/admin/utluppkg.sql /tmp/upgrade
Make sure the ORACLE_BASE is set and run the "preupgrd.sql" script from SQL*Plus.
$ export ORACLE_SID=orcl
$ ORAENV_ASK=NO
$ . oraenv
$ ORAENV_ASK=YES
$ cd /tmp/upgrade
$ sqlplus / as sysdba

SQL> @preupgrd.sql
Loading Pre-Upgrade Package...
Executing Pre-Upgrade Checks...
Pre-Upgrade Checks Complete.
      ************************************************************

Results of the checks are located at:
 /u01/app/oracle/cfgtoollogs/orcl/preupgrade/preupgrade.log

Pre-Upgrade Fixup Script (run in source database environment):
 /u01/app/oracle/cfgtoollogs/orcl/preupgrade/preupgrade_fixups.sql

Post-Upgrade Fixup Script (run shortly after upgrade):
 /u01/app/oracle/cfgtoollogs/orcl/preupgrade/postupgrade_fixups.sql

      ************************************************************

         Fixup scripts must be reviewed prior to being executed.

      ************************************************************

      ************************************************************
                   ====>> USER ACTION REQUIRED  <<====
      ************************************************************

 The following are *** ERROR LEVEL CONDITIONS *** that must be addressed
                    prior to attempting your upgrade.
            Failure to do so will result in a failed upgrade.

           You MUST resolve the above errors prior to upgrade

      ************************************************************

SQL>
The Pre-Upgrade Information Tool produces 3 scripts.
  • preupgrade.log : The results of all the checks performed. You need to check this to see if it is safe to continue with the upgrade.
  • preupgrade_fixups.sql : A fixup script that should be run before the upgrade.
  • postupgrade_fixups.sql : A fixup script that should be run after the upgrade.
Assuming there are no show-stoppers in the "preupgrade.log" file, run the "preupgrade_fixups.sql" script. Any changes it can't perform are flagged as "MANUAL ACTION SUGGESTED".
SQL> @/u01/app/oracle/cfgtoollogs/orcl/preupgrade/preupgrade_fixups.sql
Pre-Upgrade Fixup Script Generated on 2013-07-24 15:00:32  Version: 12.1.0.1 Build: 006
Beginning Pre-Upgrade Fixups...

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


**********************************************************************
Check Tag:     DEFAULT_PROCESS_COUNT
Check Summary: Verify min process count is not too low
Fix Summary:   Review and increase if needed, your PROCESSES value.
**********************************************************************
Fixup Returned Information:
WARNING: --> Process Count may be too low

     Database has a maximum process count of 150 which is lower than the
     default value of 300 for this release.
     You should update your processes value prior to the upgrade
     to a value of at least 300.
     For example:
        ALTER SYSTEM SET PROCESSES=300 SCOPE=SPFILE
     or update your init.ora file.
**********************************************************************


PL/SQL procedure successfully completed.


**********************************************************************
Check Tag:     EM_PRESENT
Check Summary: Check if Enterprise Manager is present
Fix Summary:   Execute emremove.sql prior to upgrade.
**********************************************************************
Fixup Returned Information:
WARNING: --> Enterprise Manager Database Control repository found in the database

     In Oracle Database 12c, Database Control is removed during
     the upgrade. To save time during the Upgrade, this action
     can be done prior to upgrading using the following steps after
     copying rdbms/admin/emremove.sql from the new Oracle home
   - Stop EM Database Control:
    $> emctl stop dbconsole

   - Connect to the Database using the SYS account AS SYSDBA:

   SET ECHO ON;
   SET SERVEROUTPUT ON;
   @emremove.sql
     Without the set echo and serveroutput commands you will not
     be able to follow the progress of the script.
**********************************************************************


PL/SQL procedure successfully completed.


**********************************************************************
Check Tag:     DBMS_LDAP_DEPENDENCIES_EXIST
Check Summary: Check for dependency on DBMS_LDAP package
Fix Summary:   Network Objects must be reviewed manually.
**********************************************************************
Fixup Returned Information:
WARNING: --> Existing DBMS_LDAP dependent objects

     Database contains schemas with objects dependent on DBMS_LDAP package.
     Refer to the Upgrade Guide for instructions to configure Network ACLs.
     USER APEX_030200 has dependent objects.
**********************************************************************


PL/SQL procedure successfully completed.


**********************************************************************
Check Tag:     AMD_EXISTS
Check Summary: Check to see if AMD is present in the database
Fix Summary:   Manually execute ORACLE_HOME/oraolap/admin/catnoamd.sql script to remove OLAP.
**********************************************************************
Fixup Returned Information:
INFORMATION: --> OLAP Catalog(AMD) exists in database

     Starting with Oracle Database 12c, OLAP is desupported.
     If you are not using the OLAP Catalog component and want
     to remove it, then execute the
     ORACLE_HOME/oraolap/admin/catnoamd.sql script before or
     after the upgrade.
**********************************************************************


PL/SQL procedure successfully completed.


**********************************************************************
                      [Pre-Upgrade Recommendations]
**********************************************************************


PL/SQL procedure successfully completed.

                        *****************************************
                        ********* Dictionary Statistics *********
                        *****************************************

Please gather dictionary statistics 24 hours prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
    EXECUTE dbms_stats.gather_dictionary_stats;

^^^ MANUAL ACTION SUGGESTED ^^^


PL/SQL procedure successfully completed.


           **************************************************
                ************* Fixup Summary ************

 4 fixup routines generated INFORMATIONAL messages that should be reviewed.


PL/SQL procedure successfully completed.

**************** Pre-Upgrade Fixup Script Complete *********************

PL/SQL procedure successfully completed.

SQL>
As you can see, in this case, the suggested changes were as follows.
ALTER SYSTEM SET PROCESSES=300 SCOPE=SPFILE;

SET ECHO ON;
SET SERVEROUTPUT ON;
-- emremove.sql scrip located in the 12c home.
@/u01/app/oracle/product/12.1.0.1/db_1/rdbms/admin/emremove.sql

-- Removing this before the upgrade will result in the errors shown below.
-- These errors are not show-stoppers, but if you want a cleaner run through,
-- remove this feature after the upgrade.
@?/olap/admin/catnoamd.sql

EXECUTE dbms_stats.gather_dictionary_stats;

-- Shutdown the database.
SHUTDOWN IMMEDIATE;
Copy the parameter and password files from the old home to the 12c home.
$ cp /u01/app/oracle/product/11.2.0.3/db_1/dbs/spfileorcl.ora /u01/app/oracle/product/12.1.0.1/db_1/dbs
$ cp /u01/app/oracle/product/11.2.0.3/db_1/dbs/orapworcl /u01/app/oracle/product/12.1.0.1/db_1/dbs
If the "preupgrade.log" file contains references to deprecated initialization parameters, make the suggested changes to the parameters now before continuing.
Edit the "/etc/oratab" file, setting the new ORACLE_HOME value.
orcl:/u01/app/oracle/product/12.1.0.1/db_1:Y
Make sure the environment is set to the 12c home.
$ export ORACLE_SID=orcl
$ ORAENV_ASK=NO
$ . oraenv
$ ORAENV_ASK=YES
Start the database in upgrade mode.
$ sqlplus / as sysdba

SQL> STARTUP UPGRADE;
SQL> EXIT;
Run the new Parallel Upgrade Utility (catctl.pl).
$ cd $ORACLE_HOME/rdbms/admin
$ $ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql
You can alter the level of parallelism using the "-n" parameter. For example, the following command runs the upgrade with a parallel level of 8.
$ cd $ORACLE_HOME/rdbms/admin
$ $ORACLE_HOME/perl/bin/perl catctl.pl -n 8 catupgrd.sql
You can see an example of the output from this utility here.
Startup the upgraded database and run the "utlu121s.sql" script to check the summary of the upgrade results.
$ sqlplus / as sysdba

SQL> STARTUP;
SQL> @utlu121s.sql
.
Oracle Database 12.1 Post-Upgrade Status Tool           07-24-2013 17:24:18
.
Component                               Current         Version  Elapsed Time
Name                                    Status          Number   HH:MM:SS
.
Oracle Server
.                                      UPGRADED      12.1.0.1.0  00:16:48
JServer JAVA Virtual Machine
.                                         VALID      12.1.0.1.0  00:04:47
Oracle Workspace Manager
.                                         VALID      12.1.0.1.0  00:01:17
OLAP Analytic Workspace
.                                         VALID      12.1.0.1.0  00:00:53
Oracle OLAP API
.   SP2-0310: unable to open file "xoqsys.sql"
.   ORA-01917: user or role "OLAPSYS" does not exist
.   ORA-00942: table or view does not exist
.   ORA-00942: table or view does not exist
.   ORA-00942: table or view does not exist
.   ORA-00942: table or view does not exist
.   ORA-00942: table or view does not exist
.                                         VALID      12.1.0.1.0  00:00:46
Oracle XDK
.                                         VALID      12.1.0.1.0  00:00:48
Oracle Text
.                                         VALID      12.1.0.1.0  00:01:07
Oracle XML Database
.                                         VALID      12.1.0.1.0  00:04:35
Oracle Database Java Packages
.                                         VALID      12.1.0.1.0  00:00:22
Oracle Multimedia
.                                         VALID      12.1.0.1.0  00:02:42
Spatial
.                                         VALID      12.1.0.1.0  00:06:21
Oracle Application Express
.                                         VALID     4.2.0.00.27  00:25:28
Final Actions
.                                                                00:02:47
Total Upgrade Time: 01:09:24

PL/SQL procedure successfully completed.

SQL>
You can see the upgrade failed for the "Oracle OLAP API" section, which is a feature we removed before the upgrade, so it is OK to continue.
If we had no errors, the "catuppst.sql" script would have been run as part of the upgrade. Since we did have errors, we need to run it manually.
SQL> @catuppst.sql
If the "postupgrade_fixups.sql" file contained any recommendations, run it now.
SQL> @/u01/app/oracle/cfgtoollogs/orcl/preupgrade/postupgrade_fixups.sql
The following items are not essential, but the upgrade manual suggests it is a best practice to run them.
-- The following item is probably included in your postupgrade_fixups.sql script.
EXECUTE DBMS_STATS.gather_fixed_objects_stats;

-- Recompile invalid objects.
@utlrp.sql

-- Check for newly invalid objects.
@utluiobj.sql

-- Run again to check the final outcome of the upgrade.
@utlu121s.sql
The upgraded database is now available.
$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Wed Jul 24 18:17:03 2013

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> SELECT name, open_mode FROM v$database;

NAME      OPEN_MODE
--------- --------------------
ORCL      READ WRITE

SQL>
Remember to alter any script or profile files that contain references to the ORACLE_HOME environment variable.

Sunday 8 December 2013

DBA related Views Oracle DBA

Storage Information Specific Views:

DBA_EXTENTS,    DBA_FREE_SPACE,     DBA_OBJECTS,
DBA_OBJECT_SIZE,    DBA_SEGMENTS,     DBA_TABLESPACES,
DBA_ROLLBACK_SEGS,     DBA_UNDO_EXTENTS

Operating System
DBA_DATA_FILES,      DBA_EXP_FILES,      DBA_TEMP_FILES

Privileges
DBA_COL_PRIVS,   DBA_PROFILES,   DBA_ROLES,
DBA_ROLE_PRIVS,   DBA_SYS_PRIVS,   DBA_TAB_PRIVS,
DBA_UPDATABLE_COLUMNS

Indexes
DBA_INDEXES,   DBA_IND_COLUMNS,
DBA_IND_EXPRESSIONS,   DBA_IND_PARTITIONS

Tables/Views
DBA_TABLES,   DBA_TAB_COLUMNS,   DBA_TAB_PARTITIONS,
DBA_TAB_COMMENTS,
DBA_UNUSED_COL_TABS,    DBA_VIEWS

Constraints
DBA_CONSTRAINTS,    DBA_CONS_COLUMNS

Triggers
DBA_TRIGGERS,   DBA_TRIGGER_COLS,
DBA_INTERNAL_TRIGGERS

Materialized Views
DBA_MVIEW_AGGREGATES,   DBA_MVIEW_ANALYSIS,
DBA_MVIEW_DETAIL_RELATIONS,   DBA_MVIEW_JOINS,
DBA_MVIEW_KEYS

Partitions
DBA_PART_COL_STATISTICS, DBA_PART_HISTOGRAMS,
DBA_PART_INDEXES, DBA_PART_KEY_COLUMNS,
DBA_PART_LOBS, DBA_PART_TABLES,
DBA_IND_SUBPARTITIONS, DBA_LOB_PARTITIONS,
DBA_LOB_SUBPARTITIONS

Objects, Methods and Types
DBA_OBJECT_TABLES,    DBA_METHOD_PARAMS,
DBA_METHOD_RESULTS,    DBA_TYPES,    DBA_TYPE_ATTRS,
DBA_TYPE_METHODS,    DBA_DIMENSIONS,    DBA_LOBS

Operators
DBA_OPANCILLARY,    DBA_OPARGUMENTS,
DBA_OPBINDINGS,    DBA_OPERATORS

Summaries
DBA_SUMMARIES,    DBA_SUMMARY_AGGREGATES,
DBA_SUMMARY_DETAIL_TABLES,    DBA_SUMMARY_JOINS,
DBA_SUMMARY_KEYS

Miscellaneous
DBA_DB_LINKS,   DBA_SOURCE  ,    DBA_SEQUENCES,
DBA_SYNONYMS,   DBA_USERS,    DBA_OUTLINES,
DBA_JOBS,    DBA_JOBS_RUNNING,    DBA_LIBRARIES,
DBA_PENDING_TRANSACTIONS,    DBA_RULESETS,
DBA_OUTLINE_HINTS,     DBA_POLICIES,
DBA_SUBPART_KEY_COLUMNS,     DBA_TS_QUOTAS,
DBA_JAVA_POLICY,    USER_JAVA_POLICY

Dynamic Performance Views

Instance Level Tuning

v$GLOBAL_TRANSACTION,          v$OBJECT_DEPENDENCY,
 v$SHARED_POOL_RESERVED,     v$SORT_SEGMENT,
v$SYSTEM_CURSOR_CACHE,       v$SORT_USAGE,                          v$STATNAME,
v$SYSSTAT,  v$SYSTEM_EVENT,   v$TRANSACTION,                       v$LATCH,
v$LIBRARYCACHE,                           v$ROLLSTAT,                               v$ROWCACHE,
vRSGASTAT,      v$SQLAREA,           v$SQLTEXT,            v$WAITSTAT

Recovery Based Views
v$ARCHIVE,    v$ARCHIVE_DEST,      v$BACKUP_CORRUPTION,
v$BACKUP_DEVICE,       v$BACKUP_REDOLOG,
v$DELETED_OBJECT,       v$RECOVERY_LOG,       v$RECOVER_FILE,
v$ARCHIVED_LOG,       v$BACKUP,       v$BACKUP_DATAFILE,
v$BACKUP_PIECE,       v$BACKUP_SET,
v$RECOVERY_FILE_STATUS,         v$RECOVERY_STATUS,
v$DATABASE_BLOCK_CORRUPTION,
v$DATABASE_INCARNATION

Cache Views
v$CACHE, 
v$LIBRARYCACHE, 
v$SUBCACHE,
v$DB_OBJECT_CACHE, 
v$ROWCACHE

Control File Views
v$CONTROLFILE, 
v$CONTROLFILE_RECORD_SELECTION

Cursor and SQL Views
v$SYSTEM_CURSOR_CACHE,          v$OPEN_CURSOR,      v$SQLAREA,
v$SQL, v$SQLTEXT,      v$SQLTEXT_WITH_NEWLINES,
v$SQL_CURSOR,     v$SQL_BIND_METADATA,
v$SQL_SHARED_MEMORY,       v$SQL_BIND_DATA,
v$SQL_WORKAREA,      v$SQL_WORKAREA_ACTIVE

Security Views
v$ENABLEDPRIVS,      v$PWFILE_USERS

Session Views
v$ACCESS,    v$MYSTAT,    v$PROCESS,    v$SESSION ,
v$SESSION_CONNECT_INFO,    v$SESSION_CURSOR_CACHE,
v$SESSION_EVENT,    v$SESSION_LONGOPS,
v$SESSION_OBJECT_CACHE,    v$SESSION_WAIT,     v$SESSTAT
(needs v$statname, v$session join),     v$SESS_IO

Latch and Lock Views
v$BUFFER_POOL,     v$CACHE_LOCK,   v$CLASS_PING,
v$DLM_CONVERT_LOCAL,     v$DLM_CONVERT_REMOTE,
v$DLM_LATCH,    v$DLM_MISC,     v$ENQUEUE_LOCK,
v$EVENT_NAME,     v$FALSE_PING,    v$FILE_PING,     v$LATCH,
v$LATCHHOLDER,     v$LATCHNAME,     v$LATCH_CHILDREN,
v$LATCH_MISSES,     v$LATCH_PARENT ,     v$LOCK,
v$LOCK_ACTIVITY,    v$LOCK_ELEMENT,     v$LOCKED_OBJECT,
v$LOCKS_WITH_COLLISIONS,      v$PING,        v$RESOURCE,
v$RESOURCE_LIMIT,        v$TRANSACTION_ENQUEUE,       v$LOCK

Instance Views
v$ACTIVE_INSTANCES,          v$BGPROCESS,            v$BH,
v$COMPATIBILITY,          v$COMPATSEG,                v$COPY_CORRUPTION,
v$DATABASE,            v$DATAFILE,               v$DATAFILE_COPY,
v$DATAFILE_HEADER,             v$DBFILE,            v$DBLINK,         v$DB_PIPES,
v$INSTANCE,            v$LICENSE,         v$OFFLINE_RANGE,        v$OPTION,
v$ROLLSTAT ,     v$SGA,     v$SGA_STAT,     v$TABLESPACE,
v$TRANSACTION,     v$UNDOSTAT,     v$VERSION

Fixed Views
v$FIXED_TABLE,     v$FIXED_VIEW_DEFINITION,
v$INDEXED_FIXED_COLUMN

Miscellaneous Views
v$TIMER,       v$TYPE_SIZE,          v$SEQUENCES

MTS and Parallel Server Views
v$CIRCUIT,      v$DISPATCHER,     v$DISPATCHER_RATE,        v$MTS,
v$QUEUE,      v$REQDIST,      v$SHARED_SERVER,      v$THREAD

File Mapping
v$MAP_LIBRARY,      v$MAP_FILE,       v$MAP_FILE_EXTENT,
v$MAP_ELEMENT,      v$MAP_EXT_ELEMENT,
v$MAP_SUBELEMENT,       v$MAP_COMP_LIST,
v$MAP_FILE_IO_STACK

Thursday 5 December 2013

export from 11g and import into 10g

Import data into a target database with a lower compatibility level.

Sample configuration:

Source database: 11.1.0.6.0 with COMPATIBLE=11.1.0
Target database: 10.2.0.4.0 with COMPATIBLE=10.2.0
Solution:

Start the export job using the 11.1.0.6.0 Export Data Pump client that connects to the 11.1.0.6.0 source database. Use the parameter VERSION=10.2 to create a dumpfile set with a lower compatibility level.
Transfer the dumpfile set to the server where the target database is located.
Start the import of the data using the 10.2.0.4.0 Import Data Pump client that connects to the 10.2.0.4.0 target database.

-- Step 1: export from 11.1.0.6 source database
-- with 11.1.0.6 Export Data Pump client and specify VERSION:


% expdp system/manager DIRECTORY=my_dir DUMPFILE=expdp_s.dmp \ 
LOGFILE=expdp_s.log SCHEMAS=scott VERSION=10.2

-- Step 2: transfer dumpfile to target server

-- Step 3: import into 10.2.0.4 target database
-- with 10.2.0.4 Import Data Pump client:


% impdp system/manager DIRECTORY=my_dir DUMPFILE=expdp_s.dmp \  
LOGFILE=impdp_s.log SCHEMAS=scott

oraInst.loc points to an Inventory that does not exist

Problem:

/etc/oraInst.loc points to an Inventory that does not exist:

mkdir : No such file or directory at ./adclone.pl line 1274

ERROR: Failed to execute ./adclone.pl


Solution: Step -1 

/home/applprod

Step-2

/etc/oraInst.loc 

/home/applprod/oraInventory - previously it was /home/oraprod/oraInventory

(or)
As root user, run /tmp/orainstRoot.sh.

Rerun clone again, but it failed.

The root directory had completely filled up because the backup was restored to /oracle and not /u0/oracle.
Removed /oracle, then reran /tmp/orainstRoot.sh and tried script again.

librt.so.1 , libc.so.6 error while executing afmkinit.sh

[AutoConfig Error Report]

Executing script in InstantiateFile:
<RDBMS_ORACLE_HOME>appsutil/install/<CONTEXT_NAME>/afmkinit.sh
:
:
.end std out.
cp: error while loading shared libraries: libc.so.6: cannot open shared object file:
No such file or directory
touch: error while loading shared libraries: librt.so.1: cannot open shared object file:
No such file or directory

<Same error returned for:
afdbprf.sh
adcrobj.sh



The following report lists errors AutoConfig encountered during each
phase of its execution.  Errors are grouped by directory and phase.
The report format is:
      <filename>  <phase>  <return code where appropriate>

  [SETUP PHASE]
  AutoConfig could not successfully execute the following scripts:
    Directory: /u02/oradev/devdb/9.2.0/appsutil/install/DEV_oracletrng5
      afmkinit.sh             INSTE8_SETUP       127


AutoConfig is exiting with status 1

RC-50014: Fatal: Execution of AutoConfig was failed
Raised by oracle.apps.ad.clone.ApplyDatabase


StackTrace:
java.lang.Exception: RC-50014: Fatal: Execution of AutoConfig was failed
        at oracle.apps.ad.clone.ApplyDatabase.checkAutoConfigErr(ApplyDatabase.java:2322)
        at oracle.apps.ad.clone.ApplyDatabase.runAutoConfig(ApplyDatabase.java:2117)
        at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:415)
        at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:319)
        at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:295)
        at oracle.apps.ad.clone.ApplyDBTier.<init>(ApplyDBTier.java:154)
        at java.lang.reflect.Constructor.newInstance(Native Method)
        at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:68)
        at java.lang.Thread.run(Thread.java:479)



Solution:


1. Edit the <9i RDBMS_ORACLE_HOME>/appsutil/bin/adgetlnxver.sh file as below

2. Alter by replacing all occurances of LD_ASSUME_KERNEL with XD_ASSUME_KERNEL

---------------

if same error may occur in Application Tier:  then

cd $AD_TOP/bin/adgetlnxver.sh

uncheck or replace all occurances of LD_ASSUME_KERNEL with XD_ASSUME_KERNEL

Unable to find PD KSH version

[oratest@apps1 bin]$ perl adcfgclone.pl dbTier

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adcfgclone Version 120.20.12000000.11

Enter the APPS password :

Checking for make...    found - /usr/bin/make
 Checking for ld...     found - /usr/bin/ld
 Checking for cc...     found - /usr/bin/cc
 Checking for ar...     found - /usr/bin/ar
 Checking for ksh...
 Unable to find PD KSH version.
 Unable to locate all utilities with system path.
 PATH = /u02/oratest/TEST/db/tech_st/10.2.0/appsutil/clone/bin/../jre/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oratest/bin


WARNING: Could not find all the required OS utilities in the $PATH. Please review the checks above

SOLUTION(as per metalink document id 451994.1)

To get this failure fixed execute following steps : 1. Download and apply Patch 5972212 - 'ADCHKUTL.SH FAILS IN SLES 10 DUE TO PDKSH REQUIREMENT'
This Patch is available for Release 11i and R12.0.x - it brings the script 'adchkutl.sh' in Release 115.6, which no longer checks for 'pdksh'.
Following Workaround can be used as an immediate fix : 1. Before starting the adcfgclone.pl script set in your Environment the KSH_VERSION. The following is applicable to the Linux Red Hat 5 platform :
export KSH_VERSION='@(#)PD KSH v5.2.14 99/07/13.2'
2. Execute 'perl adcfgclone.pl dbTier' and it should now run successfully.