注:以下步骤是一个实例,参考者注意修改参数值,比如用户名,SID,端口等(注意红色部分)!
1. 创建帐务数据库用户:ora_bill
useradd -d /LCdisk/oradata/bill -g dba ora_bill
root:/LCdisk/oradata/bill>passwd ora_bill
su – ora_bill
2. 创建环境变量ORACLE_SID=testbill;
3.创建文件
oracle:/home/oracle/product/9.2.0/dbs>more inittestacct.ora>inittestbill.ora
root:/home/oracle/product/9.2.0/dbs>chown ora_bill inittestbill.ora
添加该文件内容
#cache and I/O
DB_BLOCK_SIZE=8192
DB_CACHE_SIZE=20971520
# Cursors and Library Cache
#CURSOR_SHARING=SIMILAR
OPEN_CURSORS=300
# Diagnostics and Statistics
BACKGROUND_DUMP_DEST='/LCdisk/oradata/bill/admin/bdump'
CORE_DUMP_DEST=/LCdisk/oradata/bill/admin/cdump
#TIMED_STATISTICS=TRUE
USER_DUMP_DEST='/LCdisk/oradata/bill/admin/udump'
# Control File Configuration
control_files = ("/LCdisk/oradata/bill/ctlfile1", "/LCdisk/oradata/bill/ctlfile2")
# Archive
LOG_ARCHIVE_DEST_1='LOCATION=/LCdisk/oradata/bill/archive'
LOG_ARCHIVE_FORMAT=%t_%s.dbf
LOG_ARCHIVE_START=FALSE
# Shared Server
# Uncomment and use first DISPATCHES parameter below when your listener is
# configured for SSL
# (listener.ora and sqlnet.ora)
# DISPATCHERS = "(PROTOCOL=TCPS)(SER=MODOSE)",
dispatchers='(PROTOCOL=TCP) (SERVICE=testbillXDB)'
# Miscellaneous
COMPATIBLE=9.2.0
DB_NAME=testbill
INSTANCE_NAME=testbill
Manually Creating an Oracle Database
# Pools
JAVA_POOL_SIZE=31457280
LARGE_POOL_SIZE=1048576
SHARED_POOL_SIZE=52428800
# Processes and Sessions
PROCESSES=150
# Redo Log and Recovery
#FAST_START_MTTR_TARGET=300
# Resource Manager
#RESOURCE_MANAGER_PLAN=SYSTEM_PLAN
# Sort, Hash Joins, Bitmap Indexes
SORT_AREA_SIZE=524288
# Automatic Undo Management
UNDO_MANAGEMENT=AUTO
UNDO_TABLESPACE=undotbs
4.修改文件
ora_bill:/home/oracle/product/9.2.0/network/admin>vi listener.ora
添加内容
LISTENER3=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.8.91)(PORT = 1525))
)
SID_LIST_LISTENER3 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = testbill)
(ORACLE_HOME = /home/oracle/product/9.2.0)
(SID_NAME = testbill)
)
)
5.修改文件
ora_bill:/home/oracle/product/9.2.0/network/admin>vi tnsnames.ora
添加内容
TESTBILL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.8.91)(PORT = 1525))
)
(CONNECT_DATA =
(SERVICE_NAME = testbill)
)
)
6.创建目录
ora_bill:/LCdisk/oradata/bill/admin/udump>
ora_bill:/LCdisk/oradata/bill/admin/bdump>
ora_bill:/LCdisk/oradata/bill/admin/cdump>
root:/LCdisk/oradata/bill/admin>chown oracle *
root:/LCdisk/oradata/bill>chmod -R 777 admin
root:/LCdisk/oradata/bill/admin>su - ora_bill
7.创建数据库实例
ora_bill:/LCdisk>sqlplus /nolog
SQL> conn / as sysdba
SQL> startup nomount
SQL> CREATE DATABASE TESTBILL
2 USER SYS IDENTIFIED BY hncs
3 USER SYSTEM IDENTIFIED BY hncs
4 LOGFILE GROUP 1 ('/LCdisk/oradata/bill/redo01.log') SIZE 256M,
5 GROUP 2 (
阅读(635) | 评论(0) | 转发(0) |
1. 创建帐务数据库用户:ora_bill
useradd -d /LCdisk/oradata/bill -g dba ora_bill
root:/LCdisk/oradata/bill>passwd ora_bill
su – ora_bill
2. 创建环境变量ORACLE_SID=testbill;
3.创建文件
oracle:/home/oracle/product/9.2.0/dbs>more inittestacct.ora>inittestbill.ora
root:/home/oracle/product/9.2.0/dbs>chown ora_bill inittestbill.ora
添加该文件内容
#cache and I/O
DB_BLOCK_SIZE=8192
DB_CACHE_SIZE=20971520
# Cursors and Library Cache
#CURSOR_SHARING=SIMILAR
OPEN_CURSORS=300
# Diagnostics and Statistics
BACKGROUND_DUMP_DEST='/LCdisk/oradata/bill/admin/bdump'
CORE_DUMP_DEST=/LCdisk/oradata/bill/admin/cdump
#TIMED_STATISTICS=TRUE
USER_DUMP_DEST='/LCdisk/oradata/bill/admin/udump'
# Control File Configuration
control_files = ("/LCdisk/oradata/bill/ctlfile1", "/LCdisk/oradata/bill/ctlfile2")
# Archive
LOG_ARCHIVE_DEST_1='LOCATION=/LCdisk/oradata/bill/archive'
LOG_ARCHIVE_FORMAT=%t_%s.dbf
LOG_ARCHIVE_START=FALSE
# Shared Server
# Uncomment and use first DISPATCHES parameter below when your listener is
# configured for SSL
# (listener.ora and sqlnet.ora)
# DISPATCHERS = "(PROTOCOL=TCPS)(SER=MODOSE)",
dispatchers='(PROTOCOL=TCP) (SERVICE=testbillXDB)'
# Miscellaneous
COMPATIBLE=9.2.0
DB_NAME=testbill
INSTANCE_NAME=testbill
Manually Creating an Oracle Database
# Pools
JAVA_POOL_SIZE=31457280
LARGE_POOL_SIZE=1048576
SHARED_POOL_SIZE=52428800
# Processes and Sessions
PROCESSES=150
# Redo Log and Recovery
#FAST_START_MTTR_TARGET=300
# Resource Manager
#RESOURCE_MANAGER_PLAN=SYSTEM_PLAN
# Sort, Hash Joins, Bitmap Indexes
SORT_AREA_SIZE=524288
# Automatic Undo Management
UNDO_MANAGEMENT=AUTO
UNDO_TABLESPACE=undotbs
4.修改文件
ora_bill:/home/oracle/product/9.2.0/network/admin>vi listener.ora
添加内容
LISTENER3=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.8.91)(PORT = 1525))
)
SID_LIST_LISTENER3 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = testbill)
(ORACLE_HOME = /home/oracle/product/9.2.0)
(SID_NAME = testbill)
)
)
5.修改文件
ora_bill:/home/oracle/product/9.2.0/network/admin>vi tnsnames.ora
添加内容
TESTBILL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.8.91)(PORT = 1525))
)
(CONNECT_DATA =
(SERVICE_NAME = testbill)
)
)
6.创建目录
ora_bill:/LCdisk/oradata/bill/admin/udump>
ora_bill:/LCdisk/oradata/bill/admin/bdump>
ora_bill:/LCdisk/oradata/bill/admin/cdump>
root:/LCdisk/oradata/bill/admin>chown oracle *
root:/LCdisk/oradata/bill>chmod -R 777 admin
root:/LCdisk/oradata/bill/admin>su - ora_bill
7.创建数据库实例
ora_bill:/LCdisk>sqlplus /nolog
SQL> conn / as sysdba
SQL> startup nomount
SQL> CREATE DATABASE TESTBILL
2 USER SYS IDENTIFIED BY hncs
3 USER SYSTEM IDENTIFIED BY hncs
4 LOGFILE GROUP 1 ('/LCdisk/oradata/bill/redo01.log') SIZE 256M,
5 GROUP 2 (
给主人留下些什么吧!~~