Oracle Application Server 10g Release 2 (10.1.2) Installation On RedHat Advanced Server 3.0 (Update 3)

Oracle Application Server 10g Release 2 (10.1.2) Installation On RedHat Advanced Server 3.0 (Update 3)
In this article I'll describe the installation of Oracle Application Server 10g Release 2 (10.1.2), Oracle's J2EE Application Server, on RedHat Advanced Server 3.0 (update 3). The article assumes you've performed the standard advanced server installation including the development tools.

Download Software
Unpack Files
Hosts File
Set Kernel Parameters
Setup
Installation
Post Installation
Note. I've experienced issues with installations on systems that are updated beyond Update 3, which is the version certified by Oracle.

Download Software
Download the following software:

Oracle Application Server 10g (9.0.4) Software
Unpack Files
Unpack the contents of the file:

cpio -idmv < as_linux_x86_core_101200.cpio
You should now have a directory (Disk1) containing installation files.

Hosts File
The /etc/hosts file must contain a fully qualified name for the server:


Set Kernel Parameters
Add the following lines to the /etc/sysctl.conf file:

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 256 32000 100 142
fs.file-max = 131072
net.ipv4.ip_local_port_range = 10000 65000
kernel.msgmni = 2878
kernel.msgmax = 8192
kernel.msgmnb = 65535
Run the following command to change the current kernel parameters:

/sbin/sysctl -p
Add the following lines to the /etc/security/limits.conf file:

* soft nproc 2047
* hard nproc 16384
* soft nofile 2048
* hard nofile 65536
Add the following line to the /etc/pam.d/login file, if it does not already exist:

session required /lib/security/pam_limits.so
Setup
Install the following packages:

# From RedHat AS3 Disk 2
cd /mnt/cdrom/RedHat/RPMS
rpm -Uvh setarch-1.3-1.i386.rpm
rpm -Uvh sysstat-4.0.7-4.EL3.3.i386.rpm

# From RedHat AS3 Disk 3
cd /mnt/cdrom/RedHat/RPMS
rpm -Uvh openmotif21-2.1.30-8.i386.rpm
rpm -Uvh ORBit-0.5.17-10.4.i386.rpm
rpm -Uvh libpng10-1.0.13-15.i386.rpm
rpm -Uvh gnome-libs-1.4.1.2.90-34.1.i386.rpm
rpm -Uvh compat-glibc-7.x-2.2.4.32.6.i386.rpm \
compat-gcc-7.3-2.96.128.i386.rpm \
compat-gcc-c++-7.3-2.96.128.i386.rpm \
compat-libstdc++-7.3-2.96.128.i386.rpm \
compat-libstdc++-devel-7.3-2.96.128.i386.rpm
Create the new groups and users:

groupadd oinstall
groupadd dba
groupadd oper

useradd -g oinstall -G dba -s /bin/ksh oracle
passwd oracle
Create the directories in which the Oracle software will be installed:

mkdir -p /u01/app/oracle/product/j2ee_10_1_2
chown -R oracle.oinstall /u01
Login as root and issue the following command:

xhost +
Login as the oracle user and add the following lines at the end of the .profile file:

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/j2ee_10_1_2; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH; export PATH
PATH=$PATH:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/opmn/bin; export PATH
PATH=$PATH:$ORACLE_HOME/Apache/Apache/bin; export PATH

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 16384
else
ulimit -u 16384 -n 16384
fi
fi

PS1="`hostname`> "
set -o emacs
set filec
Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable:

DISPLAY=:0.0; export DISPLAY
Start the Oracle Universal Installer (OUI) by issuing the following command in the Disk1 directory:

./runInstaller
During the installation enter the appropriate ORACLE_HOME and name then continue with the installation.

Post Installation
With the installation complete you can perform any administration tasks using Enterprise Manager:

