Oracle 12c Installation.
In my test machine I installed Oracle 12c into 64 bit OEL6.4
For installation of 12c you need a good configuration of server with atleast 8GB of RAM.
Software Download Location.
1. OTN
Preinstallation.
Install the following RPMs.
rpm -ivh binutils
rpm -ivh compat-libcap1
rpm -ivh compat-libstdc++-33
rpm -ivh compat-libstdc++-33.i686
rpm -ivh gcc
rpm -ivh gcc-c++
rpm -ivh glibc
rpm -ivh glibc.i686
rpm -ivh glibc-devel
rpm -ivh glibc-devel.i686
rpm -ivh ksh
rpm -ivh libgcc
rpm -ivh libgcc.i686
rpm -ivh libstdc++
rpm -ivh libstdc++.i686
rpm -ivh libstdc++-devel
rpm -ivh libstdc++-devel.i686
rpm -ivh libaio
rpm -ivh libaio.i686
rpm -ivh libaio-devel
rpm -ivh libaio-devel.i686
rpm -ivh libXext
rpm -ivh libXext.i686
rpm -ivh libXtst
rpm -ivh libXtst.i686
rpm -ivh libX11
rpm -ivh libX11.i686
rpm -ivh libXau
rpm -ivh libXau.i686
rpm -ivh libxcb
rpm -ivh libxcb.i686
rpm -ivh libXi
rpm -ivh libXi.i686
rpm -ivh make
rpm -ivh sysstat
rpm -ivh unixODBC
rpm -ivh unixODBC-devel
rpm -ivh compat-libcap1
rpm -ivh compat-libstdc++-33
rpm -ivh compat-libstdc++-33.i686
rpm -ivh gcc
rpm -ivh gcc-c++
rpm -ivh glibc
rpm -ivh glibc.i686
rpm -ivh glibc-devel
rpm -ivh glibc-devel.i686
rpm -ivh ksh
rpm -ivh libgcc
rpm -ivh libgcc.i686
rpm -ivh libstdc++
rpm -ivh libstdc++.i686
rpm -ivh libstdc++-devel
rpm -ivh libstdc++-devel.i686
rpm -ivh libaio
rpm -ivh libaio.i686
rpm -ivh libaio-devel
rpm -ivh libaio-devel.i686
rpm -ivh libXext
rpm -ivh libXext.i686
rpm -ivh libXtst
rpm -ivh libXtst.i686
rpm -ivh libX11
rpm -ivh libX11.i686
rpm -ivh libXau
rpm -ivh libXau.i686
rpm -ivh libxcb
rpm -ivh libxcb.i686
rpm -ivh libXi
rpm -ivh libXi.i686
rpm -ivh make
rpm -ivh sysstat
rpm -ivh unixODBC
rpm -ivh unixODBC-devel
Configure the linux kernel for Oracle processes.
[root@test ~]# cat >> /etc/sysctl.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
[root@test ~]# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmall = 4294967296
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
Configure the Linux for Oracle processes and files.
[root@test ~]# cat >> /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
Create the new groups and users for oracle administration.
[root@test yum.repos.d]# vim /etc/security/limits.d/90-nproc.conf
root soft nproc unlimited
* - nproc 16384
Save the file.
Disable the secure linux and firewall.
[root@test yum.repos.d]# setenforce Permissive
[root@test yum.repos.d]# vim /etc/selinux/config
SELINUX=permissive
Save the file.
[root@test yum.repos.d]# service iptables stop
[root@test yum.repos.d]# chkconfig iptables off
Create the new groups and users for oracle administration.
[root@test yum.repos.d]# groupadd oinstall
[root@test yum.repos.d]# groupadd dba
[root@test yum.repos.d]# groupadd oper
[root@test yum.repos.d]# groupadd asmadmin
[root@test yum.repos.d]# useradd -g oinstall -G dba,oper,asmadmin oracle
[root@test yum.repos.d]# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@test yum.repos.d]# mkdir -p /u01/app/oracle/product/12.1.0/db_1
[root@test yum.repos.d]# chown -R oracle:oinstall /u01
[root@test yum.repos.d]# chmod -R 775 /u01
[root@test yum.repos.d]# su - oracle
[oracle@test ~]$ vim .bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=test.oracle.com
export ORACLE_UNQNAME=cdb12c
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=cdb12c
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Save the file.
[oracle@test ~]$ source ~/.bash_profile
[oracle@test ~]$ echo $ORACLE_SID
cdb12c
[root@test yum.repos.d]# chown -R oracle:oinstall /u01
[root@test yum.repos.d]# chmod -R 775 /u01
[root@test yum.repos.d]# su - oracle
[oracle@test ~]$ vim .bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=test.oracle.com
export ORACLE_UNQNAME=cdb12c
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=cdb12c
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Save the file.
[oracle@test ~]$ source ~/.bash_profile
[oracle@test ~]$ echo $ORACLE_SID
cdb12c
Lets begin the installation.
Run the .runInstaller from the Database installation directory.
Here my Container database is 'CDB12C' and Pluggable database is 'PDBORCL'.
Run the .runInstaller from the Database installation directory.
Here my Container database is 'CDB12C' and Pluggable database is 'PDBORCL'.
The Installation has been completed.
Let configure the TNSnames.ora and Listener.ora file for Pluggable database.
[oracle@test admin]$ vim listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = test.oracle.com)(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PDBORCL)
(ORACLE_HOME = /u01/app/oracle/product/12.1.0/db_1)
)
)
[oracle@test admin]$ vim tnsnames.ora
PDBORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = test.oracle.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = pdborcl.oracle.com)
)
)
CDB12C =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = test.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = cdb12c.oracle.com)
)
)
Lets check the Container and Pluggable Database status.
[oracle@test admin]$ sqlplus "/as sysdba"
SQL*Plus: Release 12.1.0.1.0 Production on Fri Aug 23 20:45:53 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select NAME,CON_ID,CDB,CON_DBID,DBID from v$database;
NAME CON_ID CDB CON_DBID DBID
--------- ---------- --- ---------- ----------
CDB12C 0 YES 4022780829 4022780829
SQL> select CON_ID,DBID,NAME,OPEN_MODE from v$pdbs;
CON_ID DBID NAME OPEN_MODE
---------- ---------- ------------------------------ ----------
2 4066732052 PDB$SEED READ ONLY
3 2271299207 PDBORCL READ WRITE
Note. In 12c CON_ID represents types of Container.
CON_ID Container
0 Database
1 Root
2 Seed
3...252 Pluggable Database
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
NAME CON_ID CON_NAME
-------------------- ---------- ------------------------------
pdborcl.oracle.com 3 PDBORCL
cdb12cXDB 1 CDB$ROOT
cdb12c.oracle.com 1 CDB$ROOT
SYS$BACKGROUND 1 CDB$ROOT
SYS$USERS 1 CDB$ROOT
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/cdb12c/system01.dbf
/u01/app/oracle/oradata/cdb12c/sysaux01.dbf
/u01/app/oracle/oradata/cdb12c/undotbs01.dbf
/u01/app/oracle/oradata/cdb12c/users01.dbf
Note. Pluggable database doesn't contain undo tablespace in 12c.
SQL> alter session set container=pdborcl;
Session altered.
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/cdb12c/pdborcl/system01.dbf
/u01/app/oracle/oradata/cdb12c/pdborcl/sysaux01.dbf
/u01/app/oracle/oradata/cdb12c/pdborcl/SAMPLE_SCHEMA_users01.dbf
/u01/app/oracle/oradata/cdb12c/pdborcl/example01.dbf
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
TEMP
USERS
EXAMPLE
SQL> show con_name
CON_NAME
------------------------------
PDBORCL
Open and shut down the Pluggable database.
SQL> alter pluggable database pdborcl close immediate;
Pluggable database altered.
SQL> select CON_ID,DBID,NAME,OPEN_MODE from v$pdbs;
CON_ID DBID NAME OPEN_MODE
---------- ---------- ------------------------------ ----------
3 2271299207 PDBORCL MOUNTED
SQL> alter pluggable database pdborcl open;
Pluggable database altered.
SQL> select CON_ID,DBID,NAME,OPEN_MODE from v$pdbs;
CON_ID DBID NAME OPEN_MODE
---------- ---------- ------------------------------ ----------
3 2271299207 PDBORCL READ WRITE
How to connect to Pluggable database.
SQL> conn sys/Oracle12@pdborcl as sysdba
Connected.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
CDB12C READ WRITE
SQL> select NAME from v$pdbs;
NAME
------------------------------
PDBORCL
Also there is no BG process for Pluggable database.
[oracle@test admin]$ ps -aef |grep ora_
oracle 9004 1 0 Aug22 ? 00:00:20 ora_pmon_cdb12c
oracle 9006 1 0 Aug22 ? 00:00:30 ora_psp0_cdb12c
oracle 9009 1 3 Aug22 ? 00:47:01 ora_vktm_cdb12c
oracle 9013 1 0 Aug22 ? 00:00:07 ora_gen0_cdb12c
oracle 9015 1 0 Aug22 ? 00:00:04 ora_mman_cdb12c
oracle 9019 1 0 Aug22 ? 00:00:06 ora_diag_cdb12c
oracle 9021 1 0 Aug22 ? 00:00:06 ora_dbrm_cdb12c
oracle 9023 1 0 Aug22 ? 00:02:03 ora_dia0_cdb12c
oracle 9025 1 0 Aug22 ? 00:00:12 ora_dbw0_cdb12c
oracle 9027 1 0 Aug22 ? 00:00:06 ora_lgwr_cdb12c
oracle 9029 1 0 Aug22 ? 00:00:38 ora_ckpt_cdb12c
oracle 9031 1 0 Aug22 ? 00:00:04 ora_lg00_cdb12c
oracle 9033 1 0 Aug22 ? 00:00:01 ora_lg01_cdb12c
oracle 9035 1 0 Aug22 ? 00:00:05 ora_smon_cdb12c
oracle 9037 1 0 Aug22 ? 00:00:01 ora_reco_cdb12c
oracle 9039 1 0 Aug22 ? 00:00:04 ora_lreg_cdb12c
oracle 9041 1 0 Aug22 ? 00:01:42 ora_mmon_cdb12c
oracle 9043 1 0 Aug22 ? 00:01:33 ora_mmnl_cdb12c
oracle 9045 1 0 Aug22 ? 00:00:01 ora_d000_cdb12c
oracle 9047 1 0 Aug22 ? 00:00:01 ora_s000_cdb12c
oracle 9065 1 0 Aug22 ? 00:00:01 ora_tmon_cdb12c
oracle 9067 1 0 Aug22 ? 00:00:04 ora_tt00_cdb12c
oracle 9069 1 0 Aug22 ? 00:00:04 ora_smco_cdb12c
oracle 9071 1 0 Aug22 ? 00:00:01 ora_aqpc_cdb12c
oracle 9076 1 0 Aug22 ? 00:01:18 ora_p000_cdb12c
oracle 9078 1 0 Aug22 ? 00:01:17 ora_p001_cdb12c
oracle 9080 1 0 Aug22 ? 00:01:18 ora_p002_cdb12c
oracle 9082 1 0 Aug22 ? 00:01:05 ora_p003_cdb12c
oracle 9084 1 0 Aug22 ? 00:00:03 ora_p004_cdb12c
oracle 9086 1 0 Aug22 ? 00:00:03 ora_p005_cdb12c
oracle 9088 1 0 Aug22 ? 00:00:02 ora_p006_cdb12c
oracle 9090 1 0 Aug22 ? 00:00:02 ora_p007_cdb12c
oracle 9121 1 0 Aug22 ? 00:02:02 ora_cjq0_cdb12c
oracle 9123 1 0 Aug22 ? 00:00:02 ora_w000_cdb12c
oracle 9155 1 0 Aug22 ? 00:00:01 ora_qm02_cdb12c
oracle 9159 1 0 Aug22 ? 00:00:01 ora_q002_cdb12c
oracle 9161 1 0 Aug22 ? 00:00:02 ora_q003_cdb12c
oracle 9650 1 0 Aug22 ? 00:00:02 ora_w001_cdb12c
oracle 11547 1 0 00:30 ? 00:00:01 ora_w002_cdb12c
oracle 11727 1 0 00:35 ? 00:00:01 ora_w003_cdb12c
oracle 11734 1 0 00:35 ? 00:00:01 ora_w004_cdb12c
oracle 13064 1 0 01:35 ? 00:00:01 ora_w005_cdb12c
oracle 13066 1 0 01:35 ? 00:00:01 ora_w006_cdb12c
oracle 13078 1 0 01:35 ? 00:00:01 ora_w007_cdb12c
oracle 13615 1 0 02:35 ? 00:00:01 ora_w008_cdb12c
oracle 13617 1 0 02:35 ? 00:00:01 ora_w009_cdb12c
oracle 24062 1 0 20:40 ? 00:00:00 ora_p008_cdb12c
oracle 24064 1 0 20:40 ? 00:00:00 ora_p009_cdb12c
oracle 24066 1 0 20:40 ? 00:00:00 ora_p00a_cdb12c
oracle 24068 1 0 20:40 ? 00:00:00 ora_p00b_cdb12c
oracle 24103 23002 0 20:45 pts/8 00:00:00 grep ora_
Hope this help.
Thanks for your time. :)
No comments:
Post a Comment