Oracle9i Database Administrator's Guide
Release 1 (9.0.1) for Windows

Part Number A90164-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

1
Postinstallation Database Creation

This chapter describes how to create a database manually or by using the Oracle Database Configuration Assistant after installing Oracle.

This chapter contains these topics:

Before You Create a Database

Before you create a database, consider the following requirements.

Naming Conventions for Oracle Databases

All mounted Oracle databases in a network must have unique database names. A name is associated with a database at creation time and stored in its control files. If the database keyword is provided in the CREATE DATABASE statement or when prompted by the Oracle Database Configuration Assistant, that value becomes the name for that database.

If you attempt to mount two Oracle9i databases with the same database name, you receive the following error during the mounting of the second database:

ORA-01102: cannot mount database in EXCLUSIVE mode

If there are two or more Oracle9i databases on the same computer, but located in different Oracle homes, the following rules apply:

To change the name of an existing database, you must use the CREATE CONTROLFILE statement to re-create your control file(s) and specify a new database name. This restriction only exists for Oracle8i and later releases. Any Oracle7 instances running simultaneously with an Oracle9i instance are not subject to this restriction.


Note:

The directory path examples in this chapter follow Optimal Flexible Architecture (OFA) guidelines (for example, ORACLE_BASE\ORACLE_HOME\rdbms\admin). If you specified non-OFA compliant directories during installation, your directory paths will differ. 


Accessing Data Files and Log Files on Remote Computers

Although it is possible for Oracle to access database files on remote computers using the Universal Naming Convention (UNC), it is not recommended because of performance and network reliability concerns.

UNC is a PC format for specifying the location of resources on a local area network. UNC uses the following format:

\\server-name\shared-resource-path-name

For example, to access the file system01.dbf in the directory C:\oracle\oradata\orcl on the shared server argon, you reference the file as:

\\argon\oracle\oradata\orcl\system01.dbf

Note that the location of archive log files cannot be specified using UNC. If you set the LOG_ARCHIVE_DEST_n initialization parameter to a UNC specification, the database does not start and you receive the following errors:

ORA-00256: error occurred in translating archive text string '\meldell\rmdrive'
ORA-09291: sksachk: invalid device specified for archive destination 
OSD-04018: Unable to access the specified directory or device
O/S-Error: (OS 2) The system cannot find the file specified

Ensure that you set the LOG_ARCHIVE_DEST_n initialization parameter to a mapped drive.


Note:

An ORA-00256 error also occurs if you enter:

\\\meldell\rmdrive

or

\\\meldell\\rmdrive

Control files required the additional backslashes for release 8.0.4, but redo log files and datafiles did not. 


Creating a Database Using Tools

You can choose either of the following methods to create a database:

Oracle Corporation recommends you use the Oracle Database Configuration Assistant to create a database, because it is the easier method.

If you prefer you can also create a database using command line tools.

Using Oracle Database Configuration Assistant

Use the Database Configuration Assistant (DBCA) to register a database running in a member server or workstation in Active Directory on a Windows 2000 domain from a member server or workstation.

If the database service is running on a server, make sure everyone is a member of Pre Windows 2000 Compatible domain group. If everyone is not a member of this group, add the username/computer name (LocalSystem) that the database service is running to the Pre Windows 2000 Compatible domain group. If this is not done, the database on the member server will randomly get ACCESS DENIED errors when accessing Active Directory.

The database service on the server has to be running as a LocalSystem or domain user, for Database Configuration Assistant to successfully register the database with Active Directory. If the database is running as a local user, then trying to register the database with Active Directory using Database Configuration Assistant fails, as this user cannot logon to Active Directory. After successfully registering with the directory using the Database Configuration Assistant, if the database service is running as a LocalSystem, then manually add the computer name to the Access Control List of the OracleDBSecurity container (in Active Directory) with read permissions on OracleDBSecurity container. If the database service is running as a domain user, then the username should be manually added to the Access Control List of the OracleDBSecurity container (in Active Directory) with read permissions on OracleDBSecurity Container. If this is not done, then you may not be able to use the Active Directory to get enterprise roles.

Oracle Database Configuration Assistant enables you to:

Create a Database


Note:

