Академический Документы
Профессиональный Документы
Культура Документы
This article focuses on the second option. It can be completed on the command line only, that
is, without any GUI tool.
Also, the article is a bit biased towards Windows and its command prompt (cmd.exe: start-
>run->cmd).
D:\oracle\product\10.1.0>set ORACLE_SID=ORA10
Instance created.
It can be verified that a Windows service was created by typing services.msc into the
console. A service named OracleServiceORA10 (ORA10 = %ORACLE_SID%) will be found.
Also, the startup type is manual as was requested by -startmode M.
Oracle also created a password file under %ORACLE_HOME%\database:
D:\oracle\product\10.1.0\Db_1>dir database
Directory of D:\oracle\product\10.1.0\Db_1\database
http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html
03/05/2005 03:54 PM 2,560 PWDORA10.ORA
D:\oracle\product\10.1.0\Db_1\database\initORA10.ora
control_files = (d:\oracle\databases\ora10\control01.ora,
d:\oracle\databases\ora10\control02.ora,
d:\oracle\databases\ora10\control03.ora)
undo_management = auto
db_name = ora10
db_block_size = 8192
Now, that we have created an Oracle service and the init.ora file, we're ready to start the
instance:
D:\oracle\product\10.1.0\Db_1>sqlplus /nolog
http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html
SQL*Plus tells us that we're connected to an idle instance. That means that it is not yet
started. So, let's start the instance. We have to start the instance without mounting
(nomount) as there is no database we could mount at the moment.
SQL> startup nomount
This created the SGA (System Global Area) and the background processes.
datafile 'D:\oracle\databases\ora10\system.dbf'
size 50M
autoextend on
size 10M
autoextend on
http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html
next 10M
maxsize unlimited
datafile 'D:\oracle\databases\ora10\undo.dbf'
size 10M
tempfile 'D:\oracle\databases\ora10\temp.dbf'
size 10M;
If something goes wrong with the creation, Oracle will write an error into the alert.log. The
alert log is normaly found in the directory that is specified with the background_dump_dest. If
this parameter was not specified (as is the case in our minimal init.ora), the alert.log will be
written into %ORACLE_HOME%/RDMBS/trace.
If an ORA-01031: insufficient privileges is returned, that means most likely, that the current
user is not in the dba group (on unix), or the ORA_DBA (windows).
If the init.ora file is not at its default location or has not been found with the pfile attribute, an
ORA-01078: failure in processing system parameters and an LRM-00109: could not open
parameter file '/appl/oracle/product/9.2.0.2/dbs/initadpdb.ora' error is issued.
The create database command also executes a file whose name is determined by the (hidden)
init parameter _init_sql_file (which seems to default to sql.bsq)
After the creation of the database, it can be mounted and opened for use.
• %ORACLE_HOME%/rdbms/admin/catalog.sql
• %ORACLE_HOME%/rdbms/admin/catproc.sql and
SQL*Plus provides a shortcut to refer to the ORACLE_HOME directory: the question mark (?).
Therefore, these scripts can be called like so:
SQL> @?/rdbms/admin/catalog.sql
SQL> @?/rdbms/admin/catproc.sql
catalog.sql creates the data dictionary. catproc.sql creates all structures required for PL/SQL.
catalog.sql calls, for example, catexp.sql which is a requirement for exp, or dbmsstdx.sql
which is a requirement to create triggers.
The user system might also want to run ?/sqlplus/admin/pupbld.sql. pupbld.sql creates a
table that allows to block someone from using sql plus.
SQL> @?/sqlplus/admin/pupbld
Of course, tablespaces, users, tables and so on must be created according to the use of the
database.
http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html
Setting up database to using java
Also call @?/javavm/install/initjvm if you want to enable the JServer option(?).
http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html