Now, I will create database using OMF.
OMF (Oracle Manage Files) is a database feature, introduced in Oracle 9i, that simplifies tablespace creation. Using OMF, Oracle will automatically assign datafile names to tablespaces and automatically create and delete the required datafiles the operating-system level.
1. The first step is the same as before, but you needs to specify 2 new parameters:
db_create_file_dest and db_create_online_log_dest_n.
The db_create_file_dest specifies, where the datafiles will be placed.
The db_create_online_log_dest_n specifies, where the online logs will be placed. Use 1,2,3 instead of n, when you want to have 3 members in each group.
db_name=ocm11g
db_block_szie=8192
undo_management=auto
undo_tablespace=undotbs
control_files='/oracle/oradata/control01.ctl','/oracle/oradata/control02.ctl'
diagnostic_dest='/oracle/admin'
db_cache_szie=60M
shared_pool_size=100M
java_pool_size=25M
db_create_file_dest='/oracle/oradata'
db_create_online_log_dest_1='/oracle/oradata'
db_create_online_log_dest_2='/oracle/oradata'
2. Now, you can create a database:
sqlplus "/as sysdba"
startup nomount;
create database
user sys identified by **********
user system identified by *********
maxlogfiles 3
maxlogmembers 3
maxdatafiles 20
character set al32utf8
logfile group 1 size 50M blocksize 512, group 2 size 50M blocksize 512
default temporary tablespace temp tempfile size 200M uniform size 1M
undo tablespace undotbs datafile size 200M;
the database should be created and opened when the script will finish.
3. Now, you have to run the scripts again:
sqlplus "/as sysdba"
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
sqlplus system/******
@?/sqlplus/admin/pupbld.sql
4. Create a new default tablespace:
create tablespace users datafile size 20M;
alter database default tablesapce users;
When you want to create a new tablespace, it will be automatically created in the location specified by the db_create_file_dest parameter. You can change it with alter system set to create the datafile in the new location;
1. The first step is the same as before, but you needs to specify 2 new parameters:
db_create_file_dest and db_create_online_log_dest_n.
The db_create_file_dest specifies, where the datafiles will be placed.
The db_create_online_log_dest_n specifies, where the online logs will be placed. Use 1,2,3 instead of n, when you want to have 3 members in each group.
db_name=ocm11g
db_block_szie=8192
undo_management=auto
undo_tablespace=undotbs
control_files='/oracle/oradata/control01.ctl','/oracle/oradata/control02.ctl'
diagnostic_dest='/oracle/admin'
db_cache_szie=60M
shared_pool_size=100M
java_pool_size=25M
db_create_file_dest='/oracle/oradata'
db_create_online_log_dest_1='/oracle/oradata'
db_create_online_log_dest_2='/oracle/oradata'
2. Now, you can create a database:
sqlplus "/as sysdba"
startup nomount;
create database
user sys identified by **********
user system identified by *********
maxlogfiles 3
maxlogmembers 3
maxdatafiles 20
character set al32utf8
logfile group 1 size 50M blocksize 512, group 2 size 50M blocksize 512
default temporary tablespace temp tempfile size 200M uniform size 1M
undo tablespace undotbs datafile size 200M;
the database should be created and opened when the script will finish.
3. Now, you have to run the scripts again:
sqlplus "/as sysdba"
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
sqlplus system/******
@?/sqlplus/admin/pupbld.sql
4. Create a new default tablespace:
create tablespace users datafile size 20M;
alter database default tablesapce users;
When you want to create a new tablespace, it will be automatically created in the location specified by the db_create_file_dest parameter. You can change it with alter system set to create the datafile in the new location;