If you use Oracle Database Configuration Assistant to create a new database in a new Oracle home, the listener.ora file located in ORACLE_BASE\ORACLE_HOME\network\admin is updated with the SID information. Also a new TNS entry is generated in the tnsnames.ora file located in ORACLE_BASE\ORACLE_HOME\network\admin


To create a database using Oracle Database Configuration Assistant:


Note:

Users must have Windows NT Administrator's privileges in order to create an Oracle9i database. If Oracle Database Configuration Assistant is run from a user account that is not part of the Administrator's group, it displays a warning stating that you do not have administrative privileges to create the database. Log in as a user that is part of the Administrator's group and restart this tool to create the database. 


  1. Choose Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Database Configuration Assistant.

    The Oracle Database Configuration Assistant Welcome page appears.

  2. Choose Next. A window appears prompting you to select an operation to perform.


    Text description of dbwel.gif follows.
    Text description of the illustration dbwel.gif

  3. Select Create a database, then Choose Next.

    The following window appears:


    Text description of dbtmpl.gif follows.
    Text description of the illustration dbtmpl.gif
  4. Select New Database, then Choose Next.

  5. Enter a Global Database Name typically of the form name.domain and an Oracle System Identifier (SID). Choose Next.

  6. Select the features you want to configure for the new database. Choose from Oracle Spatial, Oracle OLAP Services Features, and several sample schemas. Choose Next.

  7. Select a database connection option:

    • Dedicated Server Mode. Each Client connection to the database allocates a resource dedicated to that client only.

    • Shared Server Mode. Several Client connections share an allocated pool of resources.

    Choose Next.

  8. Select a Typical or Custom Installation. A Typical installation lets you set:

    • Maximum number of connected users

    • Percentage of physical memory for Oracle

    • Database type

    A Custom installation lets you specify initialization parameter values and other options including:

    • Shared Pool size

    • Buffer Cache size

    • Java Pool size

    • Large Pool size

  9. Choose Next.


    Text description of dbtyp.gif follows.
    Text description of the illustration dbtyp.gif

  10. Respond to instructions on each Oracle Database Configuration Assistant page, then Choose Next when you are ready to continue to the next page. When you get to the last page, Choose Finish to start the creation of the Oracle9i database.

Importing Sample Schemas

Sample Online Transaction Processing (OLTP) and data warehousing database schemas are available on the CD-ROM. After you finish creating your Oracle9i database with Oracle Database Configuration Assistant, you can import the appropriate sample schema.

If you selected multipurpose, you do not need to import the sample schemas; they are already provided with your database.

To import an OLTP or data warehousing sample schema into your Oracle9i database:

  1. Start SQL*Plus:

    C:\> sqlplus
    
  2. Connect with the SYSTEM account:

    Enter user-name: SYSTEM/password
    
  3. Create a special user account for importing the appropriate schema:

    SQL> CREATE USER sample_user IDENTIFIED BY password;
    SQL> GRANT RESOURCE TO sample_user;
    SQL> GRANT CONNECT TO sample_user;
    

    where sample_user is sampleoltp for the OLTP sample schema or samplestar for the data warehousing sample schema.

  4. Exit SQL*Plus:

    SQL> EXIT
    
  5. Go to the ORACLE_BASE\ORACLE_HOME\assistants\dbca\samples directory on your hard drive.

  6. Import the appropriate schema:

    C:\oracle\ora90\assistants\dbca\samples> imp sample_user/password 
    FILE=sample.dmp FULL=y LOG=myimp.log
    

    where: 

     

    C:\oracle 

    is the ORACLE_BASE directory 

    ora90 

    is the ORACLE_HOME directory 

    sample_user 

    is sampleoltp for the OLTP sample schema or samplestar for the data warehousing sample schema 

    sample.dmp 

    is source90.dmp for the OLTP sample schema or target90.dmp for the data warehousing sample schema 

    myimp.log 

    import log file 

    See Also:

    for more information on using Oracle Database Configuration Assistant 

Delete a Database

The Delete a Database option of Oracle Database Configuration Assistant lets you quickly and easily delete all database files excluding the initialization parameter file.

Creating a Database Manually

This section describes how to create a new database manually. Oracle provides a sample database creation script, and a sample initialization parameter file with the database software files it distributes, both of which can be edited to suit your needs. If you have existing scripts you can use them to create a database manually or you can edit your existing script using the sample database creation script as a guide. There are a number of ways to create a database depending on if you want to:

