Saturday, 11 March 2023

DBA Handy 19c grid Cluster manage Comands with snaps.

Dear All,

In this post will share the Cluster status hands-on commands for day to day work..

oracle clusterware resources and components we can mange with CRSCTL Utility.

1. How to connect to opc instance and switch to Grid user .


sudo su - grid


2.How to  stop and start Cluster : ( run from root user) to check the cluster status you can connect grid user and and set the grid home and check it , you can connect to root user if you want to stop and start the cluster services .

Note :  we have to stop the all the running database instnace prior to Cluster stop .

$GRID_HOME/bin/crsctl stop crs

$GRID_HOME/bin/crsctl start crs

3. Enable/Disable auto restart of CRS.

$GRID_HOME/bin/crsctl disable crs

$GRID_HOME/bin/crsctl enable crs

4. we can Find the cluster name by using below commands.

$GRID_HOME/bin/cemutlo -n

or

$GRID_HOME/bin/olsnodes -c



5.how to  Find the grid version:

 $GRID_HOME/bin/crsctl query crs softwareversion 



$GRID_HOME/bin/crsctl query crs softwareversion devdb01


[grid@devdb01 grid]$ crsctl query crs softwareversion devdb01

Oracle Clusterware version on node [devdb01] is [19.0.0.0.0]


6. check cluster component status

$GRID_HOME/bin/crsctl stat res -t




$GRID_HOME/bin/crsctl check crs

$GRID_HOME/bin/crsctl check crsd

$GRID_HOME/bin/crsctl check cssd

$GRID_HOME/bin/crsctl check evmd




7. Find voting disk and OCR location

$GRID_HOME/bin/crsctl query css votedisk

$GRID_HOME/bin/ocrcheck



8. Find cluster interconnect details

$GRID_HOME/bin/oifcfg getif

select NAME,IP_ADDRESS from v$cluster_interconnects;



 9. Check CRS status of local node and staus of  all crs resourcs

crsctl check crs

$GRID_HOME/bin/crsctl stat res -t

$GRID_HOME/bin/crsctl stat res -t -init




10. Stop and start high availability service ( HAS)

crsctl stop has

crsctl start has


11. Check CRS status of remote nodes

crsctl check cluster

crsctl check cluster -all



12. Disk timeout from node to voting disk(disktimeout) and Network latency in the node interconnect (Misscount)

crsctl get css disktimeout

crsctl get css misscount




crsctl replace votedisk +OCRVD

13. Add , Delete , another voting disk:

crsctl add css votedisk

crsctl delete css votedisk

14 . Get ocr disk backup details and Check whether standard or flex ASM

ocrconfig -showbackup

crsctl get cluster mode status







15 . Check CRS /cluster configuration information:

crsctl config crs

crsctl get cluster configuration




16 .Node roles in cluster

crsctl get node role status -all



17. crsctl has commands for standalone grid infrastrcuture


crsctl check has

crsctl config has

crsctl disable has

crsctl enable has

crsctl query has releaseversion

crsctl query has softwareversion

crsctl start has

crsctl stop has


Thanks,
Srini

How to create an instance in OCI

 

Hi All,


In this post will show you how to create new instance in Oracle cloud console .

once loged to Oracle cloud , go to compute... then click on instances .






Click on instances and then click on create instnaces:




provide the instnace name or leave it default,then select the compartment  .. then select the placement  which you want.




select the shape / image .



then select the network components and upload the public key which you generated from your machine to the cloud instnace .

note : dont share the private key with any one that you can use your self ( ex. to connect linux server using putty ) .



if you dont have key you can generate from the console click on generate a key pair for me option.




select the boot volume , i am useing free tier so , i have leave it default .. you can custamize as per your requriments with in the limits .





Click on hide advanced options , update if its requried , i have leave it default.





then click on create .. with few seconds your instnace is ready to use.






in the next post will share how to access this instance from your local windows machine and how to extended the block volue .  thank you 

Thanks ,

Srini



Friday, 10 March 2023

Enterpise Command Center V9 configuration on EBS R12.2.X -- Part 1

 

Hi ,

In this post i am trying to show the ECC setup on EBS R12.2.X presentation .

Enterpise Command Center V9





ECC Installtion high level steps : 








ECC Start and Stop process .. 






ECC Upgrade Process High level steps :







To understand the more on ECC setup on EBS R12.2.X read below deatils also will post the  part 2 for continution for this ECC setup ........

A new image containing the latest Oracle Enterprise Command Center (ECC) Framework for Oracle E-Business Suite (EBS), Oracle Enterprise Command Center Framework V9, is now available in the OCI Console Marketplace (accessible from your Oracle Cloud account). This image facilitates deployment of Enterprise Command Centers in your tenancy.

