![]() |
The Hitchhiker's Guide to the ACSby Bryan Quinn, Adam Farkas, Doug Hoffman, Hiroyoshi Iwashima, Ryan Lee and Ravi Jasuja, |
ftp://ftp.oracle.com/pub/www/otn/linux/oracle8i/oracle8161_tar.gz
# tar -xzf oracle8161_tar.gz
Throughout these instructions, we will refer to a service name or SID of ora8. Although we do not reccomend this for users not experienced with Oracle, it is possible to change this setting. If so, change any reference to the Oracle Service Name or SID of ora8 to your new name.
Do not change the name of the Oracle path, /ora8. We reccomend this path setting for pathnames to your customized name. If you are confused by this, stick to using ora8.
Though Oracle 8.1.6 has an automated installer, we still need to perform several manual, administrative tasks before we can launch it. You must perform all of these steps as the root user.
We need to create a user oracle, which is used to install the product, as well as starting and stopping the database.
# groupadd dba # groupadd oinstall # useradd -g oinstall -G dba -m oracle
# passwd oracleYou will be prompted for the New Password and Confirmation of that password.
While Oracle can reside in a variety of places in the filesystem, aD has adopted '/ora8' as the base directory to make our ACS installation that much smoother.
Note: the oracle install needs ~ 2 gigs free on '/ora8' to install sucessfully.
# mkdir /ora8 # cd /ora8 # mkdir -p m01 m02 m03/oradata/ora8 # chown -R oracle.dba /ora8
export ORACLE_BASE=/ora8/m01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/8.1.6 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export ORACLE_SID=ora8 export ORACLE_TERM=vt100 export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data umask 022
# NLS_LANG=american # export NLS_LANGThese lines will change the Oracle date settings and will break ACS since ACS depends on ANSI YYYY-MM-DD dates.
$ env
$ startx
$ su root # mount -t iso9660 /dev/cdrom /mnt/cdrom # exit
$ ./runInstaller
$ su # cd $ORACLE_HOME # ./orainstRoot.sh # exit $ exit
$ su root {enter root password} # cd $ORACLE_HOME # chmod 744 root.sh # ./root.sh # exit $ exitHit "Enter" when it asks for the path to the local bin directory. Then:
$ dbassist &
nls_date_format = "YYYY-MM-DD"
open_cursors = 500
Note: We suggest shutting down X to free up some more RAM and cpu cycles to give ocale as much breathing room as possible.
./sqlora8.sh
Eventually, you'll be returned to your shell prompt. In the meantime, go get some food.
$ mv acceptance-sql.txt acceptance.sql
$ sqlplus system/manager
SQL> alter user system identified by alexisahunk; SQL> alter user sys identified by alexisahunk; SQL> alter user ctxsys identified by alexisahunk;
SQL> create tablespace web datafile '/ora8/m03/oradata/ora8/web.dbf' size 50m autoextend on;
Typically we will name the account the same name that is used under /web/{service_name} to identify the service.
SQL> create user web identified by pw4web default tablespace web temporary tablespace temp quota unlimited on web; SQL> grant create session, connect, resource to web;
SQL> quit
$ sqlplus web/pw4web SQL>@/[path to the acceptancesql file]/acceptance.sql
You will want to automate the database startup and shutdown process. It's probably best to have Oracle spring to life when you boot up your machine.
$ cp /tmp/dbstart.txt $ORACLE_HOME/bin/dbstart $ chmod 755 $ORACLE_HOME/bin/dbstart
ora8:/ora8/m01/app/oracle/product/8.1.6:N
By the way, if you changed the service name or have multiple databases, the format of this file is
service_name:$ORACLE_HOME:Y || N (for autoload)
$ su - # cd /etc
# chown root.root /etc/rc.d/init.d/oracle8i # chmod +x /etc/rc.d/init.d/oracle8i
# ./oracle8i stop # ./oracle8i start # ./oracle8i restart # ./oracle8i invalid-parameter
# chkconfig --add oracle8i # chkconfig --list oracle8i
Reboot your computer and ensure that Oracle started automatically by starting sqlplus. If it works, then your Oracle installation is complete.
$ sqlplus system/changeme
SQL> drop user oracle_user_name cascade;
SQL> drop tablespace table_space_name including contents cascade constraints;
Oracle has an internal representation for storing the data based on the number of seconds elapsed since some date. However, for the purposes of inputing dates into Oracle and getting them back out, Oracle needs to be told to use a specific date format. By default, it uses an Oracle-specific format which isn't copacetic. You want Oracle to use the ANSI-compliant date format which is of form 'YYYY-MM-DD'.
To fix this, you should include the following line in
$ORACLE_HOME/dbs/initSID.ora
or for the default
case, $ORACLE_HOME/dbs/initora8.ora
:
nls_date_format = "YYYY-MM-DD"You test whether this solved the problem by firing up sqlplus and typing
SQL> select sysdate from dual;You should see back a date like
2000-06-02
. If some
of the date is chopped off, i.e. like 2000-06-0
, everything
is still fine. The problem here is that sqlplus is simply
truncating the output. You can fix this by typing
SQL> column sysdate format a15 SQL> select sysdate from dual;If the date does not conform to this format, doublecheck that you included the necessary line in the init scripts. If it still isn't working make sure that you have restarted the database since adding the line if you didn't do it prior to database creation.
If you're sure that you have restarted the database since adding the line, check your initialization scripts. Make sure that the following line is not included
export nls_lang = americanSetting this environment variable will override the date setting. Either delete this line and login again or add the following entry to your login scripts after the
nls_lang
line.
export nls_date_format = 'YYYY-MM-DD'Log back in again. If adding the
nls_date_format
line
doesn't help, then let me
know about it.