Table 1-1 summarizes the steps involved in creating a new database for each of these database creation scenarios. Each step is explained in detail in the following subsections.

Table 1-1 Database Creation Scenarios
Perform these tasks...  If you want to... 
Copy an existing database to a new database, then remove the old database  Copy an existing database to a new database, then keep the old database  Create a new database when no other database exists on the system 

Exporting an Existing Database 

Yes 

Only if you want to copy data from the existing database to the new database 

Not applicable 

Deleting Database Files 

Yes 

No 

Not applicable 

Modifying the init.ora file 

Yes 

Yes 

Yes 

Creating and Starting an Oracle Service 

No 

Yes 

Yes 

Putting the CREATE DATABASE Statement in a Script 

Yes 

Yes 

Yes 

Creating a Database 

Yes 

Yes 

Yes 

Importing a Database 

Yes 

Only if you want to import tables and other objects exported from the existing database 

Not applicable 

Updating the ORACLE_SID in the Registry 

No 

Only if you want to change the default SID 

Yes 

Backing Up the New Database 

Yes 

Yes 

Yes 

How to Create a Database

An example is used in the following sections to demonstrate how to create a database.

In this example, you will copy an existing database (the starter database with a SID of orcl located in the C:\oracle\oradata\orcl directory) to a new database with a database name and SID of prod located in the C:\oracle\oradata\prod directory.

You will delete the starter database orcl after you have created the prod database.


Note:

In this example, ORACLE_BASE is C:\oracle. See Oracle9i Database installation guide for Windows for more information on ORACLE_BASE


Creating Directories

Create the following directories in which to put the administration and database files for the new database prod:

Exporting an Existing Database

You only need to export an existing database if you want to copy its contents to a new database.

You can start the Export utility by using either parameter mode or interactive mode. However, parameter mode is the recommended mode. Interactive mode provides less functionality than parameter mode and exists for backward compatibility only.

Example 1-1 Parameter Mode

C:\> exp SYSTEM/password FILE=myexp.dmp FULL=y LOG=myexp.log

Example 1-2 Interactive Mode

C:\> exp SYSTEM/password

Enter only the command exp SYSTEM/password to begin an interactive session and let the Export utility prompt you for the information it needs.

See Oracle9i Database Utilities for more information on using the Export utility.


Note:

If you use parameter mode, the Export utility considers file names and directory names to be invalid if a blank space is present. Enclose the full path in the file= parameter in triple quotation marks. For example:

FILE="""C:\program files\export.dmp"""

or

FILE="""C:\program files\export file.dmp"""

If the Export utility is used in interactive mode, the file name or directory name can contain a space without quotation marks. 


To export all data from an existing database to a new database:

  1. Set ORACLE_SID to the database service of the database whose contents you want to export. For example, if the database you want to export is the starter database orcl, enter the following at the MS-DOS command prompt. Note that there are no spaces around the equal sign (=) character.

    C:\> set ORACLE_SID=orcl
    
  2. Start the Export utility from the MS-DOS command prompt:

    C:\> exp SYSTEM/password FILE=myexp.dmp FULL=y LOG=myexp.log
    

    You now have a full database export of the starter database orcl in the file myexp.dmp. All messages from the Export utility are logged in the file myexp.log.

Deleting Database Files

Deleting database files is only required when you want to copy an existing database to a new database to replace the old database. In the following example, you delete the database files of the starter database orcl.

To delete database files:

  1. Shut down the starter database orcl at the MS-DOS command prompt:

    C:\> oradim -SHUTDOWN -SID orcl -USRPWD password -SHUTTYPE inst
    -SHUTMODE i
    
  2. Delete the following database files located in the C:\oracle\oradata\orcl directory:

    • control01.ctl

    • control02.ctl

    • control03.ctl

    • indx01.dbf

    • Drsys01.dbf

    • CWMLITE01.DBF

    • EXAMPLE01.DBF

    • UNDOTBS01.DBF

    • system01.dbf

    • temp01.dbf

    • users01.dbf

    • redo01.log

    • redo02.log

    • redo03.log

    • tools01.dbf

Modifying the init.ora file

If you are using the starter database orcl as the basis for your new database, copy the init.ora file:

C:\ORACLE_BASE\admin\orcl\pfile\init.ora 

to

