Search This Blog

Total Pageviews

Saturday 20 July 2013

Oracle Control file recovery

How to Recover an Accidentally Deleted Control file .....

Oracle Control file recovery 
Deleted a control file accidentally 
Recover control file 


SQL> connect scott/tiger

Connected.

SQL> create table test_control ( c_date date );  ------- create test table to check out test 

Table created.

SQL> insert into test_control values ( sysdate );

1 row created.

SQL> /

1 row created.

SQL> alter session set nls_date_format='dd-mm-yyyy hh24:mi:ss';

Session altered.

SQL> select * from test_control ;  

C_DATE

-------------------

20-07-2013 19:37:54

20-07-2013 19:37:56

SQL> !ls -ltr /u01/app/oracle/oradata/vihaan/control*

-rw-r----- 1 oracle oinstall 9748480 Jul 20 19:41 /u01/app/oracle/oradata/vihaan/control02.ctl

-rw-r----- 1 oracle oinstall 9748480 Jul 20 19:41 /u01/app/oracle/oradata/vihaan/control01.ctl

delete the contral file 

SQL> !rm /u01/app/oracle/oradata/vihaan/control*

SQL>  !ls -ltr /u01/app/oracle/oradata/vihaan/control*

ls: /u01/app/oracle/oradata/vihaan/control*: No such file or directory

SQL> archive log list;

ORA-00210: cannot open the specified control file

ORA-00202: control file: '/u01/app/oracle/oradata/vihaan/control01.ctl'

ORA-27041: unable to open file

Linux-x86_64 Error: 2: No such file or directory

In alert log file 

ALTER SYSTEM: Flushing buffer cache

Sat Jul 20 19:45:17 2013

Errors in file /u01/app/oracle/diag/rdbms/vihaan/vihaan/trace/vihaan_m000_4757.trc:

ORA-00210: cannot open the specified control file

ORA-00202: control file: '/u01/app/oracle/oradata/vihaan/control01.ctl'

ORA-27041: unable to open file

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

SQL> shutdown immediate ;

ORA-00210: cannot open the specified control file

ORA-00202: control file: '/u01/app/oracle/oradata/vihaan/control01.ctl'

ORA-27041: unable to open file

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Only shutdowm abort option left 

SQL> shutdown abort ;

ORACLE instance shut down.

Recovery Manager complete.

-bash-3.2$ rman

Recovery Manager: Release 11.2.0.3.0 - Production on Sat Jul 20 19:47:35 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target /

connected to target database (not started)

RMAN> startup nomount ;

Oracle instance started

Total System Global Area    1043886080 bytes

Fixed Size                     2234960 bytes

Variable Size                620758448 bytes

Database Buffers             415236096 bytes

Redo Buffers                   5656576 bytes

RMAN backup location


-bash-3.2$ cd /u01/RmanBackup/VIHAAN/

-bash-3.2$ ls -ltr

total 1056760

-rw-r----- 1 oracle oinstall    9830400 Jul 20 09:17 c-1662646448-20130720-02

-rw-r----- 1 oracle oinstall 1061232640 Jul 20 16:19 VIHAAN821290686_s18_s1

-rw-r----- 1 oracle oinstall     143872 Jul 20 16:19 VIHAAN821290772_s19_s1

-rw-r----- 1 oracle oinstall    9830400 Jul 20 16:19 c-1662646448-20130720-04

RMAN> connect target /

connected to target database: VIHAAN (not mounted)

Restore control file from backup

RMAN> restore controlfile from '/u01/RmanBackup/VIHAAN/c-1662646448-20130720-04';

Starting restore at 20-JUL-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=19 device type=DISK

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

output file name=/u01/app/oracle/oradata/vihaan/control01.ctl

output file name=/u01/app/oracle/oradata/vihaan/control02.ctl

Finished restore at 20-JUL-13

RMAN> sql 'alter database mount';

sql statement: alter database mount

RMAN>  RECOVER DATABASE;  ---- <<<<<< Imp Only recover no retore database  

