All scripts and instructions for manual database creation)

Source: Internet
Author: User

      All scripts and instructions for creating databases manually

    • System Environment:
        1. Operating System: Windows 2000 Server, 128 MB of machine memory
        2. Database: Oracle 8i R2 (8.1.6) for NT Enterprise Edition
        3. installation path: D: \ oracle
  • Steps for creating a database:
    1. manually create related directories
    D: \ oracle \ admin \ test
    D: \ oracle \ admin \ test \ adhoc
    D: \ oracle \ admin \ test \ bdump
    D: \ oracle \ admin \ test \ cdump
  • D: \ oracle \ admin \ test \ create
    D: \ oracle \ admin \ test \ exp
    D: \ oracle \ admin \ test \ pfile
    D: \ oracle \ admin \ test \ udump
    D: \ oracle \ oradata \ test
    D: \ oracle \ oradata \ test \ archive
    2. manually create the initialization startup parameter file: D: \ oracle \ admin \ test \ pfile \ inittest. ora,
    3. manually create the D: \ oracle \ ora81 \ database \ inittest. ora file,
    Content: ifile = 'd: \ oracle \ admin \ test \ pfile \ inittest. ora'

    4. Use the orapwd.exe command to create D: \ oracle \ ora81 \ database \ pwdtest. ora
    Command: D: \ oracle \ ora81 \ bin \ orapwd file = D: \ oracle \ ora81 \ database \ pwdtest. ora Password = Oracle entries = 5

    5. Use the oradim.exe command to generate a new instance Management Service in the service.
    Set oracle_sid = test
    D: \ oracle \ ora81 \ bin \ oradim-New-Sid test-startmode manual-pfile "D: \ oracle \ admin \ test \ pfile \ inittest. ora"

    6. generate various database objects
    D: \> svrmgrl
    -- Create a database
    Connect internal/Oracle
    Startup nomount pfile = "D: \ oracle \ admin \ test \ pfile \ inittest. ora"
    Create Database Test
    Logfile 'd: \ oracle \ oradata \ test \ redo01.log 'size 2048 K, 'd: \ oracle \ oradata \ test \ redo02.log 'size 2048 K, 'd: \ oracle \ oradata \ test \ redo03.log 'size 2048 K
    Maxlogfiles 32
    Maxlogmembers 2
    Maxloghistory 1
    Datafile 'd: \ oracle \ oradata \ test \ system01.dbf' size 58 m reuse autoextend on next 640 K
    Maxdatafiles 254
    Maxinstances 1
    Character Set zhs16gbk
    National Character Set zhs16gbk;

    Control Files and log files are generated when the preceding statements are executed.

    Connect internal/Oracle
    -- Modify the system tablespace
    Alter tablespace system default storage (initial 64 K next 64 K minextents 1 maxextents unlimited pctincrease 50 );
    Alter tablespace system minimum extent 64 K;
    -- Create a rollback tablespace
    Create tablespace RBS datafile 'd: \ oracle \ oradata \ test \ rbs01.dbf' size 256 m Reuse
    Autoextend on next 5120 K
    Minimum extent 512 K
    Default storage (initial 512 K next 512 K minextents 8 maxextents 4096 );
    -- Create user tablespace
    Create tablespace users datafile 'd: \ oracle \ oradata \ test \ users01.dbf' size 128 M Reuse
    Autoextend on next 1280 K
    Minimum extent 128 K
    Default storage (initial 128 K next 128 K minextents 1 maxextents 4096 pctincrease 0 );
    -- Create temporary tablespace
    Create tablespace temp datafile 'd: \ oracle \ oradata \ test \ temp01.dbf' size 32 m Reuse
    Autoextend on next 640 K
    Minimum extent 64 K
    Default storage (initial 64 K next 64 K minextents 1 maxextents unlimited pctincrease 0) Temporary;
    -- Create a tool tablespace
    Create tablespace tools datafile 'd: \ oracle \ oradata \ test \ tools01.dbf' size 64 m Reuse
    Autoextend on next 320 k
    Minimum extent 32 K
    Default storage (initial 32 K next 32 K minextents 1 maxextents 4096 pctincrease 0 );
    -- Create index tablespace
    Create tablespace indx datafile 'd: \ oracle \ oradata \ test \ indx01.dbf' size 32 m Reuse
    Autoextend on next 1280 K
    Minimum extent 128 K
    Default storage (initial 128 K next 128 K minextents 1 maxextents 4096 pctincrease 0 );
    -- Create rollback segments
    Create public rollback segment rbs0 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs1 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs2 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs3 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs4 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs5 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs6 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs7 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs8 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs9 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs10 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs11 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs12 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs13 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs14 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs15 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs16 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs17 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs18 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs19 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs20 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs21 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs22 tablespace RBS storage (optimal 4096 K); Create public rollback segment rbs23 tablespace RBS storage (optimal 4096 K ); create public rollback segment rbs24 tablespace RBS storage (optimal 4096 K); -- make the rollback segment online
    Alter rollback segment "rbs0" online; Alter rollback segment "rbs1" online; Alter rollback segment "rbs2" online; Alter rollback segment "rbs3" online; Alter rollback segment "rbs4" online; alter rollback segment "rbs5" online; Alter rollback segment "rbs6" online; Alter rollback segment "rbs7" online; Alter rollback segment "rbs8" online; Alter rollback segment "rbs9" online; alter rollback segment "rbs10" online; Alter rollback segment "rbs11" online; Alter rollback segment "rbs12" online; Alter rollback segment "rbs13" online; Alter rollback segment "rbs14" online; alter rollback segment "rbs15" online; Alter rollback segment "rbs16" online; Alter rollback segment "rbs17" online; Alter rollback segment "rbs18" online; Alter rollback segment "rbs19" online; alter rollback segment "rbs20" online; Alter rollback segment "rbs21" online; Alter rollback segment "rbs22" online; Alter rollback segment "rbs23" online; Alter rollback segment "rbs24" online;
    -- Modify the temporary tablespace of sys to temp.
    Alter user SYS temporary tablespace temp;
    -- Create a data dictionary table
    @ D: \ oracle \ ora81 \ RDBMS \ admin \ catalog. SQL; @ D: \ oracle \ ora81 \ RDBMS \ admin \ catexp7. SQL @ D: \ oracle \ ora81 \ RDBMS \ admin \ catproc. SQL
    @ D: \ oracle \ ora81 \ RDBMS \ admin \ caths. SQL
    Connect system/Manager
    @ D: \ oracle \ ora81 \ sqlplus \ admin \ pupbld. SQL
    Connect internal/Oracle
    @ D: \ oracle \ ora81 \ RDBMS \ admin \ catrep. SQL exit
    -- Generate the SQL * Plus Help System
    Sqlplus system/Manager
    @ D: \ oracle \ ora81 \ sqlplus \ admin \ HELP \ helpbld. SQL helpus. SQL
    Exit
    -- Modify the default and temporary tablespaces of the System user
    Svrmgrl
    Connect internal/Oracle
    Alter user system default tablespace tools;
    Alter user system temporary tablespace temp;
    Exit

    7. Set the test instance startup service to Automatic startup mode d: \ oracle \ ora81 \ bin \ oradim-edit-Sid test-startmode auto

 


About this site | Contact Webmaster | Comments and suggestions | Business Cooperation | Map of this site | Advertisement service |
Copyright (c) 2003-2004 Oracle database online copyright
E-mail: webmaster@dbonline.cn
Http://www.dbonline.cn

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.