C:\ORACLE_BASE\admin\prod\pfile\init.ora  

and modify the file as described in this section.

If you do not have an existing database on your system, you cannot copy an initialization parameter file to use as the basis for your new init.ora file. However, you can use the sample initialization parameter file initsmpl.ora provided in the ORACLE_BASE\ORACLE_HOME\admin\sample\pfile directory as the basis for the init.ora file for the prod database.

If you use initsmpl.ora as the basis for the init.ora file, you must modify the following initialization parameters in the init.ora file, or you will not be able to start the prod database:

Modifying the DB_FILES initialization parameter is recommended to optimize performance. Table 1-2 describes the modification instructions.

Table 1-2 Modifying DB_FILES Initialization Parameters
Initialization Parameter  Modification Instructions 

DB_NAME  

This parameter indicates the name of the database and must match the name used in the CREATE DATABASE statement in "Putting the CREATE DATABASE Statement in a Script". You give a unique database name to each database. You can use up to eight characters for a database name. The name does not need to match the SID of the database service.

Set this parameter to:

DB_NAME=PROD.DOMAIN 

INSTANCE_NAME  

Set this parameter to:

INSTANCE_NAME=prod.domain 

SERVICE_NAMES  

Set this parameter to:

SERVICE_NAMES=prod.domain 

CONTROL_FILES  

This parameter lists the control files of the database. You do not have the control files on your file system at this point, because the control files are created when you run the CREATE DATABASE statement. Ensure that you specify the complete path and filename, including drive letter.

Set this parameter to:

CONTROL_FILES = ("C:\oracle\oradata\prod\control01.ctl", "C:\oracle\oradata\prod\control02.ctl", "C:\oracle\oradata\prod\control03.ctl") 

BACKGROUND_DUMP_DEST  

Set this parameter to:

BACKGROUND_DUMP_DEST = C:\oracle\admin\prod\bdump 

USER_DUMP_DEST  

Set this parameter to:

USER_DUMP_DEST = C:\oracle\admin\prod\udump 

DB_FILES  

Set this parameter to the same number as the value of the MAXDATAFILES option of the CREATE DATABASE statement. The value of 100 is used for this example.

DB_FILES=100 

See Also:

Oracle9i Database Reference for information on other initialization parameters that you can add or modify 

Creating and Starting an Oracle Service

You only need to create and start an Oracle service if you want to do one of the following:

Before you create the database, first create a Windows NT service to run the database. This service is the Oracle9i database process, oracle.exe, installed in the form of a Windows NT service.

Use the ORADIM utility to create the service. After it has been created, the service starts automatically. See "Using the ORADIM Utility to Administer an Oracle Instance" for information on how to use the ORADIM utility.

To create and start an Oracle service:

  1. Run the ORADIM utility from the MS-DOS command prompt:

    C:\> oradim -NEW -SID prod -INTPWD password -STARTMODE manual
    -PFILE "C:\oracle\admin\prod\pfile\init.ora"
    

    Note that the previously created init.ora file is specified, with complete path, including drive name. You can check if the service is started in the services window of the Windows NT Control Panel.

  2. Set ORACLE_SID to equal prod. Note that there are no spaces around the equal sign (=) character:

    C:\> set ORACLE_SID=prod
    

Putting the CREATE DATABASE Statement in a Script

The CREATE DATABASE statement is a SQL statement that creates the database. A script containing this statement can be used anytime you want to create a database.

The CREATE DATABASE statement may have the following parameters:

When you run a CREATE DATABASE statement, Oracle performs several operations depending upon the clauses that you specified in the CREATE DATABASE statement or the initialization parameters that you have set.


Note:

Oracle Managed Files is a feature that can work with the CREATE DATABASE statement. Using Oracle-managed files simplifies the administration of an Oracle database. Oracle-managed files eliminate the need to directly manage the operating system files comprising an Oracle database. Using Oracle Managed Files can simplify the use of the CREATE DATABASE statement. You specify operations in terms of database objects rather than filenames. For more information on using Oracle Managed Files see Oracle9i Database Administrator's Guide


The following statement creates the database prod:

