Thursday, 12 February 2015

Responsiblity R12

For Oracle Responsibility, means set of privileges assigned to user.
Responsibilities are generally defined by System Administrator.

For defining the responsibility, you need set of components described below:

1. Data Group
It defines the mapping between Oracle Application and oracle username assigned to it.Each application in data group has a oracle user assigned to it
For defining the data group, the following details should be assigned.

->Name
->Application
->Menu
->Request Group

2.Menu
It's a hierarchical arrangement of application forms that displays in the navigation.It defines the range of application functionality available for a responsibility.

3.Application
Name of the application to which responsibility is given access to.

4. Responsibility key
Internal key for the responsibility

5. Responsibility name 
Name of the responsibility

To define a new responsibility:

System Administrator >> Security >> Responsibility >> Define

Refer metalink for detailed explanation 1508400.1


Program was terminated by signal 25 concurrent manager

This issue occurs when your reports.log in $APPLCSF/$APPLLOG  exceeds the size by more than 2GB.

To check the size

$ cd $APPLCSF/$APPLLOG
$  ls -l reports.log

Solution

Backup your reports.log file rename it to reports.log.bk
Create a new reports.log file

$ touch reports.log

Tuesday, 10 February 2015

RMAN Duplicate Database


RMAN duplicate database is a new feature added to 11g database.
With this feature you can duplicate your target database without bringing down any services on it.

This feature is basically used for creating up the Standby Databases.



rman target sys/XXX@SID auxiliary sys/XXX@SID

 run
{
DUPLICATE TARGET DATABASE TO 'XXXX' FROM ACTIVE DATABASE nofilenamecheck;
}
exit

Monday, 9 February 2015

OPATCH Utility (Database Patch)

Opatch is a patching utility that ensures your Oracle software is into healthy and secure condition.

The below image will help you in understanding the workflow for applying the database patch.



Surrounding text describes Figure 1-1 .

OPATCH options

    opatch -help
   opatch apply -help
   opatch compare 
   opatch lsinventory -help
   opatch lspatches -help
   opatch napply -help
   opatch nrollback -help
   opatch rollback -help
   opatch prereq -help
   opatch util -help

Application Patching (ADPATCH)


Patch is a program to fix a particular problem or enhance/add a particular feature in existing environment.

To apply the patch, download the patch from metalink with specific OS versions.

Unzip the patch and read the pre-requisite.
vi README.txt

To check whether the patch is already applied.

*sqlplus apps/<apps password>@<tnsalias>   then
select * from AD_BUGS where bug_number=’<patch number>’


Maintenance Mode is mode of operation in which the oracle application system is ready for patching activities. It improves performance and availability by minimizing downtime.

Run the 'adadmin' from APPL_TOP
 
1.Generate applications file menu.
2.Maintain applications file menu.
3.Compile/Reload Applications Database Entities Menu.
4.Maintain Applications Database Entities Menu.
5.Change Maintenance Mode.
6.Exit ad Administration

Select the option '5' to change the maintenance mode.
1.Enable Maintenance mode.
2.Disable Maintenance mode.
3.Return to Main Menu.


If you wish to apply patch without putting applications in maintenance mode use options=hotpatch with adpatch.

adpatch options=hotpatch








RMAN BACKUP INCREMENTAL LEVEL 1

RMAN BACKUP INCREMENTAL LEVEL 1


Rman target / catalog rman/rman@rman(running it from the production, and the catalog is in backup server(10.0.xx.x and SID of rman is rman ))

RMAN> #
2> connect catalog *
3> connect target *
4>
5> set snapshot controlfile name to '/tmp/PROD_snapshot.ctl';
6>
7>
8> CONFIGURE DEVICE TYPE disk PARALLELISM 1;
9> CONFIGURE CONTROLFILE AUTOBACKUP ON;
10> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rmanbackup/PROD/1_xxxxxx/CTRL_BK_%F';
11>
12> run
13> {
14> allocate channel ch1 type disk;
15> allocate channel ch2 type disk;
16> backup incremental level 1 format '/rmanbackup/PROD/1_xxxxxxxx/DB_FULL_1_%U_%T' database ;
17> SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
18> backup incremental level 1 format '/rmanbackup/PROD/1_xxxxxxxx/ARC_FULL_1_%U_%T' archivelog all;
19> release channel ch1;
20> release channel ch2;
21> }
22> crosscheck backup;
23> exit

cloning


Rapid Clone
Cloning an Oracle E-Business Suite Release 12 system can be accomplished by running the Rapid Clone tool. This tool can be employed with Oracle E-Business Suite Release 12, or any AutoConfig-enabled earlier releases.

(/* PRECLONE STEPS */)
----------------source location-------------------------------------
cd $ORACLE_HOME/appsutil/scripts/context_name
./ adpreclone.pl dbTier      -----------------------db tier

cd $INST_TOP/admin/scripts
./adpreclone.pl appsTier   ---------------------application Tier

copy all the application tier file system to the target system (appl_top,common_top,technology stack 10.1.2 ,10.1.3)



(/* POSTCLONE STEPS */)
cd $ORACLE_HOME/appsutil/clone/bin
./adcfgclone.pl dbTier        ----------------------------db Tier
cd $COMMON_TOP/clone/bin
./adcfgclone.pl appsTier     ---------------------------application Tier


Scripts For DBA


RMAN FILE LOCATION---------------------------------------------------------
show parameter recover;

database version---------------------------------------------------------
    select * from v$version;

tablespace names-----------------------------------------------------------
    select * from dba_tablespace

account unlock-----------------------------------------------------------------------------
    alter user user_name account unlock;
    alter user apps account unlock;

apache restart-------------------------------------------------------------------------------
    cd /usr/local/apache-tomcat/bin/
    ./startup.sh

NLS parameters

SELECT * FROM nls_session_parameters;
Instance parameters (change with ALTER SYSTEM):
SELECT * FROM nls_instance_parameters;
Database parameters (set during database creation):
SELECT * FROM nls_database_parameters;

check patch version 
adident Header (name of patch)

 Permission

chmod
chmod -R 777 /u02

user add
useradd -g dba oraprod

groupadd dba

chown
chown -R applprod.dba /u03/oracle...

Adding up datafile

select * from v$tablespace;
select * from v$datafile;
add datafile
alter tablespace tablespace_name add datafile '/u01/oracle/oradata/prodtest1/system02.dbf' size 50G;

add log file to existing group
sql> ALTER DATABASE ADD LOGFILE MEMBER '/u02/oradata/mydb/redo02.log' TO GROUP 2;

add log file to the new group
alter database add logfile group 5 ('/u01/oracle/oradata/prod/redologt1.dbf','/u01/oracle/oradata/prod/logt2.dbf') size 50m;

 control file creation
"CREATE CONTROLFILE
 SET DATABASE prod
   LOGFILE GROUP 1 ('/u01/oracle/prod/redo01_01.log',"


archive log find old files

find . -mtime +5  -exec rm -f {} \; -print         - delete 

find . -mtime +5  {} \; -print
find /u02/oracle/archive/ -mtime +5;

About Me


Hello Everyone,

I Aman Singh graduated as a Computer Science Engineer.
Certified OCA 10g.

Working as Oracle Apps DBA.