同1台机器建两个数据库和两个监听的建法

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:775

gwtest01/u01/oracle/app/oracle/product/10.2.0.3/network/admin>ps -ef|grep ora_
oracle 270402 1 0 19:21:36 - 0:00 ora_s000_gwpbkf1
oracle 286882 1 0 19:21:36 - 0:05 ora_mmon_gwpbkf1
oracle 295058 1 0 19:21:36 - 0:08 ora_cjq0_gwpbkf1
oracle 299234 1 0 19:21:36 - 0:00 ora_reco_gwpbkf1
oracle 303212 1 0 19:21:36 - 0:03 ora_smon_gwpbkf1
oracle 307426 1 0 19:21:36 - 0:01 ora_lgwr_gwpbkf1
oracle 311346 1 0 19:21:36 - 0:04 ora_ckpt_gwpbkf1
oracle 323592 1 0 19:58:22 - 0:00 ora_s000_gwpbkf2
oracle 413882 1 0 19:58:30 - 0:38 ora_qmnc_gwpbkf2
oracle 422096 1 0 19:21:36 - 0:14 ora_mmnl_gwpbkf1
oracle 1183984 1 0 19:21:36 - 0:00 ora_d000_gwpbkf1
oracle 2633740 1 0 19:58:21 - 0:03 ora_smon_gwpbkf2
oracle 2650224 1 0 19:58:21 - 0:04 ora_ckpt_gwpbkf2
oracle 2666686 1 0 19:58:21 - 0:01 ora_lgwr_gwpbkf2
oracle 2670830 1 0 21:21:37 - 0:00 ora_q003_gwpbkf2
oracle 2703540 1 0 19:58:21 - 0:01 ora_dbw1_gwpbkf2
oracle 2723934 1 0 19:58:21 - 0:00 ora_mman_gwpbkf2
oracle 2732090 1 0 19:58:21 - 0:01 ora_dbw0_gwpbkf2
oracle 2842864 283086 0 16:16:08 pts/0 0:00 grep ora_
oracle 352724 1 0 19:21:36 - 0:00 ora_psp0_gwpbkf1
oracle 373074 1 0 19:21:36 - 0:07 ora_pmon_gwpbkf1
oracle 385322 1 0 19:21:36 - 0:01 ora_dbw0_gwpbkf1
oracle 1249580 1 0 19:21:36 - 0:00 ora_mman_gwpbkf1
oracle 4133290 1 0 19:58:22 - 0:00 ora_d000_gwpbkf2
oracle 4157910 1 0 19:21:54 - 0:00 ora_q000_gwpbkf1
oracle 4219338 1 0 19:21:44 - 0:00 ora_qmnc_gwpbkf1
oracle 4567486 1 0 19:21:36 - 0:01 ora_dbw1_gwpbkf1
oracle 4583742 1 0 19:58:22 - 0:14 ora_mmnl_gwpbkf2
oracle 4600188 1 0 19:58:21 - 0:05 ora_mmon_gwpbkf2
oracle 4624670 1 0 19:58:21 - 0:08 ora_cjq0_gwpbkf2
oracle 4628782 1 0 19:58:21 - 0:00 ora_reco_gwpbkf2
oracle 4727112 1 0 21:18:11 - 0:00 ora_q001_gwpbkf1
oracle 4731266 1 0 19:58:21 - 0:00 ora_psp0_gwpbkf2
oracle 4743586 1 0 19:58:21 - 0:06 ora_pmon_gwpbkf2
oracle 4755804 1 0 19:58:40 - 0:00 ora_q000_gwpbkf2
gwtest01/u01/oracle/app/oracle/product/10.2.0.3/network/admin>
gwtest01/u01/oracle/app/oracle/product/10.2.0.3/network/admin>ps -ef|grep tns
oracle 331996 1 0 15:34:40 - 0:00 /u01/oracle/app/oracle/product/10.2.0.3/bin/tnslsnr GWPBKF2_LISTENER -inherit
oracle 2842866 283086 0 16:16:34 pts/0 0:00 grep tns
oracle 4718910 1 0 15:30:17 pts/0 0:00 /u01/oracle/app/oracle/product/10.2.0.3/bin/tnslsnr GWPBKF1_LISTENER -inherit
gwtest01/u01/oracle/app/oracle/product/10.2.0.3/network/admin>
gwtest01/u01/oracle>export ORACLE_SID=gwpbkf1
gwtest01/u01/oracle>sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Feb 8 13:24:14 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn /as sysdba;
Connected.
SQL> select DBID,NAME,DB_UNIQUE_NAME from v$database;
DBID NAME DB_UNIQUE_NAME
---------- --------- ------------------------------
780705974 GWPBKF1 gwpbkf1
SQL>
gwtest01/u01/oracle>export ORACLE_SID=gwpbkf2
gwtest01/u01/oracle>sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Feb 8 13:22:41 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn /as sysdba;
Connected.
SQL> select DBID,NAME,DB_UNIQUE_NAME from v$database;
DBID NAME DB_UNIQUE_NAME
---------- --------- ------------------------------
554037770 GWPBKF2 gwpbkf2
-----------------------------------------------------------------------------------------
gwtest01/u01/oracle/app/oracle/product/10.2.0.3/network/admin>cat listener.ora
# listener.ora Network Configuration File: /u01/oracle/app/oracle/product/10.2.0.3/network/admin/listener.ora
# Generated by Oracle configuration tools.
GWPBKF1_LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gwtest01)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
SID_LIST_GWPBKF1_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/oracle/app/oracle/product/10.2.0.3)
(PROGRAM = extproc)
)
)
GWPBKF2_LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gwtest01)(PORT = 1522))
)
)
gwtest01/u01/oracle/app/oracle/product/10.2.0.3/network/admin>
gwtest01/u01/oracle/app/oracle/product/10.2.0.3/network/admin>cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/oracle/app/oracle/product/10.2.0.3/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
gwtest01/u01/oracle/app/oracle/product/10.2.0.3/network/admin>
--------------------------------------------------------------------------------------------------------------------
gwtest01/u01/oracle>sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 - Production on Thu Feb 9 08:18:15 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn /as sysdba;
Connected.
SQL> select DBID,NAME,DB_UNIQUE_NAME from v$database;
DBID NAME DB_UNIQUE_NAME
---------- --------- ------------------------------
780705974 GWPBKF1 gwpbkf1
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
gwtest01/u01/oracle>export ORACLE_SID=gwpbkf2
gwtest01/u01/oracle>sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 - Production on Thu Feb 9 08:19:32 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn /as sysdba;
Connected.
SQL> select DBID,NAME,DB_UNIQUE_NAME from v$database;
DBID NAME DB_UNIQUE_NAME
---------- --------- ------------------------------
554037770 GWPBKF2 gwpbkf2
SQL>

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】