
- •Contents
- •Send Us Your Comments
- •Preface
- •What’s New in SQL Reference?
- •1 Introduction to Oracle SQL
- •History of SQL
- •SQL Standards
- •Embedded SQL
- •Lexical Conventions
- •Tools Support
- •2 Basic Elements of Oracle SQL
- •Datatypes
- •Oracle Built-in Datatypes
- •ANSI, DB2, and SQL/DS Datatypes
- •Oracle-Supplied Types
- •"Any" Types
- •XML Types
- •Spatial Type
- •Media Types
- •Datatype Comparison Rules
- •Data Conversion
- •Literals
- •Text Literals
- •Integer Literals
- •Number Literals
- •Interval Literals
- •Format Models
- •Number Format Models
- •Date Format Models
- •String-to-Date Conversion Rules
- •XML Format Model
- •Nulls
- •Nulls in SQL Functions
- •Nulls with Comparison Conditions
- •Nulls in Conditions
- •Pseudocolumns
- •CURRVAL and NEXTVAL
- •LEVEL
- •ROWID
- •ROWNUM
- •XMLDATA
- •Comments
- •Comments Within SQL Statements
- •Comments on Schema Objects
- •Hints
- •Database Objects
- •Schema Objects
- •Nonschema Objects
- •Parts of Schema Objects
- •Schema Object Names and Qualifiers
- •Schema Object Naming Rules
- •Schema Object Naming Examples
- •Schema Object Naming Guidelines
- •Syntax for Schema Objects and Parts in SQL Statements
- •How Oracle Resolves Schema Object References
- •Referring to Objects in Other Schemas
- •Referring to Objects in Remote Databases
- •Referencing Object Type Attributes and Methods
- •3 Operators
- •About SQL Operators
- •Unary and Binary Operators
- •Operator Precedence
- •Arithmetic Operators
- •Concatenation Operator
- •Set Operators
- •4 Expressions
- •About SQL Expressions
- •Simple Expressions
- •Compound Expressions
- •CASE Expressions
- •CURSOR Expressions
- •Datetime Expressions
- •Function Expressions
- •INTERVAL Expressions
- •Object Access Expressions
- •Scalar Subquery Expressions
- •Type Constructor Expressions
- •Variable Expressions
- •Expression Lists
- •5 Conditions
- •About SQL Conditions
- •Condition Precedence
- •Comparison Conditions
- •Simple Comparison Conditions
- •Group Comparison Conditions
- •Logical Conditions
- •Membership Conditions
- •Range Conditions
- •Null Conditions
- •EQUALS_PATH
- •EXISTS Conditions
- •LIKE Conditions
- •IS OF type Conditions
- •UNDER_PATH
- •Compound Conditions
- •6 Functions
- •SQL Functions
- •Single-Row Functions
- •Aggregate Functions
- •Analytic Functions
- •Object Reference Functions
- •Alphabetical Listing of SQL Functions
- •ACOS
- •ADD_MONTHS
- •ASCII
- •ASCIISTR
- •ASIN
- •ATAN
- •ATAN2
- •BFILENAME
- •BITAND
- •CAST
- •CEIL
- •CHARTOROWID
- •COALESCE
- •COMPOSE
- •CONCAT
- •CONVERT
- •CORR
- •COSH
- •COUNT
- •COVAR_POP
- •COVAR_SAMP
- •CUME_DIST
- •CURRENT_DATE
- •CURRENT_TIMESTAMP
- •DBTIMEZONE
- •DECODE
- •DECOMPOSE
- •DENSE_RANK
- •DEPTH
- •DEREF
- •DUMP
- •EMPTY_BLOB, EMPTY_CLOB
- •EXISTSNODE
- •EXTRACT (datetime)
- •EXTRACT (XML)
- •EXTRACTVALUE
- •FIRST
- •FIRST_VALUE
- •FLOOR
- •FROM_TZ
- •GREATEST
- •GROUP_ID
- •GROUPING
- •GROUPING_ID
- •HEXTORAW
- •INITCAP
- •INSTR
- •LAST
- •LAST_DAY
- •LAST_VALUE
- •LEAD
- •LEAST
- •LENGTH
- •LOCALTIMESTAMP
- •LOWER
- •LPAD
- •LTRIM
- •MAKE_REF
- •MONTHS_BETWEEN
- •NCHR
- •NEW_TIME
- •NEXT_DAY
- •NLS_CHARSET_DECL_LEN
- •NLS_CHARSET_ID
- •NLS_CHARSET_NAME
- •NLS_INITCAP
- •NLS_LOWER
- •NLSSORT
- •NLS_UPPER
- •NTILE
- •NULLIF
- •NUMTODSINTERVAL
- •NUMTOYMINTERVAL
- •PATH
- •PERCENT_RANK
- •PERCENTILE_CONT
- •PERCENTILE_DISC
- •POWER
- •RANK
- •RATIO_TO_REPORT
- •RAWTOHEX
- •RAWTONHEX
- •REFTOHEX
- •REGR_ (Linear Regression) Functions
- •REPLACE
- •ROUND (number)
- •ROUND (date)
- •ROW_NUMBER
- •ROWIDTOCHAR
- •ROWIDTONCHAR
- •RPAD
- •RTRIM
- •SESSIONTIMEZONE
- •SIGN
- •SINH
- •SOUNDEX
- •SQRT
- •STDDEV
- •STDDEV_POP
- •STDDEV_SAMP
- •SUBSTR
- •SYS_CONNECT_BY_PATH
- •SYS_CONTEXT
- •SYS_DBURIGEN
- •SYS_EXTRACT_UTC
- •SYS_GUID
- •SYS_TYPEID
- •SYS_XMLAGG
- •SYS_XMLGEN
- •SYSDATE
- •SYSTIMESTAMP
- •TANH
- •TO_CHAR (character)
- •TO_CHAR (datetime)
- •TO_CHAR (number)
- •TO_CLOB
- •TO_DATE
- •TO_DSINTERVAL
- •TO_MULTI_BYTE
- •TO_NCHAR (character)
- •TO_NCHAR (datetime)
- •TO_NCHAR (number)
- •TO_NCLOB
- •TO_NUMBER
- •TO_SINGLE_BYTE
- •TO_TIMESTAMP
- •TO_TIMESTAMP_TZ
- •TO_YMINTERVAL
- •TRANSLATE
- •TRANSLATE ... USING
- •TREAT
- •TRIM
- •TRUNC (number)
- •TRUNC (date)
- •TZ_OFFSET
- •UNISTR
- •UPDATEXML
- •UPPER
- •USER
- •USERENV
- •VALUE
- •VAR_SAMP
- •VARIANCE
- •VSIZE
- •WIDTH_BUCKET
- •XMLAGG
- •XMLCOLATTVAL
- •XMLCONCAT
- •XMLELEMENT
- •XMLFOREST
- •XMLSEQUENCE
- •XMLTRANSFORM
- •ROUND and TRUNC Date Functions
- •User-Defined Functions
- •Prerequisites
- •Name Precedence
- •7 Common SQL DDL Clauses
- •allocate_extent_clause
- •constraints
- •deallocate_unused_clause
- •file_specification
- •logging_clause
- •parallel_clause
- •physical_attributes_clause
- •storage_clause
- •8 SQL Queries and Subqueries
- •About Queries and Subqueries
- •Creating Simple Queries
- •Hierarchical Queries
- •The UNION [ALL], INTERSECT, MINUS Operators
- •Sorting Query Results
- •Joins
- •Using Subqueries
- •Unnesting of Nested Subqueries
- •Selecting from the DUAL Table
- •Distributed Queries
- •9 SQL Statements: ALTER CLUSTER to ALTER SEQUENCE
- •Types of SQL Statements
- •Organization of SQL Statements
- •ALTER CLUSTER
- •ALTER DATABASE
- •ALTER DIMENSION
- •ALTER FUNCTION
- •ALTER INDEX
- •ALTER INDEXTYPE
- •ALTER JAVA
- •ALTER MATERIALIZED VIEW
- •ALTER MATERIALIZED VIEW LOG
- •ALTER OPERATOR
- •ALTER OUTLINE
- •ALTER PACKAGE
- •ALTER PROCEDURE
- •ALTER PROFILE
- •ALTER RESOURCE COST
- •ALTER ROLE
- •ALTER ROLLBACK SEGMENT
- •ALTER SEQUENCE
- •10 SQL Statements: ALTER SESSION to ALTER SYSTEM
- •ALTER SESSION
- •ALTER SYSTEM
- •ALTER TABLE
- •ALTER TABLESPACE
- •ALTER TRIGGER
- •ALTER TYPE
- •ALTER USER
- •ALTER VIEW
- •ANALYZE
- •ASSOCIATE STATISTICS
- •AUDIT
- •CALL
- •COMMENT
- •COMMIT
- •13 SQL Statements: CREATE CLUSTER to CREATE JAVA
- •CREATE CLUSTER
- •CREATE CONTEXT
- •CREATE CONTROLFILE
- •CREATE DATABASE
- •CREATE DATABASE LINK
- •CREATE DIMENSION
- •CREATE DIRECTORY
- •CREATE FUNCTION
- •CREATE INDEX
- •CREATE INDEXTYPE
- •CREATE JAVA
- •14 SQL Statements: CREATE LIBRARY to CREATE SPFILE
- •CREATE LIBRARY
- •CREATE MATERIALIZED VIEW
- •CREATE MATERIALIZED VIEW LOG
- •CREATE OPERATOR
- •CREATE OUTLINE
- •CREATE PACKAGE
- •CREATE PACKAGE BODY
- •CREATE PFILE
- •CREATE PROCEDURE
- •CREATE PROFILE
- •CREATE ROLE
- •CREATE ROLLBACK SEGMENT
- •CREATE SCHEMA
- •CREATE SEQUENCE
- •CREATE SPFILE
- •15 SQL Statements: CREATE SYNONYM to CREATE TRIGGER
- •CREATE SYNONYM
- •CREATE TABLE
- •CREATE TABLESPACE
- •CREATE TEMPORARY TABLESPACE
- •CREATE TRIGGER
- •CREATE TYPE
- •CREATE TYPE BODY
- •CREATE USER
- •CREATE VIEW
- •DELETE
- •DISASSOCIATE STATISTICS
- •DROP CLUSTER
- •DROP CONTEXT
- •DROP DATABASE LINK
- •DROP DIMENSION
- •DROP DIRECTORY
- •DROP FUNCTION
- •DROP INDEX
- •DROP INDEXTYPE
- •DROP JAVA
- •DROP LIBRARY
- •DROP MATERIALIZED VIEW
- •DROP MATERIALIZED VIEW LOG
- •DROP OPERATOR
- •DROP OUTLINE
- •DROP PACKAGE
- •DROP PROCEDURE
- •DROP PROFILE
- •DROP ROLE
- •DROP ROLLBACK SEGMENT
- •17 SQL Statements: DROP SEQUENCE to ROLLBACK
- •DROP SEQUENCE
- •DROP SYNONYM
- •DROP TABLE
- •DROP TABLESPACE
- •DROP TRIGGER
- •DROP TYPE
- •DROP TYPE BODY
- •DROP USER
- •DROP VIEW
- •EXPLAIN PLAN
- •GRANT
- •INSERT
- •LOCK TABLE
- •MERGE
- •NOAUDIT
- •RENAME
- •REVOKE
- •ROLLBACK
- •18 SQL Statements: SAVEPOINT to UPDATE
- •SAVEPOINT
- •SELECT
- •SET CONSTRAINT[S]
- •SET ROLE
- •SET TRANSACTION
- •TRUNCATE
- •UPDATE
- •Required Keywords and Parameters
- •Optional Keywords and Parameters
- •Syntax Loops
- •Multipart Diagrams
- •Database Objects
- •ANSI Standards
- •ISO Standards
- •Oracle Compliance
- •FIPS Compliance
- •Oracle Extensions to Standard SQL
- •Character Set Support
- •Using Extensible Indexing
- •Using XML in SQL Statements
- •Index

CREATE CONTEXT
CREATE CONTEXT
Purpose
Use the CREATE CONTEXT statement to:
■Create a namespace for a context (a set of application-defined attributes that validates and secures an application) and
■Associate the namespace with the externally created package that sets the context.
You can use the DBMS_SESSION.set_context procedure in your designated package to set or reset the attributes of the context.
See Also:
■Oracle9i Database Concepts for a definition and discussion of contexts
■Oracle9i Supplied PL/SQL Packages and Types Reference for information on the DBMS_SESSION.set_context procedure
Prerequisites
To create a context namespace, you must have CREATE ANY CONTEXT system privilege.
Syntax
create_context::=
OR |
REPLACE |
|
|
schema |
. |
CREATE |
|
CONTEXT |
namespace |
USING |
package |
EXTERNALLY
INITIALIZED
GLOBALLY
ACCESSED GLOBALLY
;
13-12 Oracle9i SQL Reference

CREATE CONTEXT
Semantics
OR REPLACE
Specify OR REPLACE to redefine an existing context namespace using a different package.
namespace
Specify the name of the context namespace to create or modify. Context namespaces are always stored in the schema SYS.
schema
Specify the schema owning package. If you omit schema, Oracle uses the current schema.
package
Specify the PL/SQL package that sets or resets the context attributes under the namespace for a user session.
Note: To provide some design flexibility, Oracle does not verify the existence of the schema or the validity of the package at the time you create the context.
See Also: Oracle9i Supplied PL/SQL Packages and Types Reference for more information on setting the package
INITIALIZED Clause
The INITIALIZED clause lets you specify an entity other than Oracle that can initialize the context namespace.
EXTERNALLY EXTERNALLY indicates that the namespace can be initialized using an OCI interface when establishing a session.
See Also: Oracle Call Interface Programmer’s Guide for information on using OCI to establish a session
GLOBALLY GLOBALLY indicates that the namespace can be initialized by the LDAP directory when a global user connects to the database.
SQL Statements: CREATE CLUSTER to CREATE JAVA 13-13