Enterprise Command Center Framework Image

The V9 release includes 34 command centers comprising 138 dashboards across EBS. These new and enhanced command centers help EBS users visualize, analyze, identify, and act on key transactions without a need for custom operational reporting, all from interactive displays. For more information, refer to Oracle Enterprise Command Centers (ECC) Quick Start Guide.

Using ECC With An Existing EBS Instance

To use ECC with an existing EBS instance, follow these two main steps:

  1. Create an ECC Framework Instance - With your subscription to the Oracle Compute Cloud Service, you can follow Provision a New Oracle Enterprise Command Center Framework Release 12.2 Installation on Oracle Cloud Infrastructure (MOS Note 2734421.1) to create a virtual machine containing the ECC V9 Framework.
     
  2. Integrate the ECC Framework Instance with EBS - After you have created your ECC Framework V9 instance, MOS Note 2734421.1 will guide you through the required post-installation steps. These include updating your network and security configurations, and then running a script to integrate with an existing EBS instance. You will then proceed to configure your Enterprise Command Centers and role-based dashboards.

Your existing EBS cloud instance can have been created by any of the following methods:

  • An automated lift and shift operation using EBS Cloud Backup Module and EBS Cloud Manager.
  • A manual lift and shift operation.
  • A Cloud Manager Advanced Provisioning procedure.

Additional Options for Deploying ECC Framework in Your Tenancy

  • The previously announced EBS 12.2.11 Demo Install Image includes the EBS database, application, and ECC tiers, all in a single VM, and is a quick way to spin up an instance for previewing ECC. Note that the EBS Release 12.2.11 Demo Install Image currently includes ECC V8.
  • Similarly, if you are using EBS Cloud Manager, One-Click Provisioning installs the EBS database, application, and ECC tiers (also currently ECC V8) in a single VM.

References

  • Provision a New Oracle Enterprise Command Center Framework Release 12.2 Installation on Oracle Cloud Infrastructure (MOS Note 2734421.1)
  • Enterprise Command Centers Quick Start Guide
  • Getting Started with Oracle E-Business Suite on Oracle Cloud Infrastructure (MOS Note 2517025.1)



Referance Documetns for next steps .. will update the part-2 next post how to setup / install this ECC on EBS R12.2.X.


Thanks,

Srini



Sunday, 5 March 2023

RMAN Transportable Database - Cross-Platform Database Migration Same endian

 Dear All,


in this post i am shaing cross platform db migration using Rman transportable db .


Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.4 and later
Information in this document applies to any platform.

Purpose

+ We can use RMAN "Transportable Database" conversion for performing cross platform database migration between two operating system platforms belonging to the same endian format.

Use V$TRANSPORTABLE_PLATFORM view to check the endianess of source and target database platforms.

+ If you need to migrate database across endian platforms i.e. from a little-endian platform to big-endian platform or vice-versa, we cannot use RMAN "Transportable Database" conversion. In this case, you would be using transportable tablespaces along with RMAN datafile conversion.

+ Also, note that for certain platform migration, we need not use RMAN convert (either using "Transportable Database" or "Transportable Tablespaces") at all. For these platforms, you can directly perform RMAN duplication (active or backup-based) or RMAN restore/recover without any conversion:

Document 1079563.1 RMAN DUPLICATE/RESTORE/RECOVER Mixed Platform Support

Details

For explaining RMAN "Transportable Database" methodology, we will migrate a 11.2.0.3 database running on Linux x86 64-bit (little-endian) platfrom to Solaris Operating System x86 32-bit (little-endian) platform

1. Execute DBMS_TDB.CHECK_EXTERNAL function to identify any external tables, directories, or BFILEs. RMAN cannot automate the transport of these files, so you must copy the files manually and re-create the database directories.

SQL> set serveroutput on;
SQL> declare x boolean; begin x := dbms_tdb.check_external; end;
  2  /
The following directories exist in the database:
SYS.ORACLE_OCM_CONFIG_DIR, SYS.DATA_PUMP_DIR
 
PL/SQL procedure successfully completed.


As per output above, we have 2 directories defined in the database. Check the operating system path for these directories using below query. Ensure that the same path is available on the target system for these directories to be usable or rename the directory paths after conversion.

SQL> select DIRECTORY_NAME, DIRECTORY_PATH from DBA_DIRECTORIES;
 
