1 machine, more than 1 instance database

11 Nov

a. install software database oracle 11g
b. create database with dbca (GUI)

[oracle@isc ~]$ ORACLE_SID=isc; export ORACLE_SID
[oracle@isc ~]$ dbca
c. Again, create database with dbca (GUI)
[oracle@isc ~]$ ORACLE_SID=isc2; export ORACLE_SID
[oracle@isc ~]$ dbca

d. cek listener.ora
[oracle@isc ~]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
# Public
172.20.141.78 isc.localdomain isc

[oracle@isc ~]$ cat $ORACLE_HOME/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = isc.localdomain)(PORT = 1521))
)
)

e. cek tnsnames.ora
[oracle@isc ~]$ cat $ORACLE_HOME/network/admin/tnsnames.ora
ISC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = isc.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = isc2)
)
)

ISC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = isc.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = isc)
)
)
f. test connection
[oracle@isc ~]$ vi exit.sql
select * from dept;
exit;

[oracle@isc ~]$ sqlplus scott/tiger@isc @exit
SQL*Plus: Release 11.1.0.6.0 – Production on Fri Nov 14 04:48:47 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

DEPTNO DNAME LOC
———- ————– ————-
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@isc ~]$ sqlplus scott/tiger@isc2 @exit
SQL*Plus: Release 11.1.0.6.0 – Production on Fri Nov 14 04:48:47 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

DEPTNO DNAME LOC
———- ————– ————-
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

g. startup database
[oracle@isc ~]$ ORACLE_SID=isc; export ORACLE_SID
[oracle@isc ~]$ sqlplus / as sysdba
SQL> startup;
ORACLE instance started.
Total System Global Area 1389391872 bytes
Fixed Size 1299848 bytes
Variable Size 687868536 bytes
Database Buffers 687865856 bytes
Redo Buffers 12357632 bytes
Database mounted.
Database opened.
SQL> exit

[oracle@isc ~]$ ORACLE_SID=isc2; export ORACLE_SID
[oracle@isc ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 – Production on Fri Nov 14 04:40:38 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 1033670656 bytes
Fixed Size 1304448 bytes
Variable Size 285214848 bytes
Database Buffers 742391808 bytes
Redo Buffers 4759552 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@isc ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.1.0.6.0 – Production on 14-NOV-2008 04:40:26
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait…
TNSLSNR for Linux: Version 11.1.0.6.0 – Production
System parameter file is /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/isc/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=isc.localdomain)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.6.0 – Production
Start Date 14-NOV-2008 04:40:28
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/isc/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=isc.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully

h. shutdown database
[oracle@isc ~]$ ORACLE_SID=isc; export ORACLE_SID
[oracle@isc ~]$ sqlplus / as sysdba
SQL> shutdown;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

[oracle@isc ~]$ ORACLE_SID=isc2; export ORACLE_SID
[oracle@isc ~]$ sqlplus / as sysdba
SQL> shutdown;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

[oracle@isc ~]$ lsnrctl stop
LSNRCTL for Linux: Version 11.1.0.6.0 – Production on 14-NOV-2008 04:55:18
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: