Oracle
  Home arrow Oracle arrow Page 3 - Creating a Database in Oracle 9i
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

Creating a Database in Oracle 9i
By: Ben Shepherd
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 163
    2003-04-11

    Table of Contents:
  • Creating a Database in Oracle 9i
  • How Data is Stored
  • Create a Database

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating a Database in Oracle 9i - Create a Database


    (Page 3 of 3 )

    There are two ways that you can create a database in Oracle 9i. One way is to use the Oracle Database Configuration Assistant. Using the Oracle Database Configuration Assistant makes sure that the new database is optimized with Oracle 9i’s latest features. Simply read the instruction and follow the prompts. The other way to create a database is to do it manually. This will now be demonstrated.

    Create a suitable directory structure for the new database. Once this is done, copy the init.ora file into a new file named init{SID}.ora into new directory.

    Now you have created a parameter file, you’ll need to declare an Oracle SID name. Keep the SID consistent with the parameter filename. The command to do this action will depend on the platform you have the DBMS installed. If you are using Windows, simply type,

    Set ORACLE_SID = {SID}

    Alternatively, on the a unix platform, the DBA must type,

    Export ORACLE_SID = {SID}

    Use SQL*Plus under / as sysdba and set the database to nomount mode.

    So, if we wish to override the default spfile to start the new instance in nomount mode then type,

    Startup nomount pfile = ‘<directory>\init{SID}.ora’

    Now we are about to create the database. When creating a new database, write the code into an sql file so that your have a copy of the database features as well as the ability to fix any mistakes in the create database command. Here is the code,

    CREATE DATABASE ShepIT
    Maxinstances   1
    Maxloghistory  1
    Maxlogfiles  10
    Maxlogmembers 15
    Maxdatafiles  100
    Datafile ‘<directory>\datafile_01.dbf’
    size 300M reuse autoextend on next 15M maxsize unlimited
    character set WE8MSWIN1252
    national character set AL16UFT16
    logfile 
    group 1 (‘<directory>\redo_01.log’) size 75M
     group 2 (‘<directory>\redo_02.log’) size 75M
     group 3 (‘<directory>\redo_03.log’) size 75M
    default temporary tablespace TEMP
    tempfile ‘<directory>\temp_01.dbf’
     extent management local uniform size 1M
    undo tablespace UNDO_TS datafile ‘<directory>\datafile_01.dbf’
     size 125M reuse autoextend on next 15M maxsize unlimited;

    Oracle, should respond by saying that the database is created. Once this is done you are ready to load scripts that are needed to support your Oracle products by typing the following commands

    @<directory>\catalog.sql
    @<directory>\catproc.sql
    @<directory>\catexp.sql

    Ok, the database is configured. Change the SYSTEM and SYS passwords, to ensure better security for your database.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    ORACLE ARTICLES

    - Partitioning in Oracle. What? Why? When? Who...
    - Datatypes Used in Oracle 9i
    - Creating a Database in Oracle 9i
    - Oracle with Doctor Janusz Getta
    - Working With Oracle on Windows: Part 3
    - Working With Oracle on Windows: Part 2







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek