DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Creatung a database

  1. #1
    Join Date
    Jan 2000
    Location
    Manama, Bahrain
    Posts
    50
    I have 8.1.5 client installed on my machine & use it to connect to a remote database.

    I would like to create a small database on my machine for test purposes. Can someone advise on how I go about it?
    I don't have the Database Config Asst on my machine. It is only installed on the server. I looked for it on the CD but couldn't find it.

    Any suggestions would be appreciated.

    Thanks & regards
    Lynn

  2. #2
    Join Date
    Aug 2000
    Posts
    236
    Lyn,

    You cannot create a db on a client. You can do it only on a server and you need a fully qualified SYSDBA account.

    I had put together a check sheet for creating a db on NT.
    I am creating a db called prod. If you no old databases skip steps 2.1 to 2.4.

    All the best.

    Here it is:

    2. CREATE A DATABASE - PROD

    2.1 Create a directory for the new database – d:\PROD

    2.2 Set Oracle SID to the current database.

    D:\ORANT> SET ORACLE_SID=ORCL

    2.3 Export all data from an existing database to the new database.

    D:\ORANT> EXP80 SYSTEM/PASSWORD FILE=MYEXP.DMP FULL=Y LOG=MYEXP.LOG

    2.4 Shutdown the starter database ORCL using ORADIM80

    D:\ORANT> ORADIM80 –SHUTDOWN –SID ORCL –USRPWD PASSWORD -SHUTTYPE INST –SHUTMODE I

    2.5 Create the following subdirectories in d:\PROD

    2.5.1 D:\PROD\DATABASE
    2.5.2 D:\PROD\DATABASE\ARCHIVE
    2.5.3 Copy RDBMS directory from Oracle home D:\orant\rdbms80 to
    D:\PROD\rdbms80

    2.6 Copy the parameter file from Oracle Home\database to D:\PROD\DATABASE\INITPROD.ORA

    2.7 Edit the parameter file and make the following changes:

    2.7.1 Change DB_NAME to whatever required. Though this does not need to match the instance SID, this is preferable.
    2.7.2 Change CONTROL_FILES parameters to d:\PROD\DATABASE\ctl1prod.ora
    2.7.3 Set GLOBAL_NAMES to TRUE
    2.7.4 Set DB_FILES to same number as MAXDATAFILES option in the CREATE DATABASE command.

    2.8 Create a new Windows NT Service.

    D:\PROD> ORADIM80 –NEW –SID PROD –INTPWD PASSWORD -STARTMODE AUTO –PFILE D:\PROD\DATABASE\INITPROD.ORA
    2.9 Prepare the CREATE DATABASE script.

    Open d:\PROD\rdbms80\admin\build_db.sql, rename it to d:\PROD\rdbms80\admin\build_prod.sql and make the following changes:

    2.9.1 Set PFILE to d:\PROD\database\initprod.ora
    2.9.2 Change to – CREATE DATABASE PROD
    2.9.3 Modify all logfiles and datafiles names and location.
    2.9.4 Remove the STARTUP command in the file.

    2.10 Check if NT Service has been created and running

    2.10.1 D:\PROD> NET START

    2.11 Set Oracle SID to the new database PROD.

    2.11.1 D:\ PROD > SET ORACLE_SID=PROD

    2.12 Start Server manager and connect as internal using password as the same one used to create the service:

    D:\ PROD >SVRMGR30
    SVRMGR> CONNECT INTERNAL/ORACLE

    2.13 Start the PROD instance in NOMOUNT mode

    SVRMGR> STARTUP NOMOUNT PFILE=D:\PROD\DATABASE\INITPROD.ORA

    2.14 Turn spooling on to save DB creation messages

    SVRMGR> SPOOL D:\PROD\ BUILD_PROD.LOG

    2.15 Execute the BUILD_PROD script

    SVRMGR> @ D:\PROD\RDBMS80\ADMIN\ BUILD_PROD.SQL

    2.16 Run the following script to generate the data dictionary.

    SVRMGR> @ D:\PROD\RDBMS80\ADMIN\ CATALOG.SQL

    2.17 Run the following script to generate the PL/SQL functionality

    SVRMGR> @ D:\PROD\RDBMS80\ADMIN\ CATPROC.SQL

    2.18 Run the following script to generate the Advanced Replication functionality

    SVRMGR> @ D:\PROD\RDBMS80\ADMIN\ CATREP8M.SQL

    2.19 Change the password of sys and system users.

    2.20 Edit the Oracle_SID parameter in the registry to the new database.

    2.21 Shutdown and start the database.


    3. CONFIGURING NET8

    3.1 Start the command line utility LSNRCTL80

    3.2 Check status of listener to see if both the databases are running
    LSNRCTL> STATUS LISTENER

    3.3 If the listener has only the old database, add the database service PROD to the listener.ora file by:

    3.3.1 Opening the file and adding PROD SID to it.
    3.3.2 Start NET8 assistant, Listener, Database services and add the PROD database.

    3.4 Stop the listener:

    LSNRCTL> SET PASSWORD ORACLE
    LSNRCTL> STOP LISTENER

    3.5 Restart the listener:
    LSNRCTL> START LISTENER

    3.6 Check status of listener to see if both the databases are running
    LSNRCTL> STATUS LISTENER

    3.7 Exit.

Posting Permissions

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


Click Here to Expand Forum to Full Width