Thursday, November 5, 2015

Java Home and Oracle Home setting in Unix

Setting Java Home in Unix:
==========================================
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_60
export CLASSPATH=$JAVA_HOME/lib/tools.jar:.:
export PATH=$JAVA_HOME/bin:$PATH:
==========================================


Setting Oracle Home in Unix:
==========================================
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME:$PATH:.

echo $ORACLE_HOME   (to display Oracle Home)
==========================================

UNIX_LOGIN_USER@enstageSYSTEM:~$ sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 5 13:39:53 2015
Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: USER_NAME
Enter password:  password

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

UNIX_LOGIN_USER@enstageSYSTEM:~$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 5 13:40:30 2015
Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> startup   (To start Oracle Database, hopefully root user is required to start DB)
SQL> exit
UNIX_LOGIN_USER@enstageSYSTEM:~$ lsnrctl start  (To start Oracle Database Listener)

==========================================
SQL> set linesize 300;  (For proper visibility)
SQL> set pagesize 2000; (For proper visibility)
==========================================

No comments:

Post a Comment