Oracle Infrastructure – Database 19c Kurulumu

Oracle Infrastructure – Database 19c Kurulumu

Os: Oracle Linux 7.9

Veri Tabanına ait paketlerin işletim sistemine kurulması

yum install -y oracle-database-preinstall-19c.x86_64

yum install oracleasm-support

yum update -y

groupadd -g 54331 dba

groupadd -g 54332 oinstall

groupadd -g 54333 asmdba

groupadd -g 54334 asmoper

groupadd -g 54335 asmadmin

usermod -g oinstall -G dba,asmdba,asmoper,asmadmin oracle

mkdir -p /u01/app/oracle/product/19.0.0/db_1

mkdir -p /u01/app/grid/product/19.0.0/grid_1

chown -R oracle:oinstall /u01

chmod -R 775 /u01

Oracle kullanıcısı .bash_profile içeriği

ORACLE_HOSTNAME=db19c.localdomain; export ORACLE_HOSTNAME

ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

GRID_HOME=/u01/app/grid/product/19.0.0/grid_1; export GRID_HOME

DB_HOME=$ORACLE_BASE/product/19.0.0/db_1; export DB_HOME

ORACLE_HOME=$DB_HOME; export ORACLE_HOME

ORACLE_SID=orcl; export ORACLE_SID

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

alias grid_env=’. /home/oracle/.grid’

alias db_env=’. /home/oracle/.db’


nano .db

export ORACLE_SID=orcl

export ORACLE_HOME=$DB_HOME

export PATH=$ORACLE_HOME/bin:$BASE_PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

nano .grid

export ORACLE_SID=+ASM

export ORACLE_HOME=$GRID_HOME

export PATH=$ORACLE_HOME/bin:$BASE_PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

ASM için 3 adet disk kullanıcam.

/dev/sdb – /dev/sdc > DATA

/dev/sdd > FRA

Disk /dev/sdb: 12.9 GB, 12884901888 bytes, 25165824 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sdc: 12.9 GB, 12884901888 bytes, 25165824 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sdd: 10.7 GB, 10737418240 bytes, 20971520 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@db19c ~]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Device does not contain a recognized partition table

Building a new DOS disklabel with disk identifier 0x26834a52.

Command (m for help): n

Partition type:

p primary (0 primary, 0 extended, 4 free)

e extended

Select (default p):

Using default response p

Partition number (1-4, default 1):

First sector (2048-25165823, default 2048):

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-25165823, default 25165823):

Using default value 25165823

Partition 1 of type Linux and of size 12 GiB is set

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@db19c ~]# ls /dev/sd*

/dev/sda /dev/sda1 /dev/sda2 /dev/sdb /dev/sdb1 /dev/sdc /dev/sdc1 /dev/sdd /dev/sdd1

[root@db19c ~]# oracleasm configure -i

Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library

driver. The following questions will determine whether the driver is

loaded on boot and what permissions it will have. The current values

will be shown in brackets (‘[]’). Hitting <ENTER> without typing an

answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: oracle

Default group to own the driver interface []: oinstall

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

[root@db19c ~]# oracleasm init

Creating /dev/oracleasm mount point: /dev/oracleasm

Loading module “oracleasm”: oracleasm

Configuring “oracleasm” to use device physical block size

Mounting ASMlib driver filesystem: /dev/oracleasm

[root@db19c ~]# oracleasm createdisk DATA1 /dev/sdb1

oracleasm createdisk DATA2 /dev/sdc1Writing disk header: done

Instantiating disk: done

[root@db19c ~]# oracleasm createdisk DATA2 /dev/sdc1

Writing disk header: done

Instantiating disk: done

[root@db19c ~]# oracleasm createdisk FRA1 /dev/sdd1

Writing disk header: done

Instantiating disk: done

Oracle Grid Infrastructure 19c Kurulumu

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application

Description automatically generated

Graphical user interface, text, application

Description automatically generated

Kurulum tamamlandıktan sonra FRA alanını tanımlıyorum

[oracle@db19c ~]$ asmca

Graphical user interface, text

Description automatically generated

Graphical user interface, text, application

Description automatically generated

Graphical user interface, table

Description automatically generated

Oracle Database 19c Kurulumu

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, application

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application

Description automatically generated

Graphical user interface, application

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, email

Description automatically generated

Graphical user interface, text, application

Description automatically generated

Graphical user interface, table

Description automatically generated

Graphical user interface

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, application, Word

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@db19c ~]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 – Production on 04-AUG-2022 16:26:16

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db19c.localdomain)(PORT=1521)))

STATUS of the LISTENER

————————

Alias LISTENER

Version TNSLSNR for Linux: Version 19.0.0.0.0 – Production

Start Date 04-AUG-2022 15:48:19

Uptime 0 days 0 hr. 37 min. 56 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/app/grid/product/19.0.0/grid_1/network/admin/listener.ora

Listener Log File /u01/app/oracle/diag/tnslsnr/db19c/listener/alert/log.xml

Listening Endpoints Summary…

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db19c.localdomain)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary…

Service “+ASM” has 1 instance(s).

Instance “+ASM”, status READY, has 1 handler(s) for this service…

Service “+ASM_DATA” has 1 instance(s).

Instance “+ASM”, status READY, has 1 handler(s) for this service…

Service “+ASM_FRA” has 1 instance(s).

Instance “+ASM”, status READY, has 1 handler(s) for this service…

Service “orcl” has 1 instance(s).

Instance “orcl”, status READY, has 1 handler(s) for this service…

Service “orclXDB” has 1 instance(s).

Instance “orcl”, status READY, has 1 handler(s) for this service…

The command completed successfully

[oracle@db19c ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Thu Aug 4 16:26:59 2022

Version 19.3.0.0.0

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

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.3.0.0.0

SQL> SELECT INSTANCE_NAME, STATUS, DATABASE_STATUS FROM V$INSTANCE;

INSTANCE_NAME STATUS DATABASE_STATUS

—————- ———— —————–

orcl OPEN ACTIVE