tag:blogger.com,1999:blog-15864479873159292662024-03-21T03:22:30.911-07:00DBNITRO.netUnknownnoreply@blogger.comBlogger30125tag:blogger.com,1999:blog-1586447987315929266.post-82013869906174329922022-08-06T02:22:00.004-07:002022-08-06T02:23:26.125-07:00My Work with GitHub<p>Hello everyone, I don't have much time to post something here but I would like to share with you all some scripts I am developing for a while, everything you can find in this link:</p><p>https://github.com/dbaribas/dbnitro</p><p>You can download and use it as you wish.</p><p>The main script is the OracleMenu.sh</p><p>This script will provide to you a lot of benefits to select and use different Oracle Homes, Instances and sql statements to help you day-by-day as Oracle Experts.</p><p>Enjoy it.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-37739901780021391052021-04-05T02:36:00.004-07:002021-04-14T05:21:21.902-07:00Migrate ASMLIB to ASMFD<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># --------------------------------------------------------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># ASMFD : How to Migrate ASM Diskgroups from ASMLIB to ASMFD (ASM Filter Driver) on Oracle Grid Infrastructure (RAC) (Doc ID 2172754.1)</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># --------------------------------------------------------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># Applies to:</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Oracle Database Backup Service - Version N/A and later</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Oracle Database Cloud Exadata Service - Version N/A and later</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.1.0.2 [Release 12.1]</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Oracle Database Cloud Schema Service - Version N/A and later</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Oracle Database Exadata Express Cloud Service - Version N/A and later Linux x86-64</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># --------------------------------------------------------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># What is Oracle ASM Filter Driver (Oracle ASMFD) ?</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Oracle ASM Filter Driver (Oracle ASMFD) is a kernel module that resides in the I/O path of the Oracle ASM disks. Oracle ASM uses the filter driver to validate write I/O requests to Oracle ASM disks.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">The Oracle ASMFD simplifies the configuration and management of disk devices by eliminating the need to rebind disk devices used with Oracle ASM each time the system is restarted.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">The Oracle ASM Filter Driver rejects any I/O requests that are invalid. This action eliminates accidental overwrites of Oracle ASM disks that would cause corruption in the disks and files within the disk group. For example, the Oracle ASM Filter Driver filters out all non-Oracle I/Os which could cause accidental overwrites.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Oracle ASM Filter Driver (Oracle ASMFD) is installed with an Oracle Grid Infrastructure installation. If you have an existing Oracle ASM library driver (Oracle ASMLIB) configuration, then this document will guide you to migrate the existing ASM diskgroup disks which are stamped with ASMLib to ASMFD (ASM Filter Driver).</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># --------------------------------------------------------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># Solution</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Following assumptions are made before we proceed with the next steps </p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">1. Please check the existing environment is certified or not. Check below document</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">ASMFD (ASM Filter Driver) Support on OS Platforms (Certification Matrix).(Doc ID 2034681.1)</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">2. It is recommended to apply latest PSU for successful migration.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">3. Take the backup of the database before proceeding this activity.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># --------------------------------------------------------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># Step by Step Procedure</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">1. As a root user run below command to generate the which ASM Disk is associated with the OS disk. In a multipath configuration, please use the multipath name</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/home: ]$ oracleasm listdisks | xargs oracleasm querydisk -p</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Disk "DATA" is a valid ASM disk /dev/sdb1: LABEL="DATA" TYPE="oracleasm"</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Disk "FRA" is a valid ASM disk /dev/sdc1: LABEL="FRA" TYPE="oracleasm"</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">2. As a Grid Infrastructure (GI) software owner, get the present ASM diskstring value</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ +ASM ]|[ oracle@srv10:/home/oracle: ]$ asmcmd -p dsget</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">parameter:/dev/oracleasm/disks/*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">profile:/dev/oracleasm/disks/*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ +ASM ]|[ oracle@srv10:/home/oracle: ]$</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">In case the ASMLIB disk discovery string is NOT /dev/oracleasm/disks/* but "ORCL:*".</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">grid@hostname1 ~]$ asmcmd dsget</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">parameter:ORCL:*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">profile:ORCL:*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">3. As a GI owner update the Oracle ASM disk discovery string to enable Oracle ASMFD to discover devices in the future.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ +ASM ]|[ oracle@srv10:/home/oracle: ]$ asmcmd -p dsset '/dev/oracleasm/disks/*','AFD:*'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ +ASM ]|[ oracle@srv10:/home/oracle: ]$ asmcmd -p dsget</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">parameter:/dev/oracleasm/disks/*, AFD:*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">profile:/dev/oracleasm/disks/*,AFD:*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">In case the ASMLIB disk discovery string is NOT /dev/oracleasm/disks/* but "ORCL:*".</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[grid@hostname1 ~]$ asmcmd dsset 'ORCL:*','AFD:*'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[grid@hostname1 ~]$ asmcmd dsget</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">parameter:ORCL:*, AFD:*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">profile:ORCL:*,AFD:*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">4. As a root user stop the cluster accessing the shared ASMLib disks</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># Cluster</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ crsctl stop crs</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># Standalone</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ crsctl stop has</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'srv10'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2673: Attempting to stop 'ora.dbprod.db' on 'srv10'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'srv10'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'srv10' succeeded</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2677: Stop of 'ora.dbprod.db' on 'srv10' succeeded</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2673: Attempting to stop 'ora.DATA.dg' on 'srv10'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2673: Attempting to stop 'ora.FRA.dg' on 'srv10'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2677: Stop of 'ora.DATA.dg' on 'srv10' succeeded</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2677: Stop of 'ora.FRA.dg' on 'srv10' succeeded</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2673: Attempting to stop 'ora.asm' on 'srv10'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2677: Stop of 'ora.asm' on 'srv10' succeeded</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2673: Attempting to stop 'ora.evmd' on 'srv10'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2677: Stop of 'ora.evmd' on 'srv10' succeeded</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2673: Attempting to stop 'ora.cssd' on 'srv10'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2677: Stop of 'ora.cssd' on 'srv10' succeeded</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'srv10' has completed</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-4133: Oracle High Availability Services has been stopped.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">5. Check and Stop the oracleasm driver and acfsload as root user</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ oracleasm status</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Checking if ASM is loaded: yes</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Checking if /dev/oracleasm is mounted: yes</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ oracleasm exit</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Unmounting ASMlib driver filesystem: /dev/oracleasm</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Unloading module "oracleasm": oracleasm</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ ls -ltr /dev/oracleasm/</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">total 0</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ lsmod | grep acfs</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">oracleacfs 3498241 2</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">oracleoks 503994 2 oracleacfs,oracleadvm</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ acfsload stop</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ lsmod | grep acfs</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># --------------------------------------------------------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># Note: It is recommended to remove the ASMLib related RPMs to avoid any conflict.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ rpm -qa | grep asm</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">oracleasmlib-2.0.12-1.el7.x86_64</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">kmod-oracleasm-2.0.8-28.0.1.el7.x86_64</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">oracleasm-support-2.1.11-2.el7.x86_64</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ rpm -e oracleasm-support-2.1.11-2.el7.x86_64 kmod-oracleasm-2.0.8-28.0.1.el7.x86_64 oracleasmlib-2.0.12-1.el7.x86_64</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">warning: /etc/sysconfig/oracleasm saved as /etc/sysconfig/oracleasm.rpmsave</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">6. As root, configure Oracle ASMFD to filter at the node level:</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ afdroot version_check</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-616: Valid AFD distribution media detected at: '/u01/app/19.3.0.1/grid/usm/install/Oracle/EL7UEK/x86_64/5.4.17-2011.0.7/5.4.17-2011.0.7-x86_64/bin'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ afddriverstate supported</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-9200: Supported</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd afd_configure</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-627: AFD distribution files found.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-634: Removing previous AFD installation.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-635: Previous AFD components successfully removed.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-9294: updating file /etc/sysconfig/oracledrivers.conf</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-636: Installing requested AFD software.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-637: Loading installed AFD drivers.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-9321: Creating udev for AFD.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-9323: Creating module dependencies - this may take some time.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-9154: Loading 'oracleafd.ko' driver.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-649: Verifying AFD devices.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-9156: Detecting control device '/dev/oracleafd/admin'.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD-638: AFD installation correctness verified.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Modifying resource dependencies - this may take some time.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">7. As the Oracle Grid Infrastructure / root owner verify the status of Oracle ASMFD:</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd afd_state</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'srv10.dbnitro.net'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># Case is disabled</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'DISABLED' on host 'hostname1' <<<< Filtering is disabled</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">8. As a root user set the AFD diskstring and enable the Filtering</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd -p afd_filter -e</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd -p afd_state</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'srv10.dbnitro.net' <<<< Filtering is enabled</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">9. As a root user, with the help of the data gathered in step 1, migrate (label) all the ASMLib disks </p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">$ORACLE_HOME/bin/asmcmd afd_label <OLD ASMLib Disk Label Name> <Disk Path> --migrate</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ cat /etc/oracleafd.conf</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">afd_diskstring='/dev/sd*'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">afd_filtering=enable</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd afd_scan</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd afd_lsdsk</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd -p afd_label DATA /dev/sdb1 --migrate</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd -p afd_label FRA /dev/sdc1 --migrate</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">10. Validate that all the disks have been migrated to the ASMFD.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd afd_scan</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd afd_lsdsk</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">--------------------------------------------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Label Filtering Path</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">================================================================================</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">DATA ENABLED /dev/sdb1</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">FRA ENABLED /dev/sdc1</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ ls -ltr /dev/oracleafd/disks/</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">total 8</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">-rw-rw-r-- 1 oracle oinstall 10 Mar 25 08:33 DATA</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">-rw-rw-r-- 1 oracle oinstall 10 Mar 25 08:41 FRA</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">11. Edit the afd_diskstring with below content. (Ensure that you put the correct afd_diskstring, otherwise ASMFD disks will not get mounted in the mount point i.e in "/dev/oracleafd/disks/" folder)</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[root@hostname1 ~]# vi /etc/afd.conf</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">#afd_diskstring='/dev/oracleasm/disks/*'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">afd_diskstring='/dev/xvd*'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">afd_filtering=enable </p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># --------------------------------------------------------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># Tips:- This value can be derived from the path value displayed while running the "asmcmd afd_lsdsk" </p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">12. Repeat above steps on all the nodes of the cluster.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">13. Start the CRS on all the nodes ( before starting the CRS, start the ACFS module)</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ lsmod | grep acfs</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd -p afd_lslbl</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">--------------------------------------------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Label Duplicate Path</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">================================================================================</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">DATA /dev/sdb1</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">FRA /dev/sdc1</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd -p afd_lsdsk</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">--------------------------------------------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Label Filtering Path</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">================================================================================</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">DATA ENABLED /dev/sdb1</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">FRA ENABLED /dev/sdc1</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ asmcmd -p afd_state</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'srv10.dbnitro.net'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ lsmod | egrep "oracle|asm|afd|acfs|advm"</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">oracleafd 221184 0</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ acfsload start</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">ACFS-9391: Checking for existing ADVM/ACFS installation.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">ACFS-9129: ADVM/ACFS not installed</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># Cluster</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[root@hostname1 ~]# $ORACLE_HOME/bin/crsctl start crs</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-4123: Oracle High Availability Services has been started.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[root@hostname2 ~]# $ORACLE_HOME/bin/crsctl start crs</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-4123: Oracle High Availability Services has been started.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[root@hostname1 ~]# crsctl check cluster -all</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">**************************************************************</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">hostname1:</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-4537: Cluster Ready Services is online</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-4529: Cluster Synchronization Services is online</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-4533: Event Manager is online</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">**************************************************************</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">hostname2:</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-4537: Cluster Ready Services is online</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-4529: Cluster Synchronization Services is online</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-4533: Event Manager is online</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">**************************************************************</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"># Standalone</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ crsctl start has</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">CRS-4123: Oracle High Availability Services has been started.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">14. As the Disks are migrated to ASMFD, remove ASMLIB disk path from disk discovery string. Execute the following command as a Grid Software owner from any one of the node :-</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ +ASM ]|[ oracle@srv10:/home/oracle: ]$ asmcmd -p dsget</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">parameter:/dev/oracleasm/disks/*, AFD:*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">profile:/dev/oracleasm/disks/*,AFD:*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ +ASM ]|[ oracle@srv10:/home/oracle: ]$ asmcmd -p dsset 'AFD:*'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ +ASM ]|[ oracle@srv10:/home/oracle: ]$ asmcmd -p dsget</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">parameter:AFD:*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">profile:AFD:*</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">15. As a Grid Software owner validate that all the diskgroups are mounted properly</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ +ASM ]|[ oracle@srv10:/home/oracle: ]$ asmcmd -p lsdg</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">MOUNTED EXTERN N 512 512 4096 4194304 51196 48820 0 48820 0 N DATA/</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">MOUNTED EXTERN N 512 512 4096 4194304 51196 49576 0 49576 0 N FRA/</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ +ASM ]|[ oracle@srv10:/home/oracle: ]$ asmcmd -p lsdsk -G DATA</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Path</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD:DATA</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ +ASM ]|[ oracle@srv10:/home/oracle: ]$ asmcmd -p lsdsk -G FRA</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">Path</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">AFD:FRA</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">16. Lastly validate all the disks are using ASMFD Library :- (Login into ASM instance as sysasm) </p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">col PATH for a20</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">col LIBRARY for a45</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">col NAME for a15</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">select inst_id</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"> , group_number grp_num</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"> , name</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"> , state</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"> , header_status header</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"> , mount_status mount</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"> , path</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"> , library</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">from gv$asm_disk</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">order by inst_id, group_number, name;</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"> INST_ID| GRP_NUM|NAME |STATE |HEADER |MOUNT |PATH |LIBRARY</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">----------------|----------------|---------------|--------|------------|-------|--------------------|---------------------------------------------</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"> 1| 1|DATA_0000 |NORMAL |MEMBER |CACHED |AFD:DATA |AFD Library - Generic , version 3 (KABI_V3)</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"> 1| 2|FRA_0000 |NORMAL |MEMBER |CACHED |AFD:FRA |AFD Library - Generic , version 3 (KABI_V3)</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">17. Check whether the ASMFD disk is accessible even by the root user also.</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">[ root@srv10:/root: ]$ kfed read /dev/oracleafd/disks/DATA</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">KFED-00303: unable to open file '/dev/oracleafd/disks/DATA'</p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px; min-height: 14px;"><br /></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;">18. Now the migration is completed and all the disks are using ASM Filter Driver.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-49958447862801355872021-04-03T11:33:00.004-07:002021-04-05T02:10:38.500-07:00Create Standby Database one command only<h4 style="text-align: left;"><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;">Sometimes we just have to create a standby as far as possible, it doesn't means that we can't use the easier way to do that. </span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;">Here is just some examples about that:</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># ---------------------------------------------------------------------</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># SINGLE Instance on ASM</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><span style="-webkit-font-kerning: none;"><span style="font-weight: normal;">dbca -silent \</span><br /><span style="font-weight: normal;"> -createDuplicateDB \</span><br /><span style="font-weight: normal;"> -gdbName dbprod \ </span># Source Database<br /><span style="font-weight: normal;"> -primaryDBConnectionString srv01:1521/dbprod \ </span># Source Database</span></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><span style="-webkit-font-kerning: none;"><span style="font-weight: normal;"> -createAsStandby \</span><br /><span style="font-weight: normal;"> -sid dbstby -\ </span># Target Database<br /></span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><span style="-webkit-font-kerning: none;"><span style="font-weight: normal;"> -dbUniqueName dbstby \ </span># Target Database</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><span style="-webkit-font-kerning: none;"><span style="font-weight: normal;"> -databaseConfigType single \ </span># Instance Creation Type<br /><span style="font-weight: normal;"> -initParams db_create_file_dest=+DATA,db_recovery_file_dest=+FRA,dg_broker_start=true</span></span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># During this process, I found this error, when we create the standby with Grid Infrastructure the new instance is created as NON STANDBY, we need to change it using the following command.</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;">srvctl modify database -db dbstby -role PHYSICAL_STANDBY -startoption MOUNT -stopoption immediate</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># Also, pay attention on the status of your new instance, it is OPEN, but you must to shutdown and start it as mount before to start the standby configuration with or without Dataguard Broker.</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"><br />
# ---------------------------------------------------------------------</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># SINGLE Instance on File System</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><span style="-webkit-font-kerning: none;"><span style="font-weight: normal;">dbca -silent \</span><br /><span style="font-weight: normal;"> -createDuplicateDB \</span><br /><span style="font-weight: normal;"> -gdbName dbprod \ </span># Source Database<br /><span style="font-weight: normal;"> -primaryDBConnectionString srv01:1521/dbprod \ </span># Source Database</span></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><span style="-webkit-font-kerning: none;"><span style="font-weight: normal;"> -createAsStandby \</span><br /><span style="font-weight: normal;"> -sid dbstby \ </span># Target Database<br /><span style="font-weight: normal;"> -dbUniqueName dbstby \ </span># Target Database<br /><span style="font-weight: normal;"> -databaseConfigType single \ </span># Instance Creation Type<br /><span style="font-weight: normal;"> -initParams db_create_file_dest=/u01/oradata/dbprod,db_recovery_file_dest=/u01/oradata/dbprod/arch,dg_broker_start=true</span></span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># During this process, I found this error, when we create the standby with Grid Infrastructure the new instance is created as NON STANDBY, we need to change it using the following command</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;">srvctl modify database -db dbstby -role PHYSICAL_STANDBY -startoption MOUNT -stopoption immediate</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># Also, pay attention on the status of your new instance, it is OPEN, but you must to shutdown and start it as mount before to start the standby configuration with or without Dataguard Broker.</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># ---------------------------------------------------------------------</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># RAC Instance</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><span style="-webkit-font-kerning: none;"><span style="font-weight: normal;">dbca -silent \</span><br /><span style="font-weight: normal;"> -createDuplicateDB \</span><br /><span style="font-weight: normal;"> -gdbName dbprod \ </span># Source Database<br /><span style="font-weight: normal;"> -primaryDBConnectionString srv01:1521/dbprod \ </span># Source Database</span></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; line-height: normal; margin: 0px;"><span style="-webkit-font-kerning: none;"><span style="font-weight: normal;"> -adminManaged \</span><br /><span style="font-weight: normal;"> -createAsStandby \</span><br /><span style="font-weight: normal;"> -sid dbstby \ </span># Target Database<br /><span style="font-weight: normal;"> -dbUniqueName dbstby \ </span># Target Database<br /><span style="font-weight: normal;"> -databaseConfigType rac \ </span># Instance Creation Type<br /><span style="font-weight: normal;"> -nodelist srv04,srv05,srv06 \</span><br /><span style="font-weight: normal;"> -initParams db_create_file_dest=+DATA,db_recovery_file_dest=+FRA,dg_broker_start=true </span><br />
</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"><br /></span></p><p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># During this process, I found this error, when we create the standby with Grid Infrastructure the new instance is created as NON STANDBY, we need to change it using the following command</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;">srvctl modify database -db dbstby -role PHYSICAL_STANDBY -startoption MOUNT -stopoption immediate</span></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"><span style="font-kerning: none;"></span><br /></p>
<p style="font-family: "Courier New"; font-size: 12px; font-stretch: normal; font-weight: normal; line-height: normal; margin: 0px;"><span style="font-kerning: none;"># Also, pay attention on the status of your new instance, it is OPEN, but you must to shutdown and start it as mount before to start the standby configuration with or without Dataguard Broker.</span></p></h4>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-47115772860313527832020-12-09T02:06:00.004-08:002020-12-16T06:25:22.525-08:00DBCA Silent Mode for Container Database<div><span style="font-family: courier;"><span># ---------------------------------------------------------------------<br /></span></span><span style="font-family: courier;"><span># glogin.sql<br /></span></span><span style="font-family: courier;"># ---------------------------------------------------------------------<br /></span><span style="font-family: courier;"><span># Modify the configuration of GLOGIN to show you better results.</span></span></div><div><span style="font-family: courier;"><span><br /></span></span><span style="font-family: courier;"><span>cat >> $ORACLE_HOME/sqlplus/admin/glogin.sql <<EOF<br /></span></span><span style="font-family: courier;"><span>set pages 700 lines 700 timing on time on colsep '|' trim on trims on numformat 999999999999999 heading on feedback on<br /></span></span><span style="font-family: courier;"><span>COLUMN NAME FORMAT A20<br /></span></span><span style="font-family: courier;"><span>COLUMN FILE_NAME FORMAT A80<br /></span></span><span style="font-family: courier;"><span>SET SQLPROMPT '&_user@&_connect_identifier> '<br /></span></span><span style="font-family: courier;"><span>DEFINE _EDITOR=vi<br /></span></span><span style="font-family: courier;"><span>EOF</span></span></div><div><span style="font-family: courier;"><span><br /></span></span><span style="font-family: courier;"><span># ---------------------------------------------------------------------<br /></span></span><span style="font-family: courier;"><span># Database Creation Version 19c (With CDB/PDB on ASM Disks)</span></span><span style="font-family: courier;"><span><br /></span></span><span style="font-family: courier;"><span># SINGLE Create Database Silent on ASM and Container True<br /></span></span><span style="font-family: courier;"><span><br /></span></span></div><div><span style="font-family: courier;"><span>dbca -silent -createDatabase -templateName General_Purpose.dbc \<br /></span></span><span style="font-family: courier;"><span> -gdbName cdbprod \<br /></span></span><span style="font-family: courier;"><span> -sid cdbprod \<br /></span></span><span style="font-family: courier;"><span> -createAsContainerDatabase true \<br /></span></span><span style="font-family: courier;"><span> -databaseConfigType single \<br /></span></span><span style="font-family: courier;"><span> -SysPassword Welcome1 \<br /></span></span><span style="font-family: courier;"><span> -SystemPassword Welcome1 \<br /></span></span><span style="font-family: courier;"><span> -emConfiguration NONE \<br /></span></span><span style="font-family: courier;"><span> -storageType ASM \<br /></span></span><span style="font-family: courier;"><span> -datafileDestination +DATA \<br /></span></span><span style="font-family: courier;"><span> -redoLogFileSize 200 \<br /></span></span><span style="font-family: courier;"><span> -characterSet AL32UTF8 \<br /></span></span><span style="font-family: courier;"><span> -enableArchive true \<br /></span></span><span style="font-family: courier;"><span> -archiveLogMode auto \<br /></span></span><span style="font-family: courier;"><span> -recoveryAreaDestination +FRA \<br /></span></span><span style="font-family: courier;"><span> -memoryPercentage 50 \<br /></span></span><span style="font-family: courier;"><span> -dbOptions IMEDIA:false,CWMLITE:false,SAMPLE_SCHEMA:false,ORACLE_TEXT:false,APEX:false,OMS:false,DV:false,JSERVER:false,SPATIAL:false</span></span><span style="font-family: courier;"><span><br /></span></span><span style="font-family: courier;"><span><br /></span></span></div><div><span style="font-family: courier;"><span># ---------------------------------------------------------------------</span></span></div><div><span style="font-family: courier;"><span># This is to setup the password of your new CDP, necessary when you use DBCA Silent.</span></span></div><div><span style="font-family: courier;"><span># ---------------------------------------------------------------------</span></span></div><div><span style="font-family: courier;"><span><br /></span></span><span style="font-family: courier;">orapwd dbuniquename=cdbprod file='+DATA' force=y entries=10 password="Welcome1+"</span><span style="font-family: courier;"><span><br /></span></span><span style="font-family: courier;"><span><br /></span></span></div><div><span style="font-family: courier;"><span># ---------------------------------------------------------------------</span></span></div><div><span style="font-family: courier;"><span># Validate the Database Creation</span></span></div><div><span style="font-family: courier;"><span># ---------------------------------------------------------------------</span></span></div><div><span style="font-family: courier;"><span><br /></span></span></div><div><span style="font-family: courier;"><span>srvctl config database -db cdbprod</span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-28948996387731345212020-12-09T01:41:00.001-08:002020-12-09T01:41:06.447-08:00ORACLE Configuration<p><span style="font-family: courier;"># ------------------------------------------------------------------------<br />su - oracle<br /><br /># ------------------------------------------------------------------------<br /># Version Variable<br /># ------------------------------------------------------------------------<br />#<br /><br />ORA_VER_INST="11.2.0.4"<br />ORA_VER_INST="12.1.0.2"<br />ORA_VER_INST="12.2.0.1"<br />ORA_VER_INST="12.2.0.2"<br />ORA_VER_INST="18.1.0.1"<br />ORA_VER_INST="18.1.0.2"<br />ORA_VER_INST="18.2.0.1"<br />ORA_VER_INST="18.2.0.2"<br />ORA_VER_INST="18.3.0.1"<br />ORA_VER_INST="18.3.0.2"<br />ORA_VER_INST="18.4.0.1"<br />ORA_VER_INST="19.1.0.1"<br />ORA_VER_INST="19.2.0.2"<br />ORA_VER_INST="19.3.0.1"<br /><br /># ------------------------------------------------------------------------<br /># Oracle Edition<br /># ------------------------------------------------------------------------<br />#<br /><br />ORA_EDITION="db_SE_01"<br />ORA_EDITION="db_SE1_01"<br />ORA_EDITION="db_SE2_01"<br />ORA_EDITION="db_EE_01"<br />ORA_EDITION="db_PE_01"<br />ORA_EDITION="db_XE_01"<br /><br /># ------------------------------------------------------------------------<br /># SRV01 - ORACLE<br /># ------------------------------------------------------------------------<br />#<br /><br />cat > /home/oracle/.cdb1 <<EOF<br /># Variables Of Environment ORACLE [ ORACLE ]<br />export TMP=/tmp<br />export TMPDIR=\${TMP}<br />export HOST=\`hostname\`<br />export UPTIME=\`uptime | sed 's/.*up \([^,]*\), .*/\1/'\`<br />export ORACLE_HOSTNAME=\${HOST}<br />export ORACLE_BASE=/u01/app/oracle<br />export ORACLE_VERSION=${ORA_VER_INST}<br />export ORACLE_EDITION=${ORA_EDITION}<br />export ORACLE_HOME=\${ORACLE_BASE}/product/\${ORACLE_VERSION}/\${ORACLE_EDITION}<br />export GRID_HOME=/u01/app/\${ORACLE_VERSION}/grid<br />export ORACLE_TERM=xterm<br />export ORACLE_UNQNAME=cdbprod<br />export ORACLE_SID=cdbprod<br />export GRID_SID="+ASM"<br />export OGG_HOME=\${ORACLE_BASE}/product/ogg_19c<br />export TFA_HOME=\${ORACLE_HOME}/suptools/tfa/release/tfa_home<br />export OCK_HOME=\${ORACLE_HOME}/suptools/orachk<br />export OH=\${ORACLE_HOME}<br />export DBS=\${ORACLE_HOME}/dbs<br />export TNS=\${ORACLE_HOME}/network/admin<br />export OGG=\${OGG_HOME}<br />export TFA=\${TFA_HOME}<br />export OCK=\${OCK_HOME}<br />export ORATOP=\${ORACLE_HOME}/suptools/oratop/oratop<br />export OPATCH=\${ORACLE_HOME}/OPatch<br />export JAVA_HOME=\${ORACLE_HOME}/jdk<br />export PS1=\$'[ \${ORACLE_SID} ]|[ \${LOGNAME}@\h:\`pwd\`: ]\$ '<br />export PATH=\${PATH}:/usr/sbin:/usr/bin:/sbin:/bin:\${ORACLE_HOME}/bin:\${GRID_HOME}/bin:\${OPATCH}:\${ORACLE_HOME}/perl/bin:\${JAVA_HOME}/bin:\${OGG_HOME}:\${TFA_HOME}/bin:\${OCK_HOME}/<br />export LD_LIBRARY_PATH=\${ORACLE_HOME}/lib:\${ORACLE_HOME}/perl/lib:\${GRID_HOME}/lib:/lib:/usr/lib<br />export CLASSPATH=\${ORACLE_HOME}/JRE:\${ORACLE_HOME}/jlib:\${ORACLE_HOME}/rdbms/jlib<br />export ALERTDB=\${ORACLE_BASE}/diag/rdbms/\${ORACLE_UNQNAME}/\${ORACLE_SID}/trace/alert_\${ORACLE_SID}.log<br />export ALERTDG=\${ORACLE_BASE}/diag/rdbms/\${ORACLE_UNQNAME}/\${ORACLE_SID}/trace/drc\${ORACLE_SID}.log<br />export ALERTGG=\${OGG_HOME}/ggserr.log<br />export ALERTASM=\${ORACLE_BASE}/diag/asm/+asm/\${GRID_SID}/trace/alert_\${GRID_SID}.log<br />export LSNRCTL=\`ps -ef | grep tnslsnr | grep -v "grep" | wc -l\`<br />alias dblog='tail -f \${ALERTDB}'<br />alias dglog='tail -f \${ALERTDG}'<br />alias gglog='tail -f \${ALERTGG}'<br />alias asmlog='tail -f \${ALERTASM}'<br />alias sqlplus='rlwrap sqlplus'<br />alias s='rlwrap sqlplus / as sysdba'<br />alias rman='rlwrap rman'<br />alias r='rlwrap rman target /'<br />alias dgmgrl='rlwrap dgmgrl'<br />alias d='rlwrap dgmgrl /'<br />alias asmcmd='rlwrap asmcmd'<br />alias a='rlwrap asmcmd'<br />alias adrci='rlwrap adrci'<br />alias ad='rlwrap adrci'<br />alias ggsci='rlwrap \${OGG_HOME}/ggsci'<br />alias ogg='rlwrap \${OGG_HOME}/ggsci'<br />alias p='ps -ef | grep pmon | grep -v grep'<br />alias l='rlwrap lsnrctl status'<br />alias rest='crsctl stat res -t -init'<br />alias res='crsctl stat res -t'<br />alias orat='\${ORATOP}/oratop -f -i 10 / as sysdba'<br />alias meminfo='free -m -l -t'<br />alias psmem='ps auxf | sort -nr -k 4'<br />alias psmem10='ps auxf | sort -nr -k 4 | head -10'<br />alias pscpu='ps auxf | sort -nr -k 3'<br />alias pscpu10='ps auxf | sort -nr -k 3 | head -10'<br />alias cpuinfo='lscpu'<br />umask 0022<br />clear<br />if [[ \${ORACLE_SID} = \`ps -ef | grep pmon | grep -i \${ORACLE_SID} | awk '{ print \$NF }' | sed s/ora_pmon_//g\` ]]<br />then<br /> DB_STATUS="ONLINE"<br />else<br /> DB_STATUS="OFFLINE"<br />fi<br />if [ \${LSNRCTL} != 0 ]<br />then<br /> DB_LISTNER="ONLINE"<br />else<br /> DB_LISTNER="OFFLINE"<br />fi<br />echo ">----------------------------------------------------------------------------------------------"<br />echo "# SERVER_UPTIME.....: [ \${UPTIME} ]"<br />echo "# ORACLE_BASE.......: [ \${ORACLE_BASE} ]"<br />echo "# ORACLE_HOME.......: [ \${ORACLE_HOME} ]"<br />echo "# ORACLE_VERSION....: [ \${ORACLE_VERSION} ]"<br />echo "# ORACLE_SID........: [ \${ORACLE_SID} ]"<br />echo "# DATABASE_STATUS...: [ \${DB_STATUS} ]"<br />echo "# LISTENER_STATUS...: [ \${DB_LISTNER} ]"<br />echo ">----------------------------------------------------------------------------------------------"<br />EOF<br /><br />grep -v '^#\|^$' /etc/oratab<br /><br /># ------------------------------------------------------------------------<br />chown oracle.oinstall /home/oracle/.cdb1<br /><br />echo ". /home/oracle/.cdb1" >> /home/oracle/.bash_profile</span></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-38854994183546922402020-12-08T01:46:00.003-08:002020-12-08T02:35:23.242-08:00AFD / ACFS Configuration<p><span style="font-family: courier;"># ------------------------------------------------------------------------<br /># AFD Manually Installation<br /># ------------------------------------------------------------------------<br /># AS ROOT<br /><br />/u01/app/19.3.0.1/grid/bin/afdroot version_check ---> only to enable acfs<br />/u01/app/19.3.0.1/grid/bin/afddriverstate supported ---> only to enable acfs<br /><br /># SINGLE RESTART<br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_label DATA /dev/sdb --init<br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_label FRA /dev/sdc --init<br /><br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_lslbl<br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_lsdsk<br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_state<br /><br /># RAC<br /># /u01/app/19.3.0.1/grid/bin/asmcmd afd_label CONFIG /dev/sdb<br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_label CONFIG /dev/sdb --init<br /><br /># /u01/app/19.3.0.1/grid/bin/asmcmd afd_label DATA /dev/sdc<br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_label DATA /dev/sdc --init<br /><br /># /u01/app/19.3.0.1/grid/bin/asmcmd afd_label FRA /dev/sdd<br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_label FRA /dev/sdd --init<br /><br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_lslbl<br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_lsdsk<br />/u01/app/19.3.0.1/grid/bin/asmcmd afd_state<br /><br />#<br />/u01/app/19.3.0.1/grid/bin/asmcmd lsdsk --statistics<br /><br /><br /># chown grid.asmadmin /dev/sdb<br /># chown grid.asmadmin /dev/sdc<br /># chown grid.asmadmin /dev/sdd<br /><br /># <br />/u01/app/19.3.0.1/grid/crs/config/config.sh<br /><br /><br /># Clear<br /><br />asmcmd afd_unlabel 'CONFIG'<br />asmcmd afd_unlabel 'DATA'<br />asmcmd afd_unlabel 'FRA'<br /><br /><br />disk /dev/sdb1 is already provisioned for ASM<br />disk /dev/sdc1 is already provisioned for ASM<br /><br /><br />dd if=/dev/zero of=/dev/sdb1 bs=1024 count=100<br />dd if=/dev/zero of=/dev/sdc1 bs=1024 count=100<br /></span></p><p><span style="font-family: courier;"># ------------------------------------------------------------------------<br /># Pre-Checks of Oracle Restart Installation<br /># ------------------------------------------------------------------------<br /><br />./runcluvfy.sh stage -pre hacfg<br /></span></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-52400140184544941932020-12-08T01:10:00.002-08:002020-12-08T01:11:24.955-08:00GRID Configuration<p><span style="font-family: courier;"># ------------------------------------------------------------------------<br /># ------------------------------------------------------------------------<br /># Version Variable<br />#<br /><br />ORA_VER_INST="11.2.0.4"<br />ORA_VER_INST="12.1.0.2"<br />ORA_VER_INST="12.2.0.1"<br />ORA_VER_INST="12.2.0.2"<br />ORA_VER_INST="18.1.0.1"<br />ORA_VER_INST="18.1.0.2"<br />ORA_VER_INST="18.2.0.1"<br />ORA_VER_INST="18.2.0.2"<br />ORA_VER_INST="18.3.0.1"<br />ORA_VER_INST="18.3.0.2"<br />ORA_VER_INST="18.4.0.1"<br />ORA_VER_INST="19.3.0.1"<br /><br /># ------------------------------------------------------------------------<br /># Oracle Edition<br />#<br /><br />ORA_EDITION="db_SE_01"<br />ORA_EDITION="db_SE1_01"<br />ORA_EDITION="db_SE2_01"<br />ORA_EDITION="db_EE_01"<br />ORA_EDITION="db_PE_01"<br /><br /># ------------------------------------------------------------------------<br /># Grid Folders<br /># ------------------------------------------------------------------------<br />#<br /><br />mkdir -p /u01/app/grid<br />mkdir -p /u01/app/${ORA_VER_INST}/grid<br />mkdir -p /u01/app/oraInventory/<br />#<br />chown grid.oinstall -R /u01/app/grid<br />chown grid.oinstall -R /u01/app/${ORA_VER_INST}<br /><br />#<br /># chown grid.oinstall /u01/app/oraInventory/<br /><br /># ------------------------------------------------------------------------<br /># Database Folders<br /># ------------------------------------------------------------------------<br />#<br /><br />mkdir -p /u01/app/oracle<br />mkdir -p /u01/app/oracle/product/${ORA_VER_INST}/${ORA_EDITION}<br /><br />#<br />chown oracle.oinstall -R /u01/app/oracle<br />chown oracle.oinstall -R /u01/app/oracle/product/${ORA_VER_INST}<br />#<br /># chown oracle.oinstall /u01/app/oraInventory/<br /> </span></p><p></p><p><span style="font-family: courier;"># ------------------------------------------------------------------------<br /># Configuration <br /># ------------------------------------------------------------------------<br /><br />su - grid<br /><br /># ------------------------------------------------------------------------<br /># Version Variable<br />#<br /><br />ORA_VER_INST="11.2.0.4"<br />ORA_VER_INST="12.1.0.2"<br />ORA_VER_INST="12.2.0.1"<br />ORA_VER_INST="12.2.0.2"<br />ORA_VER_INST="18.1.0.1"<br />ORA_VER_INST="18.1.0.2"<br />ORA_VER_INST="18.2.0.1"<br />ORA_VER_INST="18.2.0.2"<br />ORA_VER_INST="18.3.0.1"<br />ORA_VER_INST="18.3.0.2"<br />ORA_VER_INST="18.4.0.1"<br />ORA_VER_INST="19.1.0.1"<br />ORA_VER_INST="19.2.0.2"<br />ORA_VER_INST="19.3.0.1"<br /><br /># ------------------------------------------------------------------------<br /># Oracle Edition<br />#<br /><br />ORA_EDITION="db_SE_01"<br />ORA_EDITION="db_SE1_01"<br />ORA_EDITION="db_SE2_01"<br />ORA_EDITION="db_EE_01"<br />ORA_EDITION="db_PE_01"<br />ORA_EDITION="db_XE_01"<br /><br />#<br /># ------------------------------------------------------------------------<br /># SRV01 - GRID<br /># ------------------------------------------------------------------------<br />#<br /><br />cat > /home/grid/.asm <<EOF<br /># Variables Of Environment ORACLE [ GRID ]<br />export TMP=/tmp<br />export TMPDIR=\${TMP}<br />export HOST=\`hostname\`<br />export HOSTNAME=\`hostname -a\`<br />export UPTIME=\`uptime | sed 's/.*up \([^,]*\), .*/\1/'\`<br />export ORACLE_HOSTNAME=\${HOST}<br />export ORACLE_BASE=/u01/app/grid<br />export ORACLE_VERSION=${ORA_VER_INST}<br />export GRID_HOME=/u01/app/\${ORACLE_VERSION}/grid<br />export ORACLE_HOME=\${GRID_HOME}<br />export OH=\${ORACLE_HOME}<br />export DBS=\${ORACLE_HOME}/dbs<br />export TNS=\${ORACLE_HOME}/network/admin<br />export ORACLE_SID=+ASM<br />export ORACLE_TERM=xterm<br />export OPATCH=\${ORACLE_HOME}/OPatch<br />export JAVA_HOME=\${ORACLE_HOME}/jdk<br />export PS1=\$'[ \${ORACLE_SID} ]|[ \${LOGNAME}@\h:\`pwd\`: ]\$ '<br />export PATH=\${PATH}:/usr/sbin:/usr/bin:/sbin:/bin:\${ORACLE_HOME}/bin:\${GRID_HOME}/bin:\${OPATCH}:\${ORACLE_HOME}/perl/bin:\${JAVA_HOME}/bin<br />export LD_LIBRARY_PATH=\${ORACLE_HOME}/lib:\${ORACLE_HOME}/perl/lib:\${GRID_HOME}/lib:/lib:/usr/lib<br />export CLASSPATH=\${ORACLE_HOME}/JRE:\${ORACLE_HOME}/jlib:\${ORACLE_HOME}/rdbms/jlib<br />export ALERTASM=\${ORACLE_BASE}/diag/asm/+asm/\${ORACLE_SID}/trace/alert_\${ORACLE_SID}.log<br />export LSNRCTL=\`ps -ef | grep tnslsnr | grep -v "grep" | wc -l\`<br />alias asmlog='tail -f \${ALERTASM}'<br />alias sqlplus='rlwrap sqlplus'<br />alias s='rlwrap sqlplus / as sysasm'<br />alias rman='rlwrap rman'<br />alias r='rlwrap rman target /'<br />alias asmcmd='rlwrap asmcmd -p'<br />alias a='rlwrap asmcmd -p'<br />alias adrci='rlwrap adrci'<br />alias ad='rlwrap adrci'<br />alias p='ps -ef | grep pmon | grep -v grep'<br />alias l='rlwrap lsnrctl status'<br />alias rest='crsctl stat res -t -init'<br />alias res='crsctl stat res -t'<br />alias wr='watch -d crsctl stat res -t'<br />alias meminfo='free -m -l -t'<br />alias psmem='ps auxf | sort -nr -k 4'<br />alias psmem10='ps auxf | sort -nr -k 4 | head -10'<br />alias pscpu='ps auxf | sort -nr -k 3'<br />alias pscpu10='ps auxf | sort -nr -k 3 | head -10'<br />alias cpuinfo='lscpu'<br />umask 0022<br />clear<br />if [[ \${ORACLE_SID} = \`ps -ef | grep pmon | grep -i \${ORACLE_SID} | awk '{ print \$NF }' | sed s/asm_pmon_//g\` ]]<br />then<br /> DB_STATUS="ONLINE"<br />else<br /> DB_STATUS="OFFLINE"<br />fi<br />if [ \${LSNRCTL} != 0 ]<br />then<br /> DB_LISTNER="ONLINE"<br />else<br /> DB_LISTNER="OFFLINE"<br />fi<br />echo ">----------------------------------------------------------------------------------------------"<br />echo "# SERVER_UPTIME.....: [ \${UPTIME} ]"<br />echo "# ORACLE_BASE.......: [ \${ORACLE_BASE} ]"<br />echo "# ORACLE_HOME.......: [ \${ORACLE_HOME} ]"<br />echo "# ORACLE_VERSION....: [ \${ORACLE_VERSION} ]"<br />echo "# ORACLE_SID........: [ \${ORACLE_SID} ]"<br />echo "# DATABASE_STATUS...: [ \${DB_STATUS} ]"<br />echo "# LISTENER_STATUS...: [ \${DB_LISTNER} ]"<br />echo ">----------------------------------------------------------------------------------------------"<br />EOF<br /><br /># ------------------------------------------------------------------------<br /># Configure the Environment of Grid per File<br /># ------------------------------------------------------------------------<br />chown grid.oinstall /home/grid/.asm<br />echo ". /home/grid/.asm" >> /home/grid/.bash_profile</span></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-52044607416109881782020-12-03T04:46:00.004-08:002020-12-07T01:45:39.942-08:00Preparing Linux to install Oracle Products<div style="text-align: left;"><span style="font-family: courier;"><span># ---------------------------------------------------------------------<br /></span><span># Setup the ROOT Environment<br /></span><span># ---------------------------------------------------------------------<br /></span><span>#</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span><br /></span><span>cat > /root/.bash_profile <<EOF</span><span><br /></span><span># Get the aliases and functions<br /></span><span>if [ -f ~/.bashrc ]; then<br /></span><span> . ~/.bashrc<br /></span><span>fi</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span><br /></span><span># User specific environment and startup programs<br /></span><span>export PS1=\$'[ \${LOGNAME}@\h:\`pwd\`: ]\$ '<br /></span><span>export GRID_VERSION=19.3.0.1<br /></span><span>export ORACLE_BASE=/u01/app/grid<br /></span><span>export GRID_HOME=/u01/app/\${GRID_VERSION}/grid<br /></span><span>export ORACLE_HOME=\${GRID_HOME}<br /></span><span>export OPATCH=\${ORACLE_HOME}/OPatch<br /></span><span>export JAVA_HOME=\${ORACLE_HOME}/jdk<br /></span><span>export PATH=\${PATH}:\${HOME}/bin:\${GRID_HOME}/bin:\${OPATCH}:\${JAVA_HOME}/bin<br /></span><span>EOF</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span><br /></span><span>. .bash_profile<br /></span><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span># ---------------------------------------------------------------------<br /></span><span># OEL 7 and 8<br /></span><span># ---------------------------------------------------------------------<br /></span><span>hostnamectl set hostname srv01.dbnitro.net --stats<br /></span><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span># ---------------------------------------------------------------------<br /></span><span># OR<br /></span><span># ---------------------------------------------------------------------<br /></span><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span>vim /etc/hosts</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span><br /></span><span># OR</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span>echo "192.168.56.10 srv01.dbnitro.net srv01" >> /etc/hosts<br /></span><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span># ---------------------------------------------------------------------<br /></span><span># OEL 7 and 8<br /></span><span># ---------------------------------------------------------------------</span><span>systemctl stop firewalld</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span>systemctl disable firewalld<br /></span><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span># ---------------------------------------------------------------------<br /></span><span># yum -y install chrony<br /></span><span># ---------------------------------------------------------------------<br /></span><span>systemctl enable chronyd.service<br /></span><span>systemctl status chronyd.service<br /></span><span>systemctl start chronyd.service<br /></span><span>systemctl restart chronyd.service<br /></span><span>systemctl status chronyd.service<br /></span><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span># ---------------------------------------------------------------------<br /></span><span># Install EPEL for OL7<br /></span><span># ---------------------------------------------------------------------<br /></span><span>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm<br /></span><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span># ---------------------------------------------------------------------<br /></span><span># Install EPEL for OL8<br /></span><span># ---------------------------------------------------------------------<br /></span><span>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm<br /></span><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span># ---------------------------------------------------------------------# JAVA<br /></span><span># ---------------------------------------------------------------------<br /></span><span>yum -y install java-1.8.0-openjdk-devel.x86_64 java-1.8.0-openjdk.x86_64<br /></span><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span># ---------------------------------------------------------------------<br /></span><span>dnf -y install java-1.8.0-openjdk-devel.x86_64 java-1.8.0-openjdk.x86_64</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span><br /></span><span># ---------------------------------------------------------------------</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span># Update the Linux and Kernel</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span># ---------------------------------------------------------------------</span><span><br /></span><span>yum -y upgrade</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span><br /></span><span># ---------------------------------------------------------------------<br /></span><span># OEL 7 ---> https://yum.oracle.com/repo/OracleLinux/OL7/baseos/latest/x86_64/index.html</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span><br /></span><span># ---------------------------------------------------------------------<br /></span><span># Verify Installed Packages<br /></span><span># ---------------------------------------------------------------------<br /></span><span>rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' atop bc.x86_64 beakerlib-vim-syntax binutils bind-utils bzip2-devel.x86_64 bzip2-libs.x86_64 bzip2.x86_64 chrony cpp compat-libstdc++-33 compat-libcap1 dialog elinks elfutils-libelf elfutils-libelf-devel epel-release.noarch firefox gcc gcc-c++ glances glibc glibc-common glibc-devel glibc-headers htop iotop iptraf-ng iscsi-initiator-utils iscsi-initiator-utils-iscsiuio lsscsi libiscsi netbsd-iscsi targetcli ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libiscsi libXtst libXtst-devel lm_sensors lsof make mlocate nawk.x86_64 net-tools ntp nfs-utils nmap perl perl-DBI perl-TermReadKey perl-ExtUtils-MakeMaker perl-CPAN perl-CGI perl-URI.noarch psmisc readline-devel rlwrap smartmontools sos cockpit sysstat telnet tuned tuned-utils unixODBC unixODBC-devel unzip vim-X11 vim-common vim-enhanced vim-filesystem vim-minimal wget xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-utils xorg-x11-apps xorg-x11-xauth xterm.x86_64 whois | egrep "is not installed"<br /></span><span>rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' kmod-oracleasm.x86_64 ---> NOT NECESSARY FOR AFD/ACFS<br /></span><span>rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' oracleasm-support.x86_64 ---> NOT NECESSARY FOR AFD/ACFS<br /></span><span>rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' oracleasmlib.x86_64 ---> NOT NECESSARY FOR AFD/ACFS<br /></span><span>rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' ocfs2-tools.x86_64<br /></span><span>rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' oracle-rdbms-server-11gR2-preinstall.x86_64<br /></span><span>rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' oracle-rdbms-server-12cR1-preinstall.x86_64<br /></span><span>rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' oracle-database-server-12cR2-preinstall.x86_64<br /></span><span>rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' oracle-database-preinstall-18c.x86_64<br /></span><span>rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' oracle-database-preinstall-19c.x86_64</span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span><br /></span><span># ---------------------------------------------------------------------<br /></span><span># Install Packages<br /></span><span># ---------------------------------------------------------------------<br /></span><span>yum -y install atop bc.x86_64 beakerlib-vim-syntax binutils bind-utils bzip2-devel.x86_64 bzip2-libs.x86_64 bzip2.x86_64 chrony cpp compat-libstdc++-33 compat-libcap1 dialog elinks elfutils-libelf elfutils-libelf-devel epel-release.noarch firefox gcc gcc-c++ glances glibc glibc-common glibc-devel glibc-headers htop iotop iptraf-ng iscsi-initiator-utils iscsi-initiator-utils-iscsiuio lsscsi libiscsi netbsd-iscsi targetcli ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libiscsi libXtst libXtst-devel lm_sensors lsof make mlocate nawk.x86_64 net-tools ntp nfs-utils nmap perl perl-DBI perl-TermReadKey perl-ExtUtils-MakeMaker perl-CPAN perl-CGI perl-URI.noarch psmisc readline-devel rlwrap smartmontools sos cockpit sysstat telnet tuned tuned-utils unixODBC unixODBC-devel unzip vim-X11 vim-common vim-enhanced vim-filesystem vim-minimal wget xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-utils xorg-x11-apps xorg-x11-xauth xterm.x86_64 whois<br /></span><span>yum -y install kmod-oracleasm.x86_64 ---> NOT NECESSARY FOR AFD/ACFS<br /></span><span>yum -y install oracleasm-support.x86_64 ---> NOT NECESSARY FOR AFD/ACFS<br /></span><span>yum -y install oracleasmlib.x86_64 ---> NOT NECESSARY FOR AFD/ACFS<br /></span><span>yum -y install ocfs2-tools.x86_64<br /></span><span>yum -y install oracle-rdbms-server-11gR2-preinstall.x86_64<br /></span><span>yum -y install oracle-rdbms-server-12cR1-preinstall.x86_64<br /></span><span>yum -y install oracle-database-server-12cR2-preinstall.x86_64<br /></span><span>yum -y install oracle-database-preinstall-18c.x86_64<br /></span><span>yum -y install oracle-database-preinstall-19c.x86_64<br /><br /><br /># ------------------------------------------------------------------------<br /># Set parameters on /etc/hosts on Single Instance<br /># ------------------------------------------------------------------------<br />#<br />echo "#" >> /etc/hosts<br />echo "`ifconfig -a | grep inet | awk '{ print $2 }' | head -2 | grep -v 127.0.0.1 | head -1` `hostname` `hostname -s`" >> /etc/hosts<br /><br /># ------------------------------------------------------------------------<br /># Disable SELINUX<br /># ------------------------------------------------------------------------<br />#<br /><br />cat > /etc/sysconfig/selinux <<EOF<br /># This file controls the state of SELinux on the system.<br /># SELINUX= can take one of these three values:<br /># enforcing - SELinux security policy is enforced.<br /># permissive - SELinux prints warnings instead of enforcing.<br /># disabled - No SELinux policy is loaded.<br />SELINUX=disabled<br /># SELINUXTYPE= can take one of these two values:<br /># targeted - Targeted processes are protected,<br /># mls - Multi Level Security protection.<br />SELINUXTYPE=targeted<br />EOF<br /><br /># ------------------------------------------------------------------------<br /># Configure limits.conf<br /># ------------------------------------------------------------------------<br />#<br /><br />cat >> /etc/security/limits.conf <<EOF<br />#<br /># Oracle Limits Configuration<br />#<br />* soft nproc 2047<br />* hard nproc 16384<br />* soft nofile 65536<br />* hard nofile 65536<br />* soft stack 10240<br />* hard stack 32768<br />* soft memlock 60397977<br />* hard memlock 60397977<br />EOF<br /></span></span></div><p><span style="font-family: courier;"># ------------------------------------------------------------------------<br /># Create the Groups and Users<br /># ------------------------------------------------------------------------<br /># ODA Environment<br />#<br /><br />----------------------------------------------------------------------------------------------------------------------<br />Groups Group Name Group ID Grid is a member Oracle is a member Agent is a member<br />----------- --------------- ---------- ----------------------- --------------------- -----------------------<br />oinstall oinstall 54321 yes (primary group) yes (primary group) yes (primary group)<br />osdba dba 54322 yes yes yes<br />osdba oper 54323 no yes yes<br />osbkpdba backupdba 54324 no yes yes<br />osdba asmdba 54325 yes yes yes<br />osdgdba dgdba 54326 no yes yes<br />osdba kmdba 54327 no yes yes<br />osasm asmadmin 54328 yes no no<br />osoper asmoper 54329 yes no yes<br />osracdba racdba 54330 yes yes no<br />osoper racoper 54331 yes yes yes<br /><br />--------------------------------------------------------------------------------------------------------------------<br /><br /># ------------------------------------------------------------------------<br /># Groups ( yum -y install system-config-users )<br /># ------------------------------------------------------------------------<br />#<br />/usr/sbin/groupadd -g 54321 oinstall<br />/usr/sbin/groupadd -g 54322 dba<br />/usr/sbin/groupadd -g 54323 oper<br />/usr/sbin/groupadd -g 54324 backupdba<br />/usr/sbin/groupadd -g 54325 asmdba<br />/usr/sbin/groupadd -g 54326 dgdba<br />/usr/sbin/groupadd -g 54327 kmdba<br />/usr/sbin/groupadd -g 54328 asmadmin<br />/usr/sbin/groupadd -g 54329 asmoper<br />/usr/sbin/groupadd -g 54330 racdba<br />/usr/sbin/groupadd -g 54331 racoper<br /><br />/usr/sbin/useradd -u 54321 -g oinstall -G dba,oper,backupdba,asmdba,dgdba,kmdba,racdba,racoper oracle<br />/usr/sbin/useradd -u 54322 -g oinstall -G dba,asmdba,asmadmin,asmoper,racdba,racoper grid<br /><br /># ------------------------------------------------------------------------<br /># Create Users Password<br /># ------------------------------------------------------------------------<br /># Password<br />#<br /><br />passwd grid<br />passwd oracle<br /><br /># OR<br /><br />echo 'oracle:oracle' | chpasswd<br />echo 'grid:grid' | chpasswd <br /><br /># ------------------------------------------------------------------------<br /># Install the Pre-Install Package for Databases<br />yum -y install oracle-database-preinstall-19c.x86_64<br /><br /></span><br /><span style="font-family: courier;"><span style="font-family: courier;"># ------------------------------------------------------------------------<br /># Validate the Kernel Parameters<br /></span>sysctl -p<br /><br /># ------------------------------------------------------------------------<br /># Creating Directories to Grid and Database Installation<br /># ------------------------------------------------------------------------<br /># General Folders<br /># ------------------------------------------------------------------------<br /><br />mkdir -p /u01/app/oraInventory<br />#<br />mkdir -p /u01/app/grid<br />mkdir -p /u01/app/grid/diag<br />#<br />mkdir -p /u01/app/oracle<br />mkdir -p /u01/app/oracle/diag<br />#<br />chown -R grid.oinstall /u01<br />chown -R grid.oinstall /u01/app/grid<br />chown -R grid.oinstall /u01/app/grid/diag<br />#<br />chown -R oracle.oinstall /u01/app/oracle<br />chown -R oracle.oinstall /u01/app/oracle/diag<br />#<br />chmod -R 775 /u01/<br /><br /> ------------------------------------------------------------------------<br /># Mount tmpfs automatically on Linux<br /># ------------------------------------------------------------------------<br /># Create the folders to Grid and Database<br /># Change the permission to GRID (verify if is necessary re-run this part of the script after Grid installation)<br /># ------------------------------------------------------------------------<br /># Grid (Verify this configuration before the Grid Installation)<br /># ------------------------------------------------------------------------<br /># Used to Manage Auto Memory<br /><br /># mount -t tmpfs shmfs -o size=16g /dev/shm<br /><br />#<br /><br />echo "shmfs /dev/shm tmpfs size=16g 0 0" >> /etc/fstab<br /><br />#<br /><br />mount -a<br /><br /><br /></span></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-33337907422281683222020-08-27T12:55:00.121-07:002021-02-16T06:38:56.174-08:00ORACLE DATABASE IN 3 COMMAND LINES "ONLY" (Versions XE 18c and EE 19c).<p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 8pt; text-align: justify;"><span style="font-family: Courier New;"><b><span style="font-size: 12px;">Hello, I created this post to help people to create an easy and fast Oracle Database environment to test some commands, sql statements, backup and restore or just to learn something new. The goal here is to create one linux vm, as easy and simple as possible, than install and create an Oracle Database, with that you can use the learn and test almost all functionalities and increase your knowledge. If you find something wrong here, </span></b><span style="font-size: 12px;"><b>please inform me via comments or via email.</b></span></span></p><p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 8pt; text-align: justify;"><span style="font-family: Courier New;"><b><span style="font-size: 12px;">I hope you can learn something really helpful here, like it was for me.</span></b></span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span style="font-family: "Courier New"; font-size: 9pt;"># ----------------------------------</span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span style="font-family: "Courier New"; font-size: 9pt;"># Create a VM using VirtualBox.</span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"># ----------------------------------<br /># The idea is create a VM as simple as possible. In this demonstration LAB that I am creating here, will fit for the versions XE and EE as well, we can have the same VM/Linux Installation for both tests.<br /><br /># ----------------------------------<br /># VM Creating.<br /># ----------------------------------<o:p></o:p></span></p><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; color: black;"><tbody><tr><td style="border: 1pt solid; padding: 0cm 5.4pt; width: 725.55pt;" valign="top" width="967"><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><span style="color: red;">OS: Oracle Linux 7.8 x86_64<br />Memory: 4 GB<br />SWAP: 8GB<br />DISKS: 1 Disk of 50GB<br />FS: XFS<br />Packages: BASIC (It's not necessary others package for this LAB during this installation).</span><o:p></o:p></span></p></td></tr></tbody></table><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="color: white; font-family: "Courier New"; font-size: 9pt;"><br /></span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"># After installation of Linux on this VM, you can configure the "/etc/hosts" with the name of the server and the it's ip, this step is mandatory for the database creation.<br /><br /># ----------------------------------<br /># 18c (Version XE)<br /># ----------------------------------<br /># To install all necessary packages on Linux, just execute this command, just it and all necessary packages will be installed for the Oracle Softwares.<o:p></o:p></span></p><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; color: black;"><tbody><tr><td style="border: 1pt solid; padding: 0cm 5.4pt; width: 725.55pt;" valign="top" width="967"><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><span style="color: red;">yum -y install oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm<br /><br /># OR<br /><br /></span></span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><span style="color: red;">
</span></span></p><p style="direction: ltr; language: en-US; margin-bottom: 0pt; margin-left: 0in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: left; unicode-bidi: embed; word-break: normal;"><span style="color: red;"><span style="font-family: "Courier New"; font-size: 10pt;">yum
-y install oracle-database-preinstall-18c.x86_64</span></span></p>
<p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><o:p></o:p></span></p></td></tr></tbody></table><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="color: white; font-family: "Courier New"; font-size: 9pt;"><br /># ----------------------------------</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><br /># To install the Oracle XE software, just download and save the RPM Package, use this link to download it: </span><span lang="EN-US"><a href="https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-18c-1.0-1.x86_64.rpm?xd_co_f=0927a5d6-3c24-43a7-aea7-7a6e921db801" style="color: #954f72;"><span style="font-family: "Courier New"; font-size: 9pt;">https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-18c-1.0-1.x86_64.rpm</span></a></span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><br /><br /># ----------------------------------<br /># Once the download it's done, just execute this command to install the Oracle XE Software.<o:p></o:p></span></p><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; color: black;"><tbody><tr><td style="border: 1pt solid; padding: 0cm 5.4pt; width: 725.55pt;" valign="top" width="967"><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><span style="color: red;">yum -y localinstall /tmp/oracle-database-xe-18c-1.0-1.x86_64.rpm<br /></span><o:p></o:p></span></p></td></tr></tbody></table><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="color: white; font-family: "Courier New"; font-size: 9pt;"><br /># ----------------------------------</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><br /># After the installation process is done, we have to create the database, just execute that command and the database will be created, the SID will be: XE<o:p></o:p></span></p><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; color: black;"><tbody><tr><td style="border: 1pt solid; padding: 0cm 5.4pt; width: 725.55pt;" valign="top" width="967"><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><span style="color: red;">/etc/init.d/oracle-xe-18c configure</span><o:p></o:p></span></p></td></tr></tbody></table><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><br /># ----------------------------------</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><br /># This command asks you to insert the password of this instance.<br /><br /># ----------------------------------<br /># That is it, after the database creation, you have to connect on the Oracle User, and connect on the database using sqlplus, (don't forget to setup the variables using . oraenv).<o:p></o:p></span></p><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; color: black;"><tbody><tr><td style="border: 1pt solid; padding: 0cm 5.4pt; width: 725.55pt;" valign="top" width="967"><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><span style="color: red;">su – oracle<br /><br />. oraenv <<< XE<br /><br />sqlplus / as sysdba<br /><br />select host_name<br /> , instance_number<br /> , instance_name<br /> , version<br /> , version_full<br /> , status<br /> , database_status<br /> , instance_role<br /> , instance_mode<br /> , database_type<br /> , edition <br />from gv$instance<br />order by 1, 2;</span><o:p></o:p></span></p></td></tr></tbody></table><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><br /></span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span style="font-family: "Courier New"; font-size: 9pt;"><b><span style="color: red;"># Look my example here!!!</span></b></span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span style="font-family: "Courier New"; font-size: 9pt;"># ----------------------------------</span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"># Installation of Oracle XE</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><br /><br />Last failed login: Thu Aug 27 14:30:18 CEST 2020 from 192.168.56.1 on ssh:notty<br />There was 1 failed login attempt since the last successful login.<br />Last login: Thu Aug 27 14:28:07 2020<br /><br /># ----------------------------------<br /># Install the pre-install package<br /><br />[root@oel7-ora-xe ~]# <span style="color: red;">yum -y install oracle-database-preinstall-18c-1.0-1.el7.x86_64</span><br />Loaded plugins: ulninfo<br />ol7_UEKR5 | 2.5 kB 00:00:00<br />ol7_latest | 2.7 kB 00:00:00<br />(1/5): ol7_latest/x86_64/group | 660 kB 00:00:00<br />(2/5): ol7_UEKR5/x86_64/updateinfo | 72 kB 00:00:00<br />(3/5): ol7_latest/x86_64/updateinfo | 2.9 MB 00:00:00<br />(4/5): ol7_UEKR5/x86_64/primary_db | 12 MB 00:00:00<br />(5/5): ol7_latest/x86_64/primary_db | 36 MB 00:00:00<br />Resolving Dependencies<br />--> Running transaction check<br />---> Package oracle-database-preinstall-18c.x86_64 0:1.0-1.el7 will be installed<br />--> Processing Dependency: bc for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: sysstat for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: xorg-x11-utils for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: bind-utils for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: net-tools for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: compat-libcap1 for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: ksh for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: libaio-devel for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: xorg-x11-xauth for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: libaio for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: psmisc for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: unzip for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: glibc-devel for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: compat-libstdc++-33 for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: libstdc++-devel for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: nfs-utils for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Processing Dependency: smartmontools for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />--> Running transaction check<br />---> Package bc.x86_64 0:1.06.95-13.el7 will be installed<br />---> Package bind-utils.x86_64 32:9.11.4-16.P2.el7_8.6 will be installed<br />--> Processing Dependency: bind-libs(x86-64) = 32:9.11.4-16.P2.el7_8.6 for package: 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64<br />--> Processing Dependency: bind-libs-lite(x86-64) = 32:9.11.4-16.P2.el7_8.6 for package: 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64<br />--> Processing Dependency: libisc.so.169()(64bit) for package: 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64<br />--> Processing Dependency: libdns.so.1102()(64bit) for package: 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64<br />--> Processing Dependency: libisccfg.so.160()(64bit) for package: 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64<br />--> Processing Dependency: liblwres.so.160()(64bit) for package: 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64<br />--> Processing Dependency: libGeoIP.so.1()(64bit) for package: 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64<br />--> Processing Dependency: libirs.so.160()(64bit) for package: 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64<br />--> Processing Dependency: libbind9.so.160()(64bit) for package: 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64<br />---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed<br />---> Package compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed<br />---> Package glibc-devel.x86_64 0:2.17-307.0.1.el7.1 will be installed<br />--> Processing Dependency: glibc-headers = 2.17-307.0.1.el7.1 for package: glibc-devel-2.17-307.0.1.el7.1.x86_64<br />--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-307.0.1.el7.1.x86_64<br />---> Package ksh.x86_64 0:20120801-142.0.1.el7 will be installed<br />---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed<br />---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed<br />---> Package libstdc++-devel.x86_64 0:4.8.5-39.0.5.el7 will be installed<br />--> Processing Dependency: libstdc++(x86-64) = 4.8.5-39.0.5.el7 for package: libstdc++-devel-4.8.5-39.0.5.el7.x86_64<br />---> Package net-tools.x86_64 0:2.0-0.25.20131004git.el7 will be installed<br />---> Package nfs-utils.x86_64 1:1.3.0-0.66.0.1.el7_8 will be installed<br />--> Processing Dependency: gssproxy >= 0.7.0-3 for package: 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64<br />--> Processing Dependency: libtirpc >= 0.2.4-0.7 for package: 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64<br />--> Processing Dependency: rpcbind for package: 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64<br />--> Processing Dependency: keyutils for package: 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64<br />--> Processing Dependency: libevent for package: 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64<br />--> Processing Dependency: libnfsidmap for package: 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64<br />--> Processing Dependency: quota for package: 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64<br />--> Processing Dependency: libevent-2.0.so.5()(64bit) for package: 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64<br />--> Processing Dependency: libtirpc.so.1()(64bit) for package: 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64<br />--> Processing Dependency: libnfsidmap.so.0()(64bit) for package: 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64<br />---> Package psmisc.x86_64 0:22.20-16.el7 will be installed<br />---> Package smartmontools.x86_64 1:7.0-2.el7 will be installed<br />--> Processing Dependency: mailx for package: 1:smartmontools-7.0-2.el7.x86_64<br />---> Package sysstat.x86_64 0:10.1.5-19.el7 will be installed<br />--> Processing Dependency: libsensors.so.4()(64bit) for package: sysstat-10.1.5-19.el7.x86_64<br />---> Package unzip.x86_64 0:6.0-21.el7 will be installed<br />---> Package xorg-x11-utils.x86_64 0:7.5-23.el7 will be installed<br />--> Processing Dependency: libXext.so.6()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libXv.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libXtst.so.6()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libXrender.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libXxf86vm.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libXxf86misc.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libX11-xcb.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libXrandr.so.2()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libdmx.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libXinerama.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libX11.so.6()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libXxf86dga.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libxcb.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libxcb-shape.so.0()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />--> Processing Dependency: libXi.so.6()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64<br />---> Package xorg-x11-xauth.x86_64 1:1.0.9-1.el7 will be installed<br />--> Processing Dependency: libXau.so.6()(64bit) for package: 1:xorg-x11-xauth-1.0.9-1.el7.x86_64<br />--> Processing Dependency: libXmuu.so.1()(64bit) for package: 1:xorg-x11-xauth-1.0.9-1.el7.x86_64<br />--> Running transaction check<br />---> Package GeoIP.x86_64 0:1.5.0-14.el7 will be installed<br />--> Processing Dependency: geoipupdate for package: GeoIP-1.5.0-14.el7.x86_64<br />---> Package bind-libs.x86_64 32:9.11.4-16.P2.el7_8.6 will be installed<br />--> Processing Dependency: bind-license = 32:9.11.4-16.P2.el7_8.6 for package: 32:bind-libs-9.11.4-16.P2.el7_8.6.x86_64<br />---> Package bind-libs-lite.x86_64 32:9.11.4-16.P2.el7_8.6 will be installed<br />---> Package glibc-headers.x86_64 0:2.17-307.0.1.el7.1 will be installed<br />--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-307.0.1.el7.1.x86_64<br />--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-307.0.1.el7.1.x86_64<br />---> Package gssproxy.x86_64 0:0.7.0-28.el7 will be installed<br />--> Processing Dependency: libini_config >= 1.3.1-31 for package: gssproxy-0.7.0-28.el7.x86_64<br />--> Processing Dependency: libref_array.so.1(REF_ARRAY_0.1.1)(64bit) for package: gssproxy-0.7.0-28.el7.x86_64<br />--> Processing Dependency: libini_config.so.3(INI_CONFIG_1.1.0)(64bit) for package: gssproxy-0.7.0-28.el7.x86_64<br />--> Processing Dependency: libini_config.so.3(INI_CONFIG_1.2.0)(64bit) for package: gssproxy-0.7.0-28.el7.x86_64<br />--> Processing Dependency: libverto-module-base for package: gssproxy-0.7.0-28.el7.x86_64<br />--> Processing Dependency: libini_config.so.3()(64bit) for package: gssproxy-0.7.0-28.el7.x86_64<br />--> Processing Dependency: libbasicobjects.so.0()(64bit) for package: gssproxy-0.7.0-28.el7.x86_64<br />--> Processing Dependency: libref_array.so.1()(64bit) for package: gssproxy-0.7.0-28.el7.x86_64<br />--> Processing Dependency: libcollection.so.2()(64bit) for package: gssproxy-0.7.0-28.el7.x86_64<br />---> Package keyutils.x86_64 0:1.5.8-3.el7 will be installed<br />---> Package libX11.x86_64 0:1.6.7-2.el7 will be installed<br />--> Processing Dependency: libX11-common >= 1.6.7-2.el7 for package: libX11-1.6.7-2.el7.x86_64<br />---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed<br />---> Package libXext.x86_64 0:1.3.3-3.el7 will be installed<br />---> Package libXi.x86_64 0:1.7.9-1.el7 will be installed<br />---> Package libXinerama.x86_64 0:1.1.3-2.1.el7 will be installed<br />---> Package libXmu.x86_64 0:1.1.2-2.el7 will be installed<br />--> Processing Dependency: libXt.so.6()(64bit) for package: libXmu-1.1.2-2.el7.x86_64<br />---> Package libXrandr.x86_64 0:1.5.1-2.el7 will be installed<br />---> Package libXrender.x86_64 0:0.9.10-1.el7 will be installed<br />---> Package libXtst.x86_64 0:1.2.3-1.el7 will be installed<br />---> Package libXv.x86_64 0:1.0.11-1.el7 will be installed<br />---> Package libXxf86dga.x86_64 0:1.1.4-2.1.el7 will be installed<br />---> Package libXxf86misc.x86_64 0:1.0.3-7.1.el7 will be installed<br />---> Package libXxf86vm.x86_64 0:1.1.4-1.el7 will be installed<br />---> Package libdmx.x86_64 0:1.1.3-3.el7 will be installed<br />---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed<br />---> Package libnfsidmap.x86_64 0:0.25-19.el7 will be installed<br />---> Package libstdc++.x86_64 0:4.8.5-39.0.3.el7 will be updated<br />---> Package libstdc++.x86_64 0:4.8.5-39.0.5.el7 will be an update<br />---> Package libtirpc.x86_64 0:0.2.4-0.16.el7 will be installed<br />---> Package libxcb.x86_64 0:1.13-1.el7 will be installed<br />---> Package lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7 will be installed<br />---> Package mailx.x86_64 0:12.5-19.el7 will be installed<br />---> Package quota.x86_64 1:4.01-19.el7 will be installed<br />--> Processing Dependency: quota-nls = 1:4.01-19.el7 for package: 1:quota-4.01-19.el7.x86_64<br />--> Processing Dependency: tcp_wrappers for package: 1:quota-4.01-19.el7.x86_64<br />---> Package rpcbind.x86_64 0:0.2.0-49.el7 will be installed<br />--> Running transaction check<br />---> Package bind-license.noarch 32:9.11.4-16.P2.el7_8.6 will be installed<br />---> Package geoipupdate.x86_64 0:2.5.0-1.el7 will be installed<br />---> Package kernel-headers.x86_64 0:3.10.0-1127.19.1.el7 will be installed<br />---> Package libX11-common.noarch 0:1.6.7-2.el7 will be installed<br />---> Package libXt.x86_64 0:1.1.5-3.el7 will be installed<br />--> Processing Dependency: libICE.so.6()(64bit) for package: libXt-1.1.5-3.el7.x86_64<br />--> Processing Dependency: libSM.so.6()(64bit) for package: libXt-1.1.5-3.el7.x86_64<br />---> Package libbasicobjects.x86_64 0:0.1.1-32.el7 will be installed<br />---> Package libcollection.x86_64 0:0.7.0-32.el7 will be installed<br />---> Package libini_config.x86_64 0:1.3.1-32.el7 will be installed<br />--> Processing Dependency: libpath_utils.so.1(PATH_UTILS_0.2.1)(64bit) for package: libini_config-1.3.1-32.el7.x86_64<br />--> Processing Dependency: libpath_utils.so.1()(64bit) for package: libini_config-1.3.1-32.el7.x86_64<br />---> Package libref_array.x86_64 0:0.1.5-32.el7 will be installed<br />---> Package libverto-libevent.x86_64 0:0.2.5-4.el7 will be installed<br />---> Package quota-nls.noarch 1:4.01-19.el7 will be installed<br />---> Package tcp_wrappers.x86_64 0:7.6-77.el7 will be installed<br />--> Running transaction check<br />---> Package libICE.x86_64 0:1.0.9-9.el7 will be installed<br />---> Package libSM.x86_64 0:1.2.2-2.el7 will be installed<br />---> Package libpath_utils.x86_64 0:0.2.1-32.el7 will be installed<br />--> Finished Dependency Resolution<br />Dependencies Resolved<br />================================================================================================================<br /> Package Arch Version Repository Size<br />================================================================================================================<br />Installing:<br /> oracle-database-preinstall-18c x86_64 1.0-1.el7 ol7_latest 18 k<br />Installing for dependencies:<br /> GeoIP x86_64 1.5.0-14.el7 ol7_latest 1.5 M<br /> bc x86_64 1.06.95-13.el7 ol7_latest 114 k<br /> bind-libs x86_64 32:9.11.4-16.P2.el7_8.6 ol7_latest 155 k<br /> bind-libs-lite x86_64 32:9.11.4-16.P2.el7_8.6 ol7_latest 1.1 M<br /> bind-license noarch 32:9.11.4-16.P2.el7_8.6 ol7_latest 89 k<br /> bind-utils x86_64 32:9.11.4-16.P2.el7_8.6 ol7_latest 259 k<br /> compat-libcap1 x86_64 1.10-7.el7 ol7_latest 17 k<br /> compat-libstdc++-33 x86_64 3.2.3-72.el7 ol7_latest 190 k<br /> geoipupdate x86_64 2.5.0-1.el7 ol7_latest 34 k<br /> glibc-devel x86_64 2.17-307.0.1.el7.1 ol7_latest 1.1 M<br /> glibc-headers x86_64 2.17-307.0.1.el7.1 ol7_latest 691 k<br /> gssproxy x86_64 0.7.0-28.el7 ol7_latest 110 k<br /> kernel-headers x86_64 3.10.0-1127.19.1.el7 ol7_latest 9.0 M<br /> keyutils x86_64 1.5.8-3.el7 ol7_latest 53 k<br /> ksh x86_64 20120801-142.0.1.el7 ol7_latest 882 k<br /> libICE x86_64 1.0.9-9.el7 ol7_latest 66 k<br /> libSM x86_64 1.2.2-2.el7 ol7_latest 39 k<br /> libX11 x86_64 1.6.7-2.el7 ol7_latest 606 k<br /> libX11-common noarch 1.6.7-2.el7 ol7_latest 164 k<br /> libXau x86_64 1.0.8-2.1.el7 ol7_latest 28 k<br /> libXext x86_64 1.3.3-3.el7 ol7_latest 38 k<br /> libXi x86_64 1.7.9-1.el7 ol7_latest 40 k<br /> libXinerama x86_64 1.1.3-2.1.el7 ol7_latest 13 k<br /> libXmu x86_64 1.1.2-2.el7 ol7_latest 70 k<br /> libXrandr x86_64 1.5.1-2.el7 ol7_latest 27 k<br /> libXrender x86_64 0.9.10-1.el7 ol7_latest 25 k<br /> libXt x86_64 1.1.5-3.el7 ol7_latest 172 k<br /> libXtst x86_64 1.2.3-1.el7 ol7_latest 20 k<br /> libXv x86_64 1.0.11-1.el7 ol7_latest 18 k<br /> libXxf86dga x86_64 1.1.4-2.1.el7 ol7_latest 18 k<br /> libXxf86misc x86_64 1.0.3-7.1.el7 ol7_latest 19 k<br /> libXxf86vm x86_64 1.1.4-1.el7 ol7_latest 17 k<br /> libaio x86_64 0.3.109-13.el7 ol7_latest 24 k<br /> libaio-devel x86_64 0.3.109-13.el7 ol7_latest 12 k<br /> libbasicobjects x86_64 0.1.1-32.el7 ol7_latest 25 k<br /> libcollection x86_64 0.7.0-32.el7 ol7_latest 41 k<br /> libdmx x86_64 1.1.3-3.el7 ol7_latest 15 k<br /> libevent x86_64 2.0.21-4.el7 ol7_latest 208 k<br /> libini_config x86_64 1.3.1-32.el7 ol7_latest 63 k<br /> libnfsidmap x86_64 0.25-19.el7 ol7_latest 49 k<br /> libpath_utils x86_64 0.2.1-32.el7 ol7_latest 28 k<br /> libref_array x86_64 0.1.5-32.el7 ol7_latest 27 k<br /> libstdc++-devel x86_64 4.8.5-39.0.5.el7 ol7_latest 1.5 M<br /> libtirpc x86_64 0.2.4-0.16.el7 ol7_latest 89 k<br /> libverto-libevent x86_64 0.2.5-4.el7 ol7_latest 8.2 k<br /> libxcb x86_64 1.13-1.el7 ol7_latest 213 k<br /> lm_sensors-libs x86_64 3.4.0-8.20160601gitf9185e5.el7 ol7_latest 41 k<br /> mailx x86_64 12.5-19.el7 ol7_latest 244 k<br /> net-tools x86_64 2.0-0.25.20131004git.el7 ol7_latest 305 k<br /> nfs-utils x86_64 1:1.3.0-0.66.0.1.el7_8 ol7_latest 412 k<br /> psmisc x86_64 22.20-16.el7 ol7_latest 141 k<br /> quota x86_64 1:4.01-19.el7 ol7_latest 178 k<br /> quota-nls noarch 1:4.01-19.el7 ol7_latest 90 k<br /> rpcbind x86_64 0.2.0-49.el7 ol7_latest 59 k<br /> smartmontools x86_64 1:7.0-2.el7 ol7_latest 546 k<br /> sysstat x86_64 10.1.5-19.el7 ol7_latest 315 k<br /> tcp_wrappers x86_64 7.6-77.el7 ol7_latest 78 k<br /> unzip x86_64 6.0-21.el7 ol7_latest 171 k<br /> xorg-x11-utils x86_64 7.5-23.el7 ol7_latest 114 k<br /> xorg-x11-xauth x86_64 1:1.0.9-1.el7 ol7_latest 29 k<br />Updating for dependencies:<br /> libstdc++ x86_64 4.8.5-39.0.5.el7 ol7_latest 306 k<br />Transaction Summary<br />================================================================================================================<br />Install 1 Package (+60 Dependent packages)<br />Upgrade ( 1 Dependent package)<br />Total download size: 22 M<br />Downloading packages:<br />Delta RPMs disabled because /usr/bin/applydeltarpm not installed.<br />warning: /var/cache/yum/x86_64/7Server/ol7_latest/packages/bc-1.06.95-13.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY<br />Public key for bc-1.06.95-13.el7.x86_64.rpm is not installed<br />(1/62): bc-1.06.95-13.el7.x86_64.rpm | 114 kB 00:00:00<br />(2/62): bind-libs-9.11.4-16.P2.el7_8.6.x86_64.rpm | 155 kB 00:00:00<br />(3/62): GeoIP-1.5.0-14.el7.x86_64.rpm | 1.5 MB 00:00:00<br />(4/62): bind-libs-lite-9.11.4-16.P2.el7_8.6.x86_64.rpm | 1.1 MB 00:00:00<br />(5/62): bind-license-9.11.4-16.P2.el7_8.6.noarch.rpm | 89 kB 00:00:00<br />(6/62): bind-utils-9.11.4-16.P2.el7_8.6.x86_64.rpm | 259 kB 00:00:00<br />(7/62): compat-libcap1-1.10-7.el7.x86_64.rpm | 17 kB 00:00:00<br />(8/62): compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm | 190 kB 00:00:00<br />(9/62): geoipupdate-2.5.0-1.el7.x86_64.rpm | 34 kB 00:00:00<br />(10/62): glibc-headers-2.17-307.0.1.el7.1.x86_64.rpm | 691 kB 00:00:00<br />(11/62): glibc-devel-2.17-307.0.1.el7.1.x86_64.rpm | 1.1 MB 00:00:00<br />(12/62): gssproxy-0.7.0-28.el7.x86_64.rpm | 110 kB 00:00:00<br />(13/62): keyutils-1.5.8-3.el7.x86_64.rpm | 53 kB 00:00:00<br />(14/62): ksh-20120801-142.0.1.el7.x86_64.rpm | 882 kB 00:00:00<br />(15/62): libICE-1.0.9-9.el7.x86_64.rpm | 66 kB 00:00:00<br />(16/62): kernel-headers-3.10.0-1127.19.1.el7.x86_64.rpm | 9.0 MB 00:00:00<br />(17/62): libSM-1.2.2-2.el7.x86_64.rpm | 39 kB 00:00:00<br />(18/62): libX11-common-1.6.7-2.el7.noarch.rpm | 164 kB 00:00:00<br />(19/62): libX11-1.6.7-2.el7.x86_64.rpm | 606 kB 00:00:00<br />(20/62): libXau-1.0.8-2.1.el7.x86_64.rpm | 28 kB 00:00:00<br />(21/62): libXi-1.7.9-1.el7.x86_64.rpm | 40 kB 00:00:00<br />(22/62): libXinerama-1.1.3-2.1.el7.x86_64.rpm | 13 kB 00:00:00<br />(23/62): libXmu-1.1.2-2.el7.x86_64.rpm | 70 kB 00:00:00<br />(24/62): libXrandr-1.5.1-2.el7.x86_64.rpm | 27 kB 00:00:00<br />(25/62): libXrender-0.9.10-1.el7.x86_64.rpm | 25 kB 00:00:00<br />(26/62): libXt-1.1.5-3.el7.x86_64.rpm | 172 kB 00:00:00<br />(27/62): libXtst-1.2.3-1.el7.x86_64.rpm | 20 kB 00:00:00<br />(28/62): libXv-1.0.11-1.el7.x86_64.rpm | 18 kB 00:00:00<br />(29/62): libXxf86dga-1.1.4-2.1.el7.x86_64.rpm | 18 kB 00:00:00<br />(30/62): libXxf86misc-1.0.3-7.1.el7.x86_64.rpm | 19 kB 00:00:00<br />(31/62): libXext-1.3.3-3.el7.x86_64.rpm | 38 kB 00:00:00<br />(32/62): libXxf86vm-1.1.4-1.el7.x86_64.rpm | 17 kB 00:00:00<br />(33/62): libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00:00<br />(34/62): libaio-devel-0.3.109-13.el7.x86_64.rpm | 12 kB 00:00:00<br />(35/62): libbasicobjects-0.1.1-32.el7.x86_64.rpm | 25 kB 00:00:00<br />(36/62): libcollection-0.7.0-32.el7.x86_64.rpm | 41 kB 00:00:00<br />(37/62): libdmx-1.1.3-3.el7.x86_64.rpm | 15 kB 00:00:00<br />(38/62): libevent-2.0.21-4.el7.x86_64.rpm | 208 kB 00:00:00<br />(39/62): libini_config-1.3.1-32.el7.x86_64.rpm | 63 kB 00:00:00<br />(40/62): libnfsidmap-0.25-19.el7.x86_64.rpm | 49 kB 00:00:00<br />(41/62): libpath_utils-0.2.1-32.el7.x86_64.rpm | 28 kB 00:00:00<br />(42/62): libref_array-0.1.5-32.el7.x86_64.rpm | 27 kB 00:00:00<br />(43/62): libstdc++-devel-4.8.5-39.0.5.el7.x86_64.rpm | 1.5 MB 00:00:00<br />(44/62): libstdc++-4.8.5-39.0.5.el7.x86_64.rpm | 306 kB 00:00:00<br />(45/62): libtirpc-0.2.4-0.16.el7.x86_64.rpm | 89 kB 00:00:00<br />(46/62): libxcb-1.13-1.el7.x86_64.rpm | 213 kB 00:00:00<br />(47/62): lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm | 41 kB 00:00:00<br />(48/62): mailx-12.5-19.el7.x86_64.rpm | 244 kB 00:00:00<br />(49/62): net-tools-2.0-0.25.20131004git.el7.x86_64.rpm | 305 kB 00:00:00<br />(50/62): nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64.rpm | 412 kB 00:00:00<br />(51/62): libverto-libevent-0.2.5-4.el7.x86_64.rpm | 8.2 kB 00:00:00<br />(52/62): oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm | 18 kB 00:00:00<br />(53/62): quota-4.01-19.el7.x86_64.rpm | 178 kB 00:00:00<br />(54/62): quota-nls-4.01-19.el7.noarch.rpm | 90 kB 00:00:00<br />(55/62): psmisc-22.20-16.el7.x86_64.rpm | 141 kB 00:00:00<br />(56/62): rpcbind-0.2.0-49.el7.x86_64.rpm | 59 kB 00:00:00<br />(57/62): sysstat-10.1.5-19.el7.x86_64.rpm | 315 kB 00:00:00<br />(58/62): smartmontools-7.0-2.el7.x86_64.rpm | 546 kB 00:00:00<br />(59/62): tcp_wrappers-7.6-77.el7.x86_64.rpm | 78 kB 00:00:00<br />(60/62): unzip-6.0-21.el7.x86_64.rpm | 171 kB 00:00:00<br />(61/62): xorg-x11-utils-7.5-23.el7.x86_64.rpm | 114 kB 00:00:00<br />(62/62): xorg-x11-xauth-1.0.9-1.el7.x86_64.rpm | 29 kB 00:00:00<br />----------------------------------------------------------------------------------------------------------------<br />Total 17 MB/s | 22 MB 00:00:01<br />Retrieving key from </span><span lang="EN-US"><a href="file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle" style="color: #954f72;"><span style="font-family: "Courier New"; font-size: 9pt;">file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle</span></a></span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><br />Importing GPG key 0xEC551F03:<br /> Userid : "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"<br /> Fingerprint: 4214 4123 fecf c55b 9086 313d 72f9 7b74 ec55 1f03<br /> Package : 7:oraclelinux-release-7.8-1.0.7.el7.x86_64 (@anaconda/7.8)<br /> From : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle<br />Running transaction check<br />Running transaction test<br />Transaction test succeeded<br />Running transaction<br /> Updating : libstdc++-4.8.5-39.0.5.el7.x86_64 1/63<br /> Installing : libXau-1.0.8-2.1.el7.x86_64 2/63<br /> Installing : libxcb-1.13-1.el7.x86_64 3/63<br /> Installing : 32:bind-license-9.11.4-16.P2.el7_8.6.noarch 4/63<br /> Installing : libref_array-0.1.5-32.el7.x86_64 5/63<br /> Installing : libevent-2.0.21-4.el7.x86_64 6/63<br /> Installing : libaio-0.3.109-13.el7.x86_64 7/63<br /> Installing : libbasicobjects-0.1.1-32.el7.x86_64 8/63<br /> Installing : libcollection-0.7.0-32.el7.x86_64 9/63<br /> Installing : libICE-1.0.9-9.el7.x86_64 10/63<br /> Installing : libtirpc-0.2.4-0.16.el7.x86_64 11/63<br /> Installing : rpcbind-0.2.0-49.el7.x86_64 12/63<br /> Installing : libSM-1.2.2-2.el7.x86_64 13/63<br /> Installing : libaio-devel-0.3.109-13.el7.x86_64 14/63<br /> Installing : libverto-libevent-0.2.5-4.el7.x86_64 15/63<br /> Installing : libstdc++-devel-4.8.5-39.0.5.el7.x86_64 16/63<br /> Installing : 1:quota-nls-4.01-19.el7.noarch 17/63<br /> Installing : mailx-12.5-19.el7.x86_64 18/63|<br /> Installing : 1:smartmontools-7.0-2.el7.x86_64 19/63<br /> Installing : compat-libstdc++-33-3.2.3-72.el7.x86_64 20/63<br /> Installing : keyutils-1.5.8-3.el7.x86_64 21/63<br /> Installing : libnfsidmap-0.25-19.el7.x86_64 22/63<br /> Installing : lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64 23/63<br /> Installing : sysstat-10.1.5-19.el7.x86_64 24/63<br /> Installing : libpath_utils-0.2.1-32.el7.x86_64 25/63<br /> Installing : libini_config-1.3.1-32.el7.x86_64 26/63<br /> Installing : gssproxy-0.7.0-28.el7.x86_64 27/63<br /> Installing : compat-libcap1-1.10-7.el7.x86_64 28/63<br /> Installing : ksh-20120801-142.0.1.el7.x86_64 29/63<br /> Installing : unzip-6.0-21.el7.x86_64 30/63<br /> Installing : libX11-common-1.6.7-2.el7.noarch 31/63<br /> Installing : libX11-1.6.7-2.el7.x86_64 32/63<br /> Installing : libXext-1.3.3-3.el7.x86_64 33/63<br /> Installing : libXi-1.7.9-1.el7.x86_64 34/63<br /> Installing : libXrender-0.9.10-1.el7.x86_64 35/63<br /> Installing : libXrandr-1.5.1-2.el7.x86_64 36/63<br /> Installing : libXtst-1.2.3-1.el7.x86_64 37/63<br /> Installing : libXxf86misc-1.0.3-7.1.el7.x86_64 38/63<br /> Installing : libdmx-1.1.3-3.el7.x86_64 39/63<br /> Installing : libXinerama-1.1.3-2.1.el7.x86_64 40/63<br /> Installing : libXv-1.0.11-1.el7.x86_64 41/63<br /> Installing : libXxf86vm-1.1.4-1.el7.x86_64 42/63<br /> Installing : libXxf86dga-1.1.4-2.1.el7.x86_64 43/63<br /> Installing : xorg-x11-utils-7.5-23.el7.x86_64 44/63<br /> Installing : libXt-1.1.5-3.el7.x86_64 45/63<br /> Installing : libXmu-1.1.2-2.el7.x86_64 46/63<br /> Installing : 1:xorg-x11-xauth-1.0.9-1.el7.x86_64 47/63<br /> Installing : psmisc-22.20-16.el7.x86_64 48/63<br /> Installing : net-tools-2.0-0.25.20131004git.el7.x86_64 49/63<br /> Installing : kernel-headers-3.10.0-1127.19.1.el7.x86_64 50/63<br /> Installing : glibc-headers-2.17-307.0.1.el7.1.x86_64 51/63<br /> Installing : glibc-devel-2.17-307.0.1.el7.1.x86_64 52/63<br /> Installing : bc-1.06.95-13.el7.x86_64 53/63<br /> Installing : tcp_wrappers-7.6-77.el7.x86_64 54/63<br /> Installing : 1:quota-4.01-19.el7.x86_64 55/63<br /> Installing : 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64 56/63<br /> Installing : geoipupdate-2.5.0-1.el7.x86_64 57/63<br /> Installing : GeoIP-1.5.0-14.el7.x86_64 58/63<br /> Installing : 32:bind-libs-lite-9.11.4-16.P2.el7_8.6.x86_64 59/63<br /> Installing : 32:bind-libs-9.11.4-16.P2.el7_8.6.x86_64 60/63<br /> Installing : 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64 61/63<br /> Installing : oracle-database-preinstall-18c-1.0-1.el7.x86_64 62/63<br /> Cleanup : libstdc++-4.8.5-39.0.3.el7.x86_64 63/63<br /> Verifying : libtirpc-0.2.4-0.16.el7.x86_64 1/63<br /> Verifying : libXext-1.3.3-3.el7.x86_64 2/63<br /> Verifying : libXxf86misc-1.0.3-7.1.el7.x86_64 3/63<br /> Verifying : libdmx-1.1.3-3.el7.x86_64 4/63<br /> Verifying : libICE-1.0.9-9.el7.x86_64 5/63<br /> Verifying : geoipupdate-2.5.0-1.el7.x86_64 6/63<br /> Verifying : libXinerama-1.1.3-2.1.el7.x86_64 7/63<br /> Verifying : libXrender-0.9.10-1.el7.x86_64 8/63<br /> Verifying : libXt-1.1.5-3.el7.x86_64 9/63<br /> Verifying : libXv-1.0.11-1.el7.x86_64 10/63<br /> Verifying : libXi-1.7.9-1.el7.x86_64 11/63<br /> Verifying : libXxf86vm-1.1.4-1.el7.x86_64 12/63<br /> Verifying : tcp_wrappers-7.6-77.el7.x86_64 13/63<br /> Verifying : libcollection-0.7.0-32.el7.x86_64 14/63<br /> Verifying : 1:nfs-utils-1.3.0-0.66.0.1.el7_8.x86_64 15/63<br /> Verifying : libbasicobjects-0.1.1-32.el7.x86_64 16/63<br /> Verifying : gssproxy-0.7.0-28.el7.x86_64 17/63<br /> Verifying : 1:smartmontools-7.0-2.el7.x86_64 18/63<br /> Verifying : 32:bind-libs-9.11.4-16.P2.el7_8.6.x86_64 19/63<br /> Verifying : bc-1.06.95-13.el7.x86_64 20/63<br /> Verifying : GeoIP-1.5.0-14.el7.x86_64 21/63<br /> Verifying : xorg-x11-utils-7.5-23.el7.x86_64 22/63<br /> Verifying : sysstat-10.1.5-19.el7.x86_64 23/63<br /> Verifying : kernel-headers-3.10.0-1127.19.1.el7.x86_64 24/63<br /> Verifying : net-tools-2.0-0.25.20131004git.el7.x86_64 25/63<br /> Verifying : libXtst-1.2.3-1.el7.x86_64 26/63<br /> Verifying : 32:bind-libs-lite-9.11.4-16.P2.el7_8.6.x86_64 27/63<br /> Verifying : rpcbind-0.2.0-49.el7.x86_64 28/63<br /> Verifying : 32:bind-utils-9.11.4-16.P2.el7_8.6.x86_64 29/63<br /> Verifying : glibc-headers-2.17-307.0.1.el7.1.x86_64 30/63<br /> Verifying : libstdc++-4.8.5-39.0.5.el7.x86_64 31/63<br /> Verifying : libaio-0.3.109-13.el7.x86_64 32/63<br /> Verifying : libini_config-1.3.1-32.el7.x86_64 33/63<br /> Verifying : psmisc-22.20-16.el7.x86_64 34/63<br /> Verifying : libX11-common-1.6.7-2.el7.noarch 35/63<br /> Verifying : unzip-6.0-21.el7.x86_64 36/63<br /> Verifying : libxcb-1.13-1.el7.x86_64 37/63<br /> Verifying : libevent-2.0.21-4.el7.x86_64 38/63<br /> Verifying : ksh-20120801-142.0.1.el7.x86_64 39/63<br /> Verifying : libverto-libevent-0.2.5-4.el7.x86_64 40/63<br /> Verifying : compat-libcap1-1.10-7.el7.x86_64 41/63<br /> Verifying : libXrandr-1.5.1-2.el7.x86_64 42/63<br /> Verifying : libaio-devel-0.3.109-13.el7.x86_64 43/63<br /> Verifying : libref_array-0.1.5-32.el7.x86_64 44/63<br /> Verifying : 1:xorg-x11-xauth-1.0.9-1.el7.x86_64 45/63<br /> Verifying : libpath_utils-0.2.1-32.el7.x86_64 46/63<br /> Verifying : 1:quota-4.01-19.el7.x86_64 47/63<br /> Verifying : lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64 48/63<br /> Verifying : libnfsidmap-0.25-19.el7.x86_64 49/63<br /> Verifying : libstdc++-devel-4.8.5-39.0.5.el7.x86_64 50/63<br /> Verifying : libSM-1.2.2-2.el7.x86_64 51/63<br /> Verifying : oracle-database-preinstall-18c-1.0-1.el7.x86_64 52/63<br /> Verifying : libXxf86dga-1.1.4-2.1.el7.x86_64 53/63<br /> Verifying : libXmu-1.1.2-2.el7.x86_64 54/63<br /> Verifying : keyutils-1.5.8-3.el7.x86_64 55/63<br /> Verifying : compat-libstdc++-33-3.2.3-72.el7.x86_64 56/63<br /> Verifying : 32:bind-license-9.11.4-16.P2.el7_8.6.noarch 57/63<br /> Verifying : libXau-1.0.8-2.1.el7.x86_64 58/63<br /> Verifying : libX11-1.6.7-2.el7.x86_64 59/63<br /> Verifying : glibc-devel-2.17-307.0.1.el7.1.x86_64 60/63<br /> Verifying : mailx-12.5-19.el7.x86_64 61/63<br /> Verifying : 1:quota-nls-4.01-19.el7.noarch 62/63<br /> Verifying : libstdc++-4.8.5-39.0.3.el7.x86_64 63/63<br />Installed: oracle-database-preinstall-18c.x86_64 0:1.0-1.el7<br />Dependency Installed:<br /> GeoIP.x86_64 0:1.5.0-14.el7 bc.x86_64 0:1.06.95-13.el7<br /> bind-libs.x86_64 32:9.11.4-16.P2.el7_8.6 bind-libs-lite.x86_64 32:9.11.4-16.P2.el7_8.6<br /> bind-license.noarch 32:9.11.4-16.P2.el7_8.6 bind-utils.x86_64 32:9.11.4-16.P2.el7_8.6<br /> compat-libcap1.x86_64 0:1.10-7.el7 compat-libstdc++-33.x86_64 0:3.2.3-72.el7<br /> geoipupdate.x86_64 0:2.5.0-1.el7 glibc-devel.x86_64 0:2.17-307.0.1.el7.1<br /> glibc-headers.x86_64 0:2.17-307.0.1.el7.1 gssproxy.x86_64 0:0.7.0-28.el7<br /> kernel-headers.x86_64 0:3.10.0-1127.19.1.el7 keyutils.x86_64 0:1.5.8-3.el7<br /> ksh.x86_64 0:20120801-142.0.1.el7 libICE.x86_64 0:1.0.9-9.el7<br /> libSM.x86_64 0:1.2.2-2.el7 libX11.x86_64 0:1.6.7-2.el7<br /> libX11-common.noarch 0:1.6.7-2.el7 libXau.x86_64 0:1.0.8-2.1.el7<br /> libXext.x86_64 0:1.3.3-3.el7 libXi.x86_64 0:1.7.9-1.el7<br /> libXinerama.x86_64 0:1.1.3-2.1.el7 libXmu.x86_64 0:1.1.2-2.el7<br /> libXrandr.x86_64 0:1.5.1-2.el7 libXrender.x86_64 0:0.9.10-1.el7<br /> libXt.x86_64 0:1.1.5-3.el7 libXtst.x86_64 0:1.2.3-1.el7<br /> libXv.x86_64 0:1.0.11-1.el7 libXxf86dga.x86_64 0:1.1.4-2.1.el7<br /> libXxf86misc.x86_64 0:1.0.3-7.1.el7 libXxf86vm.x86_64 0:1.1.4-1.el7<br /> libaio.x86_64 0:0.3.109-13.el7 libaio-devel.x86_64 0:0.3.109-13.el7<br /> libbasicobjects.x86_64 0:0.1.1-32.el7 libcollection.x86_64 0:0.7.0-32.el7<br /> libdmx.x86_64 0:1.1.3-3.el7 libevent.x86_64 0:2.0.21-4.el7<br /> libini_config.x86_64 0:1.3.1-32.el7 libnfsidmap.x86_64 0:0.25-19.el7<br /> libpath_utils.x86_64 0:0.2.1-32.el7 libref_array.x86_64 0:0.1.5-32.el7<br /> libstdc++-devel.x86_64 0:4.8.5-39.0.5.el7 libtirpc.x86_64 0:0.2.4-0.16.el7<br /> libverto-libevent.x86_64 0:0.2.5-4.el7 libxcb.x86_64 0:1.13-1.el7<br /> lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7 mailx.x86_64 0:12.5-19.el7<br /> net-tools.x86_64 0:2.0-0.25.20131004git.el7 nfs-utils.x86_64 1:1.3.0-0.66.0.1.el7_8<br /> psmisc.x86_64 0:22.20-16.el7 quota.x86_64 1:4.01-19.el7<br /> quota-nls.noarch 1:4.01-19.el7 rpcbind.x86_64 0:0.2.0-49.el7<br /> smartmontools.x86_64 1:7.0-2.el7 sysstat.x86_64 0:10.1.5-19.el7<br /> tcp_wrappers.x86_64 0:7.6-77.el7 unzip.x86_64 0:6.0-21.el7<br /> xorg-x11-utils.x86_64 0:7.5-23.el7 xorg-x11-xauth.x86_64 1:1.0.9-1.el7<br />Dependency Updated: libstdc++.x86_64 0:4.8.5-39.0.5.el7<br />Complete!</span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span style="font-family: "Courier New"; font-size: 12px;"># ----------------------------------</span><br style="font-family: "courier new"; font-size: 12px;" /><span style="font-family: "Courier New"; font-size: 12px;"># Install Oracle Software for XE Version</span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;">[root@oel7-ora-xe ~]# <span style="color: red;">yum -y localinstall /tmp/oracle-database-xe-18c-1.0-1.x86_64.rpm</span><br />Loaded plugins: ulninfo<br />Examining /tmp/oracle-database-xe-18c-1.0-1.x86_64.rpm: oracle-database-xe-18c-1.0-1.x86_64<br />Marking /tmp/oracle-database-xe-18c-1.0-1.x86_64.rpm to be installed<br />Resolving Dependencies<br />--> Running transaction check<br />---> Package oracle-database-xe-18c.x86_64 0:1.0-1 will be installed<br />--> Finished Dependency Resolution<br />Dependencies Resolved<br />================================================================================================================<br /> Package Arch Version Repository Size<br />================================================================================================================<br />Installing:<br /> oracle-database-xe-18c x86_64 1.0-1 /oracle-database-xe-18c-1.0-1.x86_64 5.2 G<br />Transaction Summary<br />================================================================================================================<br />Install 1 Package<br />Total size: 5.2 G<br />Installed size: 5.2 G<br />Downloading packages:<br />Running transaction check<br />Running transaction test<br />Transaction test succeeded<br />Running transaction<br /> Installing : oracle-database-xe-18c-1.0-1.x86_64 1/1<br />[INFO] Executing post installation scripts...<br />[INFO] Oracle home installed successfully and ready to be configured.<br />To configure Oracle Database XE, optionally modify the parameters in '/etc/sysconfig/oracle-xe-18c.conf' and then execute<br />'/etc/init.d/oracle-xe-18c configure' as root.<br /><br /> Verifying : oracle-database-xe-18c-1.0-1.x86_64 1/1<br /><br />Installed: oracle-database-xe-18c.x86_64 0:1.0-1<br /><br />Complete!<br /><br /># ----------------------------------<br /># Creating the XE Database Instance<br /><br />[root@oel7-ora-xe ~]# <span style="color: red;">/etc/init.d/oracle-xe-18c configure</span><br />Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:<br />Confirm the password:<br />Configuring Oracle Listener.<br />Listener configuration succeeded.<br />Configuring Oracle Database XE.<br />Enter SYS user password:<br />***********<br />Enter SYSTEM user password:<br />**********<br />Enter PDBADMIN User Password:<br />*********<br />Prepare for db operation<br />7% complete<br />Copying database files<br />29% complete<br />Creating and starting Oracle instance<br />30% complete<br />31% complete<br />34% complete<br />38% complete<br />41% complete<br />43% complete<br />Completing Database Creation<br />47% complete<br />50% complete<br />Creating Pluggable Databases<br />54% complete<br />71% complete<br />Executing Post Configuration Actions<br />93% complete<br />Running Custom Scripts<br />100% complete<br /><br />Database creation complete. For details check the logfiles at: /opt/oracle/cfgtoollogs/dbca/XE.<br />Database Information:<br />Global Database Name:XE<br />System Identifier(SID):XE<br />Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.<br />Connect to Oracle Database using one of the connect strings:<br /> Pluggable database: oel7-ora-xe.localdomain:1539/XEPDB1<br /> Multitenant container database: oel7-ora-xe.localdomain:1539<br />Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE<br /><br />[root@oel7-ora-xe ~]# <span style="color: red;">su – oracle</span><br />Last login: Thu Aug 27 14:40:56 CEST 2020 on pts/0<br />[oracle@oel7-ora-xe ~]$ <span style="color: red;">. oraenv <<< XE</span><br />ORACLE_SID = [oracle] ? The Oracle base has been set to /opt/oracle<br />[oracle@oel7-ora-xe ~]$ <span style="color: red;">sqlplus / as sysdba</span><br />SQL*Plus: Release 18.0.0.0.0 - Production on Thu Aug 27 14:50:12 2020<br />Version 18.4.0.0.0<br />Copyright (c) 1982, 2018, Oracle. All rights reserved.<br />Connected to:<br />Oracle Database 18c Express Edition Release 18.0.0.0.0 – Production<br />Version 18.4.0.0.0<br /><br />SQL> <span style="color: red;">select host_name<br /> , instance_name<br /> , version<br /> , version_full<br /> , status<br /> , database_type<br /> , edition<br />from gv$instance<br />order by 1, 2;</span><br /><br />HOST_NAME INSTANCE_NAME VERSION VERSION_FULL STATUS DATABASE_TYPE EDITION<br />----------------------- ------------- ---------- ------------- ------- -------------- -------<br /><span style="color: red;">oel7-ora-xe.localdomain XE 18.0.0.0.0 18.4.0.0.0 OPEN SINGLE XE</span><o:p></o:p></span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"></span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;">SQL></span><span style="font-family: "Courier New"; font-size: 9pt;"> </span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"># DONE!!!</span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;">----------------------------------------------------------------------------------------------</span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"># NOW THE 19c ENTERPRISE EDITION VERSION</span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"># ----------------------------------<br /># 19c (Version EE)<br /># ----------------------------------<br /># For the 19c EE Version, the process is the same, what changes is the pre-install package and other necessary step to create the database.<br /><br /># ----------------------------------<br /># Install the pre-install package.<o:p></o:p></span></p><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; color: black;"><tbody><tr><td style="border: 1pt solid; padding: 0cm 5.4pt; width: 725.55pt;" valign="top" width="967"><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><span style="color: red;">yum -y install oracle-database-preinstall-19c-1.0-2.el7.x86_64.rpm</span><o:p></o:p></span></p></td></tr></tbody></table><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="color: white; font-family: "Courier New"; font-size: 9pt;"># ----------------------------------</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><br /># Install the software (you have to download it first, www.oracle.com/downloads</span><span style="font-family: "Courier New"; font-size: 9pt;">).</span></p><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; color: black;"><tbody><tr><td style="border: 1pt solid; padding: 0cm 5.4pt; width: 725.55pt;" valign="top" width="967"><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><span style="color: red;">yum -y localinstall /tmp/oracle-database-ee-19c-1.0-1.x86_64.rpm</span><o:p></o:p></span></p></td></tr></tbody></table><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="color: white; font-family: "Courier New"; font-size: 9pt;"><br /></span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"># ----------------------------------<br /># Create the folder where the database instance will be saved.<o:p></o:p></span></p><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; color: black;"><tbody><tr><td style="border: 1pt solid; padding: 0cm 5.4pt; width: 725.55pt;" valign="top" width="967"><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><span style="color: red;">mkdir -p /opt/oracle/oradata/</span><o:p></o:p></span></p></td></tr></tbody></table><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="color: white; font-family: "Courier New"; font-size: 9pt;"><br /># ----------------------------------</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><br /># This is the command to create the database using a single line command. (Remember, that is just an example).<o:p></o:p></span></p><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; color: black;"><tbody><tr><td style="border: 1pt solid; padding: 0cm 5.4pt; width: 725.55pt;" valign="top" width="967"><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"><span style="color: red;">dbca -silent -createDatabase -templateName General_Purpose.dbc \<br /> -databaseType OLTP \<br /> -gdbName dbprod \<br /> -sid dbprod \<br /> -createAsContainerDatabase false \<br /> -enableArchive true \<br /> -archiveLogMode auto \<br /> -SysPassword Welcome1 \<br /> -SystemPassword Welcome1 \<br /> -emConfiguration NONE \<br /> -storageType FS \<br /> -datafileDestination /opt/oracle/oradata/ \<br /> -redoLogFileSize 250 \<br /> -characterSet AL32UTF8 \<br /> -useOMF true \<br /> -dbOptions \<br /> -memoryMgmtType auto_sga \<br /> -memoryPercentage 60 \<br /> -dbOptions IMEDIA:false,CWMLITE:false,SAMPLE_SCHEMA:false,ORACLE_TEXT:false,APEX:false,OMS:false,DV:false,JSERVER:false,SPATIAL:false</span><o:p></o:p></span></p></td></tr></tbody></table><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><span lang="EN-US" style="color: white; font-family: "Courier New"; font-size: 9pt;"><br /></span><span lang="EN-US" style="font-family: "Courier New"; font-size: 9pt;"># ----------------------------------<br /># DONE!!!<o:p></o:p></span></p><p class="MsoNormal" style="font-family: calibri, sans-serif; font-size: 11pt; line-height: normal; margin: 0cm 0cm 8pt;"><b><span style="color: red;">Now you can try on your own, good luck!!!</span></b></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-89272266154029135792019-10-18T00:44:00.001-07:002019-10-18T00:44:03.219-07:00Logo<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1qi06Fa_LBW31rXV4yNheX3571taYGbsOzWoTNudCu3vYoQrP1oGnVCiDjnk2U92lVESkk5Aei1d_UKm4ZdzdRLtRf1GnmOKMVikDCv8IOekB-SI6UlvUV-8R3WZeMkPETGjLTj7-xDM/s1600/l2b.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="986" data-original-width="960" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1qi06Fa_LBW31rXV4yNheX3571taYGbsOzWoTNudCu3vYoQrP1oGnVCiDjnk2U92lVESkk5Aei1d_UKm4ZdzdRLtRf1GnmOKMVikDCv8IOekB-SI6UlvUV-8R3WZeMkPETGjLTj7-xDM/s320/l2b.jpeg" width="311" /></a></div>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-9952463548561101632017-12-07T05:03:00.003-08:002020-09-18T06:14:16.566-07:0020) # "KILL A RUNNING SESSION"<span style="font-family: Courier New, Courier, monospace;">20) # "KILL A RUNNING SESSION"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} KILL A RUNNING SESSION ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ ${DBVERSION} = "12" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;">PDB=$(sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pagesize 0 linesize 32767 feedback off verify off heading off echo off</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NAME FROM V\$CONTAINERS ORDER BY CON_ID, NAME;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># echo -e "\n${PDB}" | tail +2</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} -- SELECT YOUR DATABASE [ CDB$ROOT / PDB ] ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">select SET_PDB in ${PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">do</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PPDB=${SET_PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">break 1</span><br />
<span style="font-family: Courier New, Courier, monospace;">done</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} " -- YOUR DATABASE SELECTED IS: ${RED} ${PPDB} ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set container=${PPDB};</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col MACHINE for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col username for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col OSUSER for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col PROGRAM for a60</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "SID,SERIAL,@INST" for a20</span><br />
<span style="font-family: Courier New, Courier, monospace;">select OSUSER</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , MACHINE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , SID || ',' || SERIAL# || ',@' || INST_ID as "SID,SERIAL,@INST"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , USERNAME</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , PROGRAM</span><br />
<span style="font-family: Courier New, Courier, monospace;">from gv\$session</span><br />
<span style="font-family: Courier New, Courier, monospace;">where osuser not in ('GRID','grid','ORACLE','oracle')</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by 1,2,3,5;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col MACHINE for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col username for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col OSUSER for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col PROGRAM for a60</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "SID,SERIAL,@INST" for a20</span><br />
<span style="font-family: Courier New, Courier, monospace;">select OSUSER</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , MACHINE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , SID || ',' || SERIAL# || ',@' || INST_ID as "SID,SERIAL,@INST"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , USERNAME</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , PROGRAM</span><br />
<span style="font-family: Courier New, Courier, monospace;">from gv\$session</span><br />
<span style="font-family: Courier New, Courier, monospace;">where osuser not in ('GRID','grid','ORACLE','oracle')</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by 1,2,3,5;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-70674269645051083452017-12-07T05:03:00.001-08:002020-09-18T06:14:19.204-07:0019) # "VERIFY RUNNING JOBS"<span style="font-family: Courier New, Courier, monospace;">19) # "VERIFY RUNNING JOBS"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} VERIFY RUNNING JOBS ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ ${DBVERSION} = "12" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;">PDB=$(sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pagesize 0 linesize 32767 feedback off verify off heading off echo off</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NAME FROM V\$CONTAINERS ORDER BY CON_ID, NAME;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># echo -e "\n${PDB}" | tail +2</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} -- SELECT YOUR DATABASE [ CDB$ROOT / PDB ] ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">select SET_PDB in ${PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">do</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PPDB=${SET_PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">break 1</span><br />
<span style="font-family: Courier New, Courier, monospace;">done</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} " -- YOUR DATABASE SELECTED IS: ${RED} ${PPDB} ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set container=${PPDB};</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 1000 lines 500 timing on VERIFY OFF colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "Last Date" for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "This Date" for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT a.job "Job"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , a.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , a.failures "Failures"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , Substr(To_Char(a.last_date,'DD-Mon-YYYY HH24:MI:SS'),1,20) "Last Date"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , Substr(To_Char(a.this_date,'DD-Mon-YYYY HH24:MI:SS'),1,20) "This Date"</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM dba_jobs_running a;</span><br />
<span style="font-family: Courier New, Courier, monospace;">SET VERIFY ON</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 1000 lines 500 timing on VERIFY OFF colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "Last Date" for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "This Date" for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT a.job "Job"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , a.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , a.failures "Failures"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , Substr(To_Char(a.last_date,'DD-Mon-YYYY HH24:MI:SS'),1,20) "Last Date"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , Substr(To_Char(a.this_date,'DD-Mon-YYYY HH24:MI:SS'),1,20) "This Date"</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM dba_jobs_running a;</span><br />
<span style="font-family: Courier New, Courier, monospace;">SET VERIFY ON</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-64673051873474770592017-12-07T05:02:00.004-08:002020-09-18T06:14:22.649-07:0018) # "MATERIALIZEDS VIEWS DISABLEDS"<span style="font-family: Courier New, Courier, monospace;">18) # "MATERIALIZEDS VIEWS DISABLEDS"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} MATERIALIZEDS VIEWS DISABLEDS ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col owner for a20</span><br />
<span style="font-family: Courier New, Courier, monospace;">col type for a20</span><br />
<span style="font-family: Courier New, Courier, monospace;">select owner</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ,type</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ,tablespace_name</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ,round(sum(mb)) as mb</span><br />
<span style="font-family: Courier New, Courier, monospace;">from (select owner,'mview' as type, tablespace_name, round(sum(bytes)/1024/1024) as mb from dba_segments where (owner,segment_name) in</span><br />
<span style="font-family: Courier New, Courier, monospace;"> (select owner, mview_name from dba_mviews) group by owner, segment_type, tablespace_name</span><br />
<span style="font-family: Courier New, Courier, monospace;">union</span><br />
<span style="font-family: Courier New, Courier, monospace;">select owner</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , 'mview_log' as type</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , tablespace_name</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , round(sum(bytes)/1024/1024) as mb</span><br />
<span style="font-family: Courier New, Courier, monospace;">from dba_segments</span><br />
<span style="font-family: Courier New, Courier, monospace;">where (owner, segment_name) in</span><br />
<span style="font-family: Courier New, Courier, monospace;">(select log_owner, log_table from dba_snapshot_logs)</span><br />
<span style="font-family: Courier New, Courier, monospace;">group by owner, segment_type, tablespace_name</span><br />
<span style="font-family: Courier New, Courier, monospace;">union</span><br />
<span style="font-family: Courier New, Courier, monospace;">select owner</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , 'mview_index' as type</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , tablespace_name</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , round(sum(bytes)/1024/1024) as mb</span><br />
<span style="font-family: Courier New, Courier, monospace;">from dba_segments</span><br />
<span style="font-family: Courier New, Courier, monospace;">where (owner,segment_name) in</span><br />
<span style="font-family: Courier New, Courier, monospace;">(select owner, index_name from dba_indexes where (owner,table_name) in</span><br />
<span style="font-family: Courier New, Courier, monospace;">(select owner, mview_name from dba_mviews))</span><br />
<span style="font-family: Courier New, Courier, monospace;">group by owner, segment_type, tablespace_name) t1</span><br />
<span style="font-family: Courier New, Courier, monospace;">group by owner,type,tablespace_name;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-61989758123333074142017-12-07T05:02:00.002-08:002020-09-18T06:14:24.110-07:0017) # "JOBS CONTROL OF THE CLIENT [ @ ]"<span style="font-family: Courier New, Courier, monospace;">17) # "JOBS CONTROL OF THE CLIENT [ @ ]"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} JOBS CONTROL OF THE CLIENT ( @ ) ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ ${DBVERSION} = "12" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;">PDB=$(sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pagesize 0 linesize 32767 feedback off verify off heading off echo off</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NAME FROM V\$CONTAINERS ORDER BY CON_ID, NAME;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># echo -e "\n${PDB}" | tail +2</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} -- SELECT YOUR DATABASE [ CDB$ROOT / PDB ] ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">select SET_PDB in ${PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">do</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PPDB=${SET_PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">break 1</span><br />
<span style="font-family: Courier New, Courier, monospace;">done</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} " -- YOUR DATABASE SELECTED IS: ${RED} ${PPDB} ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set container=${PPDB};</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col COMMENTS for a100</span><br />
<span style="font-family: Courier New, Courier, monospace;">col JOB_NAME for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col owner for a10</span><br />
<span style="font-family: Courier New, Courier, monospace;">col state for a12</span><br />
<span style="font-family: Courier New, Courier, monospace;">col SCHEDULE_TYPE for a16</span><br />
<span style="font-family: Courier New, Courier, monospace;">col LAST_EXEC for a20</span><br />
<span style="font-family: Courier New, Courier, monospace;">col enabled for a8</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT JOB_NAME</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , STATE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , ENABLED</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , PROGRAM_OWNER as OWNER</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , SCHEDULE_TYPE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , RUN_COUNT as EXEC</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(LAST_START_DATE, 'dd/mm/yyyy HH:MM:SS') as LAST_EXEC</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , COMMENTS</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM DBA_SCHEDULER_JOBS</span><br />
<span style="font-family: Courier New, Courier, monospace;">ORDER BY 1,2,3,4,5,6,7;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col COMMENTS for a100</span><br />
<span style="font-family: Courier New, Courier, monospace;">col JOB_NAME for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col owner for a10</span><br />
<span style="font-family: Courier New, Courier, monospace;">col state for a12</span><br />
<span style="font-family: Courier New, Courier, monospace;">col SCHEDULE_TYPE for a16</span><br />
<span style="font-family: Courier New, Courier, monospace;">col LAST_EXEC for a20</span><br />
<span style="font-family: Courier New, Courier, monospace;">col enabled for a8</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT JOB_NAME</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , STATE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , ENABLED</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , PROGRAM_OWNER as OWNER</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , SCHEDULE_TYPE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , RUN_COUNT as EXEC</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(LAST_START_DATE, 'dd/mm/yyyy HH:MM:SS') as LAST_EXEC</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , COMMENTS</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM DBA_SCHEDULER_JOBS</span><br />
<span style="font-family: Courier New, Courier, monospace;">ORDER BY 1,2,3,4,5,6,7;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-60621239667560907962017-12-07T05:01:00.003-08:002020-09-18T06:14:26.130-07:0016) # "INVALIDS OBJECTS ( @ )"<span style="font-family: Courier New, Courier, monospace;">16) # "INVALIDS OBJECTS ( @ )"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} INVALIDS OBJECTS ( @ ) ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ ${DBVERSION} = "12" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;">PDB=$(sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pagesize 0 linesize 32767 feedback off verify off heading off echo off</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NAME FROM V\$CONTAINERS ORDER BY CON_ID, NAME;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># echo -e "\n${PDB}" | tail +2</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} -- SELECT YOUR DATABASE [ CDB$ROOT / PDB ] ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">select SET_PDB in ${PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">do</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PPDB=${SET_PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">break 1</span><br />
<span style="font-family: Courier New, Courier, monospace;">done</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} " -- YOUR DATABASE SELECTED IS: ${RED} ${PPDB} ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set container=${PPDB};</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col owner for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col OBJECT_TYPE for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "Total of invalids objects." for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">select owner</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , decode(object_type,null,'========================>', object_type) as "OBJECT_TYPE"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , count(object_type) as "TOTAL"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , decode(grouping(owner),0,null,1,'Total of invalids objects.') as " "</span><br />
<span style="font-family: Courier New, Courier, monospace;">from dba_objects where status <> 'VALID'</span><br />
<span style="font-family: Courier New, Courier, monospace;">group by rollup (owner, object_type)</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by owner, object_type desc;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col owner for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col OBJECT_TYPE for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "Total of invalids objects." for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">select owner</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , decode(object_type,null,'========================>', object_type) as "OBJECT_TYPE"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , count(object_type) as "TOTAL"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , decode(grouping(owner),0,null,1,'Total of invalids objects.') as " "</span><br />
<span style="font-family: Courier New, Courier, monospace;">from dba_objects where status <> 'VALID'</span><br />
<span style="font-family: Courier New, Courier, monospace;">group by rollup (owner, object_type)</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by owner, object_type desc;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-73212706325811105282017-12-07T05:01:00.000-08:002020-09-18T06:14:27.394-07:0015) # "LOAD LASTS 1/5/10 MINUTES"<span style="font-family: Courier New, Courier, monospace;">15) # "LOAD LASTS 1/5/10 MINUTES"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} LOAD LASTS 1/5/10 MINUTES ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ `uname` = "SunOS" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;"> uptime | awk '{print $(NF-2)" "$(NF-1)" "$(NF-0)}'</span><br />
<span style="font-family: Courier New, Courier, monospace;">elif [ `uname` = "AIX" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;"> echo ${ECHO} "AIX"</span><br />
<span style="font-family: Courier New, Courier, monospace;">elif [ `uname` = "Linux" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;"> echo ${ECHO} ">----------------------------------------------------------------------------------------------------"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> echo ${ECHO} "${RED} NOW |5min |15min | ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> cat /proc/loadavg</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;"> echo ${ECHO} ">----------------------------------------------------------------------------------------------------"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> echo ${ECHO} " -- This Operation System is Unknown --"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> echo ${ECHO} ">----------------------------------------------------------------------------------------------------"</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-20507302851594517612017-12-07T05:00:00.003-08:002020-09-18T06:14:29.939-07:0014) # "VERIFY LONG OPERATIONS"<span style="font-family: Courier New, Courier, monospace;">14) # "VERIFY LONG OPERATIONS"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "-- ${RED} VERIFY LONG OPERATIONS ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ ${DBVERSION} = "12" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;">PDB=$(sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pagesize 0 linesize 32767 feedback off verify off heading off echo off</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NAME FROM V\$CONTAINERS ORDER BY CON_ID, NAME;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># echo -e "\n${PDB}" | tail +2</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} -- SELECT YOUR DATABASE [ CDB$ROOT / PDB ] ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">select SET_PDB in ${PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">do</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PPDB=${SET_PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">break 1</span><br />
<span style="font-family: Courier New, Courier, monospace;">done</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} " -- YOUR DATABASE SELECTED IS: ${RED} ${PPDB} ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set container=${PPDB};</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # ACTIVE SESSIONS AND SQL STATEMENTS #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col USERNAME for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">col SQL_TEXT for a100</span><br />
<span style="font-family: Courier New, Courier, monospace;">col machine for a35</span><br />
<span style="font-family: Courier New, Courier, monospace;">col osuser for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">select S.USERNAME</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.serial#</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.machine</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.osuser</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.seconds_in_wait as "waiting seg"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , t.sql_id</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sql_text</span><br />
<span style="font-family: Courier New, Courier, monospace;">from v\$sqltext_with_newlines t, V\$SESSION s</span><br />
<span style="font-family: Courier New, Courier, monospace;">where t.address = s.sql_address and t.hash_value = s.sql_hash_value and s.status = 'ACTIVE'</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by s.sid, t.piece;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col OBJECT_NAME for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">select object_name</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , object_type</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , session_id</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , type</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , lmode</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , request</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , block</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , ctime</span><br />
<span style="font-family: Courier New, Courier, monospace;">from v\$locked_object, all_objects, v\$lock</span><br />
<span style="font-family: Courier New, Courier, monospace;">where v\$locked_object.object_id = all_objects.object_id AND v\$lock.id1 = all_objects.object_id AND v\$lock.sid = v\$locked_object.session_id</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by session_id, ctime desc, object_name;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col OPNAME for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col TARGET for a35</span><br />
<span style="font-family: Courier New, Courier, monospace;">col UNITS for a10</span><br />
<span style="font-family: Courier New, Courier, monospace;">col MESSAGE for a80</span><br />
<span style="font-family: Courier New, Courier, monospace;">col sql_id for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">select distinct * from (select opname, target, sofar, sql_id, totalwork, units, elapsed_seconds, message from v\$session_longops order by start_time desc) where rownum <= 10;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col OPNAME for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col TARGET for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT opname</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , target</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , osuser</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.sql_id</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.sql_hash_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , elapsed_seconds</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , time_remaining</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM v\$session_longops sl</span><br />
<span style="font-family: Courier New, Courier, monospace;">inner join v\$session s ON sl.SID = s.SID AND sl.SERIAL# = s.SERIAL# WHERE time_remaining > 0;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col USERNAME for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">col sql_fulltext for a75</span><br />
<span style="font-family: Courier New, Courier, monospace;">col TARGET for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT s.username</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sq.executions</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.last_update_time</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.sql_id</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.sql_hash_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , opname</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , target</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , elapsed_seconds</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , time_remaining</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sq.sql_fulltext</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM v\$session_longops sl</span><br />
<span style="font-family: Courier New, Courier, monospace;">INNER JOIN v\$sql sq ON sq.sql_id = sl.sql_id</span><br />
<span style="font-family: Courier New, Courier, monospace;">INNER JOIN v\$session s ON sl.SID = s.SID AND sl.serial# = s.serial#</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE time_remaining > 0;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col units for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">col opname for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT sql_id</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , opname</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(start_time, 'DD/MM/YYYY HH24:MI:SS') as started</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(sysdate, 'DD/MM/YYYY HH24:MI:SS') as now</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , trunc(((((86400*(sysdate-start_time))/60)/60)/24)/7) weeks</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , trunc((((86400*(sysdate-start_time))/60)/60)/24) days</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , trunc(((86400*(sysdate-start_time))/60)/60)-24*(trunc((((86400*(sysdate-start_time))/60)/60)/24)) hours</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , trunc((86400*(sysdate-start_time))/60)-60*(trunc(((86400*(sysdate-start_time))/60)/60)) minutes</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , trunc(86400*(sysdate-start_time))-60*(trunc((86400*(sysdate-start_time))/60)) seconds</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sofar</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , totalwork</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , units</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , round(elapsed_seconds/60/60,2) as seconds</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , round(time_remaining/60/60,2) as remaining</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM v\$session_longops</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE sofar != totalwork;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # ACTIVE SESSIONS AND SQL STATEMENTS #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col USERNAME for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">col SQL_TEXT for a100</span><br />
<span style="font-family: Courier New, Courier, monospace;">col machine for a35</span><br />
<span style="font-family: Courier New, Courier, monospace;">col osuser for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">select S.USERNAME</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.serial#</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.machine</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.osuser</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.seconds_in_wait as "waiting seg"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , t.sql_id</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sql_text</span><br />
<span style="font-family: Courier New, Courier, monospace;">from v\$sqltext_with_newlines t, V\$SESSION s</span><br />
<span style="font-family: Courier New, Courier, monospace;">where t.address = s.sql_address and t.hash_value = s.sql_hash_value and s.status = 'ACTIVE'</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by s.sid, t.piece;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col OBJECT_NAME for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">select object_name</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , object_type</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , session_id</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , type</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , lmode</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , request</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , block</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , ctime</span><br />
<span style="font-family: Courier New, Courier, monospace;">from v\$locked_object, all_objects, v\$lock</span><br />
<span style="font-family: Courier New, Courier, monospace;">where v\$locked_object.object_id = all_objects.object_id AND v\$lock.id1 = all_objects.object_id AND v\$lock.sid = v\$locked_object.session_id</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by session_id, ctime desc, object_name;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col OPNAME for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col TARGET for a35</span><br />
<span style="font-family: Courier New, Courier, monospace;">col UNITS for a10</span><br />
<span style="font-family: Courier New, Courier, monospace;">col MESSAGE for a80</span><br />
<span style="font-family: Courier New, Courier, monospace;">col sql_id for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">select distinct * from (select opname, target, sofar, sql_id, totalwork, units, elapsed_seconds, message from v\$session_longops order by start_time desc) where rownum <= 10;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col OPNAME for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">col TARGET for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT opname</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , target</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , osuser</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.sql_id</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.sql_hash_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , elapsed_seconds</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , time_remaining</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM v\$session_longops sl</span><br />
<span style="font-family: Courier New, Courier, monospace;">inner join v\$session s ON sl.SID = s.SID AND sl.SERIAL# = s.SERIAL# WHERE time_remaining > 0;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col USERNAME for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">col sql_fulltext for a75</span><br />
<span style="font-family: Courier New, Courier, monospace;">col TARGET for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT s.username</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sq.executions</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.last_update_time</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.sql_id</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sl.sql_hash_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , opname</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , target</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , elapsed_seconds</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , time_remaining</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sq.sql_fulltext</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM v\$session_longops sl</span><br />
<span style="font-family: Courier New, Courier, monospace;">INNER JOIN v\$sql sq ON sq.sql_id = sl.sql_id</span><br />
<span style="font-family: Courier New, Courier, monospace;">INNER JOIN v\$session s ON sl.SID = s.SID AND sl.serial# = s.serial#</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE time_remaining > 0;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt # #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col units for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">col opname for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT sql_id</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , opname</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(start_time, 'DD/MM/YYYY HH24:MI:SS') as started</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(sysdate, 'DD/MM/YYYY HH24:MI:SS') as now</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , trunc(((((86400*(sysdate-start_time))/60)/60)/24)/7) weeks</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , trunc((((86400*(sysdate-start_time))/60)/60)/24) days</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , trunc(((86400*(sysdate-start_time))/60)/60)-24*(trunc((((86400*(sysdate-start_time))/60)/60)/24)) hours</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , trunc((86400*(sysdate-start_time))/60)-60*(trunc(((86400*(sysdate-start_time))/60)/60)) minutes</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , trunc(86400*(sysdate-start_time))-60*(trunc((86400*(sysdate-start_time))/60)) seconds</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sofar</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , totalwork</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , units</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , round(elapsed_seconds/60/60,2) as seconds</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , round(time_remaining/60/60,2) as remaining</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM v\$session_longops</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE sofar != totalwork;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-65803693445999798222017-12-07T05:00:00.001-08:002020-09-18T06:14:31.317-07:0013) # "HIT RATIO THE LASTS 30 DAYS"<span style="font-family: Courier New, Courier, monospace;">13) # "HIT RATIO THE LASTS 30 DAYS"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} HIT RATIO THE LASTS 30 DAYS ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col name for a40</span><br />
<span style="font-family: Courier New, Courier, monospace;">col instance_name for a30</span><br />
<span style="font-family: Courier New, Courier, monospace;">exec dbms_application_info.set_action('latches');</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT instance_name</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , name</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , case when hit_ratio < 95 then 'Warning' when hit_ratio < 99 then 'Critical' end as hit_ratio</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , sleep_miss</span><br />
<span style="font-family: Courier New, Courier, monospace;">from (select i.instance_name, l.name, round((gets-misses)/decode(gets,0,1,gets),3)*100 hit_ratio, round(sleeps/decode(misses,0,1,misses),3) sleep_miss</span><br />
<span style="font-family: Courier New, Courier, monospace;">from gv\$latch l, gv\$instance i</span><br />
<span style="font-family: Courier New, Courier, monospace;">where l.gets != 0</span><br />
<span style="font-family: Courier New, Courier, monospace;">and l.inst_id = i.inst_id)</span><br />
<span style="font-family: Courier New, Courier, monospace;">where hit_ratio < 100</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by hit_ratio;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-4471353357512101192017-12-07T04:59:00.001-08:002020-09-18T06:14:34.398-07:0012) # "VERIFY SESSIONS PER I/O"<span style="font-family: Courier New, Courier, monospace;">12) # "VERIFY SESSIONS PER I/O"</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} VERIFY SESSIONS PER I/O ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ ${DBVERSION} = "12" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;">PDB=$(sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pagesize 0 linesize 32767 feedback off verify off heading off echo off</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NAME FROM V\$CONTAINERS ORDER BY CON_ID, NAME;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># echo -e "\n${PDB}" | tail +2</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} -- SELECT YOUR DATABASE [ CDB$ROOT / PDB ] ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">select SET_PDB in ${PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">do</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PPDB=${SET_PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">break 1</span><br />
<span style="font-family: Courier New, Courier, monospace;">done</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} " -- YOUR DATABASE SELECTED IS: ${RED} ${PPDB} ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set container=${PPDB};</span><br />
<span style="font-family: Courier New, Courier, monospace;">SET LINESIZE 2000 PAGESIZE 2000 TIMING ON</span><br />
<span style="font-family: Courier New, Courier, monospace;">COLUMN username FORMAT A25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col osuser for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NVL(s.username, '(oracle)') AS username</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.osuser</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.serial#</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , si.block_gets</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , si.consistent_gets</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , si.physical_reads</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , si.block_changes</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , si.consistent_changes</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM v\$session s, v\$sess_io si</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE s.sid = si.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;">and s.osuser not in ('GRID','grid','ORACLE','oracle')</span><br />
<span style="font-family: Courier New, Courier, monospace;">ORDER BY s.username, s.osuser, si.physical_reads;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">SET LINESIZE 2000 PAGESIZE 2000 TIMING ON</span><br />
<span style="font-family: Courier New, Courier, monospace;">COLUMN username FORMAT A25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col osuser for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NVL(s.username, '(oracle)') AS username</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.osuser</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.serial#</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , si.block_gets</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , si.consistent_gets</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , si.physical_reads</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , si.block_changes</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , si.consistent_changes</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM v\$session s, v\$sess_io si</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE s.sid = si.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;">and s.osuser not in ('GRID','grid','ORACLE','oracle')</span><br />
<span style="font-family: Courier New, Courier, monospace;">ORDER BY s.username, s.osuser, si.physical_reads;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-43119206125566803882017-12-07T04:58:00.003-08:002020-09-18T06:14:37.520-07:0011) # "DATABASE SIZE"<span style="font-family: Courier New, Courier, monospace;">11) # "DATABASE SIZE"</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} DATABASE SIZE ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ ${DBVERSION} = "12" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;">PDB=$(sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pagesize 0 linesize 32767 feedback off verify off heading off echo off</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NAME FROM V\$CONTAINERS ORDER BY CON_ID, NAME;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># echo -e "\n${PDB}" | tail +2</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} -- SELECT YOUR DATABASE [ CDB$ROOT / PDB ] ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">select SET_PDB in ${PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">do</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PPDB=${SET_PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">break 1</span><br />
<span style="font-family: Courier New, Courier, monospace;">done</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} " -- YOUR DATABASE SELECTED IS: ${RED} ${PPDB} ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set container=${PPDB};</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">PROMPT # DATABASE SIZE #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "SIZE MB" for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "SIZE GB" for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "SIZE TB" for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">select to_char(sum(bytes)/1024/1024, '9G999G999D99') "SIZE MB"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(sum(bytes)/1024/1024/1024, '9G999G999D99') "SIZE GB"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(sum(bytes)/1024/1024/1024/1024, '9G999G999D999') "SIZE TB"</span><br />
<span style="font-family: Courier New, Courier, monospace;">from (select sum(bytes) bytes from dba_data_files</span><br />
<span style="font-family: Courier New, Courier, monospace;">union all</span><br />
<span style="font-family: Courier New, Courier, monospace;">select sum(bytes) bytes from dba_temp_files</span><br />
<span style="font-family: Courier New, Courier, monospace;">union all</span><br />
<span style="font-family: Courier New, Courier, monospace;">select sum(bytes * members) from v\$log</span><br />
<span style="font-family: Courier New, Courier, monospace;">union all</span><br />
<span style="font-family: Courier New, Courier, monospace;">select sum(block_size * file_size_blks) from v\$controlfile);</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">PROMPT # DATABASE SIZE #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "SIZE MB" for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "SIZE GB" for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "SIZE TB" for a15</span><br />
<span style="font-family: Courier New, Courier, monospace;">select to_char(sum(bytes)/1024/1024, '9G999G999D99') "SIZE MB"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(sum(bytes)/1024/1024/1024, '9G999G999D99') "SIZE GB"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(sum(bytes)/1024/1024/1024/1024, '9G999G999D999') "SIZE TB"</span><br />
<span style="font-family: Courier New, Courier, monospace;">from (select sum(bytes) bytes from dba_data_files</span><br />
<span style="font-family: Courier New, Courier, monospace;">union all</span><br />
<span style="font-family: Courier New, Courier, monospace;">select sum(bytes) bytes from dba_temp_files</span><br />
<span style="font-family: Courier New, Courier, monospace;">union all</span><br />
<span style="font-family: Courier New, Courier, monospace;">select sum(bytes * members) from v\$log</span><br />
<span style="font-family: Courier New, Courier, monospace;">union all</span><br />
<span style="font-family: Courier New, Courier, monospace;">select sum(block_size * file_size_blks) from v\$controlfile);</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-34136907323789080292017-12-07T04:58:00.001-08:002020-09-18T06:14:40.915-07:0010) # "VERIFY SESSIONS PER MEMORY"<span style="font-family: Courier New, Courier, monospace;">10) # "VERIFY SESSIONS PER MEMORY"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} VERIFY SESSIONS PER MEMORY ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ ${DBVERSION} = "12" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;">PDB=$(sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pagesize 0 linesize 32767 feedback off verify off heading off echo off</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NAME FROM V\$CONTAINERS ORDER BY CON_ID, NAME;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># echo -e "\n${PDB}" | tail +2</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} -- SELECT YOUR DATABASE [ CDB$ROOT / PDB ] ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">select SET_PDB in ${PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">do</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PPDB=${SET_PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">break 1</span><br />
<span style="font-family: Courier New, Courier, monospace;">done</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} " -- YOUR DATABASE SELECTED IS: ${RED} ${PPDB} ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set container=${PPDB};</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 1000 lines 1000 timing on</span><br />
<span style="font-family: Courier New, Courier, monospace;">col name for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col program for a60</span><br />
<span style="font-family: Courier New, Courier, monospace;">COL username for A20</span><br />
<span style="font-family: Courier New, Courier, monospace;">COL module for A20</span><br />
<span style="font-family: Courier New, Courier, monospace;">col machine for a50</span><br />
<span style="font-family: Courier New, Courier, monospace;">select se.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , n.name</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.program</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.machine</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.username</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , round(max(se.value)/(1024*1024),2) "MEM (MB)"</span><br />
<span style="font-family: Courier New, Courier, monospace;">from v\$sesstat se, v\$statname n, v\$session s</span><br />
<span style="font-family: Courier New, Courier, monospace;">where n.statistic# = se.statistic#</span><br />
<span style="font-family: Courier New, Courier, monospace;">and s.sid = se.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;">and s.username != 'SYSTEM'</span><br />
<span style="font-family: Courier New, Courier, monospace;">and n.name in ('session pga memory','session uga memory')</span><br />
<span style="font-family: Courier New, Courier, monospace;">group by s.username, s.machine, se.sid,n.name, s.program</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by 6;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 1000 lines 1000 timing on</span><br />
<span style="font-family: Courier New, Courier, monospace;">SET LINESIZE 500</span><br />
<span style="font-family: Courier New, Courier, monospace;">col name for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col program for a60</span><br />
<span style="font-family: Courier New, Courier, monospace;">COL username for A20</span><br />
<span style="font-family: Courier New, Courier, monospace;">COL module for A20</span><br />
<span style="font-family: Courier New, Courier, monospace;">col machine for a50</span><br />
<span style="font-family: Courier New, Courier, monospace;">select se.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , n.name</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.program</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.machine</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , s.username</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , round(max(se.value)/(1024*1024),2) "MEM (MB)"</span><br />
<span style="font-family: Courier New, Courier, monospace;">from v\$sesstat se, v\$statname n, v\$session s</span><br />
<span style="font-family: Courier New, Courier, monospace;">where n.statistic# = se.statistic#</span><br />
<span style="font-family: Courier New, Courier, monospace;">and s.sid = se.sid</span><br />
<span style="font-family: Courier New, Courier, monospace;">and s.username != 'SYSTEM'</span><br />
<span style="font-family: Courier New, Courier, monospace;">and n.name in ('session pga memory','session uga memory')</span><br />
<span style="font-family: Courier New, Courier, monospace;">group by s.username, s.machine, se.sid,n.name, s.program</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by 6;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-59675055652153166702017-12-07T04:57:00.001-08:002020-09-18T06:14:44.268-07:009) # "TOP 10 DB-CPU ACTIVITY"<span style="font-family: Courier New, Courier, monospace;">9) # "TOP 10 DB-CPU ACTIVITY"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} TOP 20 DB-CPU ACTIVITY ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col STAT_NAME for a50</span><br />
<span style="font-family: Courier New, Courier, monospace;">col "% PERC" for a10</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT STAT_NAME</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , TIME_WAITED</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , case when pct_waited >= 0.5 then 'Critical' when pct_waited >= 0.2 then 'Warning' end as "Status"</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(round(pct_waited*100,1), '999D00') || '%' as "% PERC"</span><br />
<span style="font-family: Courier New, Courier, monospace;">from (select STAT_NAME, time_waited, TIME_WAITED / sum(time_waited) over () pct_waited</span><br />
<span style="font-family: Courier New, Courier, monospace;">from (select STAT_NAME, round(sum(VALUE)/(1000*1000)) AS time_waited</span><br />
<span style="font-family: Courier New, Courier, monospace;">from GV\$SYS_TIME_MODEL</span><br />
<span style="font-family: Courier New, Courier, monospace;">group by STAT_NAME)</span><br />
<span style="font-family: Courier New, Courier, monospace;">order by 2 desc)</span><br />
<span style="font-family: Courier New, Courier, monospace;">where rownum <= 20;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-20774561736893489382017-12-07T04:56:00.003-08:002020-09-18T06:14:45.832-07:008) # "CONNECTIONS AVARAGE PER HOUR"<span style="font-family: Courier New, Courier, monospace;">8) # "CONNECTIONS AVARAGE PER HOUR"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} CONNECTIONS AVARAGE PER HOUR ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ ${DBVERSION} = "12" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;">PDB=$(sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pagesize 0 linesize 32767 feedback off verify off heading off echo off</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NAME FROM V\$CONTAINERS ORDER BY CON_ID, NAME;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># echo -e "\n${PDB}" | tail +2</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} -- SELECT YOUR DATABASE [ CDB$ROOT / PDB ] ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">select SET_PDB in ${PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">do</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PPDB=${SET_PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">break 1</span><br />
<span style="font-family: Courier New, Courier, monospace;">done</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} " -- YOUR DATABASE SELECTED IS: ${RED} ${PPDB} ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set container=${PPDB};</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT to_char(TRUNC(s.begin_interval_time,'HH24'),'DD/MM/YYYY HH24:MI:SS') snap_begin, sum(r.current_utilization) sessions</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM dba_hist_resource_limit r, dba_hist_snapshot s</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE (TRUNC(s.begin_interval_time,'HH24'), s.snap_id ) IN</span><br />
<span style="font-family: Courier New, Courier, monospace;">(--Select the Maximum of the Snapshot IDs within an hour if more than one snapshot IDs</span><br />
<span style="font-family: Courier New, Courier, monospace;">--have the same number of sessions within that hour , so then picking one of the snapIds</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT TRUNC(sn.begin_interval_time,'HH24'),MAX(rl.snap_id)</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM dba_hist_resource_limit rl,dba_hist_snapshot sn</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE TRUNC(sn.begin_interval_time) >= TRUNC(sysdate-1)</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND rl.snap_id = sn.snap_id</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND rl.resource_name = 'sessions'</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND rl.instance_number = sn.instance_number</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND (TRUNC(sn.begin_interval_time,'HH24'),rl.CURRENT_UTILIZATION ) IN</span><br />
<span style="font-family: Courier New, Courier, monospace;">(--Select the Maximum no.of sessions for a given begin interval time</span><br />
<span style="font-family: Courier New, Courier, monospace;">-- All the snapshots within a given hour will have the same begin interval time when TRUNC is used</span><br />
<span style="font-family: Courier New, Courier, monospace;">-- for HH24 and we are selecting the Maximum sessions for a given one hour</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT TRUNC(s.begin_interval_time,'HH24'),MAX(r.CURRENT_UTILIZATION) "no_of_sess"</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM dba_hist_resource_limit r,dba_hist_snapshot s</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE r.snap_id = s.snap_id</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND TRUNC(s.begin_interval_time) >= TRUNC(sysdate-1)</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND r.instance_number=s.instance_number</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND r.resource_name = 'sessions'</span><br />
<span style="font-family: Courier New, Courier, monospace;">GROUP BY TRUNC(s.begin_interval_time,'HH24'))</span><br />
<span style="font-family: Courier New, Courier, monospace;">GROUP BY TRUNC(sn.begin_interval_time,'HH24'),CURRENT_UTILIZATION)</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND r.snap_id = s.snap_id</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND r.instance_number = s.instance_number</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND r.resource_name = 'sessions'</span><br />
<span style="font-family: Courier New, Courier, monospace;">GROUP BY to_char(TRUNC(s.begin_interval_time,'HH24'),'DD/MM/YYYY HH24:MI:SS')</span><br />
<span style="font-family: Courier New, Courier, monospace;">ORDER BY snap_begin;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT to_char(TRUNC(s.begin_interval_time,'HH24'),'DD/MM/YYYY HH24:MI:SS') snap_begin, sum(r.current_utilization) sessions</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM dba_hist_resource_limit r, dba_hist_snapshot s</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE (TRUNC(s.begin_interval_time,'HH24'), s.snap_id ) IN</span><br />
<span style="font-family: Courier New, Courier, monospace;">(--Select the Maximum of the Snapshot IDs within an hour if more than one snapshot IDs</span><br />
<span style="font-family: Courier New, Courier, monospace;">--have the same number of sessions within that hour , so then picking one of the snapIds</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT TRUNC(sn.begin_interval_time,'HH24'),MAX(rl.snap_id)</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM dba_hist_resource_limit rl,dba_hist_snapshot sn</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE TRUNC(sn.begin_interval_time) >= TRUNC(sysdate-1)</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND rl.snap_id = sn.snap_id</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND rl.resource_name = 'sessions'</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND rl.instance_number = sn.instance_number</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND (TRUNC(sn.begin_interval_time,'HH24'),rl.CURRENT_UTILIZATION ) IN</span><br />
<span style="font-family: Courier New, Courier, monospace;">(--Select the Maximum no.of sessions for a given begin interval time</span><br />
<span style="font-family: Courier New, Courier, monospace;">-- All the snapshots within a given hour will have the same begin interval time when TRUNC is used</span><br />
<span style="font-family: Courier New, Courier, monospace;">-- for HH24 and we are selecting the Maximum sessions for a given one hour</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT TRUNC(s.begin_interval_time,'HH24'),MAX(r.CURRENT_UTILIZATION) "no_of_sess"</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM dba_hist_resource_limit r,dba_hist_snapshot s</span><br />
<span style="font-family: Courier New, Courier, monospace;">WHERE r.snap_id = s.snap_id</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND TRUNC(s.begin_interval_time) >= TRUNC(sysdate-1)</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND r.instance_number=s.instance_number</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND r.resource_name = 'sessions'</span><br />
<span style="font-family: Courier New, Courier, monospace;">GROUP BY TRUNC(s.begin_interval_time,'HH24'))</span><br />
<span style="font-family: Courier New, Courier, monospace;">GROUP BY TRUNC(sn.begin_interval_time,'HH24'),CURRENT_UTILIZATION)</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND r.snap_id = s.snap_id</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND r.instance_number = s.instance_number</span><br />
<span style="font-family: Courier New, Courier, monospace;">AND r.resource_name = 'sessions'</span><br />
<span style="font-family: Courier New, Courier, monospace;">GROUP BY to_char(TRUNC(s.begin_interval_time,'HH24'),'DD/MM/YYYY HH24:MI:SS')</span><br />
<span style="font-family: Courier New, Courier, monospace;">ORDER BY snap_begin;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-58587801425850245972017-12-07T04:56:00.000-08:002020-09-18T06:14:47.581-07:007) # "DATABASE GROWN ON LASTS MONTHS"<span style="font-family: Courier New, Courier, monospace;">7) # "DATABASE GROWN ON LASTS MONTHS"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} DATABASE GROWN ON LASTS MONTHS ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ ${DBVERSION} = "12" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;">PDB=$(sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pagesize 0 linesize 32767 feedback off verify off heading off echo off </span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT NAME FROM V\$CONTAINERS ORDER BY CON_ID, NAME;</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># echo -e "\n${PDB}" | tail +2</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} -- SELECT YOUR DATABASE [ CDB$ROOT / PDB ] ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">select SET_PDB in ${PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;">do</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PPDB=${SET_PDB}</span><br />
<span style="font-family: Courier New, Courier, monospace;"> break 1</span><br />
<span style="font-family: Courier New, Courier, monospace;">done</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} " -- YOUR DATABASE SELECTED IS: ${RED} ${PPDB} ${BLACK} --"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set container=${PPDB};</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col month for a20</span><br />
<span style="font-family: Courier New, Courier, monospace;">col GROWTH_MB format 999,999,999,999,999</span><br />
<span style="font-family: Courier New, Courier, monospace;">col GROWTH_GB format 999,999,999,999,999</span><br />
<span style="font-family: Courier New, Courier, monospace;">col GROWTH_MB for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col GROWTH_GB for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">exec dbms_application_info.set_action('DB growth');</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set nls_date_format='dd/mm/yyyy';</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT trunc(creation_time, 'MM') month</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(round(sum(bytes/1024/1024)), '9G999G999') growth_mb</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(round(sum(bytes/1024/1024/1024)), '9G999G999') growth_gb</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM v\$datafile</span><br />
<span style="font-family: Courier New, Courier, monospace;">GROUP BY trunc(creation_time, 'MM')</span><br />
<span style="font-family: Courier New, Courier, monospace;">ORDER BY trunc(creation_time, 'MM');</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">col month for a20</span><br />
<span style="font-family: Courier New, Courier, monospace;">col GROWTH_MB format 999,999,999,999,999</span><br />
<span style="font-family: Courier New, Courier, monospace;">col GROWTH_GB format 999,999,999,999,999</span><br />
<span style="font-family: Courier New, Courier, monospace;">col GROWTH_MB for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">col GROWTH_GB for a25</span><br />
<span style="font-family: Courier New, Courier, monospace;">exec dbms_application_info.set_action('DB growth');</span><br />
<span style="font-family: Courier New, Courier, monospace;">alter session set nls_date_format='dd/mm/yyyy';</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT trunc(creation_time, 'MM') month</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(round(sum(bytes/1024/1024)), '9G999G999') growth_mb</span><br />
<span style="font-family: Courier New, Courier, monospace;"> , to_char(round(sum(bytes/1024/1024/1024)), '9G999G999') growth_gb</span><br />
<span style="font-family: Courier New, Courier, monospace;">FROM v\$datafile</span><br />
<span style="font-family: Courier New, Courier, monospace;">GROUP BY trunc(creation_time, 'MM')</span><br />
<span style="font-family: Courier New, Courier, monospace;">ORDER BY trunc(creation_time, 'MM');</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1586447987315929266.post-65012347095388679312017-12-07T04:55:00.003-08:002020-09-18T06:14:49.179-07:006) # "GENERAL TUNING VIEW"<span style="font-family: Courier New, Courier, monospace;">6) # "GENERAL TUNING VIEW"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} "${RED} GENERAL TUNING VIEW ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo ${ECHO} ">--------------------------------------------------------------------------------------------------${RED} ${OPTION} ${BLACK}"</span><br />
<span style="font-family: Courier New, Courier, monospace;">${LOADING}</span><br />
<span style="font-family: Courier New, Courier, monospace;">sqlplus -S /nolog <<EOF</span><br />
<span style="font-family: Courier New, Courier, monospace;">conn / as sysdba</span><br />
<span style="font-family: Courier New, Courier, monospace;">set pages 700 lines 700 timing on colsep '|' SERVEROUTPUT ON LINESIZE 1000 FEEDBACK OFF colsep '|'</span><br />
<span style="font-family: Courier New, Courier, monospace;">PROMPT</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> v_value NUMBER;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> FUNCTION Format(p_value IN NUMBER)</span><br />
<span style="font-family: Courier New, Courier, monospace;"> RETURN VARCHAR2 IS</span><br />
<span style="font-family: Courier New, Courier, monospace;"> BEGIN</span><br />
<span style="font-family: Courier New, Courier, monospace;"> RETURN LPad(To_Char(Round(p_value,2),'990.00') || '%',8,' ') || ' ';</span><br />
<span style="font-family: Courier New, Courier, monospace;"> END;</span><br />
<span style="font-family: Courier New, Courier, monospace;">BEGIN</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- --------------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- Dictionary Cache Hit Ratio</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- --------------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> SELECT (1 - (Sum(getmisses)/(Sum(gets) + Sum(getmisses)))) * 100</span><br />
<span style="font-family: Courier New, Courier, monospace;"> INTO v_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> FROM v\$rowcache;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put('Dictionary Cache Hit Ratio : ' || Format(v_value));</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IF v_value < 90 THEN</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Increase SHARED_POOL_SIZE parameter to bring value above 90%');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ELSE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Value Acceptable.');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> END IF;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- -----------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- Library Cache Hit Ratio</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- -----------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> SELECT (1 -(Sum(reloads)/(Sum(pins) + Sum(reloads)))) * 100</span><br />
<span style="font-family: Courier New, Courier, monospace;"> INTO v_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> FROM v\$librarycache;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put('Library Cache Hit Ratio : ' || Format(v_value));</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IF v_value < 99 THEN</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Increase SHARED_POOL_SIZE parameter to bring value above 99%');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ELSE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Value Acceptable.');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> END IF;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- -------------------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- DB Block Buffer Cache Hit Ratio</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- -------------------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> SELECT (1 - (phys.value / (db.value + cons.value))) * 100</span><br />
<span style="font-family: Courier New, Courier, monospace;"> INTO v_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> FROM v\$sysstat phys,v\$sysstat db, v\$sysstat cons</span><br />
<span style="font-family: Courier New, Courier, monospace;"> WHERE phys.name = 'physical reads' AND db.name = 'db block gets' AND cons.name = 'consistent gets';</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put('DB Block Buffer Cache Hit Ratio : ' || Format(v_value));</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IF v_value < 89 THEN</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Increase DB_BLOCK_BUFFERS parameter to bring value above 89%');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ELSE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Value Acceptable.');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> END IF;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- ---------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- Latch Hit Ratio</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- ---------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> SELECT (1 - (Sum(misses) / Sum(gets))) * 100</span><br />
<span style="font-family: Courier New, Courier, monospace;"> INTO v_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> FROM v\$latch;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put('Latch Hit Ratio : ' || Format(v_value));</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IF v_value < 98 THEN</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Increase number of latches to bring the value above 98%');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ELSE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Value acceptable.');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> END IF;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- -----------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- Disk Sort Ratio</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- -----------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> SELECT (disk.value/mem.value) * 100</span><br />
<span style="font-family: Courier New, Courier, monospace;"> INTO v_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> FROM v\$sysstat disk, v\$sysstat mem</span><br />
<span style="font-family: Courier New, Courier, monospace;"> WHERE disk.name = 'sorts (disk)'</span><br />
<span style="font-family: Courier New, Courier, monospace;"> AND mem.name = 'sorts (memory)';</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put('Disk Sort Ratio : ' || Format(v_value));</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IF v_value > 5 THEN</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Increase SORT_AREA_SIZE parameter to bring value below 5%');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ELSE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Value Acceptable.');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> END IF;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- ----------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- Rollback Segment Waits</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- ----------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> SELECT (Sum(waits) / Sum(gets)) * 100</span><br />
<span style="font-family: Courier New, Courier, monospace;"> INTO v_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> FROM v\$rollstat;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put('Rollback Segment Waits : ' || Format(v_value));</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IF v_value > 5 THEN</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Increase number of Rollback Segments to bring the value below 5%');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ELSE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Value acceptable.');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> END IF;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- -------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- Dispatcher Workload</span><br />
<span style="font-family: Courier New, Courier, monospace;"> -- -------------------</span><br />
<span style="font-family: Courier New, Courier, monospace;"> SELECT NVL((Sum(busy) / (Sum(busy) + Sum(idle))) * 100,0)</span><br />
<span style="font-family: Courier New, Courier, monospace;"> INTO v_value</span><br />
<span style="font-family: Courier New, Courier, monospace;"> FROM v\$dispatcher;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put('Dispatcher Workload : ' || Format(v_value));</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IF v_value > 50 THEN</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Increase MTS_DISPATCHERS to bring the value below 50%');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ELSE</span><br />
<span style="font-family: Courier New, Courier, monospace;"> DBMS_Output.Put_Line('Value acceptable.');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> END IF;</span><br />
<span style="font-family: Courier New, Courier, monospace;">END;</span><br />
<span style="font-family: Courier New, Courier, monospace;">/</span><br />
<span style="font-family: Courier New, Courier, monospace;">SET FEEDBACK ON</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">Prompt # Waits by Class #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col waits for a50</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT 'Waits by Class | ' || wait_class as Waits, time_waited FROM v\$system_wait_class WHERE wait_class != 'Idle' ORDER BY time_waited DESC;</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">Prompt # Wait Class Breakdown #</span><br />
<span style="font-family: Courier New, Courier, monospace;">prompt ##############################################################</span><br />
<span style="font-family: Courier New, Courier, monospace;">col waits for a50</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT 'Wait Class Breakdown | ' || wait_class as Waits, ROUND(aas, 2) FROM (SELECT n.wait_class, m.time_waited/m.INTSIZE_CSEC AAS FROM v\$waitclassmetric m, v\$system_wait_class n WHERE m.wait_class_id = n.wait_class_id AND n.wait_class != 'Idle'</span><br />
<span style="font-family: Courier New, Courier, monospace;">UNION ALL</span><br />
<span style="font-family: Courier New, Courier, monospace;">SELECT 'CPU', value/100 AAS FROM v\$sysmetric WHERE metric_name = 'CPU Usage Per Sec' AND group_id = 2);</span><br />
<span style="font-family: Courier New, Courier, monospace;">quit;</span><br />
<span style="font-family: Courier New, Courier, monospace;">EOF</span>Unknownnoreply@blogger.com0