Here are several ways to manually issue the "create database" syntax for Oracle:
Extremely minimal manual database creation
OMF minimal manual create database syntax
Standard Oracle create database syntax
Extremely minimal manual database creation
1. Set your oracle_sid
Export oracle_sid = test
Export ORACLE_HOME =/path/to/Oracle/home
2. Create a minimal init. ora
# $ ORACLE_HOME/dbs/init <Sid>. ora Control_files = (/path/to/control1.ctl,/path/to/control2.ctl,/path/to/control3.ctl)Undo_management = autoUndo_tablespace = undotbs1Db_name = testDB _ block_size = 8192Sga_max_size = 1073741824 # One gigSga_target = 1073741824 # One gig
3. Create a password file
$ ORACLE_HOME/bin/orapwd file = $ ORACLE_HOME/dbs/pwd <Sid>. ora Password = Oracle entries = 5
4. Start the instance
Sqlplus/As sysdba
Startup nomount
5. Create the database
Create Database TestLogfile group 1 ('/path/to/redo1.log') size 100 m,Group 2 ('/path/to/redo2.log') size 100 m,Group 3 ('/path/to/redo3.log') size 100 mCharacter Set we8iso8859p1National Character Set utf8Datafile '/path/to/system. dbf' size 500 m autoextend on next 10 m maxsize unlimited extent management localSysaux datafile '/path/to/sysaux. dbf' size 100 m autoextend on next 10 m maxsize UnlimitedUndo tablespace undotbs1 datafile '/path/to/undotbs1.dbf' size 100 mDefault temporary tablespace temp tempfile '/path/to/temp01.dbf' size 100 m;
Note:There's some other things you can do here, like "archivelog" "set time_zone =" and "user SYS identified by password" and "user system identified by password"
6. Run catalog and catproc
@? /Rdbms/admin/CATALOG. SQL
@? /Rdbms/admin/catproc. SQL
7. Change passwords
Alter user SYS identified by whatever;
Alter user system identified by whatever;
OMF minimal manual create database syntax
1. Set your oracle_sid
Export oracle_sid = testExport ORACLE_HOME =/path/to/Oracle/home
2. Create a minimal init. ora
# $ ORACLE_HOME/dbs/init <Sid>. ora Control_files = (/path/to/control1.ctl,/path/to/control2.ctl,/path/to/control3.ctl)Undo_management = autoDb_name = testDB _ block_size = 8192Sga_max_size = 1073741824 # One gigSga_target = 1073741824 # One gigDb_create_file_dest =/path/to/datafile/location # OMFDb_create_online_log_dest_1 =/path/to/First/redo_and_control_file/location # OMFDb_create_online_log_dest_2 =/path/to/Second/redo_and_control_file/location # OMFDb_recovery_file_dest =/path/to/flash/recovery/area # OMF# Note it's a good idea to also have background_dump_dest, user_dump_dest, and core_dump_dest here well
3. Create a password file
$ ORACLE_HOME/bin/orapwd file = $ ORACLE_HOME/dbs/pwd <Sid>. ora Password = Oracle entries = 5
4. Start the instance
Sqlplus/As sysdba
Startup nomount
5. Create the database
Create Database TestCharacter Set we8iso8859p1National Character Set utf8Undo tablespace undotbs1Default temporary tablespace temp;
You can even do this and it will work, the ultimate in minimalism:
Create Database test;
Note: There's some other things you can do here, like "archivelog" "set time_zone =" and "user SYS identified by password" and "user system identified by password"
NOTE 2: This is so minimal because you are using Oracle managed files as seen in #2
6. Run catalog and catproc
@? /Rdbms/admin/CATALOG. SQL
@? /Rdbms/admin/catproc. SQL
Standard create database syntax
After creating your init. ora file with the appropriate parameters you can use the "create database" command in SQL * Plus to create a database:
Make sure that your have your $ ORACLE_HOME and $ oracle_sid set properly and that you sign-on as sysdba:
Startup nomount;
Create controlfile reuse Database "oldlsq" noresetlogs
Noarchivelog
Maxlogfiles 16
Maxlogmembers 2
Maxdatafiles 240
Maxinstances 1
# Maxloghistory 113
Logfile
Group 1 ('/U03/oradata/oldlsq/log1a. dbf ',
'/U03/oradata/olslsq/log1b. dbf') size 30 m,
Group 2 ('/u04/oradata/oldlsq/log2a. dbf ',
'/U04/oradata/oldlsq/log2b. dbf') size 30 m
Datafile
'/U01/oradata/oldlsq/system01.dbf ',
'/U01/oradata/oldlsq/mydatabase. dbf'
;
This is just an abbreviated sample of the Oracle create database Command and there are available more options:
{
Function onmousedown ()
{
Return CLK (this. href, '','', 'res', '1 ','')
}
} "Href =" oracle_tips_db_copy.htm "> clone/copy Oracle with create database Command
{
Function onmousedown ()
{
Return CLK (this. href, '','', 'res', '2 ','')
}
} "Href =" oracle_news/2004_12_31_server_configuration.htm "> server configuration in Oracle Database 10g
Oracle create database documentation
{
Function onmousedown ()
{
Return CLK (this. href, '','', 'res', '1 ','')
}
} "Href =" o10g_20.htm "> Oracle 10g automatic create database dbca
{
Function onmousedown ()
{
Return CLK (this. href, '','', 'res', '2 ','')
}
} "Href =" oracle_news/2004_2_8_rittman.htm "> Oracle9i dbca database creation assistant templates
{
Function onmousedown ()
{
Return CLK (this. href, '','', 'res', '3 ','')
}
} "Href =" t_oracle10g_389_rac_database_.htm "> RAC grid database creation dbca