-
groupadd dba
useradd -g dba -d /opt/oracle -s /bin/csh -m oracle
passwd oracle
-
setenv ORACLE_BASE /opt/oracle
setenv ORACLE_HOME $ORACLE_BASE/product/9.2.0
setenv ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data
setenv CLASSPATH $ORACLE_HOME/jre/1.1.8:$ORACLE_HOME/jlib:$ORACLE_HOME/jlib/product/jlib
set path = ($ORACLE_HOME/bin $path)
setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:$LD_LIBRARY_PATH
- Server
- Enterprise Edition
- Statndard Edition
- Custom
- Client
- Administrator
- Runtime
- Custome
Database Configuration †
- Server
- General Propose
- Transaction Processing
- Data Warehouse
- Customized
- Software Only
- Client
-
lsnrctl start
-
lsnrctl start <lisner名>
TEST:/opt/app/oracle/product/9.2.0:N
-
-
-
cp $ORACLE_BASE/admin/(SID)/pfile/init.ora.xxxx $ORACLE_BASE/admin/(SID)/pfile/init(SID).ora
ln -s $ORACLE_BASE/admin/(SID)/pfile/init(SID).ora $ORACLE_HOME/dbs/init(SID).ora
$ORACLE_BASE/admin/(SID)/pfile/init(SID).ora
-
-
case $VERSION in
"6") sqldba command=shutdown ;;
"internal") $SQLDBA <<EOF
connect internal
shutdown
EOF
;;
*) $SQLDBA <<EOF
connect / as sysdba
shutdown
EOF
;;
esac
-
case $VERSION in
"6") sqldba command=shutdown ;;
"internal") $SQLDBA <<EOF
connect internal
EOF
;;
*) $SQLDBA <<EOF
connect / as sysdba
EOF
;;
esac
-
#!/bin/sh
ORA_HOME=/opt/app/oracle/product/9.2.0
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]; then
echo "Oracle startup: cannot start"
fi
case "$1" in
'start')
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart "
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
;;
'stop')
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut "
;;
esac
-
cd /etc/rc2.d
ln -s ../init.d/dbora S98dbora
cd /etc/rc0.d
ln -s ../init.d/dbora K11dbora
cd /etc/rc1.d
ln -s ../init.d/dbora K11dbora
-
su oracle
cd ~
mv .login dot.login
Enterprise Manager †
$ORACLE_HOME/bin/oemapp
$ORACLE_HOME/bin/oemapp dbastudio
-
sqlplus "sys/sys@test as sysdba"
-
@utlxplan.sql
-
GRANT SELECT ON SYS.PLAN_TABLE TO PUBLIC;
GRANT INSERT ON SYS.PLAN_TABLE TO PUBLIC;
GRANT UPDATE ON SYS.PLAN_TABLE TO PUBLIC;
GRANT DELETE ON SYS.PLAN_TABLE TO PUBLIC;
CREATE PUBLIC SYNONYM PLAN_TABLE FOR SYS.PLAN_TABLE;
-
@plustrce.sql
-
grand plustrace to user