当前位置: 代码迷 >> Oracle管理 >> aix环境下为oracle数据库新建一个实例, !
  详细解决方案

aix环境下为oracle数据库新建一个实例, !

热度:19   发布时间:2016-04-24 05:58:42.0
aix环境下为oracle数据库新建一个实例, 十万火急!!
怎么在aix环境下为oracle数据库新建一个实例,   比如test,并建立对应的用户(oracle数据库已经装好),十万火急!!

------解决方案--------------------
登录操作系统用dbca命令建立数据库,建好数据库后再建立用户
------解决方案--------------------
是数据库实例以装好,需要创建数据库吧。
在 图形界面下运行 dbca
------解决方案--------------------
./dbca
------解决方案--------------------
注:以下步骤只是一个参考实例,参考者注意修改参数值,比如用户名,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

修改以下文件
ora_bill:/home/oracle/product/9.2.0/network/admin> vi listener.ora
添加:
LISTENER3=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.91)(PORT = 1521))
)

SID_LIST_LISTENER3 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = testbill)
(ORACLE_HOME = /home/oracle/product/9.2.0)
(SID_NAME = testbill)
)
)

修改文件
ora_bill:/home/oracle/product/9.2.0/network/admin> vi tnsnames.ora
添加
TESTBILL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.91)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = testbill)
)
)

4. 创建目录
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

5. 创建数据库实例
ora_bill:/LCdisk> sqlplus /nolog
SQL> conn / as sysdba
SQL> startup nomount
SQL> CREATE DATABASE TESTBILL
2 USER SYS IDENTIFIED BY hncs
  相关解决方案