Flipkart

Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

Wednesday, March 4, 2020

Oracle Database 19c Installation on Oracle Linux 7


Pre-installation settings before installing Oracle Database 19c
SELinux
If the OS is to be used for an Oracle installation, it is easier if Secure Linux (SELinux) is disabled or switched to permissive. To do this edit the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.

# vi /etc/selinux/config

SELINUX=permissive
If SELinux is configured after installation, the server will need a reboot for the change to take effect.

Firewall
If the OS is to be used for an Oracle installation, it is easier if the firewall is disabled. This can be done by issuing the following commands from a terminal window as the "root" user.

# systemctl stop firewalld
# systemctl disable firewalld

You can install and configure it later if you wish.

SSH
Make sure the SSH daemon is started using the following commands.

# systemctl start sshd.service
# systemctl enable sshd.service


Hosts File

The "/etc/hosts" file must contain a fully qualified name for the server.

127.0.0.1       localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.174.162 oracle19c

Set the correct hostname in the "/etc/hostname" file.

oracle19c

Oracle Installation Prerequisites

Automatic Setup:
Install "oracle-database-preinstall-19c" package to perform all prerequisite setup. use the following command


# yum install -y oracle-database-preinstall-19c
Manual Setup:
If you have not used the "oracle-database-preinstall-19c" package to perform all prerequisites, you have to manually perform the following setup tasks.
The following packages are listed as required. Don't worry if some don't install. It won't prevent the installation.

#basic packages to install
yum install -y bc
yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc++-33
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel
yum install -y fontconfig-devel
yum install -y glibc
yum install -y glibc-devel
yum install -y ksh
yum install -y libaio
yum install -y libaio-devel
yum install -y libdtrace-ctf-devel
yum install -y libXrender
yum install -y libXrender-devel
yum install -y libX11
yum install -y libXau
yum install -y libXi
yum install -y libXtst
yum install -y libgcc
yum install -y librdmacm-devel
yum install -y libstdc++
yum install -y libstdc++-devel
yum install -y libxcb
yum install -y make
yum install -y smartmontools
yum install -y sysstat

#following 4 not available in oel8
yum install -y dtrace-modules
yum install -y dtrace-modules-headers
yum install -y dtrace-modules-provider-headers
yum install -y dtrace-utils

#(for Oracle RAC and Oracle Clusterware)
yum install -y net-tools

#(for Oracle ACFS)
yum install -y nfs-utils

#(for Oracle ACFS Remote)
yum install -y python
yum install -y python-configshell
yum install -y python-rtslib
yum install -y python-six
yum install -y targetcli
yum install libstdc* -y
yum install gcc -y
yum install gcc-c++ -y
yum install java-11-openjdk-devel

 Add the following lines to the "/etc/sysctl.conf" file, or in a file called "/etc/sysctl.d/98-oracle.conf".

# vi /etc/sysctl.conf

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

Run one of the following commands to change the current kernel parameters, depending on which file you edited.

/sbin/sysctl -p
# Or
/sbin/sysctl -p /etc/sysctl.d/98-oracle.conf

Add the following lines to a file called "/etc/security/limits.d/oracle-database-preinstall-19c.conf" file.

# vi /etc/security/limits.d/oracle-database-preinstall-19c.conf

oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728


Create the new groups and users.

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54324 backupdba
groupadd -g 54325 dgdba
groupadd -g 54326 kmdba
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
groupadd -g 54330 racdba

useradd -u 54321 -g oinstall -G dba,oper oracle

usermod -g oinstall -G oracle oracle


Create the directories in which the Oracle software will be installed.

mkdir -p /home/app/oracle/product/19.3/dbhome_1
mkdir -p  /home/app/oradata
chown -R oracle:oinstall /home/app
chmod -R 775 /home/app/oradata

Edit .bash_profile file with oracle user,

vi .bash_profile

export ORACLE_BASE=/home/app/oracle
export ORACLE_HOME=/home/app/oracle/product/19.3/dbhome_1
export GRID_HOME=/home/app/grid
export ORACLE_UNQNAME=orcl
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH


save and exit

Download Software:
Download Oracle 19c database software for Linux x86-64 from Oracle cloud and copy the files to linux server (on VirtualBox) using winscp or shared folder.


You can choose "Create and configure a single instance database" option, If you want to install database software

Select Server class and Next.

Let's go with "Enterprise Edition":



 In next screen where we choose the Oracle base folder:















 
Select the directory for Oracle base. Notice that we do not have an option to select Oracle Home and it’s preselected with the directory where we have extracted software setup.

Select the type of database that you want.
Enter the Global database name and Oracle system identifier (SID)

Enable Automatic memory management or enter manually the values.
Choose the database character set from the following.
Browse the database file location for database storage and as mentioned Oracle recommends that you install data files and the Oracle database software on different disks.
Register with EM cloud if you the details or Click on Next.