Starting recover at 20-JUL-13

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=19 device type=DISK

starting media recovery

archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/oradata/vihaan/redo01.log

archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/oradata/vihaan/redo02.log

archived log for thread 1 with sequence 6 is already on disk as file /u01/app/oracle/oradata/vihaan/redo03.log

archived log file name=/u01/Archive/1_3_821290607.dbf thread=1 sequence=3

archived log file name=/u01/app/oracle/oradata/vihaan/redo01.log thread=1 sequence=4

archived log file name=/u01/app/oracle/oradata/vihaan/redo02.log thread=1 sequence=5

archived log file name=/u01/app/oracle/oradata/vihaan/redo03.log thread=1 sequence=6

media recovery complete, elapsed time: 00:00:00

Finished recover at 20-JUL-13

RMAN> exit

SQL> connect / as sysdba

Connected.

SQL>  alter database open resetlogs ;

SQL> connect scott/tiger

Connected.

SQL>  alter session set nls_date_format='dd-mm-yyyy hh24:mi:ss';

Session altered.

SQL> select * from test_control ;  ---- all the row are back :)

C_DATE

-------------------

20-07-2013 19:37:54

20-07-2013 19:37:56

Thursday 18 July 2013

Oracle  Database Releases Dates and support dates ? Oracle Database Patch Set Release Roadmap !!!!

Release Schedule of Current Database Releases [ID 742060.1]

Oracle Database (RDBMS) Releases Support Status Summary [ID 161818.1]

metalink 742060.1



Tuesday 16 July 2013

How to connect pluggable database in oracle 12c?

How to connect pluggable database in oracle 12c?

 
create pluggable database.


create pluggable database anujv admin user vihaan identified by vihaan;



alter pluggable database anujv open;
or
alter pluggable database all open


col name format a15
SQL> r
  1* select name, con_id from v$active_services



NAME                CON_ID
--------------- ----------
anujv                    5 <<<->Oracle will create this service automatically   
anuj2                    4
anuj1                    3
vihaanXDB                1
vihaan                   1
SYS$BACKGROUND           1
SYS$USERS                1



7 rows selected.




col PDB_NAME format a20
select pdb_name, status from cdb_pdbs



PDB_NAME             STATUS
-------------------- -------------
ANUJV                NORMAL




alter pluggable database anujv open ;




--- create user in pluggable database.



alter session set container=anujv;



create user vihaan1 identified by vihaan1;



SQL> grant connect,resource to vihaan1 ;
Grant succeeded.







edit tnsnames.ora



cd $ORACLE_HOME/network/admin




anujv =
 (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.85.129)(PORT = 1521)))
 (CONNECT_DATA =
 (SERVICE_NAME = anujv)
 )
  )







[oracle@localhost admin]$ sqlplus vihaan1/vihaan1@anujv
                                   user / password@tnsname entry



SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 16 19:58:05 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




or



with out tnsnames.ora entry



sqlplus vihaan1/vihaan1@localhost:1521/anujv
 
sqlplus vihaan1/vihaan1@192.168.85.129:1521/anujv



[oracle@localhost admin]$ sqlplus vihaan1/vihaan1@192.168.85.129:1521/anujv



SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 16 20:10:14 2013



Copyright (c) 1982, 2013, Oracle.  All rights reserved.



Last Successful login time: Tue Jul 16 2013 20:04:31 +01:00



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



[oracle@ora-prim ~]$ export TWO_TASK=//192.168.0.71:1521/vihaan
[oracle@ora-prim ~]$ sqlplus anuj/vihaan


SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 8 11:10:02 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Last Successful login time: Thu Dec 08 2016 10:02:09 +00:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


or

[oracle@ora-prim ~]$ export TWO_TASK=192.168.0.71:1521/vihaan
[oracle@ora-prim ~]$ sqlplus anuj/vihaan

SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 8 11:11:00 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Last Successful login time: Thu Dec 08 2016 11:10:03 +00:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options



[oracle@ora-prim ~]$ sqlplus system/sys@192.168.0.71:1521/vihaan

SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 8 10:01:01 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

or



 admin]$ pwd
/u01/app/oracle/product/12.1.0.2/db_1/network/admin


vi tnsnames.ora

add this .. 

anuj1 =
 (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)))
 (CONNECT_DATA =
 (SERVICE_NAME = ANUJ)
 )
  )


sqlplus test1/test@anuj1

SQL*Plus: Release 12.1.0.2.0 Production on Sun Apr 23 04:26:35 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Last Successful login time: Sun Apr 23 2017 04:00:42 -04:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

====

create or replace trigger open_pdbs
  AFTER STARTUP ON DATABASE
BEGIN
   EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE ALL OPEN';
END open_pdbs;
/
show errors

ALTER SESSION SET CONTAINER = ORCL;

REM exec DBMS_SERVICE.create_service('ORCL','ORCL');

REM exec DBMS_SERVICE.start_service('ORCL');

create or replace trigger start_ORCL_service
   after startup on database
begin
  sys.DBMS_SERVICE.start_service('ORCL');
end After_Startup;
/
show errors

======

Oracle 23c Pluggable !!!!!!!!!!!!!!!!!!!!!!

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - Production on Tue Nov 7 10:43:09 2023
Version 23.3.0.23.09

Copyright (c) 1982, 2023, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid credential or not authorized; logon denied
Help: https://docs.oracle.com/error-help/db/ora-01017/


unset TWO_TASK!!!!!!!!!!!!!! 


[oracle@localhost ~]$ unset TWO_TASK
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - Production on Tue Nov 7 10:45:20 2023
Version 23.3.0.23.09

Copyright (c) 1982, 2023, Oracle.  All rights reserved.


Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 FREEPDB1                       READ WRITE NO
SQL> alter session set container=FREEPDB1 ;

Session altered.

=====



[oracle@localhost ~]$ export ORACLE_PDB_SID=FREEPDB1
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - Production on Tue Nov 7 11:23:49 2023
Version 23.3.0.23.09

Copyright (c) 1982, 2023, Oracle.  All rights reserved.


Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 FREEPDB1                       READ WRITE NO
SQL>

======

unset TWO_TASK
conn hr/hr@//localhost:1521/freepdb1
Connected.


or with ip 

 sqlplus hr/hr@//192.168.0.70:1521/freepdb1

SQL*Plus: Release 23.0.0.0.0 - Production on Tue Nov 7 11:46:00 2023
Version 23.3.0.23.09

Copyright (c) 1982, 2023, Oracle.  All rights reserved.

Last Successful login time: Wed Sep 13 2023 19:50:31 +00:00

Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09

SQL> def
DEFINE _DATE           = "07-NOV-23" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "//192.168.0.70:1521/freepdb1" (CHAR)    <<<<<<<<<<<<---
DEFINE _USER           = "HR" (CHAR)
DEFINE _PRIVILEGE      = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "2303002309" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09" (CHAR)
DEFINE _O_RELEASE      = "2303002309" (CHAR)
SQL>

SQL> show user
USER is "HR"
SQL>

=======


export ORACLE_PDB_SID=FREEPDB1

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - Production on Sat Nov 11 12:12:17 2023
Version 23.3.0.23.09

Copyright (c) 1982, 2023, Oracle.  All rights reserved.


Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 FREEPDB1                       READ WRITE NO



===
whoami_pdb.sql

set line 300
col os_pid for a7
col tracefile for a80
col username for a15
col con_name for a10
col schemaname for a10
SELECT distinct s.con_id   , c.con_name       , s.username   , s.user#  , s.sid , s.serial# , s.prev_hash_value ,s.sql_id
, schemaname, p.spid os_pid
FROM V$SESSION S, v$process p, v$active_services c, (SELECT sid FROM v$mystat WHERE rownum=1) sid
WHERE audsid = SYS_CONTEXT('userenv','sessionid')
and p.addr = s.paddr 
and sid.sid = s.sid
and s.username is not null
and s.con_id=c.con_id
and s.con_id=p.con_id
 ;
 

 
    CON_ID CON_NAME   USERNAME             USER#        SID    SERIAL# PREV_HASH_VALUE SCHEMANAME OS_PID