CREATE DATABASE prod
MAXLOGFILES 5
MAXDATAFILES 100
DATAFILE 'oracle\oradata\prod\system01.dbf' SIZE 325M REUSE
AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
UNDO TABLESPACE "UNDOTBS" DATAFILE 'oracle\oradata\prod\undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET WE8MSWIN1252
logfile 'C:\oracle\oradata\prod\redo01.log' size 100M reuse,
            'C:\oracle\oradata\prod\redo02.log' size 100M reuse,
            'C:\oracle\oradata\prod\redo03.log' size 100M reuse;

Creating a Database

To use the SQL script to create a database:

  1. Verify that the service is started in the Windows NT Control Panel. In this example, the service name is OracleServicePROD, and its status column must display Started. If not, select the service name and choose Start.

    You can also check the status of the service by entering the following at the MS-DOS command prompt:

    C:\> net START
    

    A list of all Windows NT services currently running on the system appears. If OracleServicePROD is missing from the list, enter:

    C:\> net START OracleServicePROD 
    
  2. Make PROD the current SID:

    C:\> set ORACLE_SID=PROD
    
  3. Start SQL*Plus from the MS-DOS command prompt, and connect to the database as SYSDBA:

    C:\> SQLPLUS / NOLOG
    SQL> CONNECT / AS SYSDBA/password 
    

    The password is the one that you used to create the service, with the oradim -new command in "Creating and Starting an Oracle Service".

    The message Connected appears.

  4. Turn on spooling to save the messages:

    SQL> SPOOL script_name.log
    
  5. Run the script_name.sql script that you created in "Creating a Database":

    SQL> @C:\oracle\ora90\rdbms\admin\script_name.sql;
    

    If the database is successfully created, the instance is started and the following message appears numerous times: Statement processed

Importing a Database

You can import the full export created in "Exporting an Existing Database" into the new database.

You can also start the Import utility using parameter mode or interactive mode. Parameter mode is recommended, because interactive mode provides less functionality. Interactive mode exists solely for backward compatibility.

Example 1-3 Parameter Mode

C:\> imp SYSTEM/password FILE=myexp.dmp FULL=y LOG=myexp.log

Example 1-4 Interactive Mode

C:\> imp SYSTEM/password

Enter only the command imp SYSTEM/password to begin an interactive session and let the Import utility prompt you for the information it needs.

See Oracle9i Database Utilities for more information on using the Import utility.


Note:

If you use parameter mode, the Import utility considers filenames and directory names to be invalid if there is a blank space. Enclose the full path in the FILE= parameter in triple quotation marks. For example:

FILE="""C:\program files\export.dmp"""

or

FILE="""C:\program files\export file.dmp"""

If you use the Import utility in interactive mode, the filename or directory name can contain a space without quotation marks. 


To import a database:

Updating the ORACLE_SID in the Registry

If this is the first database on the system or if you want to make the new database the default database, you must make a change in the registry.

  1. Start the registry editor at the MS-DOS command prompt:

    C:\> regedt32
    

    The registry editor window appears.

  2. Choose the \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0 subkey for the first Oracle home on your computer. For subsequent installations to different Oracle homes on the same computer, the path is \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID where ID is the unique number identifying the Oracle home.

    See Also:

    Oracle9i Database installation guide for Windows for more information on the subkey locations for multiple Oracle homes 

  3. Locate the ORACLE_SID parameter on the right side of the registry editor window.

  4. Double-click the parameter name and change the data to the new SID, which is prod in this example.

If you do not yet have the ORACLE_SID parameter, because this is the first database on your system, you must create it.

To create the ORACLE_SID parameter:

  1. Choose Add Value from the Edit menu.

    The Add Value dialog box appears:


    Text description of addvalue.gif follows.
    Text description of the illustration addvalue.gif
  2. Enter ORACLE_SID in the Value Name text box.

  3. Select REG_EXPAND_SZ (for an expandable string) in the Data Type list box.

  4. Click OK.

    A string editor dialog box appropriate for the data type appears:


    Text description of stringre.gif follows.
    Text description of the illustration stringre.gif
  5. Enter prod in the String Editor dialog box.

  6. Click OK.

    The registry editor adds the ORACLE_SID parameter.

  7. Choose Exit from the Registry menu.

    The registry editor exits.

Backing Up the New Database


Caution:

If anything goes wrong while operating the new database without a backup, you must repeat the database creation procedure. Back up your database now to prevent loss of data.  


