There are a few ways of doing this, but this is the one I did most recently and now I know how to do it, it's easy enough. My assumptions for this procedure are:
- We're trying to create another Oracle database with different settings to the original
- There is an oracle user, in the dba group
- Oracle 8.1.6 was installed as this user, to /apps/oracle/product/8.1.6
- The machine you are using is secure in that you don't mind using chmod 777 on parts of the Oracle installation
Create a user
Login as root. Create a new Unix user that you will use to administer the instance:Change the Oracle SID in this file to the SID of your new instance (Click here for help with vi).useradd newuser passwd newuser cp /home/oracle/.bash_profile /home/newuser/.bash_profile. vi /home/newuser/.bash_profile
Give the user access to Oracle
We're not oracle, so we need to change a few permissions to be able to run Oracle. You would've thought that being in the dba group, we could just set the group permissions, but this didn't work for me so I'm going for the whole 777. Log in as newuser to set your new environment variables, then:You should now be newuser. In X Window, run dbassist (found in $ORACLE_HOME/bin) and follow your normal database creation procedure. Make sure you note the location of any datafiles, control files and redo logs. When you've finished, save to a script and exit X Window.su chmod 777 $ORACLE_BASE/admin chmod 777 $ORACLE_HOME/dbs chmod 777 $ORACLE_BASE/oradata chmod 777 /etc/oratab exit
As root do a chmod 777 on the directories that your datafiles, control files and redo logs are in. Also
chown oracle:dba $ORACLE_HOME/dbs/orapwnewSID