Wednesday 11 February 2015

Database Creation Part 1

Make directories FIN92DMO under /u01/app/oracle/admin and /u01/oracle/app/oradata
Creating an Oracle Instance
Set the following in .bash_profile
Copy the sql scripts under $PS_HOME/scripts/unix to a folder (back up of the original ones)
Now, create a file named initFIN92DMO.ora under $ORACLE_HOME/dbs
Add the following contents to it
DB_NAME = FIN92DMO
DB_FILES = 1021
CONTROL_FILES = (/u01/app/oracle/oradata/FIN92DMO/cntrl1FIN92DMO,/u01/app/oracle/oradata/FIN92DMO/cntrl2FIN92DMO)
OPEN_CURSORS = 1000
db_block_size = 8192
NLS_LENGTH_SEMANTICS=CHAR
remote_login_passwordfile=EXCLUSIVE
set the oracle SID and password file.
Modify and run createdb.sql. Changes are highlighted.
set termout on
set echo on
spool createdb.log

startup nomount pfile=$ORACLE_HOME/dbs/initFIN92DMO.ora

create database   FIN92DMO
   maxdatafiles  1021
   maxinstances  1
   maxlogfiles   8
   maxlogmembers 4
   CHARACTER SET WE8ISO8859P15
   NATIONAL CHARACTER SET UTF8
DATAFILE '/u01/app/oracle/oradata/FIN92DMO/system01.dbf' SIZE 2000M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/u01/app/oracle/oradata/FIN92DMO/sysaux01.dbf' SIZE 120M REUSE AUTOEXTEND ON NEXT  10240K MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/u01/app/oracle/oradata/FIN92DMO/temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT  640K MAXSIZE UNLIMITED
UNDO TABLESPACE "PSUNDOTS" DATAFILE '/u01/app/oracle/oradata/FIN92DMO/psundots01.dbf' SIZE 300M REUSE AUTOEXTEND ON NEXT  5120K MAXSIZE UNLIMITED
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/FIN92DMO/redo01.log') SIZE 100M,
       GROUP 2 ('/u01/app/oracle/oradata/FIN92DMO/redo02.log') SIZE 100M,
       GROUP 3 ('/u01/app/oracle/oradata/FIN92DMO/redo03.log') SIZE 100M;
spool off
Modify and run utlspace.sql
Run dbowner.sql
Now, re-login as sys and continue to run the scripts.
Edit and run epddl.sql

Run psroles.sql

Run psadmin.sql
Run connect.sql
Shutdown the database and start it.
Configure the TNS entries and listener.
Save the configuration.
Restart the listener and database.
To start the listener.
Type lsnrctl
Start.

1 comment:

  1. Hi,

    When I run psroles.sql, I am getting below error.
    "ORA-01917: user or role 'PSADMIN' does not exist".

    But in the previous steps we do not manually create any user or role PSADMIN. Please guide how to proceed further?

    ReplyDelete