Monday, 19 October 2015

Fundamentals : Static Data Dictionary Views

Static Data Dictionary Views


Data dictionary tables are not directly accessible, but you can access information in them through data dictionary views.

To list the data dictionary views available to you, query the view DICTIONARY.

Many data dictionary tables have three corresponding views:

An ALL_ view displays all the information accessible to the current user, including information from the current user's schema as well as information from objects in other schemas, if the current user has access to those objects by way of grants of privileges or roles.

A DBA_ view displays all relevant information in the entire database. DBA_ views are intended only for administrators. They can be accessed only by users with the SELECT ANY DICTIONARY privilege. This privilege is assigned to the DBA role when the system is initially installed.

A USER_ view displays all the information from the schema of the current user. No special privileges are required to query these views.

Saturday, 17 October 2015

ORA - Errors

ORA - Errors



Index:

1. ORA-01013 : user requested cancel of current operation
2. ORA-01102 : cannot mount database in EXCLUSIVE mode
3. ORA-03135 : connection lost contact


Reference Documents: 

1. E49325-06Database Error Messages

PDF:  http://docs.oracle.com/database/121/ERRMG/E49325-06.pdf

Monday, 10 August 2015

Identify - Oracle Database Software Release

Identifying Your Oracle Database Software Release

Because Oracle Database continues to evolve and can require maintenance, Oracle periodically produces new releases. Not all customers initially subscribe to a new release or require specific maintenance for their existing release. As a result, multiple releases of the product exist simultaneously.

As many as five numbers may be required to fully identify a release. The significance of these numbers is discussed in the sections that follow.

Release Number Format

To understand the release nomenclature used by Oracle, examine the following example of an Oracle Database server labeled "Release 10.1.0.1.0".

Figure 1-1 Example of an Oracle Database Release Number




Description of Figure 1-1 follows
Description of "Figure 1-1 Example of an Oracle Database Release Number"

Note:
Starting with release 9.2, maintenance releases of Oracle Database are denoted by a change to the second digit of a release number. In previous releases, the third digit indicated a particular maintenance release.

Major Database Release Number

The first digit is the most general identifier. It represents a major new version of the software that contains significant new functionality.

Database Maintenance Release Number

The second digit represents a maintenance release level. Some new features may also be included.

Application Server Release Number

The third digit reflects the release level of the Oracle Application Server (OracleAS).

Component-Specific Release Number

The fourth digit identifies a release level specific to a component. Different components can have different numbers in this position depending upon, for example, component patch sets or interim releases.

Platform-Specific Release Number

The fifth digit identifies a platform-specific release. Usually this is a patch set. When different platforms require the equivalent patch set, this digit will be the same across the affected platforms.

Checking Your Current Release Number

To identify the release of Oracle Database that is currently installed and to see the release levels of other database components you are using, query the data dictionary view PRODUCT_COMPONENT_VERSION. A sample query follows. (You can also query the V$VERSION view to see component-level information.) Other product release levels may increment independent of the database server.

COL PRODUCT FORMAT A35
COL VERSION FORMAT A15
COL STATUS FORMAT A15
SELECT * FROM PRODUCT_COMPONENT_VERSION;

PRODUCT                                  VERSION     STATUS
---------------------------------------- ----------- -----------
NLSRTL                                   10.2.0.1.0  Production
Oracle Database 10g Enterprise Edition   10.2.0.1.0  Prod
PL/SQL                                   10.2.0.1.0  Production
...

Screenshot




It is important to convey to Oracle the results of this query when you report problems with the software.

Sunday, 2 August 2015

Happy Friendship Day

A True friend is hard to find... They are rare & one of kind.. I don't care if I have only few.. at least I have one of the best YOU.

Wednesday, 29 July 2015

The great man, Avul Pakir Jainulabdeen Abdul Kalam who bridged the gap between life and death, he is alive after his death.

Former President Dr APJ Abdul Kalam died on 27th July 2015 in Meghalaya where he had gone to address the Indian Institute of Management, Shillong. Dr Kalam collapsed on the stage in the middle of his speech.



Message from #MyHero

"My message, especially to young people is to have courage to think differently, courage to invent, to travel the unexplored path, courage to discover the impossible and to conquer the problems and succeed. These are great qualities that they must work towards. This is my message to the young people."

Monday, 13 July 2015

Instalation of 12c Database

Instalation of 12c Database

Environment//.bash_profile:

export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=db12cstby.profad.com
export ORACLE_UNQNAME=stby
export ORACLE_BASE=/u01/app/oracle 
export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/stby
export ORACLE_SID=stby
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


