Forgot your password?    
+ Reply to Thread
Results 1 to 2 of 2

Thread: Learn to do manual installation of the database in just 6 steps

  1. #1

    Learn to do manual installation of the database in just 6 steps


    As oracle users I fired the following commands to make changes in oracle's .bashprofile.

    echo "alias sid='echo "'$ORACLE_SID'"'" >> /home/oracle/.bash_profile
    echo "alias bash='vi /home/oracle/.bash_profile'" >> /home/oracle/.bash_profile
    echo "alias ebash='. /home/oracle/.bash_profile'" >> /home/oracle/.bash_profile
    echo "alias pmon='ps -ef|grep pmon'" >> /home/oracle/.bash_profile
    echo "alias conn='sqlplus "/ as sysdba"'" >> /home/oracle/.bash_profile
    echo "alias cl='clear'" >> /home/oracle/.bash_profile

    in my vmmachine i have the pre created database with name ORCL and i will create a new database with name as “newdb”



    1. First we will make the required necesaary folders. we will copy all the folders present in the orcl folder to the new folder "newdb" at the same location and and empty all the folders except the pfile folder with the initfile.

    [oracle@localhost ~]$ cd /u01/app/oracle/admin/

    cp -R orcl/ newdb/
    cd newdb/
    cd udump/
    rm -rf *
    cd ../dpdump/
    rm -rf *
    cd ../cdump/
    rm -rf *
    cd ../bdump/
    rm -rf *
    cd ../adump/
    rm -rf *


    2. we will make the changes in the pfile. Replace the orcl word with newdb in the complete file.

    [oracle@localhost ~]$ vi /u01/app/oracle/admin/newdb/pfile/init.ora.4252011152834


    3. inside the oradata folder i created the new folder "newdb" where all my CDR files will be built.

    [oracle@localhost ~]$ cd /u01/app/oracle/oradata/

    mkdir newdb

    4. we have just created the password file in the dbs folder.

    [oracle@localhost ~]$ cd /u01/app/oracle/product/10.2.0/db_1/dbs/

    orapwd file=orapwnewdb password=shoaib entries=5 force=y


    5. now we will create the database with the create database command.

    [oracle@localhost ~]$ export ORACLE_SID=newdb
    [oracle@localhost ~]$ sqlplus / as sysdba

    startup nomount pfile=/u01/app/oracle/admin/newdb/pfile/init.ora.4252011152834

    create database newdb
    logfile group 1 ('/u01/app/oracle/oradata/newdb/redo1.log') size 100M,
    group 2 ('/u01/app/oracle/oradata/newdb/redo2.log') size 100M
    character set WE8ISO8859P1
    national character set utf8
    datafile '/u01/app/oracle/oradata/newdb/system.dbf' size 500M autoextend on
    next 10M maxsize unlimited extent management local
    sysaux datafile '/u01/app/oracle/oradata/newdb/sysaux.dbf' size 100M autoextend on next 10M maxsize unlimited
    undo tablespace undotbs1 datafile '/u01/app/oracle/oradata/newdb/undotbs1.dbf'
    size 100M default temporary tablespace temp tempfile '/u01/app/oracle/oradata/newdb/temp01.dbf' size 100M


    6. here the database will be created, now we will execuete the catalog and catproc scripts.

    @?/rdbms/admin/catalog.sql

    @?/rdbms/admin/catproc.sql


    hence the manual installation is complete.

    shoaibansari73@gmail.com
    Last edited by shoaibansari; 02-14-2012 at 04:51 PM.

  2. #2

    audit with tirggers

    --creation of trigger_table

    create table system.audit_employees (osuser long, changedt date, ipaddr varchar2(3000), newsalary varchar2(3000);

    --creation of trigger

    CREATE OR REPLACE TRIGGER system.hrsalary_audit
    AFTER UPDATE OF salary
    ON hr.employees
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    IF ld.salary != :new.salary THEN
    INSERT INTO system.audit_employees
    VALUES (sys_context('userenv','os_user'), sysdate,
    sys_context('userenv','ip_address'),
    :new.employee_id ||
    ' salary changed from '||ld.salary||
    ' to '||:new.salary);
    END IF;
    END;
    /

    --now if anyone change the salary in the hr.employees table the entry will be made in the system's audit_employees table.

    update hr.employees set salary=4000 where employee_id=118;

    --entries done in the audit table.

    SQL> select * from audit_employees;

    osuser changedt ipaddr newsalary
    ------ --------- ------ ------------------------------------
    oracle 14-FEB-12 118 salary changed from 2600 to 4000

+ Reply to Thread

Similar Threads

  1. Oracle Database 11g Installation steps in detail with Snapshots
    By Pradeep in forum Core Database Administration and Monitoring
    Replies: 3
    Last Post: 06-05-2013, 04:28 PM
  2. Oracle 11g Manual Database Creation.
    By ajaychandi in forum Core Database Administration and Monitoring
    Replies: 1
    Last Post: 03-13-2013, 06:24 PM
  3. Oracle Database Manual Backup and Recovery.
    By ajaychandi in forum Backup, Restoration & Recovery, RMAN, Flashback, Datapump, Export, Import
    Replies: 0
    Last Post: 01-24-2012, 06:51 PM
  4. Oracle 10G Software and Database Installation
    By Hemant in forum Database Installation,Upgrades,Migration,Patching and Cloning
    Replies: 5
    Last Post: 12-06-2011, 04:54 AM
  5. Manual Form Compilation
    By Amit in forum AD Utilities , Autoconfig , FND Utilities
    Replies: 0
    Last Post: 11-04-2011, 11:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training


Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics