Posts

Showing posts from July, 2025

Display issue in Oracle virtual box

 # xhost + # su - oracle export DISPLAY=:0.0 echo $DISPLAY export DISPLAY=IP address of the graphical terminal:0.0

Add file system in Linux

 /sbin/mkfs.ext4 -L /ora01 /dev/sdi1 mkdir /ora01 create the partions  fdisk -l n p wq mount /dev/sdi1 /ora01 mount  vi /etc/fstab add below line  LABEL=/ora01            /ora01              ext4    defaults        1 2 on other node: /dev/sdi1

DBMS_SHEDUER

  Step-by-Step Example Let's assume: You want to log blocking sessions into a table. Later, you could extend this to automatically kill sessions. 🔹 1. Create the Logging Table sql Copy Edit BLOCKING_SESSIONS_LOG CREATE TABLE blocking_sessions_log (     log_time         TIMESTAMP,     blocker_sid      NUMBER,     blocker_serial#  NUMBER,     blocker_username VARCHAR2(30),     blocked_sid      NUMBER,     blocked_username VARCHAR2(30) ); SQL> set lines 200 pages 200; SQL> col OWNER for a20; SQL> col TABLE_NAME for a20; SQL> col TABLESPACE_NAME for a20; OWNER                TABLE_NAME                                         TABLESPACE_NAME -------------------- -------------------------------------------------- -...

TDE enable in RAC

  1:- Create a backup of spfile/initfile (it is always a good practice to create a backup before any change on the DB):  create pfile='/tmp/initorcl1.ora' from spfile;    2:- Create WALLET directory in both nodes:    /u01/app/oracle/product/19.3.0/dbhome_1    mkdir /u01/app/oracle/product/19c/dbhome_1/admin/orcl/WALLET  created on Ndoe01  mkdir /u01/app/oracle/product/19c/dbhome_1/admin/orcl/WALLET  created on Ndoe02    3:- Update sqlnet.ora with wallet location (in all nodes):      ENCRYPTION_WALLET_LOCATION=  (SOURCE=   (METHOD=FILE)    (METHOD_DATA=     (DIRECTORY=/u01/app/oracle/product/19c/dbhome_1/admin/orcl/WALLET)))  [oracle@ggrac01 admin]$ scp sqlnet.ora ggrac02:/u01/app/oracle/product/19.3.0/dbhome_1/network/admin sqlnet.ora                                        ...

ACFS file system creation using Manual Method. Steps to create ACFS file system

 ACFS file system creation using Manual Method. Steps to create ACFS file system Step 1: List the disks using the below command. col name for a30; SELECT NAME, VALUE, GROUP_NUMBER FROM v$asm_attribute where name like '%com%'; Step 2: Create the oracleasm disk using the below command. #oracleasm create disk ACFS  /dev/mapper/DISK014_ARCH_4T1 Step 4: Verify the header status of the path is provisioned using the below query. col PATH for a50; select path, group_number group_#, disk_number disk_#, mount_status,header_status, state, total_mb, free_mb from v$asm_disk order by group_number; SQL> SELECT NAME,VALUE,GROUP_NUMBER FROM v$asm_attribute where name like '%com%'; CREATE DISKGROUP FRA EXTERNAL REDUNDANCY DISK ‘/dev/oracleasm/disks/ARCH03’ NAME FRA_01 ATTRIBUTE compatible.asm’ = ‘12.2.0.1.0’, ‘compatible.rdbms’=’12.2.0.1.0’ ,‘compatible.advm’ = 12.2.0.1.0’; Step 7: Verify the diskgroup has been created using the below query. SQL> SELECT name, free_mb, total_mb, ((t...

2 node RAC dataguard configuration

 All steps will be carried out on one of the node (Prod1) and later we will clone to other nodes or machines: Install the system Linux prerequisites:  The package oracle-database-preinstall-19c contains all the prerequisites on Oracle Linux using the Oracle Unbreakable Enterprise Kernel (UEK). yum install -y oracle-database-preinstall-19c yum install -y oracleasm-support sysctl -p crosscheck >>> cat  /etc/sysctl.conf  Group Creation: – groupadd -g 5001 oinstall groupadd -g 5002 dba groupadd -g 5003 oper groupadd -g 5004 asmadmin groupadd -g 5005 asmdba groupadd -g 5006 asmoper User Creation: – useradd -u 5007 -g oinstall -G dba,oper,asmdba oracle useradd -u 5008 -g oinstall -G asmadmin,asmdba,asmoper,dba grid usermod -g oinstall -G dba,oper,asmdba oracle usermod -g oinstall -G asmadmin,asmdba,asmoper,dba grid passwd oracle passwd grid Add below entries in /etc/security/limits.conf file which will detine limits  oracle   soft   nofile...

DNS configuration

 [root@Node1 ~]#  [root@Node1 ~]# cat /etc/resolv.conf  # Generated by NetworkManager search oracle.com nameserver 192.168.0.1 options timeout:1 options attempts:5 [root@Node1 ~]#  [root@Node1 ~]#  [root@Node1 ~]#  [root@Node1 ~]#  [root@Node1 ~]# cat /etc/named.conf // named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // // See the BIND Administrator’s Reference Manual (ARM) for details about the // configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html options { listen-on port 53 { 127.0.0.1; 192.168.0.1; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; recursing-file "/var/named/d...

Mysql Installation:-

 Mysql Installation:- ================== Package : mysql-5-6-community Conf : /etc/my.conf Port : 3306 Deamon : mysqld Step1:- Download the mysql required packages on below URL         https://repo.mysql.com/yum/mysql-5.6-community/el/7/x86_64/ #wget https://repo.mysql.com/yum/mysql-5.6-community/el/7/x86_64/mysql-community-common-5.6.48-2.el7.x86_64.rpm #wget https://repo.mysql.com/yum/mysql-5.6-community/el/7/x86_64/mysql-community-client-5.6.48-2.el7.x86_64.rpm #wget https://repo.mysql.com/yum/mysql-5.6-community/el/7/x86_64/mysql-community-libs-5.6.48-2.el7.x86_64.rpm #wget https://repo.mysql.com/yum/mysql-5.6-community/el/7/x86_64/mysql-community-server-5.6.48-2.el7.x86_64.rpm #ls total 91892 -rw-r--r--. 1 mysql mysql 21646164 Nov  3 21:46 mysql-community-client-5.6.48-2.el7.x86_64.rpm -rw-r--r--. 1 mysql mysql   295756 Nov  3 21:46 mysql-community-common-5.6.48-2.el7.x86_64.rpm -rw-r--r--. 1 mysql mysql  2346632 Nov  3 2...

Patch 37257886 - GI Release Update 19.26.0.0.250121

 1, Take the backup of database 2, Take the backup of Grid_Home and DB_HOME. 3, Take the backup of Lsinventory  4,UPdate the Opatch to the latest version for grid_home and db_home 5,Check for onvalid objects make them valid if any  6,Disable the monitoring for patching servers . 7,Verify the services and relocate services if any . 8,stop the MRP on the standby servers 9,Apply the patch on Grid_Home and DB_HOME Patch 37257886 - GI Release Update 19.26.0.0.250121 Patch Number Applicable Homes 37260974 Only Oracle home for non-Oracle RAC setup. Both Oracle home and Grid home for Oracle RAC setup. 37268031 Both Oracle home and Grid home. 37266638     Only Grid home 37461387 Only Grid home. 36758186 Only Grid home You must use the OPatch utility version 12.2.0.1.44 [oracle@dalprim02 soft]$ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch version OPatch Version: 12.2.0.1.45 [oracle@dalprim02 ~]$ /u01/app/19.3.0/grid/OPatch/opatch version OPa...