1- Oracle’ın Database Configuration Assistant tool’u ile bi ikinci database’i ekleriz. (instance name: test)

2- listener dosyası aşağıda belirtilen şekilde düzenlenir;
listener.ora——————

LISTENER_1521 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oeripek)(PORT = 1521))
)
)
)

SID_LIST_LISTENER_1521 =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_2)
(SID_NAME = ORCL)
)
(SID_DESC =
(ORACLE_HOME = /u01/app/oracle/product/8.1.7/db_1)
(SID_NAME = TEST)
)
)

database kapatılır, sonra tekrar açılır.

——-for unix (solaris 5.10)———–

öncelikle test adında yeni bir database create ederiz;

# su oracle
$ cd /u02/app/oracle/product/10.2.0/db_1/bin
$ ./dbca

tns ve listener adreslerini aşağıdaki gibi düzenleriz;

tnsnames.ora

# tnsnames.ora Network Configuration File: /u02/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ordba)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)

ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ordba)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

listener.ora

# listener.ora Network Configuration File: /u02/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = ordba)(PORT = 1521))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /u02/app/oracle/product/10.2.0/db_1)
(SID_NAME = orcl)
)

(SID_DESC =
(ORACLE_HOME = /u02/app/oracle/product/10.2.0/db_1)
(SID_NAME = test)
)
)

listener’lar kapalı ise database’i start ederek de açabiliriz;

$ ./dbshut
$ ./dbstart
$ ./sqlplus

sql>conn sys/o@orcl as sysdba
sql>startup
sql>conn sys/o@test as sysdba
sql>startup
bash-3.00$ ./lsnrctl status

her iki instance’ın Enterprise Manager (em)’ini açmak için;

bash-3.00$ export ORACLE_SID=orcl
bash-3.00$ ./emctl status dbconsole
bash-3.00$ ./emctl stop dbconsole
bash-3.00$ ./emctl start dbconsole
bash-3.00$ .. http://ordba:1158/em…

bash-3.00$ export ORACLE_SID=test
bash-3.00$ ./emctl status dbconsole
bash-3.00$ ./emctl stop dbconsole
bash-3.00$ ./emctl start dbconsole
bash-3.00$ .. http://ordba:5500/em…