CREATE CONTEXT
After the session is established, only the designated PL/SQL package can issue commands to write to any attributes inside the namespace.
See Also:
■Oracle9i Application Developer’s Guide - Fundamentals for information on establishing globally initialized contexts
■Oracle Internet Directory Administrator’s Guide for information on the connecting to the database through the LDAP directory
ACCESSED GLOBALLY
This clause indicates that any application context set in namespace is accessible throughout the entire instance. This setting lets multiple sessions share application attributes.
Examples
Creating an Application Context: Example This example uses the PL/SQL package emp_mgmt, created in "Creating a Package: Example" on page 14-55, which validates and secures the hr application. The following statement creates the context namespace hr_context and associates it with the package emp_mgmt:
CREATE CONTEXT hr_context USING emp_mgmt;
You can control data access based on this context using the SYS_CONTEXT function. For example, suppose your emp_mgmt package has defined an attribute new_ empno as a particular employee identifier. You can secure the base table employees by creating a view that restricts access based on the value of new_ empno, as follows:
CREATE VIEW hr_org_secure_view AS
SELECT * FROM employees
WHERE employee_id = SYS_CONTEXT(’hr_context’, ’new_empno’);
See Also: SYS_CONTEXT on page 6-156
13-14 Oracle9i SQL Reference