Connect to the Enterprise Manager Website (http://:1810) using the username "ias_admin" and the password you assigned during the installation. If EM is not available start it with the "emctl start iasconsole" command.
Stop enterprise manager by issuing the "emctl stop iasconsole" command.
For more information see:

Oracle Application Server Installation Guide 10g Release 2 (10.1.2) for hp HP-UX PA-RISC (64-bit), and Linux x86
Hope this helps. Regards Tim...

prc_table_to_csv

PROCEDURE prc_table_to_csv (p_table_name VARCHAR2,
p_sep_char VARCHAR2 DEFAULT '","',
p_filename VARCHAR2 DEFAULT 'Output.txt',
p_file_location VARCHAR2
)
--
IS

CURSOR cur_table_data
IS
SELECT column_name
FROM user_tab_columns
WHERE table_name = p_table_name;

v_line VARCHAR2(20000);
v_sep VARCHAR2(30);

file_handle UTL_FILE.FILE_TYPE;


TYPE TabCurTyp IS REF CURSOR;
v_TabCurTyp TabCurTyp;

BEGIN

v_sep := '||''' || p_sep_char|| '''||';
dbms_output.put_line(v_sep);

FOR cur_table_data_rec IN cur_table_data
LOOP
v_line := v_line || cur_table_data_rec.column_name || v_sep;
END LOOP;

v_line := SUBSTR(v_line, 1, LENGTH(v_line) - (6 + LENGTH(p_sep_char)) );

IF p_sep_char = '","'
THEN
v_line := ''''||'"'||'''||' || v_line || '||''' || '"' || '''';
dbms_output.put_line(v_line);
END IF;

v_line := 'SELECT ' || v_line || ' FROM ' || p_table_name;

/*
v_line := 'SELECT '||
SUBSTR(v_line, 1, LENGTH(v_line) - (6 + LENGTH(p_sep_char)) )||
' FROM ' || p_table_name ;
*/


dbms_output.put_line(v_line);

OPEN v_TabCurTyp FOR v_line;

file_handle := UTL_FILE.FOPEN(p_file_location, p_filename, 'W');

LOOP

FETCH v_TabCurTyp INTO v_line;
EXIT WHEN v_TabCurTyp%NOTFOUND;

UTL_FILE.PUT_LINE(file_handle,v_line);
dbms_output.put_line(v_line);

END LOOP;

CLOSE v_TabCurTyp;
UTL_FILE.FCLOSE(file_handle);

EXCEPTION
WHEN UTL_FILE.INVALID_PATH
THEN
dbms_output.put_line('file location or name was invalid');
RAISE_APPLICATION_ERROR(-20000,SQLCODE || ' : ' ||SQLERRM);
WHEN UTL_FILE.INVALID_MODE
THEN
dbms_output.put_line('the open_mode string was invalid');
RAISE_APPLICATION_ERROR(-20000,SQLCODE || ' : ' ||SQLERRM);
WHEN UTL_FILE.INVALID_FILEHANDLE
THEN
dbms_output.put_line('not a valid file handle');
RAISE_APPLICATION_ERROR(-20000,SQLCODE || ' : ' ||SQLERRM);
WHEN UTL_FILE.INVALID_OPERATION
THEN
dbms_output.put_line('File could not be opened as requested');
RAISE_APPLICATION_ERROR(-20000,SQLCODE || ' : ' ||SQLERRM);
WHEN UTL_FILE.READ_ERROR
THEN
dbms_output.put_line('OS error occurred during read');
RAISE_APPLICATION_ERROR(-20000,SQLCODE || ' : ' ||SQLERRM);
WHEN UTL_FILE.WRITE_ERROR
THEN
dbms_output.put_line('OS error occured during write operation');
RAISE_APPLICATION_ERROR(-20000,SQLCODE || ' : ' ||SQLERRM);
WHEN UTL_FILE.INTERNAL_ERROR
THEN
dbms_output.put_line('Internal Error');
RAISE_APPLICATION_ERROR(-20000,SQLCODE || ' : ' ||SQLERRM);
WHEN OTHERS
THEN
UTL_FILE.FCLOSE(file_handle);
RAISE;

END prc_table_to_csv;

row count procedure

declare

sql_stmt varchar2(254);
row_count number;

cursor get_tab is
select table_name, num_rows
from dba_tables
where owner=upper('&&1');

begin

dbms_output.put_line('Checking Record Counts for schema &&1 ');
dbms_output.put_line('Log file to numrows_&&1.lst ....');
dbms_output.put_line('....');

FOR get_tab_rec IN get_tab LOOP

BEGIN

sql_stmt := 'select count(*) col1 from &&1.'||get_tab_rec.table_name;

EXECUTE IMMEDIATE sql_stmt INTO row_count;

dbms_output.put_line('Table '||rpad(get_tab_rec.table_name,30)
||' '||TO_CHAR(row_count)||' rows (Analyze '||get_tab_rec.num_rows||' rows).');

EXCEPTION WHEN OTHERS THEN
dbms_output.put_line('Error counting rows for table '
||get_tab_rec.table_name);

END;

END LOOP;

END;

oracle data to xml format

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4061080732051

process search

[root@merkezora root]# ps -fe|grep LOCAL|wc -l

17

[root@merkezora root]# ps -efw|grep ora_

oracle 21891 1 0 08:14 ? 00:00:00 ora_pmon_orcl

oracle 21893 1 0 08:14 ? 00:00:00 ora_dbw0_orcl

oracle 21895 1 0 08:14 ? 00:00:00 ora_lgwr_orcl

oracle 21897 1 0 08:14 ? 00:00:00 ora_ckpt_orcl

oracle 21899 1 0 08:14 ? 00:00:00 ora_smon_orcl

oracle 21901 1 0 08:14 ? 00:00:00 ora_reco_orcl

oracle 21903 1 0 08:14 ? 00:00:00 ora_cjq0_orcl

oracle 21905 1 0 08:14 ? 00:00:00 ora_qmn0_orcl

oracle 21907 1 0 08:14 ? 00:00:00 ora_s000_orcl

oracle 21909 1 0 08:14 ? 00:00:00 ora_d000_orcl

root 22058 21957 0 08:19 pts/0 00:00:00 grep ora_

[root@merkezora root]#