|
-
Try these steps
Create a Database Manually
Step 1: Decide on Your Instance's System Identifier (SID) The first step in creating the database is to determine the System Identifier (SID).
This is what the environment will be set to when your database starts up
and shuts down, and what the instance processes will have in their names as unique identifiers.
My Instance name is called cat1020 you can use whatever you want. So
wherever you see cat1020 replace with your name. Of course, use file system
paths that are relavant to your machine.
export ORACLE_SID=cat1020
Step 2: Create the Initialization Parameter File (sample file below)
$ cat $ORACLE_HOME/dbs/initcat1020.ora
*.db_name='cat1020'
*.DB_UNIQUE_NAME='cat1020'
*.instance_name='cat1020'
*.background_dump_dest='/rdbms/oracle_data/10.2.0/cat/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/rdbms/oracle_data/10.2.0/cat/control01.ctl','/rdbms/oracle_dat
a/10.2.0/cat/control02.ctl','/rdbms/oracle_data/10.2.0/cat/control03.ctl'
*.core_dump_dest='/rdbms/oracle_data/10.2.0/cat/cdump'
*.db_block_size=4096
*.db_cache_size=30m
*.db_domain='world.com'
*.java_pool_size=31457280
*.job_queue_processes=20
*.large_pool_size= 8388608
*.log_archive_dest='/rdbms/oracle_data/10.2.0/cat/arch'
*.log_archive_format='arch%s%r%t.arc'
*.max_dump_file_size='10000'
*.nls_sort='binary'
*.open_cursors=300
*.pga_aggregate_target=100m
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.service_names='cat1020'
*.sga_max_size=400m
*.shared_pool_size=153431142
*.undo_management='AUTO'
*.undo_retention=10800
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/rdbms/oracle_data/10.2.0/cat/udump'
*.workarea_size_policy='auto
Step 3: Connect to and Start the Instance
Connect to the instance as SYSDBA either using operating system authentication or the password file method of authentication and start up the instance using the STARTUP command.
>sqlplus '/ as sysdba'
NOTE: If your parameter file is not in the default location or is not named init.ora, you may need to specify the PFILE clause in the STARTUP command for the instance to start. Because you do not yet have a database attached to the instance, you need to start up the instance in NOMOUNT state:
SQL> startup nomount; The instance is now started and ready for the CREATE DATABASE command.
#
# Change the numbers as you see fit for your environment.
#
Step 4: Issue the CREATE DATABASE Statement
create database cat1020
user sys identified by sys
user system identified by system
logfile group 1 ('/rdbms/oracle_data/10.2.0/cat/redo01.log') size 5M,
group 2 ('/rdbms/oracle_data/10.2.0/cat/redo02.log') size 5M,
group 3 ('/rdbms/oracle_data/10.2.0/cat/redo03.log') size 5M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
datafile '/rdbms/oracle_data/10.2.0/cat/system01.dbf' size 400M
extent management local
default temporary tablespace temp
tempfile '/rdbms/oracle_data/10.2.0/cat/temp.dbf' size 25M
undo tablespace undotbs1
datafile '/rdbms/oracle_data/10.2.0/cat/undotbs.dbf'
size 25M reuse autoextend on next 1M maxsize unlimited
sysaux DATAFILE '/rdbms/oracle_data/10.2.0/cat/sysaux01.dbf' SIZE 500M;
Step 5: Run Scripts to Build Data Dictionary Views
@$ORACLE_HOME/rdbms/admin/catalog.sql
@$ORACLE_HOME/rdbms/admin/catproc.sql
REM * Alter SYS and SYSTEM users.
REM *
alter user sys identified by sys temporary tablespace temp;
alter user system identified by system temporary tablespace temp;
REM * For each DBA user, run DBA synonyms SQL script. Don't forget that EACH
REM * DBA USER created in the future needs dba_syn.sql run from its account.
REM *
connect system/manager
@$ORACLE_HOME/rdbms/admin/catdbsyn.sql
@$ORACLE_HOME/sqlplus/admin/pupbld.sql
Step 6: Create a Server Parameter File
This step is optional, although highly recommended by Oracle. Your Oracle database was created by starting the instance with a parameter file, or PFILE. Because it is editable, you can migrate, easily, your new database to using a server parameter file. Creation of the server parameter file (or spfile) is accomplished by issuing the following statement:
Create spfile from pfile;
Good luck
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|