Wednesday 15 October 2014

How to compile jsp pages manual in R12

Please follow the below steps to compile jsp pages manually in R12.

backup/move  the _pages directory as below

mv $COMMON_TOP/_pages $COMMON_TOP/_pages_19sep2014

create a _pages direcory







mkdir $COMMON_TOP/_pages



cd $FND_TOP/patch/115/bin

compile jsp pages using oajspCompile.pl as below:

perl ojspCompile.pl --compile --flush -p 20

frmcmp_batch.sh fails with ORA-12154: TNS:could not resolve the connect identifier specified R12

While trying to compile a form with frmcmp_batch.sh got ORA-12154
Example:

[appebs@hom3 PTB]$ frmcmp_batch.sh module=$AU_TOP/forms/US/LISTDEL.fmb userid=APPS/rajhiapps output_file=$GMD_TOP/forms/US/LISTDEL.fmx module_type=form compile_all=special > LISTDEL1.log

Forms 10.1 (Form Compiler): Release - Production

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

PL/SQL Version 10.1.0.5.0 (Production)
Oracle Procedure Builder V10.1.2.0.2 - Production
Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
Oracle Multimedia Version 10.1.2.0.2 (Production)
Oracle Tools Integration Version 10.1.2.0.2 (Production)
Oracle Tools Common Area Version 10.1.2.0.2
Oracle CORE 10.1.0.5.0 Production
ORA-12154: TNS:could not resolve the connect identifier specified


Workaround:
Change TNS_ADMIN on frmcmp_batch.sh like bellow:

--OLD VALUE
TNS_ADMIN=$ORACLE_HOME/network/admin
export TNS_ADMIN

--NEW VALUE
# TNS_ADMIN=$ORACLE_HOME/network/admin
# export TNS_ADMIN


TNS_ADMIN=${TNS_ADMIN:-$ORACLE_HOME/network/admin}
export TNS_ADMIN



OR Apply patch 5456500 as per NOTE 431324.1

Monday 6 October 2014

RMAN Daily Full Backup 11.2.0.3



RMAN Daily Full Backup:

Base Directory = /backup/PROD
This is the location where Backup script placed, Backup files and logs will create.
Backup Script: rman.sh




#!/bin/bash
. /u01/oraprd/PROD/db/tech_st/11.2.0/PROD_db-prod.env
DATE=`date +"%d_%m_%y_%a_%H_%M"`
cd /backup/PROD/logs
mkdir $DATE
cd /backup/PROD/backup/
mkdir $DATE
cd
cd /u01/oraprd/PROD/db/tech_st/11.2.0/bin
./rman  target 'system/manager' log=/backup/PROD/logs/$DATE/rman_$DATE.log << EOF
crosscheck archivelog all;
crosscheck backup;
delete noprompt expired backup;
delete noprompt obsolete;
run {
    allocate channel C1 type disk;
    allocate channel C2 type disk;
    backup AS COMPRESSED BACKUPSET tag whole_database_open format '/backup/PROD/backup/$DATE/PROD_db_%T_%t_s%s_p%p.bak' (DATABASE);
    sql 'alter system archive log current';
    sql 'alter system archive log current';
    change archivelog all validate;
    BACKUP format '/backup/PROD/backup/$DATE/PROD_AR_%d_%s_%p.bak' TAG 'Prod_Arch_backup' ARCHIVELOG ALL NOT BACKED UP DELETE ALL INPUT;
    backup current controlfile format '/backup/PROD/backup/$DATE/cntc_%T_%t_s%s_p%p';
    release channel C1;
    release channel C2;
}
EOF
mv -f /backup/PROD/logs/$DATE/rman_$DATE.log /backup/PROD/logs/$DATE/rman_backup_$DATE.log
#exit;

 This Script will create Folders with Sysdate in backup location and log location, to easily understand backup date and logfile dates.

For every run of backup script it will create a directory Named with backup date and time
(DD-MM-YY-DAY-HH-MM) under backup location and log location.

Example:  06_10_14_Mon_01_00 
Data Files, Archive log files and control file backup sets will be create under backup/PROD/backup/
Daily Backup Logfiles will be created under /backup/PROD/logs/

RMAN Backup Schedule:
Scheduled RMAN Backup using Crontab to run Everyday 01:00am.

Monitor Backup:
Check the RMAN Backup log file for Backup status:
Check the logfile for Backup complete status as well as any errors while backup like RMAN-, ORA-

Sample Error Log file:
Check the log file for status of backup completion. And log file shoul not contain any errors like RMAN- , ORA- .
It should be like: Finished backup, and released channel: C1

Backups check:
Goto backup location of current date:
Check the backups available for Prod –DB,Archive, and Controlfile.

[oraprd@db-prod backup]$ cd 06_10_14_Mon_01_00/
[oraprd@db-prod 06_10_14_Mon_01_00]$ ls -lrt
total 6660796
-rw-r----- 1 oraprd dba 2524495872 Oct  6 01:10 PROD_db_20141006_860202005_s42_p1.bak
-rw-r----- 1 oraprd dba 2067849216 Oct  6 01:10 PROD_db_20141006_860202005_s41_p1.bak
-rw-r----- 1 oraprd dba 2141388800 Oct  6 01:19 PROD_db_20141006_860202640_s43_p1.bak
-rw-r----- 1 oraprd dba             8704 Oct  6 01:19 PROD_AR_PROD_46_1.bak
-rw-r----- 1 oraprd dba     45325824 Oct  6 01:19 PROD_AR_PROD_45_1.bak
-rw-r----- 1 oraprd dba     34897920 Oct  6 01:19 cntc_20141006_860203189_s47_p1

PROD_db_20141006_860202005_s42_p1.bak
in this PROD_db denotes PROD Instance Data files Backup-set.

PROD_AR_PROD_46_1.bak
In This PROD-AR denotes Prod Archive Backup-set.

cntc_20141006_860203189_s47_p1
In this cntc denotes Contorlfile Backup-set


References

Oracle Database Backup and Recovery User's Guide 11g Release 1 (11.1)
B28270-03

Oracle® Database Backup and Recovery User's Guide 11g Release 2 (11.2)
E10642-06