CREATE CONTROLFILE
CREATE CONTROLFILE
Caution: Oracle recommends that you perform a full backup of all files in the database before using this statement. For more information, see Oracle9i User-Managed Backup and Recovery Guide.
Purpose
Use the CREATE CONTROLFILE statement to re-create a control file in one of the following cases:
■All copies of your existing control files have been lost through media failure.
■You want to change the name of the database.
■You want to change the maximum number of redo log file groups, redo log file members, archived redo log files, datafiles, or instances that can concurrently have the database mounted and open.
Note: If it is necessary to use the CREATE CONTROLFILE statement, do not include in the DATAFILE clause any datafiles in temporary or read-only tablespaces. You can add these types of files to the database later.
An alternative to the CREATE CONTROLFILE statement is ALTER DATABASE BACKUP CONTROLFILE TO TRACE, which generates a SQL script in the trace file to re-create the controlfile. If your database contains any read-only or temporary tablespaces, that SQL script will also contain all the necessary SQL statements to add those files back into the database.
See Also: "BACKUP CONTROLFILE Clause" of ALTER DATABASE on page 9-42 for information creating a script based on an existing database controlfile
When you issue a CREATE CONTROLFILE statement, Oracle creates a new control file based on the information you specify in the statement. If you omit any clauses, Oracle uses the default values rather than the values for the previous control file.
After successfully creating the control file, Oracle mounts the database in the mode
SQL Statements: CREATE CLUSTER to CREATE JAVA 13-15

CREATE CONTROLFILE
specified by the initialization parameter CLUSTER_DATABASE. You then must perform media recovery before opening the database. It is recommended that you then shut down the instance and take a full backup of all files in the database.
See Also: Oracle9i User-Managed Backup and Recovery Guide
Prerequisites
To create a control file, you must have the SYSDBA system privilege.
The database must not be mounted by any instance. Oracle leaves the database mounted in EXCLUSIVE state after successful creation of the control file. If you are using Oracle with Real Application Clusters, the DBA must then shut down and remount the database in SHARED mode (which is the default if the value of the CLUSTER_DATABASE initialization parameter is TRUE) before other instances can start up.
If the REMOTE_LOGIN_PASSWORDFILE initialization parameter is set to EXCLUSIVE, Oracle returns an error when you attempt to re-create the control file. To avoid this message, either set the parameter to SHARED, or re-create your password file before re-creating the control file.
See Also: Oracle9i Database Reference for more information about the REMOTE_LOGIN_PASSWORDFILE parameter
13-16 Oracle9i SQL Reference

CREATE CONTROLFILE
Syntax
create_controlfile::=
|
|
|
|
REUSE |
SET |
|
|
CREATE |
CONTROLFILE |
|
|
DATABASE |
database |
||
|
|
|
|
|
|
|
, |
logfile_clause |
|
|
RESETL0GS |
DATAFILE |
datafile_tempfile_spec |
||
|
|
|
|
NORESETL0GS |
|
|
|
MAXLOGFILES |
integer |
|
|
|
|||
MAXLOGMEMBERS |
|
integer |
|
|
|
||
MAXLOGHISTORY |
|
integer |
|
|
|
||
MAXDATAFILES |
|
integer |
|
|
|
||
MAXINSTANCES |
|
integer |
|
|
|
||
|
ARCHIVELOG |
|
|
|
|
|
|
|
NOARCHIVELOG |
|
|
|
|
||
FORCE |
LOGGING |
character_set_clause |
|
||||
|
|
|
|
|
|
|
; |
(datafile_tempfile_spec::= on page 7-39—part of file_specification syntax)
logfile_clause ::=
,
GROUP integer
LOGFILE |
redo_log_file_spec |
(redo_log_file_spec::= on page 7-40—part of file_specification syntax)
character_set_clause::=
CHARACTER SET
character_set
SQL Statements: CREATE CLUSTER to CREATE JAVA 13-17

CREATE CONTROLFILE
Semantics
REUSE
Specify REUSE to indicate that existing control files identified by the initialization parameter CONTROL_FILES can be reused, thus ignoring and overwriting any information they may currently contain. If you omit this clause and any of these control files already exists, Oracle returns an error.
DATABASE Clause
Specify the name of the database. The value of this parameter must be the existing database name established by the previous CREATE DATABASE statement or
CREATE CONTROLFILE statement.
SET DATABASE Clause
Use SET DATABASE to change the name of the database. The name of a database can be as long as eight bytes.
logfile_clause
Use the logfile_clause to specify the redo log files for your database. You must list all members of all redo log file groups.
GROUP integer Specify the logfile group number. If you specify GROUP values, Oracle verifies these values with the GROUP values when the database was last open.
If you omit this clause, Oracle creates logfiles using system default values. In addition, if either the DB_CREATE_ONLINE_LOG_DEST_n or DB_CREATE_FILE_ DEST initialization parameter (or both) has been set, and if you have specified RESETLOGS, then Oracle creates two logs in the default logfile destination specified in the DB_CREATE_ONLINE_LOG_DEST_n parameter, and if it is not set, then in the
DB_CREATE_FILE_DEST parameter.
See Also: file_specification on page 7-39 for a full description of this clause
RESETLOGS Specify RESETLOGS if you want Oracle to ignore the contents of the files listed in the LOGFILE clause. These files do not have to exist. Each redo_log_ file_spec in the LOGFILE clause must specify the SIZE parameter. Oracle assigns all online redo log file groups to thread 1 and enables this thread for public
13-18 Oracle9i SQL Reference

CREATE CONTROLFILE
use by any instance. After using this clause, you must open the database using the
RESETLOGS clause of the ALTER DATABASE statement.
NORESETLOGS Specify NORESETLOGS if you want Oracle to use all files in the LOGFILE clause as they were when the database was last open. These files must exist and must be the current online redo log files rather than restored backups. Oracle reassigns the redo log file groups to the threads to which they were previously assigned and reenables the threads as they were previously enabled.
DATAFILE Clause
Specify the datafiles of the database. You must list all datafiles. These files must all exist, although they may be restored backups that require media recovery. See the syntax description in file_specification on page 7-39.
Note: You should list only datafiles in this clause, not temporary datafiles (tempfiles). Please refer to Oracle9i User-Managed Backup and Recovery Guide for more information on handling tempfiles.
Restriction on DATAFILE You cannot specify the autoextend_clause of data_ file_spec in this DATAFILE clause.
MAXLOGFILES Clause
Specify the maximum number of online redo log file groups that can ever be created for the database. Oracle uses this value to determine how much space in the control file to allocate for the names of redo log files. The default and maximum values depend on your operating system. The value that you specify should not be less than the greatest GROUP value for any redo log file group.
MAXLOGMEMBERS Clause
Specify the maximum number of members, or identical copies, for a redo log file group. Oracle uses this value to determine how much space in the control file to allocate for the names of redo log files. The minimum value is 1. The maximum and default values depend on your operating system.
MAXLOGHISTORY Clause
This parameter is useful only if you are using Oracle in ARCHIVELOG mode with Real Application Clusters. Specify the maximum number of archived redo log file groups for automatic media recovery of Real Application Clusters. Oracle uses this value to determine how much space in the control file to allocate for the names of
SQL Statements: CREATE CLUSTER to CREATE JAVA 13-19