DIRECTORY_NAME            DIRECTORY_PATH
------------------------- ----------------------------------------
DATA_PUMP_DIR             /orasoft/admin/ora11gR2/dpdump/
ORACLE_OCM_CONFIG_DIR     /orasoft/rdbms/11.2.0.3/ccr/state


2. Start the source database in READ ONLY mode:

SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database open read only;


3. Execute DBMS_TDB.CHECK_DB function. This check ensures that no conditions would prevent the transport of the database, such as incorrect compatibility settings, in-doubt or active transactions, or incompatible endian formats between the source platform and destination platform. Any condition reported by CHECK_DB must be resolved before proceeding

SQL> set serveroutput on
SQL>
SQL> DECLARE db_ready BOOLEAN;
  2  BEGIN
  3  db_ready := DBMS_TDB.CHECK_DB('Solaris Operating System (x86)', DBMS_TDB.SKIP_NONE);
  4  END;
  5  /
 
PL/SQL procedure successfully completed.


4. Transportable Database using RMAN COVERT DATABASE command can be performed on the source system or target system.

It's default behavior is to perform datafile conversion on all datafiles in the database. However, only datafiles that contain undo data require conversion including all datafiles beloging to SYSTEM tablespace and all UNDO tablespaces.

To skip datafile conversion for datafiles that do not contain undo data, you must perform a target platform conversion as shown in this document.

Get a list of datafiles that require conversion and ones that don't

SQL> select FILE_NAME "Datafiles requiring Conversion" from DBA_DATA_FILES
  2  where TABLESPACE_NAME in (select distinct TABLESPACE_NAME from DBA_ROLLBACK_SEGS);
 
Datafiles requiring Conversion
--------------------------------------------------------------------------------
/oradata/ora11gR2/system01.dbf
/oradata/ora11gR2/undotbs01.dbf
 
SQL> select FILE_NAME "Files NOT requiring Conversion" from DBA_DATA_FILES
  2  where TABLESPACE_NAME NOT in (select distinct TABLESPACE_NAME from DBA_ROLLBACK_SEGS);
 
Files NOT requiring Conversion
--------------------------------------------------------------------------------
/oradata/ora11gR2/sysaux01.dbf
/oradata/ora11gR2/users01.dbf


5. Now we need to move all the above files (the ones which need conversion and ones which do not) to the target system. For datafiles which do not require conversion, they can directly be moved to their final destination on the target system. For datafiles which need conversion, need to be moved to a staging location on the target system where we will run CONVERT on them during which they will be placed in their final destination.

To minimize time for migration, we need to evaluate how datafile copying (to the target system) and datafile conversion can be merged into a single step. One method would be to NFS mount the source system directory (containing the datafiles) on the target system. Thus, when datafile conversion is run on target system, the datafiles will be placed in their final location eliminating the extra step of transferring the datafiles to the target system.

This method will work if you are performing migration for below cases:

a) Source database uses file-system, Target database uses file-system
b) Source database uses file-system, Target database uses ASM

If source database uses ASM, we need to use BACKUP AS COPY command in RMAN (this needs to be run when the database in in MOUNT mode or OPEN read only) to move the datafiles from ASM to a file-system location on the source and then NFS mount that location on the target system.

Alternatively if source database uses SAN storage, check with your system administrator if it is possible to mount the source san diskgroups directly on the target server in read only mode.

In this example, our source Linux x86 64-bit uses file-system whereas our target Solaris x86 32-bit will use ASM. We will NFS mount the source system directory which contains the datafiles i.e. '/oradata' to the target Solaris system

NFS mounting is outside the scope of this article but here is how it is done

On source, put below line in /etc/exports:
/oradata        oraSolaris10(ro)
 
Re-start NFS:
# /etc/init.d/nfs stop
# /etc/init.d/nfs start
 
On target, perform the NFS mount:
# mount -o vers=3  -F nfs 192.168.114.10:/oradata /oradata


6. We now need to move the initialization parameter file from source to target system. If source database is using spfile, create pfile from it and move it to the target:

SQL> create pfile = '/oradata/ora11gR2/initSol11g.ora' from spfile;

On the target system, move this pfile to $ORACLE_HOME/dbs location and make suitable changes to reflect mount-points available on the target system and any other changes you might want to make. you might want to specifically change these parameters: audit_file_dest, control_files, db_name, db_recovery_file_dest, diagnostic_dest

STARTUP NOMOUNT the instance on the target system using the modified pfile:

SQL> startup nomount pfile='/orasoft/rdbms/11.2.0.3/dbs/initSol11g.ora'

7. Now, start the conversion process in RMAN on target system for the datafiles that we identified in Step 4 i.e. ones which contain UNDO data:

RMAN> CONVERT FROM PLATFORM 'Linux x86 64-bit'
2> PARALLELISM 2
3> DATAFILE '/oradata/ora11gR2/system01.dbf' FORMAT '+DATA'
4> DATAFILE '/oradata/ora11gR2/undotbs01.dbf' FORMAT '+DATA';
 
Starting conversion at target at 08-NOV-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=62 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=12 device type=DISK
channel ORA_DISK_1: starting datafile conversion
input file name=/oradata/ora11gR2/system01.dbf
channel ORA_DISK_2: starting datafile conversion
input file name=/oradata/ora11gR2/undotbs01.dbf
converted datafile=+DATA/sol11g/datafile/undotbs1.256.766638629
channel ORA_DISK_2: datafile conversion complete, elapsed time: 00:02:53
converted datafile=+DATA/sol11g/datafile/system.257.766638629
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:04:23
Finished conversion at target at 08-NOV-11


You can increase PARALLELISM value if there are many files which need to be converted so that more channels are allocated. If the target database will not use ASM, specify the file-system path in the FORMAT clause where the datafile will finally reside.

8. Now, copy rest of the datafiles (which do not contain undo and hence do not require conversion) to the ASM diskgroup using RMAN without conversion.

Note that to copy files into ASM we have again used CONVERT command (without FROM PLATFORM clause). When CONVERT DATAFILE is used without specifying a source or destination platform, we do not perform any kind of conversion. This is specifically used to move files into ASM from file-sytem.

If the target database will not use ASM, this step is not needed. Instead use OS cp command to copy these datafile directly to the directory where you want them to reside.

RMAN> CONVERT PARALLELISM 2
2> DATAFILE '/oradata/ora11gR2/sysaux01.dbf' FORMAT '+DATA'
3> DATAFILE '/oradata/ora11gR2/users01.dbf' FORMAT '+DATA';
 
Starting conversion at target at 08-NOV-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=63 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=13 device type=DISK
channel ORA_DISK_1: starting datafile conversion
input file name=/oradata/ora11gR2/sysaux01.dbf
channel ORA_DISK_2: starting datafile conversion
input file name=/oradata/ora11gR2/users01.dbf
converted datafile=+DATA/sol11g/datafile/users.259.766639567
channel ORA_DISK_2: datafile conversion complete, elapsed time: 00:00:17
converted datafile=+DATA/sol11g/datafile/sysaux.258.766639567
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:59
Finished conversion at target at 08-NOV-11


9. Now, we need to create the controlfile for our target database. You can generate the controlfile creation script by running below on the source database:

SQL> alter database backup controlfile to trace resetlogs;

Edit the controlfile creation script to reflect:

a) Datafile names for the target database where the datafiles finally reside (after running CONVERT DATAFILE)
b) Redo Log names as per target system path
c) database name as needed for the target database.

Here is the controlfile creation script for our example:

SQL> CREATE CONTROLFILE REUSE SET DATABASE "SOL11G" RESETLOGS ARCHIVELOG
  2      MAXLOGFILES 16
  3      MAXLOGMEMBERS 3
  4      MAXDATAFILES 100
  5      MAXINSTANCES 8
  6      MAXLOGHISTORY 292
  7  LOGFILE
  8    GROUP 1 '+DATA/sol11g/redo01.log'  SIZE 50M BLOCKSIZE 512,
  9    GROUP 2 '+DATA/sol11g/redo02.log'  SIZE 50M BLOCKSIZE 512,
 10    GROUP 3 '+DATA/sol11g/redo03.log'  SIZE 50M BLOCKSIZE 512
 11  DATAFILE
 12    '+DATA/sol11g/datafile/system.257.766638629',
 13    '+DATA/sol11g/datafile/sysaux.258.766639567',
 14    '+DATA/sol11g/datafile/undotbs1.256.766638629',
 15    '+DATA/sol11g/datafile/users.259.766639567'
 16  CHARACTER SET WE8MSWIN1252;
 
Control file created.


10. Now, open the database on the target system. Once, database opens, add tempfiles to the TEMP tablespace

SQL> ALTER DATABASE OPEN RESETLOGS;
 
Database altered.
 
SQL> ALTER TABLESPACE TEMP ADD TEMPFILE '+DATA' SIZE 20971520  AUTOEXTEND OFF;
 
Tablespace altered.


11. Complete the database conversion by running UTLIRP and UTLRP as below:

SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP UPGRADE;
SQL> @ ?/rdbms/admin/utlirp
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP;

SQL> @ ?/rdbms/admin/utlrp


Thanks,
Srini