---------- ---------- --------------- ---------- ---------- ---------- --------------- ---------- -------
         1 CDB$ROOT   SYS                      0       1625      10412      3590809577 SYS        131783


 


Sunday 7 July 2013

Oracle Grid infrastructure is not configured properly ASMCA needs Oracle Grid Infrastructure to configure ASM

Oracle Grid infrastructure is not configured properly ASMCA needs Oracle Grid Infrastructure to configure ASM

On Oracle 12c / Oracle 11gr2 for ASM on Stand-Alone Server




Run This srcipt again 

[root@localhost ~]# /u01/app/grid/product/12.1.0/grid/root.sh
Performing root user operation for Oracle 12c

The following environment variables are set as:
 ORACLE_OWNER= grid
 ORACLE_HOME= /u01/app/grid/product/12.1.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/u01/app/grid/product/12.1.0/grid/perl/bin/perl -I/u01/app/grid/product/12.1.0/grid/perl/lib -I/u01/app/grid/product/12.1.0/grid/crs/install /u01/app/grid/product/12.1.0/grid/crs/install/roothas.pl


To configure Grid Infrastructure for a Cluster execute the following command as grid user:
/u01/app/grid/product/12.1.0/grid/crs/config/config.sh
This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.


Then run this script for a Stand-Alone Server

[root@localhost ~]# /u01/app/grid/product/12.1.0/grid/perl/bin/perl -I/u01/app/grid/product/12.1.0/grid/perl/lib -I/u01/app/grid/product/12.1.0/grid/crs/install /u01/app/grid/product/12.1.0/grid/crs/install/roothas.pl
Using configuration parameter file: /u01/app/grid/product/12.1.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node localhost successfully pinned.
2013/07/07 19:59:44 CLSRSC-330: Adding Clusterware entries to file '/etc/inittab'


localhost 2013/07/07 20:00:17 /u01/app/grid/product/12.1.0/grid/cdata/localhost/backup_20130707_200017.olr
2013/07/07 20:00:18 CLSRSC-327: Successfully configured Oracle Grid Infrastructure for a Standalone Server
now run ASMCA again <<<<<<<<<<<<



Monday 1 July 2013

Oracle Database 12c Installation on Linux

Oracle Database 12c Release 1 (12.1) Installation On Centos 5.9 

Oracle Database 12c Installation ..

Installation Oracle Database 12c Release 1 (12.1)  On CentOS-5.9 or On linux 
Installation Oracle Database 12c


1.

we need 64 bit OS . Download this torrent and start downloading 

http://mirror.centos.org/centos/5.9/isos/x86_64/CentOS-5.9-x86_64-bin-DVD.torrent

sha1sum's for these torrent files:765b578facd7da42704ccd37ef4e498d40376785 CentOS-5.9-i386-bin-1to8.torrent
3f750a2c780aff30c982358c8727ec4a540389ef CentOS-5.9-x86_64-bin-1to9.torrent
d2bd38a60ea03a4370bbbd91b4e909a48c89835b CentOS-5.9-i386-bin-DVD.torrent
11326c888ad0290f5ccc7d4e26c2540438f56c35 CentOS-5.9-x86_64-bin-DVD.torrent



Install Centos
CentOS-5.9-x86_64-bin-DVD


2. Download Oracle Software from E-delivery

edelivery: Oracle Database 12c Release 1 (12.1.0.1) Software (64-bit)


https://edelivery.oracle.com/

Download following file for oracle 12c database 


file name 
V38500-01_1of2
V38500-02_1of2


-rw-r--r-- 1 root   root     1116527103 Jun 28 17:44 V38500-01_2of2.zip
-rw-r--r-- 1 root   root     1361028723 Jun 28 17:48 V38500-01_1of2.zip



unzip both the file you will get this dir 



In unix create following group and oracle user

groupadd dba
groupadd oinstall
groupadd asmdba
groupadd asmadmin
useradd -g oinstall -G dba,asmdba,asmadmin oracle

chown -R oracle:oinstall /home/oracle
chown -R oracle:oinstall database/
passwd oracle su - oracle Add the following lines at the end of the "/home/oracle/.bash_profile" file. # Oracle Settings export ORACLE_UNQNAME=vihaan export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1 export ORACLE_SID=vihaan 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 groupadd dba groupadd oinstall groupadd asmdba groupadd asmadmin useradd -g oinstall -G dba,asmdba,asmadmin oracle create following dir mkdir -p /u01/app/oracle/product/12.1.0/db_1 chown -R oracle:oinstall /u01 chmod -R 775 /u01 as root umount tmpfs vi /etc/fstab  ---add this line in mount -t tmpfs shmfs -o size=1300m /dev/shm vi /etc/sysctl.conf Add or amend the following lines in the "/etc/sysctl.conf" file. 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 /sbin/sysctl -p Add the following lines to the "/etc/security/limits.conf" file. oracle   soft   nofile   1024 oracle   hard   nofile   65536 oracle   soft   nproc    2047 oracle   hard   nproc    16384 oracle   soft   stack    10240 oracle   hard   stack    32768 Following 31 rpms/packages (or later version ) are required on Centos 5 / Oracle Linux 5 / Red Hat Enterprise Linux 5 for Oracle 12c 64 bit binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 compat-libstdc++-33-3.2.3 (32 bit) gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-58 glibc-2.5-58 (32 bit) glibc-devel-2.5-58 glibc-devel-2.5-58 (32 bit) ksh libaio-0.3.106 libaio-0.3.106 (32 bit) libaio-devel-0.3.106 libaio-devel-0.3.106 (32 bit) libgcc-4.1.2 libgcc-4.1.2 (32 bit) libstdc++-4.1.2 libstdc++-4.1.2 (32 bit) libstdc++-devel 4.1.2 libXext-1.0.1 libXext-1.0.1 (32 bit) libXtst-1.0.1 libXtst-1.0.1 (32 bit) libX11-1.0.3 libX11-1.0.3 (32 bit) libXau-1.0.1 libXau-1.0.1 (32 bit) libXi-1.0.1 libXi-1.0.1 (32 bit) make-3.81 sysstat-7.0.2 rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}  (%{ARCH})\n' binutils-2.17.50.0.6 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXext libXtst libXtst libX11 libXau libXi make sysstat binutils-2.17.50.0.6-20.el5_8.3  (x86_64) compat-libstdc++-33-3.2.3-61  (x86_64) compat-libstdc++-33-3.2.3-61  (i386) gcc-4.1.2-54.el5  (x86_64) gcc-c++-4.1.2-54.el5  (x86_64) glibc-2.5-107.el5_9.5  (x86_64) glibc-2.5-107.el5_9.5  (i686) glibc-devel-2.5-107.el5_9.5  (x86_64) glibc-devel-2.5-107.el5_9.5  (i386) ksh-20100621-12.el5  (x86_64) libaio-0.3.106-5  (x86_64) libaio-0.3.106-5  (i386) libaio-devel-0.3.106-5  (i386) libaio-devel-0.3.106-5  (x86_64) libgcc-4.1.2-54.el5  (x86_64) libgcc-4.1.2-54.el5  (i386) libstdc++-4.1.2-54.el5  (x86_64) libstdc++-4.1.2-54.el5  (i386) libstdc++-devel-4.1.2-54.el5  (x86_64) libstdc++-devel-4.1.2-54.el5  (i386) libXext-1.0.1-2.1  (x86_64) libXext-1.0.1-2.1  (i386) libXtst-1.0.1-3.1  (x86_64) libXtst-1.0.1-3.1  (i386) libXtst-1.0.1-3.1  (x86_64) libXtst-1.0.1-3.1  (i386) libX11-1.0.3-11.el5_7.1  (x86_64) libX11-1.0.3-11.el5_7.1  (i386) libXau-1.0.1-3.1  (x86_64) libXau-1.0.1-3.1  (i386) libXi-1.0.1-4.el5_4  (x86_64) libXi-1.0.1-4.el5_4  (i386) make-3.81-3.el5  (x86_64) sysstat-7.0.2-12.el5  (x86_64) [root@localhost ~]# yum -y install compat-libstdc++-33 Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.bytemark.co.uk * extras: mirror.sov.uk.goscomb.net * updates: mirror.sov.uk.goscomb.net Setting up Install Process Package compat-libstdc++-33-3.2.3-61.x86_64 already installed and latest version Package compat-libstdc++-33-3.2.3-61.i386 already installed and latest version Nothing to do or rpm -q binutils-2.17.50.0.6 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXext libXtst libXtst libX11 libXau libXi make sysstat --qf '%{name}.%{arch}\n'|sort rpm -q binutils-2.17.50.0.6 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXext libXtst libXtst libX11 libXau libXi make sysstat --qf '%{name}.%{arch}\n'|sort binutils.x86_64 compat-libstdc++-33.i386 compat-libstdc++-33.x86_64 gcc-c++.x86_64 gcc.x86_64 glibc-devel.i386 glibc-devel.x86_64 glibc.i686 glibc.x86_64 ksh.x86_64 libaio-devel.i386 libaio-devel.x86_64 libaio.i386 libaio.x86_64 libgcc.i386 libgcc.x86_64 libstdc++-devel.i386 libstdc++-devel.x86_64 libstdc++.i386 libstdc++.x86_64 libX11.i386 libX11.x86_64 libXau.i386 libXau.x86_64 libXext.i386 libXext.x86_64 libXi.i386 libXi.x86_64 libXtst.i386 libXtst.i386 libXtst.x86_64 libXtst.x86_64 make.x86_64 sysstat.x86_64 Install following rpm yum -y install binutils-2.17.50.0.6 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXext libXtst libXtst libX11 libXau libXi make sysstat or yum -y install  binutils-2* yum -y install  compat-libcap1-1.* yum -y install  compat-libstdc++-33-* yum -y install  compat-libstdc* yum -y install  gcc-4.* yum -y install  gcc-c++-4.* yum -y install  glibc-2.12* yum -y install  glibc-2.* yum -y install  glibc-devel-2.* yum -y install  ksh yum -y install  libgcc-4.* yum -y install  libstdc++-4.* yum -y install  libstdc++-devel-4.* yum -y install  libaio-0.* yum -y install  libaio-0.3.* yum -y install  libaio-devel-0.3.* yum -y install  libXext-1.* yum -y install  libXtst-1.* yum -y install  libX11-1.* yum -y install  libXau-1.* yum -y install  libxcb-1.* yum -y install  libXi-1.* yum -y install  make-3.* yum -y install  sysstat*   ===================================
 editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
SELINUX=permissive
su - oracle as a oracle cd database ./runInstaller [root@localhost tmp]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [root@localhost tmp]# /u01/app/oracle/product/12.1.0/db_1/root.sh Performing root user operation for Oracle 12c The following environment variables are set as:    ORACLE_OWNER= oracle    ORACLE_HOME=  /u01/app/oracle/product/12.1.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]:   Copying dbhome to /usr/local/bin ...   Copying oraenv to /usr/local/bin ...   Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. [oracle@localhost ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Sun Jun 30 14:52:23 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> def DEFINE _DATE           = "30-JUN-13" (CHAR) DEFINE _CONNECT_IDENTIFIER = "vihaan" (CHAR) DEFINE _USER           = "SYS" (CHAR) DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR) DEFINE _SQLPLUS_RELEASE = "1201000100" (CHAR) DEFINE _EDITOR         = "ed" (CHAR) DEFINE _O_VERSION      = "Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options" (CHAR) DEFINE _O_RELEASE      = "1201000100" (CHAR) SQL> select INSTANCE_NAME,VERSION from v$instance ; INSTANCE_NAME    VERSION ---------------- ----------------- vihaan           12.1.0.1.0

Oracle DBA

anuj blog Archive