CREATE CONTROLFILE
archived redo log files. The minimum value is 0. The default value is a multiple of the MAXINSTANCES value and depends on your operating system. The maximum value is limited only by the maximum size of the control file.
MAXDATAFILES Clause
Specify the initial sizing of the datafiles section of the control file at CREATE DATABASE or CREATE CONTROLFILE time. An attempt to add a file whose number is greater than MAXDATAFILES, but less than or equal to DB_FILES, causes the control file to expand automatically so that the datafiles section can accommodate more files.
The number of datafiles accessible to your instance is also limited by the initialization parameter DB_FILES.
MAXINSTANCES Clause
Specify the maximum number of instances that can simultaneously have the database mounted and open. This value takes precedence over the value of the initialization parameter INSTANCES. The minimum value is 1. The maximum and default values depend on your operating system.
ARCHIVELOG | NOARCHIVELOG
Specify ARCHIVELOG to archive the contents of redo log files before reusing them. This clause prepares for the possibility of media recovery as well as instance or system failure recovery.
If you omit both the ARCHIVELOG clause and NOARCHIVELOG clause, Oracle chooses NOARCHIVELOG mode by default. After creating the control file, you can change between ARCHIVELOG mode and NOARCHIVELOG mode with the ALTER DATABASE statement.
FORCE LOGGING
Use this clause to put the database into FORCE LOGGING mode after control file creation. When the database is in this mode, Oracle logs all changes in the database except changes to temporary tablespaces and temporary segments. This setting takes precedence over and is independent of any NOLOGGING or FORCE LOGGING settings you specify for individual tablespaces and any NOLOGGING settings you specify for individual database objects. If you omit this clause, the database will not be in FORCE LOGGING mode after the controlfile is created.
13-20 Oracle9i SQL Reference

CREATE CONTROLFILE
Note: FORCE LOGGING mode can have performance effects. Please refer to Oracle9i Database Administrator’s Guide for information on when to use this setting.
character_set_clause
If you specify a character set, Oracle reconstructs character set information in the control file. In case media recovery of the database is required, this information will be available before the database is open, so that tablespace names can be correctly interpreted during recovery. This clause is required only if you are using a character set other than the default US7ASCII. Oracle prints the current database character set to the "alert" log in $ORACLE_HOME/log during startup.
If you are re-creating your control file and you are using Recovery Manager for tablespace recovery, and if you specify a different character set from the one stored in the data dictionary, then tablespace recovery will not succeed. (However, at database open, the control file character set will be updated with the correct character set from the data dictionary.)
Note: You cannot modify the character set of the database with this clause.
See Also: Oracle9i Recovery Manager User’s Guide for more information on tablespace recovery
Example
Creating a Controlfile: Example This statement re-creates a control file. In this statement, database demo was created with the WE8DEC character set. The example uses the word path where you would normally insert the path on your system to the appropriate Oracle directories.
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "demo" NORESETLOGS NOARCHIVELOG MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 32
MAXINSTANCES 1
SQL Statements: CREATE CLUSTER to CREATE JAVA 13-21

CREATE CONTROLFILE
MAXLOGHISTORY 449 LOGFILE
GROUP 1 ’/path/oracle/dbs/t_log1.f’ SIZE 500K, GROUP 2 ’/path/oracle/dbs/t_log2.f’ SIZE 500K
# STANDBY LOGFILE DATAFILE
’/path/oracle/dbs/t_db1.f’, ’/path/oracle/dbs/dbu19i.dbf’, ’/path/oracle/dbs/tbs_11.f’, ’/path/oracle/dbs/smundo.dbf’, ’/path/oracle/dbs/demo.dbf’
CHARACTER SET WE8DEC
;
13-22 Oracle9i SQL Reference