LESSON 03
Creating a profile to access to your instances
The following is an
example of global variables that you can define to access to you
instances. Make sure to change your SID (mycdb)
and Oracle home (product/12.1.0.1/Db_1)
where applicable.
Enter the global
variables in an executable UNIX script such as UNIX profile.
# cd ~
(oracle user"s home directory)
# vi .profile
ORACLE_SID=mycdb;
export ORACLE_SID
ORACLE_BASE=/app/oracle;
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0.1/Db_1;
export ORACLE_HOME
ORACLE_PATH=$ORACLE_HOME/bin;
export ORACLE_PATH
ORACLE_USER=oracle;
export ORACLE_USER
ORACLE_TERM=vt100;
export ORACLE_TERM
ORA_NLS10=$ORACLE_HOME/nls/data;
export ORA_NLS10
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15;
export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin;
export TNS_ADMIN
SQLPATH=$ORACLE_PATH;
export SQLPATH
DBS_HOME=$ORACLE_HOME/dbs;
export DBS_HOME
ADMIN_HOME=$ORACLE_BASE/diag/rdbms/$DB_UNIQUE_NAME;
export ADMIN_HOME
ALERT_LOG=$ADMIN_HOME/$ORACLE_SID/trace/alert_$ORACLE_SID.log;
export ALERT_LOG
# --- PATH and special
PATHs-----------------
PATH=$ORACLE_PATH:/opt/SUNWspro/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/ccs/bin:/usr/openwin/bin:$ORACLE_HOME/OPatch:$BIN_HOME:$FIREFOX:$PATH;
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/ucblib:/usr/local/lib:/usr/X11R6/lib:$LD_LIBRARY_PATH;
export LD_LIBRARY_PATH
MANPATH=/opt/SUNWexplo/man:/8u/SUNWspro/man:/usr/share/man:/usr/man:/opt/emc/SYMCLI/V5.5.0/man
:wq
Save and quite.
Execute the profile.
# . ./.profile
Now, you should be able
to access to sqlplus and rman.
For example:
# sqlplus /nolog
SQL> connect
/ as sysdba
OR
# rman target sys/mypass
catalog rman/mypass@myrman
RMAN> backup
database plus archivelog delete input;
Good Luck!
|