To back up the new database:

  1. Shut down the database instance and stop the service:

    C:\> oradim -SHUTDOWN -SID prod -USRPWD password 
    -SHUTTYPE srvc,inst -SHUTMODE i
    


    Caution:

    Although the ORADIM utility returns the prompt immediately, you must wait for the database and the service to stop completely before continuing to Step 2. Wait until the Control Panel indicates the OracleServicePROD service has stopped. If you do not do this, the backup may be useless as it was taken while data was being written to the datafiles. 


  2. Using the tool of your choice, back up the database files.

    Database files consist of the initialization parameter file, control files, online redo log files, and datafiles.

    When the backup is complete, you can start the database again, create users and objects, if necessary, make any other changes, and use the database.

    Be sure to back up the database after making any significant changes to the database, such as switching the archiving mode, or adding a tablespace or datafile.


    Caution:

    Do not store database files on a compressed drive. This can result in write errors and decreased performance. 


Using the ORADIM Utility to Administer an Oracle Instance

The ORADIM utility is a command line tool that is available with the Oracle9i database. You only need to use the ORADIM utility if you are manually creating, deleting, or modifying databases. Oracle Database Configuration Assistant is an easier tool to use for this purpose.

When you use the ORADIM utility, a log file called oradim.log opens in ORACLE_BASE\ORACLE_HOME\database, or in the directory specified by the ORA_CWD registry parameter. All operations, whether successful and failed, are logged in this file. You must check this file to verify the success of an operation.

If you have installed an Oracle database service on Windows 2000, when logging in as SYSTEM user (LocalSystem), with startup mode set to Automatic, it is possible that the Oracle database service starts but the database does not start automatically. The following error message is written to the ORADIM.LOG file in the ORACLE_BASE\ORACLE_HOME\database directory.

ORA-12640: Authentication adapter initialization failed 

Also, Oracle Enterprise Management Agent, Oracle Enterprise Manager Management Server and Oracle Internet Directory may also fail because they cannot connect to the database for the same reason.

The workarounds are:

  1. Remove the line sqlnet.authentication_services=(NTS) from SQLNET.ORA or set sqlnet.authentication_services=(NONE) in SQLNET.ORA.

  2. Start the database manually after the Oracle database service has started using SQL*Plus connecting as SYSDBA.

  3. Start the service as a specific user:

    1. Choose Start > Settings > Control Panel > Services. The Services dialog box appears.

    2. Select the service you want to start.

    3. Click the Startup button. The Service dialog box appears.

    4. Click This account and specify the username and corresponding password.

The following sections describe the ORADIM utility commands and parameters. Note that each command is preceded by a dash (-). Table 1-3 shows how to get a list of ORADIM utility parameters.

Table 1-3 ORADIM Utility Parameters
To get a list of ORADIM utility parameters and descriptions... 

Use this syntax: 

oradim -? | -H | -HELP

Note: Specifying oradim without any options also returns a list of oradim parameters and descriptions.  

Example: 

C:\> oradim -? 

Creating an Instance

Table 1-4 describes how to use the ORADIM utility to create an instance.

Table 1-4 Using the ORADIM Utility to Create an instance
To create an instance... 

Use this syntax: 

oradim -NEW -SID SID | -SRVC service_name -SHUTTYPE srvc | inst | srvc, inst

[-MAXUSERS number][-STARTMODE auto | manual][-PFILE "filename"]  

Example to create an instance called PROD: 

C:\> oradim -NEW -SID prod -INTPWD mypassword1 -STARTMODE auto -PFILE "C:\oracle\admin\prod\pfile\init.ora"  

Syntax description: 

  • -NEW

 

Indicates that you want to create a new instance. This is a mandatory parameter. 

 

  • -SID SID

 

The name of the instance you want to create. You must specify either this parameter or the -SRVC parameter described below. 

 

  • -SRVC service_name

 

The name of the service you want to create (OracleServiceSID). You must specify either this parameter or the -SID parameter described above. 

 

  • -MAXUSERS number

 

The number of users defined in the password file. The default is 5. 

 

  • -STARTMODE auto, manual

 

Indicates whether to start the instance automatically or manually at startup. The default setting is manual

 

  • -PFILE filename

 

The init.ora file to be used with this instance. Ensure that you specify the complete path name of this file, including drive letter. 

 

  • -SHUTTYPE srvc, inst

 

