oracle的环境配置-单独创建数据库实例

单独创建数据库实例

数据库1    数据库2
ORCL        LAW  ------RDBMS(服务)
  |                  |
-----------------------
    安装数据库软件(DBMS)


单独再创建一个RDBMS--LAW

[root@oracle3 ~]# xhost +
access control disabled, clients can connect from any host  --自动启动了xmanager passive
[root@oracle3 ~]# su - oracle
[oracle@oracle3 ~]$ export DISPLAY="10.1.1.250:0.0"
[oracle@oracle3 ~]$ export LANG=en_US
[oracle@oracle3 ~]$ dbca   --注意:选择字符集为UTF8  不创建LAW的OEM

[oracle@oracle3 ~]$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 05-JUN-2014 14:31:51

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                05-JUN-2014 11:30:50
Uptime                    0 days 3 hr. 1 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle3)(PORT=1521)))
Services Summary...
Service "LAW" has 1 instance(s).                                              --监听的第一个实例LAW
  Instance "LAW", status READY, has 1 handler(s) for this service...
Service "LAWXDB" has 1 instance(s).
  Instance "LAW", status READY, has 1 handler(s) for this service...
Service "LAW_XPT" has 1 instance(s).
  Instance "LAW", status READY, has 1 handler(s) for this service...
Service "ORCL" has 1 instance(s).                                             --监听的第二个实例ORCL
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCL_XPT" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


                 ORCL          LAW(创建了不一定要在内存中存在,除非启动它)
                  |             |
                  ---------------
                    |
                  listener:1521
                    |
---------Linux----port:1521---------
                    |
                  外部连接
----------------------------------------------------------------------------------------
手工配置LAW的OEM

0、临时修改环境变量

[oracle@oracle3 ~]$ export ORACLE_SID=LAW

1、首先要启动LAW实例

2、运行配置工具配置
[oracle@oracle3 ~]$ emca -config dbcontrol db -repos recreate

EMCA 开始于 2014-6-5 15:40:12
EM Configuration Assistant 10.2.0.1.0 正式版
版权所有 (c) 2003, 2005, Oracle。保留所有权利。

输入以下信息:
数据库 SID: LAW
监听程序端口号: 1521
SYS 用户的口令:  
DBSNMP 用户的口令:  
SYSMAN 用户的口令:  
通知的电子邮件地址 (可选):
通知的发件 (SMTP) 服务器 (可选):
-----------------------------------------------------------------

已指定以下设置

数据库 ORACLE_HOME ................ /u01/oracle/product/10.2.0/db_1

数据库主机名 ................ oracle3
监听程序端口号 ................ 1521
数据库 SID ................ LAW
通知的电子邮件地址 ...............
通知的发件 (SMTP) 服务器 ...............

-----------------------------------------------------------------
是否继续? [yes(Y)/no(N)]: Y
2014-6-5 15:40:31 oracle.sysman.emcp.EMConfig perform
信息: 正在将此操作记录到 /u01/oracle/product/10.2.0/db_1/cfgtoollogs/emca/LAW/emca_2014-06-05_03-40-12-下午.log。
2014-6-5 15:40:32 oracle.sysman.emcp.EMReposConfig dropRepository
信息: 正在删除 EM 资料档案库 (此操作可能需要一段时间)...
2014-6-5 15:40:32 oracle.sysman.emcp.EMReposConfig invoke
信息: 已成功删除资料档案库
2014-6-5 15:40:32 oracle.sysman.emcp.EMReposConfig createRepository
信息: 正在创建 EM 资料档案库 (此操作可能需要一段时间)...
2014-6-5 15:41:59 oracle.sysman.emcp.EMReposConfig invoke
信息: 已成功创建资料档案库
2014-6-5 15:42:01 oracle.sysman.emcp.util.DBControlUtil startOMS
信息: 正在启动 Database Control (此操作可能需要一段时间)...
2014-6-5 15:43:43 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: 已成功启动 Database Control
2014-6-5 15:43:43 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: >>>>>>>>>>> Database Control URL 为 http://oracle3:5500/em <<<<<<<<<<<
已成功完成 Enterprise Manager 的配置
EMCA 结束于 2014-6-5 15:43:43

http://10.1.3.3:5500/em/console/aboutApplication
--------------------------------------------------------------------------------------------------------------------
删除一个数据库实例

[oracle@oracle3 ~]$ export ORACLE_SID=LAW
[oracle@oracle3 ~]$ dbca   --删除实例LAW

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。