Step#1: Change Hostname


[root@db11g ~]# vi /etc/sysconfig/network
[root@db11g ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=db12cstby.profad.com
[root@db11g ~]# 
[root@db11g ~]# vi /etc/hostname
[root@db11g ~]# cat /etc/hostname
db12cstby.profad.com
[root@db11g ~]# 
[root@db11g ~]# cat /etc/hosts
[root@db11g ~]# vi /etc/hosts
[root@db11g ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               db11g.profad.com db11g localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
192.168.1.121 db12cstby.profad.com db12cstby

To reflect the changes:

[root@db11g ~]# service network restart
[root@db11g ~]# /etc/init.d/network restart

Step#2:  /etc/sysctl.conf

Edit Kernel Parameters /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
sysctl -p #Apply changes

Step#3:  /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 


Step#4:  RPM required for 12c installation

rpm -qa | grep -i <rpm_name>  ==> Check rpm is installed or not.
rpm -ivh <rpm_name> --nodeps ==> install rpm
compat-libcap1 ==> install
compat-libstdc++-33
compat-libstdc++-33.i686 ==> Install
gcc
gcc-c++
glibc
glibc.i686 ==> Instal
glibc-devel
glibc-devel.i686 ==> Instal
ksh
libgcc
libgcc.i686 ==> Instal
libstdc++
libstdc++.i686 ==>Install
libstdc++-devel
libstdc++-devel.i686 ==> Install
libaio
libaio.i686 ==> Install
libaio-devel
libaio-devel.i686 ==> Install
libXext
libXext.i686 ==> Install
libXtst
libXtst.i686 ==> Install
libX11
libX11.i686 ==> Install
libXau
libXau.i686 ==> Install
libxcb ==> Install
libxcb.i686 ==> Install
libXi
libXi.i686 ==> Install
make
sysstat
unixODBC
unixODBC-devel


Step#5: Add Groups and Users

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 54321 -g oinstall -G dba,oper oracle
passwd oracle


Step#6: /etc/security/limits.d/90-nproc.conf


# Change this 

* soft nproc 1024

# To this

* - nproc 16384


Step#7: Set SELINUX

[root@db12c01 ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUX=permissive
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted
If it is different then edit the file.
SELINUX=disable
SELINUXTYPE=targeted


Step#8 : Stop Firewall

# service iptables stop
# chkconfig iptables off


Step#9 : Create dierectories for oracle installation

mkdir -p /u01/app/oracle/product/12.1.0.2/stby
cd /u01
chown -R oracle:oinstall *
chmod -R 775 /u01

Step#10 - disable access control, clients can connect from any host

# xclock
# xhost +

Step#11 :  Oracle Setting or Set .bash_profile

export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=db12cstby.profad.com
export ORACLE_UNQNAME=stby
export ORACLE_BASE=/u01/app/oracle 
export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/stby
export ORACLE_SID=stby
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


Step#12 : Extract Installation Files

[oracle@db12cstby ~]$ cd 12c_64bit
[oracle@db12cstby 12c_64bit]$ ls
linuxamd64_12102_database_1of2.zip  linuxamd64_12102_grid_1of2.zip
linuxamd64_12102_database_2of2.zip  linuxamd64_12102_grid_2of2.zip
unzip both files.
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip


Step#13 : Start the Oracle Universal Installer

Step#13.1 : Execute runInstaller





Then, after few second, you will get a page like this -










Uncheck the ticked box and click next.





After unchecked, Click Next>



Click:  Yes and then Next>


I am creating a new database that’s why I choosed for 'Create and configure a database' and then click Next>











































Tick the Checkbox of Desktop Class and Click Next>



Here, "Global database name" is different. So, I edited that to stby.profad.com and then click Next>. Here I did not put the Administrative password so I got,




As I did not put the 'Administrative password', So, I got this "[INS-32001] No value has been given for the password field." message. 
Click OK




Here, I put Administrative password as 'oracle' and click Next>



Click Yes and Then Click Next>

Here is all the information about the database installation paths and settings




Click on Install

Here, Installation is going on -



















































































Here, I got a check box.
Message is 'Run root.sh script as Root User and then Click OK.

Here, I am executing root.sh script as Root User -











































Now, Go to 'Oracle Database 12c Release 1 Installer' again and Click OK.



Then, You will get this screen. Here Database Configuration Assistant is in progress.











































After completing Database Configuration,

You will get -










































All configurations are done. Now, Click OK.




Click on Close. The Database installation is done successfully.


Now, Lets check the Database is running or not. Is it working fine??










































Here, We can see that the database is running and opened successfully.