Indicates whether to stop the service or the instance. Both can be specified. This is a mandatory parameter. 

Starting an Instance

Table 1-5 describes how to use the ORADIM utility to start an instance.

Table 1-5 Using the ORADIM Utility to Start an Instance
To start an instance... 

Use this syntax: 

ORADIM -STARTUP -SID SID [-USRPWD user_pwd] [-STARTTYPE SRVC | INST | SRVC, INST] [-PFILE "FILENAME"] 

Example to start an instance called puma

C:\> ORADIM -STARTUP -SID puma -STARTTYPE SRVC -PFILE "C:\ORACLE\ADMIN\PROD\PFILE\init.ora"  

Syntax description: 

  • -STARTUP

 

Indicates that you want to start an instance that already exists. This is a mandatory parameter. 

 

  • -SID SID

 

The name of the instance you want to start. This is a mandatory parameter. 

 

  • -USERPWD user_pwd

 

The password. 

 

  • -STARTTYPE SRVC, INST

 

Indicates whether to start the service or the instance. One or both values can be specified. If not specified, the registry is checked for the current setting. 

Stopping an Instance

Table 1-6 describes how to use the ORADIM utility to stop an instance.

Table 1-6 Using the ORADIM utility to Stop an Instance
To stop an instance: 

Use this syntax: 

ORADIM -SHUTDOWN -SID SID [-USRPWD user_pwd] [-SHUTTYPE SRVC | INST | SRVC, INST] [-SHUTMODE A | I | N] 

Example to stop an instance called puma

C:\> ORADIM -SHUTDOWN -SID puma -SHUTTYPE SRVC INST 

Syntax description: 

  • -SHUTDOWN

 

Indicates that you want to stop an instance. This is a mandatory parameter. 

 

  • -SID SID

 

The name of the instance you want to stop. This is a mandatory parameter. 

 

  • -USERPWD user_pwd

 

The password. 

 

  • -SHUTTYPE srvc, inst

 

Indicates whether to stop the service or the instance. One or both values can be specified. If not specified, the registry is checked for the current setting. 

 

  • -SHUTMODE A, I, N

 

Specifies how to stop an instance; A indicates abort mode, I indicates immediate mode, and N indicates normal mode. This is an optional parameter. If you do not specify how to stop an instance, normal is the default mode. 

Modifying an Instance

Table 1-7 describes how to use the ORADIM utility to modify an instance.

Table 1-7 Using the ORADIM utility to Modify an Instance
To modify an instance... 

Use this syntax: 

ORADIM -EDIT -SID sid [-NEWSID NEWSID]
[-STARTMODE AUTO | MANUAL][-PFILE "
FILENAME"] 

Example to modify an instance called PROD: 

C:\> ORADIM -EDIT -SID PROD -NEWSID LYNX -INTPWD MYCAT123 -STARTMODE AUTO -PFILE "C:\ORACLE\ADMIN\LYNX\PFILE\INIT.ORA" 

Note: 

You can modify an existing instance, in this example PROD, to change such values as the instance name, the password, the startup mode, and the number of users. 

Syntax description: 

  • -EDIT

 

Indicates that you want to modify an instance. This is a mandatory parameter. 

 

  • -SID SID

 

The name of the instance you want to modify. This is a mandatory parameter. 

 

  • -NEWSID NEWSID

 

The new instance name. This is an optional parameter.  

 

  • -STARTMODE AUTO, MANUAL

 

Indicates whether to start the instance automatically or manually at startup. The default setting is MANUAL

 

  • -PFILE FILENAME

 

The INIT.ORA file to be used with this instance. Ensure that you specify the complete path name of this file, including drive letter. 

Deleting an Instance

Table 1-8 describes how to use the ORADIM utility to delete an instance.

Table 1-8 Using the ORADIM utility to Delete an Instance or Service
To delete an instance or service... 

Use this syntax: 

ORADIM -DELETE -SID SIDA
ORADIM -DELETE -SVRC SVRCA
 

Example to delete an instance called PROD: 

C:\> ORADIM -DELETE -SID PROD  

Syntax description: 

  • -DELETE

 

Indicates that you want to delete an instance or service.  

 

  • SIDA

 

The name of the SID you want to delete.  

 

  • SVRCA

 

The name of the service you want to delete 


Go to previous page Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback