Announcements

Oracle training based on real-time expertise as per industry standards. Upcoming batch details are here.

View batch schedule

Free Oracle mock interview. Register using the link.

Register

#DBAchallenge: submit your questions.

Ask questions
Swipe for more →
Browse by Topic
Latest Posts

    Saturday, January 27, 2024

    RAC file system confusing?

    Shared file between RAC DB Instances:
    =====================================
    >>> Below are the list of files which are shared between RAC cluster instances and each cluster instances can read and write same file.
    >>> These are the single set of files and not instance specific files.

    a. spfile ------- On ASM
    b. controlfile ------- On ASM
    c. system ------- On ASM
    d. sysaux ------- On ASM
    e. users... etc ------- On ASM
    f. tempfile ------- On ASM
    g. password file  ------- On ASM

    Non-Shared file between RAC DB Instances or Each Instance specifi files:
    =======================================================
    >>> Below are the list of files which are non-shared between RAC cluster instances and each cluster instances can read the files but can not write same file.  
    >>> These are instance specific files in RAC cluster.

    a. undo (undo1 & undo2) ------- On ASM
    b. redo group ------- On ASM
    c. pfile ------- FS (OS storage) / SAN /NAS /NFS 


    Each Instance specific files:  
    ============================
    >>>These are instance specific files in RAC cluster.

    a. alert log ------- FS (OS storage) / SAN / NAS /NFS 
    b. trace ------- FS (OS storage) / SAN / NAS /NFS 
    c. trm ------- FS (OS storage) / SAN / NAS /NFS 
    d. incident files ------- FS (OS storage) / SAN / NAS /NFS 
    e. core dump ------- FS (OS storage) / SAN / NAS /NFS 
    etc...

    Regards,
    Mallik

    Saturday, January 6, 2024

    How to change DBID

    How to change DBID?

    Current DBID 492103932 and new DBID 535155273

    1. Query the current DBID

    [oracle@oracledb ~]$ sqlplus / as sysdba
    SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 4 05:21:52 2024

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

    Last Successful login time: Tue Jan 05 2014 23:35:38 -07:00

    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

    SQL> select dbid from v$database;
          DBID
    ----------
     492103932

    SQL>

    2. Use nid to change the DBID 

    [oracle@oracledb ~]$ nid TARGET=sys/Mallik123

    DBNEWID: Release 12.2.0.1.0 - Production on Thu Jan 4 06:22:01 2024

    Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

    Connected to database ORA12C (DBID=492103932)

    Connected to server version 12.2.0

    Control Files in database:
        /u01/app/oracle/oradata/ORA12C/controlfile/o1_mf_kk22c4gq_.ctl
        /u01/app/oracle/fast_recovery_area/ORA12C/ORA12C/controlfile/o1_mf_kk22c4jf_.ctl

    Change database ID of database ORA12C? (Y/[N]) => y

    Proceeding with operation
    Changing database ID from 492103932 to 535155273
        Control File /u01/app/oracle/oradata/ORA12C/controlfile/o1_mf_kk22c4gq_.ctl - modified
        Control File /u01/app/oracle/fast_recovery_area/ORA12C/ORA12C/controlfile/o1_mf_kk22c4jf_.ctl - modified
        Datafile /u01/app/oracle/oradata/ORA12C/datafile/o1_mf_system_kk227xkb_.db - dbid changed
        Datafile /u01/app/oracle/oradata/ORA12C/datafile/o1_mf_sysaux_kk229c5s_.db - dbid changed
        Datafile /u01/app/oracle/oradata/ORA12C/datafile/o1_mf_undotbs1_kk22b4f5_.db - dbid changed
        Datafile /u01/app/oracle/oradata/ORA12C/datafile/o1_mf_test1_ldnqcqrv_.db - dbid changed
        Datafile /u01/app/oracle/oradata/ORA12C/datafile/o1_mf_users_kk22b5h6_.db - dbid changed
        Datafile /u01/app/oracle/oradata/ORA12C/datafile/o1_mf_temp_kk22ch45_.tm - dbid changed
        Control File /u01/app/oracle/oradata/ORA12C/controlfile/o1_mf_kk22c4gq_.ctl - dbid changed
        Control File /u01/app/oracle/fast_recovery_area/ORA12C/ORA12C/controlfile/o1_mf_kk22c4jf_.ctl - dbid changed
        Instance shut down

    Database ID for database ORA12C changed to 535155273.
    All previous backups and archived redo logs for this database are unusable.
    Database is not aware of previous backups and archived logs in Recovery Area.
    Database has been shutdown, open database with RESETLOGS option.
    Succesfully changed database ID.
    DBNEWID - Completed succesfully.

    [oracle@oracledb ~]$ sqlplus / as sysdba

    SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 4 06:22:52 2024

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

    Connected to an idle instance.

    SQL> STARTUP MOUNT
    ORACLE instance started.

    Total System Global Area 3707764736 bytes
    Fixed Size                  8627248 bytes
    Variable Size             855641040 bytes
    Database Buffers         2835349504 bytes
    Redo Buffers                8146944 bytes
    Database mounted.
    SQL> ALTER DATABASE OPEN RESETLOGS;

    Database altered.

    SQL> select dbid from v$database;

          DBID
    ----------
     535155273

    SQL> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    [oracle@oracledb ~]$

    Regards,
    Mallik

    Monday, January 1, 2024

    RACOneNode relocate fails with PRKO-2148 Option'-node' must be supplied when running 'srvctl relocate database'

    1. RACOneNode database Instance one is running on node1

    [oracle@node2 ~]$ srvctl status database -d RAC1N
    Instance RAC1N_1 is running on node node1
    Online relocation: INACTIVE
    [oracle@node2 ~]$

    2. Config properties of RACOneNode database in 2 node clusters

    [oracle@node2 ~]$ srvctl config database -d RAC1N
    Database unique name: RAC1N
    Database name:
    Oracle home: /u01/app/oracle/product/12.2.0.1/dbhome_1
    Oracle user: oracle
    Spfile: +DATA/RAC1N/PARAMETERFILE/spfile.318.1067549521
    Password file: +DATA/RAC1N/PASSWORD/pwdrac1n.286.1067549269
    Domain:
    Start options: open
    Stop options: immediate
    Database role: PRIMARY
    Management policy: AUTOMATIC
    Server pools:
    Disk Groups: DATA,RECO
    Mount point paths:
    Services:
    Type: RACOneNode
    Online relocation timeout: 30
    Instance name prefix: RAC1N
    Candidate servers: node1,node2
    OSDBA group: oinstall
    OSOPER group: oinstall
    Database instances: RAC1N_1
    CSS critical: no
    CPU count: 0
    Memory target: 0
    Maximum memory: 0
    Default network number for database services:
    Database is administrator managed
    [oracle@node2 ~]$

    [oracle@node1 ~]$ . oraenv
    ORACLE_SID = [RAC1N_2] ? +ASM1
    The Oracle base remains unchanged with value /u01/app/oracle
    [oracle@node1 ~]$
    [oracle@node1 ~]$ olsnodes
    node1
    node2
    [oracle@node1 ~]$

    3. Trying to relocate Instance 1 from node1 to node2 which will fails 

    [oracle@node1 ~]$ srvctl relocate database -d RAC1N
    PRKO-2148 : Option '-node' must be supplied when running 'srvctl relocate database' for administrator-managed RAC One Node database
    [oracle@node1 ~]$

    After using -node or -n oprion I am able to reloacte Instance 1 to node2
    Now the Instacne 2 is running on node2 after relocate

    [oracle@node1 ~]$ srvctl relocate database -d RAC1N -n node2
    [oracle@node1 ~]$ srvctl status database -d RAC1N
    Instance RAC1N_2 is running on node node2
    Online relocation: INACTIVE
    [oracle@node1 ~]$

    [oracle@node1 ~]$ srvctl config database -d RAC1N
    Database unique name: RAC1N
    Database name:
    Oracle home: /u01/app/oracle/product/12.2.0.1/dbhome_1
    Oracle user: oracle
    Spfile: +DATA/RAC1N/PARAMETERFILE/spfile.318.1067549521
    Password file: +DATA/RAC1N/PASSWORD/pwdrac1n.286.1067549269
    Domain:
    Start options: open
    Stop options: immediate
    Database role: PRIMARY
    Management policy: AUTOMATIC
    Server pools:
    Disk Groups: DATA,RECO
    Mount point paths:
    Services:
    Type: RACOneNode
    Online relocation timeout: 30
    Instance name prefix: RAC1N
    Candidate servers: node1,node2
    OSDBA group: oinstall
    OSOPER group: oinstall
    Database instances: RAC1N_2
    CSS critical: no
    CPU count: 0
    Memory target: 0
    Maximum memory: 0
    Default network number for database services:
    Database is administrator managed
    [oracle@node1 ~]$

    Regards,
    Mallik

    🌟 Proud to be an Oracle ACE Pro! 🚀

    🌟 Proud to be an Oracle ACE Pro! 🚀 I’m excited to share my official Oracle ACE Profile with the Oracle community. 👨‍💻 Mallikarjun ...