Oracle Database 12c is managed by Oracle Database express by default.
Enable Recovery for your database if you want and specify the location.
Enter all accounts passwords or Use different passwords for SYS/SYSTEM accounts.
Select groups as per requirement and click NEXT.

Check the Automatically run configuration scripts or Click on Next step.
Below window will check the prerequisites for the installer.
Run the runfixup.sh file so all prerequisite will run automatically.
 Check the installer summary and click on Install.
Run the root.sh script need to be executed as the "root" user.



Click on close.


After successful creation of database check the database status.
That's it. Completed the Oracle database 19c Installation and creating a database.

Sunday, December 16, 2018

Oracle Database 12 Release 2 Installation Step By Step on Window Server 2008

    If you are installing from distribution media, insert the distribution media for Oracle Database into your computer. The Auto run feature opens the Select a Product to install window automatically. If you have downloaded the installation software from the Oracle Web site, follow the instructions on the site to invoke the Oracle Universal Installer.
    Download the setup Oracle 12C_(12.2) extract the file
    http://download.oracle.com/otn/nt/oracle12c/122010/winx64_12201_database.zip?AuthParam=1500618276_6bc47c2af4b28270b85c489742e6f3b5
    Link : http://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle12c-windows-3633015.html
    winx64_12201_database.zip
    Log on to your computer as a member of the administrative group that is authorized to install Oracle Database software.
    clip_image001
    The Configure Security Updates window appears. Enter your email address and My Oracle Support password to receive security issue notifications via email. If you do not wish to receive notifications via email, deselect "I wish to receive security updates via My Oracle Support". Click Next to continue. Click "Yes" in the confirmation window.
    clip_image002
    clip_image003
    Select the yes if not given the email address
    clip_image004
    Select any of the following install options.
    I selected the
    • Create and configure a database
    Then Next ,
    clip_image005
    Now , Select the System Class and Next.
    clip_image006
    Select the type of database installation from the following.
    I selected
    • Single Instance database Installation
    Then Next,
    clip_image007
    The Select Install Type window appears. Select "Advanced install." Click Next.
    clip_image008
    Now Choose the Database Edition want to install.
    I Selected the * Enterprise Edition and Next.
    clip_image009
    On this screen specify the Oracle Home User
    I create New Windows User
    User Name: sys
    Password : ******
    Now Next it.
    And give Oracle base path browse where want to install.
    clip_image010
    Next,
    clip_image011
    Select Configuration Type
    I selected * General Purpose / Transaction Processing
    clip_image012
    Specify Database Identifiers
    Global Database name: orcl
    Oracle system identifier: orcl
    Choose Create as Container database or unselect this.
    Pluggable database name: orclpdb
    Then Next,
    On Next screen choose the Enable Automatic Memory Management
    clip_image013
    On Character sets choose the following option
    I selected * Use Unicode (AL32UTF8)
    clip_image014
    On next tab Sample schemas can be installed.
    clip_image015
    On Next screen Specify Database Storage options
    clip_image016
    clip_image017
    You can Enable Recovery and give File system location
    clip_image018
    On next screen enter the credentials for different accounts
    clip_image019
    On next screen Prerequisite Checks will run.
    clip_image020
    clip_image021
    Now select the “Install” to install the database.
    clip_image022
    Now it’s installed Oracle Database 12 Release 2.

Thursday, December 13, 2018

CHANGING THE CHARACTER SET TO AL32UTF8

Open cmd as administrator.

And the following command.

# sqlplus / as sysdba

Like in below screen it's now connected.

clip_image001

Follow the below steps.

SQL> SHUTDOWN IMMEDIATE

SQL> STARTUP RESTRICT

SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;

SQL>ALTER DATABASE CHARACTER SET AL32UTF8;

SQL> SHUTDOWN IMMEDIATE

SQL> STARTUP

clip_image002

SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;

Now , its set on UTF8

Installing Oracle Database 12c on Windows Server 2012 R2

Download the setup

For Windows Setup Download link below:

http://download.oracle.com/otn/nt/oracle12c/121020/winx64_12102_database_1of2.zip

http://download.oracle.com/otn/nt/oracle12c/121020/winx64_12102_database_2of2.zip

Once download open folder and start the setup.

clip_image001

For support you can give email address or skip the option.

clip_image002

Choose the option from the following options

Like * Create and Configure a database

* Install database software only

* Upgarde an existing database

clip_image003

Now , Select the type of database installation example Single instance , Oracle cluster application , Oracle RAC node configure.

clip_image004

Select the Class to use .

clip_image005

Choose Install type select the Typical or Advanced Install.

clip_image006

Oracle recommends window user account .Select the following s options from them.

clip_image007

Give Global database name as ORCL. And Enter the administrative password.

Select the Container database if you want in your production.

clip_image008

Once review all then proceed to Install button.

clip_image009

clip_image010

clip_image011

clip_image012

Oracle 12c Release 1 now installed.