Monthly Archives: December 2009

Clearing Linux File Cache

To clear the Linux file system cache, use the following command:

sync ; echo 3 > /proc/sys/vm/drop_caches

REP-3000 Error

To resolve REP-3000 while running PDF reports, try these solutions:

1. Set ‘s_display’ in SID_server.xml using vi or using Oracle Application Manager:

a. Use the ‘uname -n’ command to determine the correct name of the server eg

b. If the ‘echo $DISPLAY’ command is set to 0.0, then the s_display parameter to this value, for example:

c. In a Terminal window, enter ‘xhost +’

d. Do not log off the console (0.0)

2. If VNC is running on port 1 on the server:ex

set s_display to or vision:1.0

Ensure that VNC server is not killed during the day.

Or set ‘headless’ in SID_server.xml to true and DisallowTCP to false in the /etc/X11/gdm/gdm.conf

Run AutoConfig after changing any SID_server.xml parameter.

Tape Commands for Linux

To back up /etc folder:

tar -cvf /dev/st0 /etc

To list contents of tape:

tar -tf /dev/st0

To restore data from tape:

tar -xvf /dev/st0

Script To Export 11i Database

# Exports the Oracle E-Business Suite HRMS Production database
# which will then be copied over to the backup server
# source the environment
. /u0/oracle/proddb/9.2.0/PROD_ebusiness.env
# stop, then restart the production instance
# to overcome 'snapshot too old' error
# (commented out, as users on the system at 6:00 P.M. will be kicked off)
# cd /u0/oracle/proddb/9.2.0/appsutil/scripts/PROD_ebusiness/
# ./ stop immediate
# ./ start
# get name of log file and dump file
export LOGFILE=expprod_`date +%F_%k-%M-%S`.log
export DUMPFILE=expprod.dmp
export BACKUPDIR=/mnt/prodbkup
export EXPORTDIR=/u0/prodbkup
export ZIPFILE=expprod.tar.gz
export ZIPFILE2=expprod_`date +%F_%k-%M-%S`.tar.gz
# remove existing dump file
# export the ONT schema (for testing purposes)
# exp system/manager file=$EXPORTDIR/$DUMPFILE log=$EXPORTDIR/$LOGFILE owner=ONT
# export the database
exp system/manager file=$EXPORTDIR/$DUMPFILE log=$EXPORTDIR/$LOGFILE full=y consistent=y
# tar and gzip export file
# remove the previous export dump from the test server, then copy the new one
# rm $BACKUPDIR/$ZIPFILE (Commented out by VS 10-Sep-09)
# copy the zip file and log file to the backup directory (remote NFS directory on ebusinesstest)
# rename the zip file in the remote directory to reflect today's date
# rename the zip file in the local directory to reflect today's date (as an archive copy)

Page Not Found After SSL Setup


After setting up SSL on PeopleSoft instance, logon page appears. After logging on, the web browser displays the message:

This page cannot be displayed.


Needed to change Web Profile from DEV to PROD in Application Server config file.

Backup Script for Oracle 10g

Sample script to backup an Oracle 10g database on Linux.

 # Copies Oracle database data files to backup directory on disk
 # and individually gzips them
# set up environment variables
 # need to export the Oracle environment variables
 export ORACLE_SID=orcl
 export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
FMT_DATE=`/bin/date +%Y%m%d`
# make destination directories
 mkdir -p $LOG_LOC
 mkdir -p $SCRIPT_LOC >> $LOG_FILE
 mkdir -p $BACKUP_LOC >> $LOG_FILE
# generate bash script file to copy database data files to destination
 sqlplus / as sysdba <
select '#!/bin/sh ' from dual;
 select 'sqlplus / as sysdba <<EOF'||chr(10)||
 'alter tablespace '||tablespace_name||
 ' begin backup; '||chr(10)||
 'cp '||file_name||' $BACKUP_LOC/'||substr(file_name,instr(file_name,'/',-1)+1)
 'sqlplus / as sysdba <<EOF'||chr(10)||
 'alter tablespace '||tablespace_name||
 ' end backup; '||chr(10)||
 from dba_data_files
 order by file_id
spool off
# change permission modes on script file to make it executable
 chmod 755 $SCRIPT_FILE
# execute the script file to copy the database data files
# set name of second script file
# generate bash script file to copy archive logs to destination
 sqlplus / as sysdba <
alter system switch logfile;
 alter system switch logfile;
 alter system switch logfile;
alter database backup controlfile to '$BACKUP_LOC/control01.dbf';
select '#!/bin/sh ' from dual;
 'cp '||name||' $BACKUP_LOC/'||substr(name,instr(name,'/',-1)+1)
 from v$archived_log
 where completion_time > sysdate - 1.1
 order by completion_time
spool off
# change permission modes on script file to make it executable
 chmod 755 $SCRIPT_FILE
# execute the script file to copy the archive log files
# gzip each database file in the $BACKUP_LOC directory
 gzip $BACKUP_LOC/*
echo All done!