Category: Uncategorized

  • Oracle Data Guard Resolve UNNAMED File Issue

    In a Data Guard configuration it is very common to these the ‘UNNAMED File Issue/Error’ on Standby Database when you add new datafile on Primary Database and there is no space available on the standby database server or improper parameter settings related to standby file management. This will result in the following Oracle error messages ORA-01111, ORA-01110, ORA-01157 and cause MRP process to crash resulting in Standby database ‘out of sync’ with primary. 


    Also note that, If STANDBY_FILE_MANAGEMENT parameter is not configured as ‘AUTO’ in your Data Guard environment and a datafile is created on Primary database,  then the file created on standby server will have unnamed file name and it is created under $ORACLE_HOME/dbs directory. 


    Environment Details:


    Primary DB HostName / DB Instance : PRD101/ ORCLPRD
    Standby DB HostName / DB Instance : STD101/ ORCLSTDY
    Database version: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0


    Alert log on Standby DB:


    Sun May 21 15:05:13 2017
    Errors in file /u01/app/oracle/diag/rdbms/orclstdy/orclstdy/trace/orclstdy_dbw0_61177.trc:
    ORA-01186: file 11 failed verification tests
    ORA-01157: cannot identify/lock data file 11 – see DBWR trace file
    ORA-01111: name for data file 11 is unknown – rename to correct file
    ORA-01110: data file 11: ‘/u01/app/oracle/product/11.2.0.4/db/dbs/UNNAMED00011’
    File 11 not verified due to error ORA-01157
    MRP0: Background Media Recovery terminated with error 1111
    Errors in file /u01/app/oracle/diag/rdbms/orclstdy/orclstdy/trace/orclstdy_pr00_11317.trc:
    ORA-01111: name for data file 11 is unknown – rename to correct file
    ORA-01110: data file 11: ‘/u01/app/oracle/product/11.2.0.4/db/dbs/UNNAMED00011’
    ORA-01157: cannot identify/lock data file 11 – see DBWR trace file
    ORA-01111: name for data file 11 is unknown – rename to correct file
    ORA-01110: data file 11: ‘/u01/app/oracle/product/11.2.0.4/db/dbs/UNNAMED00011’
    Managed Standby Recovery not using Real Time Apply
    Recovery Slave PR00 previously exited with exception 1111
    MRP0: Background Media Recovery process shutdown (orclstdy)


    Troubleshooting Steps:


    Let us see how we can fix this error and get Standby In-synch again with Primary.

    • Run following at Standby side. 

    SQL> set lines 300
    SQL> select name,open_mode,database_role from v$database;


    NAME      OPEN_MODE            DATABASE_ROLE
    ——— ——————– —————-
    ORCLSTDY  READ ONLY            PHYSICAL STANDBY


    SQL> select PROCESS,THREAD#,SEQUENCE#,STATUS from v$managed_standby where process=’MRP0′;


    no rows selected  –> MRP is not Running


    SQL> set sqlblanklines on


    SQL> SELECT ARCH.THREAD# “Thread”, ARCH.SEQUENCE# “Last Sequence Received”, APPL.SEQUENCE# “Last Sequence Applied”, (ARCH.SEQUENCE# – APPL.SEQUENCE#) “Difference” FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH, (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL WHERE ARCH.THREAD# = APPL.THREAD# ORDER BY 1;


        Thread Last Sequence Received Last Sequence Applied Difference


    ———- ———————- ——————— ———-


             1                  13817                 13708        109


    • Stop MRP if it’s not already stopped.



    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;


    Database altered.


    SQL> show parameter standby_file_management


    NAME                                 TYPE                             VALUE
    ———————————— ——————————– ——————————
    standby_file_management              string                           AUTO




    SQL> col NAME for a70
    SQL>  select * from v$recover_file where error like ‘%UNNAMED%’;


         FILE# NAME
    ———- ———————————————————————-
            11 /u01/app/oracle/product/11.2.0.4/db/dbs/UNNAMED00011


    Here the datafile #11 is renamed to UNNAMED00011 on standby database 


    • Identify the datafile name on primary database

    SQL>  select file#,name from v$datafile where file#=11;


    FILE#   NAME
    —— ———————————————————————-
    11  /u02/oradata/datafile/orclprd/users01.dbf


    • Temporary change setting for STANDBY_FILE_MANAGEMENT to MANUAL, we can revert this setting once we finish the activity. 

    SQL> alter system set standby_file_management=MANUAL scope=both;


    System altered.


    SQL> show parameter standby_file_management


    NAME                                 TYPE                             VALUE
    ———————————— ——————————– ——————————
    standby_file_management              string 


    • Create a new datafile with same name as of Primary ( Name obtained above)

    SQL> alter database create datafile ‘/u01/app/oracle/product/11.2.0.4/db/dbs/UNNAMED00011’ as ‘/u02/oradata/datafile/orclstdy/users01.dbf’;


    Database altered.


    SQL> select file#,name from v$datafile where file#=11;


         FILE# NAME
    ———- ———————————————————————-
            11 /u02/oradata/datafile/orclstdy/users01.dbf


    • Revert STANDBY_FILE_MANAGEMENT to AUTO 

      SQL> alter system set standby_file_management=AUTO scope=both;


    System altered.


    • Check if MRP is up 

    SQL> select PROCESS,THREAD#,SEQUENCE#,STATUS from v$managed_standby where process=’MRP0′;


    no rows selected


    • Start MRP process and monitor lag gap. MRP will start applying logs if archives are available at Standby side.

    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;


    Database altered.


    • On Primary database switch log or archive log and check the archive logs are being shipped to Standby database and MRP is applying them

    SQL> alter system switch logfile;


    • Verify standby database 

    SQL> SELECT ARCH.THREAD# “Thread”, ARCH.SEQUENCE# “Last Sequence Received”, APPL.SEQUENCE# “Last Sequence Applied”, (ARCH.SEQUENCE# – APPL.SEQUENCE#) “Difference” FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH, (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL WHERE ARCH.THREAD# = APPL.THREAD# ORDER BY 1;


        Thread Last Sequence Received Last Sequence Applied Difference


    ———- ———————- ——————— ———-


             1                  13818                 13713        105




    SQL> /


        Thread Last Sequence Received Last Sequence Applied Difference
    ———- ———————- ——————— ———-
             1                  13820                 13820          0


    You can observe, Standby Database is in synch with Primary and MRP is working perfect. 


    Conclusion


    In this article we have learned how to fix ‘UNNAMED File Issue/Error’ on Standby Database when you add new datafile on Primary Database and there is no space available on the standby database server or improper parameter settings related to standby file management. To avoid these kind of errors, also ensure that you have correct Data Guard setup as per best practices and there is sufficient file system space on both Primary and Standby servers

  • Create a Local Yum Repository Using an ISO Image on Exadata Database Machine

    You want to install some packages on the Exadata Compute nodes running Oracle Enterprise Linux and you don’t have internet access. In those cases you can create a local YUM repository using DVD Image. You simply download the DVD Image on the Desktop/Laptop where you have the internet access, copy it to the server and mount it.


    In this article we will demonstrate how create a Local YUM Repository using ISO Image on Exadata Database Machines.


    Prerequisites

    1. System with Internet
    2. Sufficient space on the server for Oracle Linux DVD ISO



    Steps to create a Local YUM Repository using ISO Image on Exadata Database Machines


    Step 1: Download Oracle Linux DVD Image from the Oracle Software Delivery Cloud at http://edelivery.oracle.com/linux


    Here I am downloading:
    V860937-01.iso Oracle Linux 6 Update 9 for x86 64 bit, 3.8 GB


    Step 2: Copy the DVD image to the server to a staging directory using Winscp


    Create a staging directory on the server


    [root@dm01db01 ~]# mkdir -p /u01/app/oracle/software/ISO


    Use Winscp to copy the ISO Image to the server


    [root@dm01db01 ~]# ls -l /u01/app/oracle/software/ISO
    total 3953672
    -rw-r–r– 1 root root 4048551936 Mar 20 04:18 V860937-01.iso


    Step 3:  Create a mount point, for example /mnt/OEL6.9, and mount the DVD image on it. 


    [root@dm01db01 ~]# mkdir -p /mnt/OEL6.9


    [root@dm01db01 ~]# ls -l /mnt/OEL6.9
    total 0


    [root@dm01db01 ~]# mount -o loop,ro /u01/app/oracle/software/ISO/V860937-01.iso /mnt/OEL6.9


    [root@dm01db01 ~]# df -h /mnt/OEL6.9
    Filesystem            Size  Used Avail Use% Mounted on
    /u01/app/oracle/software/ISO/V860937-01.iso
                          3.8G  3.8G     0 100% /mnt/OEL6.9


    [root@dm01db01 ~]# cd /mnt/OEL6.9


    [root@dm01db01 OEL6.9]# ls -l
    total 1686
    drwxr-xr-x 3 root root   2048 Mar 24  2017 EFI
    -rw-r–r– 1 root root   8529 Mar 24  2017 EULA
    -rw-r–r– 1 root root   8529 Mar 24  2017 eula.en_US
    -rw-r–r– 1 root root   3334 Mar 24  2017 eula.py
    -rw-r–r– 1 root root  18390 Mar 24  2017 GPL
    drwxr-xr-x 3 root root   2048 Mar 24  2017 HighAvailability
    drwxr-xr-x 3 root root   2048 Mar 24  2017 images
    drwxr-xr-x 2 root root   2048 Mar 24  2017 isolinux
    drwxr-xr-x 3 root root   2048 Mar 24  2017 LoadBalancer
    -rw-r–r– 1 root root     98 Mar 24  2017 media.repo
    drwxr-xr-x 2 root root 716800 Mar 24  2017 Packages
    -rw-r–r– 1 root root   7193 Mar 24  2017 README-en
    -rw-r–r– 1 root root   6016 Mar 24  2017 README-en.html
    -rw-r–r– 1 root root  81004 Mar 24  2017 RELEASE-NOTES-en
    -rw-r–r– 1 root root 227548 Mar 24  2017 RELEASE-NOTES-en.html
    -rw-r–r– 1 root root  81004 Mar 24  2017 RELEASE-NOTES-x86_64-en
    -rw-r–r– 1 root root 227548 Mar 24  2017 RELEASE-NOTES-x86_64-en.html
    -rw-r–r– 1 root root  81004 Mar 24  2017 RELEASE-NOTES-x86-en
    -rw-r–r– 1 root root 227548 Mar 24  2017 RELEASE-NOTES-x86-en.html
    lrwxrwxrwx 1 root root     15 Mar 24  2017 repodata -> Server/repodata
    drwxr-xr-x 3 root root   2048 Mar 24  2017 ResilientStorage
    -rw-r–r– 1 root root   1011 Mar 24  2017 RPM-GPG-KEY
    -rw-r–r– 1 root root   1011 Mar 24  2017 RPM-GPG-KEY-oracle
    drwxr-xr-x 3 root root   2048 Mar 24  2017 ScalableFileSystem
    drwxr-xr-x 4 root root   2048 Mar 24  2017 Server
    -rw-r–r– 1 root root    108 Mar 24  2017 supportinfo
    -r–r–r– 1 root root   6517 Mar 24  2017 TRANS.TBL
    drwxr-xr-x 3 root root   2048 Mar 24  2017 UEK4


    Step 4:  Add an entry to the /etc/fstab file, this will to auto mount the DVD image after a reboot. 


    /u01/app/oracle/software/ISO/V860937-01.iso /mnt/OEL6.9 iso9660 loop,ro 0 0


    [root@dm01db01 ~]# vi /etc/fstab


    [root@dm01db01 ~]# cat /etc/fstab
    LABEL=DBSYS             /                       ext4    defaults        1 1
    LABEL=BOOT              /boot                   ext4    defaults,nodev        1 1
    LABEL=DBORA             /u01                    ext4    defaults,nodev  1 1
    tmpfs                   /dev/shm                tmpfs   defaults,size=258341m 0
    devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
    sysfs                   /sys                    sysfs   defaults        0 0
    proc                    /proc                   proc    defaults        0 0
    LABEL=SWAP              swap                    swap    defaults        0 0
    /u01/app/oracle/software/ISO/V860937-01.iso /mnt/OEL6.9 iso9660 loop,ro 0 0


    Step 5:  Navigate to /etc/yum.repos.d directory, you can edit the existing repository files public-yum-ol6.repo or create a new repo file such as ULN-base.repo, and disable all entries by setting enabled=0. 


    [root@dm01db01 ~]# cd /etc/yum.repos.d


    [root@dm01db01 yum.repos.d]# ls -l
    total 20
    -rw-r—– 1 root root  291 Mar 31 22:43 Exadata-computenode.repo
    -r–r—– 1 root root  896 Jan 26 06:19 Exadata-computenode.repo.sample
    -rw-r–r– 1 root root 7299 Mar 20 05:57 public-yum-ol6.repo


    Here I am going to create the OL69.repo repository file and add the entries 


    [root@dm01db01 yum.repos.d]# vi OL69.repo


    [root@dm01db01 yum.repos.d]# cat OL69.repo
    [OL69]
    name=Oracle Linux 6.9 x86_64
    baseurl=file:///mnt/OEL6.9
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
    gpgcheck=1
    enabled=1


    Step 7:  Perform YUM Cache cleanup as below


    [root@dm01db01 yum.repos.d]# yum clean all
    Cleaning repos: OL69
    Cleaning up Everything


    Step 8:  Perform a test to ensure you can access yum repository


    [root@dm01db01 yum.repos.d]# yum repolist
    OL69                          | 3.7 kB      00:00 …
    OL69/primary_db                | 3.1 MB      00:00 …
    repo id                        repo name    status    
    OL69                          Oracle Linux 6.9 x86_64 3,860
    repolist: 3,860




    Conclusion


    In this article we have learned how to create local YUM repository using DVD ISO Image on Exadata Database Machine. Configuring a local YUM repository comes handy when you want to install packages on the server and you don’t have internet access from the server.

  • Oracle Database Appliance Database Configuration Parameter file

    When you create a database on Oracle Database Appliance (ODA) it uses a ‘default’ database configuration file which consists of a default parameters. 


    The default database configuration file uses the following parameters:


    [root@odanode1 ~]# oakcli show db_config_params
    The available DB configuration files are :
    default


    [root@odanode1 ~]# oakcli show db_config_params -conf default -detail
    DATABASE_BLOCK_SIZE       =>    8192
    DATABASE_LANGUAGE         =>    AMERICAN
    DATABASE_CHARACTERSET     =>    AL32UTF8
    DATABASE_TERRITORY        =>    AMERICA
    COMPONENT_LANGUAGES       =>    en
    NLS_NCHAR_CHARACTERSET    =>    AL16UTF16


    If you want to create a database with different database configuration parameter then you must create a database configuration file with your desired parameters. You can use the ‘oakcli create db_config_params’ command to create a database configuration file. The configuration files are created under the locatoin ‘/opt/oracle/oak/install/dbconf’ with a default extension of ‘.dbconf’.


    In this article we will demonstrate how to create a database configuration file.


    Steps to generate/create a database configuration file


    Step 1: List the Database Configuration files


    [root@odanode1 ~]# oakcli show db_config_params
    The available DB configuration files are :
    default


    Step 2: Create Database Configuration file


    [root@odanode1 dumpfiles]# oakcli create db_config_params -conf newdbconf
    Please select one of the following for Database Block Size  [1 .. 4] :
    1    => 4096
    2    => 8192
    3    => 16384
    4    => 32768
    2    –> Enter the value. Here I entered 2 for 8k block size
    The selected value is : 8192


    Specify the  Database Language (1. AMERICAN 2. Others) [1] : 1 –> Here I entered 1 for AMERICAN database language
    The selected value is : AMERICAN


    Specify the  Database Characterset (1. AL32UTF8 2. Others) [1] : 2 –> Enter 2 for Other Characterset


    Please select one of the following for Database Characterset [0 .. 10] :
    0    => Others
    1    => AL32UTF8
    2    => AR8ADOS710
    3    => AR8ADOS720
    4    => AR8APTEC715
    5    => AR8APTEC715T
    6    => AR8ARABICMACS
    7    => AR8ASMO8X
    8    => AR8HPARABIC8T
    9    => AR8ISO8859P6
    10    => AR8MSWIN1256


    <<Hit enter to display more characterset>>


    Please select one of the following for Database Characterset  [0 .. 21] :
    11    => AR8MUSSAD768
    12    => AR8MUSSAD768T
    13    => AR8NAFITHA711
    14    => AR8NAFITHA711T
    15    => AR8NAFITHA721
    16    => AR8NAFITHA721T
    17    => AR8SAKHR706
    18    => AR8SAKHR707
    19    => AR8SAKHR707T
    20    => AZ8ISO8859P9E
    21    => BG8MSWIN


    <<Hit enter to display more characterset>>


    Please select one of the following for Database Characterset  [0 .. 32] :
    22    => BG8PC437S
    23    => BLT8CP921
    24    => BLT8ISO8859P13
    25    => BLT8MSWIN1257
    26    => BLT8PC775
    27    => BN8BSCII
    28    => CDN8PC863
    29    => CEL8ISO8859P14
    30    => CL8ISO8859P5
    31    => CL8ISOIR111
    32    => CL8KOI8R


    <<Hit enter to display more characterset>>


    Please select one of the following for Database Characterset  [0 .. 43] :
    33    => CL8KOI8U
    34    => CL8MACCYRILLICS
    35    => CL8MSWIN1251
    36    => EE8ISO8859P2
    37    => EE8MACCES
    38    => EE8MACCROATIANS
    39    => EE8MSWIN1250
    40    => EE8PC852
    41    => EL8DEC
    42    => EL8ISO8859P7
    43    => EL8MACGREEKS


    <<Hit enter to display more characterset>>


    Please select one of the following for Database Characterset  [0 .. 54] :
    44    => EL8MSWIN1253
    45    => EL8PC437S
    46    => EL8PC851
    47    => EL8PC869
    48    => ET8MSWIN923
    49    => HU8ABMOD
    50    => HU8CWI2
    51    => IN8ISCII
    52    => IS8PC861
    53    => IW8ISO8859P8
    54    => IW8MACHEBREWS


    <<Hit enter to display more characterset>>


    Please select one of the following for Database Characterset  [0 .. 65] :
    55    => IW8MSWIN1255
    56    => IW8PC1507
    57    => JA16EUC
    58    => JA16EUCTILDE
    59    => JA16SJIS
    60    => JA16SJISTILDE
    61    => JA16VMS
    62    => KO16KSC5601
    63    => KO16KSCCS
    64    => KO16MSWIN949
    65    => LA8ISO6937


    <<Hit enter to display more characterset>>


    Please select one of the following for Database Characterset  [0 .. 76] :
    66    => LA8PASSPORT
    67    => LT8MSWIN921
    68    => LT8PC772
    69    => LT8PC774
    70    => LV8PC1117
    71    => LV8PC8LR
    72    => LV8RST104090
    73    => N8PC865
    74    => NE8ISO8859P10
    75    => NEE8ISO8859P4
    76    => RU8BESTA


    <<Hit enter to display more characterset>>


    Please select one of the following for Database Characterset  [0 .. 87] :
    77    => RU8PC855
    78    => RU8PC866
    79    => SE8ISO8859P3
    80    => TH8MACTHAIS
    81    => TH8TISASCII
    82    => TR8DEC
    83    => TR8MACTURKISHS
    84    => TR8MSWIN1254
    85    => TR8PC857
    86    => US8PC437
    87    => UTF8


    <<Hit enter to display more characterset>>


    Please select one of the following for Database Characterset  [0 .. 98] :
    88    => VN8MSWIN1258
    89    => VN8VN3
    90    => WE8DEC
    91    => WE8DG
    92    => WE8ISO8859P1
    93    => WE8ISO8859P15
    94    => WE8ISO8859P9
    95    => WE8MACROMAN8S
    96    => WE8MSWIN1252
    97    => WE8NCR4970
    98    => WE8NEXTSTEP
    96 –> Enter 96 to select WE8MSWIN1252 as characterset
    The selected value is : WE8MSWIN1252


    Specify the  Database Territory (1. AMERICA 2. Others) [1] : –> Here I entered 1 for AMERICA database Territory
    The selected value is : AMERICA


    Specify the  Component Language (1. en 2. Others) [1] : –> Here I entered 1 for en Component Language
    The selected value is : en


    Please select one of the following for NLS Characterset  [1 .. 2] :
    1    => AL16UTF16
    2    => UTF8
    1    –> Here I entered 1 for AL16UTF16 NLS Characterset
    The selected value is : AL16UTF16


    Successfully generated the Database parameter file ‘newdbconf’


    Step 3: Verify the configuration file is created


    [root@odanode1 ~]# oakcli show db_config_params
    The available DB configuration files are :
    newdbconf
    default


    Step 4: List the parameters for newly created configuration file


    [root@odanode1 ~]# oakcli show db_config_params -conf newdbconf -detail
    DATABASE_BLOCK_SIZE       =>    8192
    DATABASE_LANGUAGE         =>    AMERICAN
    DATABASE_CHARACTERSET     =>    WE8MSWIN1252
    DATABASE_TERRITORY        =>    AMERICA
    COMPONENT_LANGUAGES       =>    en
    NLS_NCHAR_CHARACTERSET    =>    AL16UTF16




    Conclusion


    In this article we have learned how to create a database configuration file with the desired parameters. The Default database configuration file parameters may not be applicable for all the databases. You can use the ‘oakcli create db_config_params’ command to create a database configuration file.

  • Delete Database On Oracle Database Appliance (ODA)

    You want to drop a database on Oracle Database Appliance (ODA) that is no more required or used. Use the “oakcli delete database” command to delete a database from ODA.




    In this article we will demonstrate how to delete a database on Oracle Database Appliance.


    Steps to Delete Database on ODA


    Step 1: List the database currently running on ODA


    [root@odanode01 ~]# oakcli show databases
    Name     Type       Storage   HomeName             HomeLocation                               Version                     
    —–    ——     ——–  ————–       —————-                           ———-                  
    newdb    RAC        ACFS      OraDb12102_home1     /u01/app/oracle/product/12.1.0.2/dbhome_1  12.1.0.2.170117(24732082,24828633)
    odatest  RAC        ACFS      OraDb12102_home1     /u01/app/oracle/product/12.1.0.2/dbhome_1  12.1.0.2.170117(24732082,24828633)


    Step 2: Get the syntax to delete the database


    [root@odanode01 ~]# oakcli delete database -h
    Usage:
            oakcli delete database  -db  <db_name>


         where:
          db_name      –    name of the database  to be deleted


    Step 3: Execute the “oakcli delete database” command to delete the database


    [root@odanode01 ~]# oakcli delete database -db newdb
    INFO: 2018-04-22 15:28:56: Look at the log file ‘/opt/oracle/oak/log/odanode01/tools/12.1.2.10.0/deletedatabase_newdb_39297.log’ for 


    more details


    Please enter the ‘root’  password :
    Please re-enter the ‘root’ password:


    Please enter the ‘SYS’  password :
    Please re-enter the ‘SYS’ password:
    INFO: 2018-04-22 15:29:30: Setting up SSH
    …………Completed
    SUCCESS: Ran /usr/bin/rsync -tarqvz /opt/oracle/oak/onecmd/ root@192.168.16.25:/opt/oracle/oak/onecmd –exclude=*zip –exclude=*gz —


    exclude=*log –exclude=*trc –exclude=*rpm and it returned: RC=0


    ……….Completed
    ……
    SUCCESS: All nodes in /opt/oracle/oak/onecmd/tmp/db_nodes are pingable and alive.
    INFO: 2018-04-22 15:31:06: SSH has been successfully established
    INFO: 2018-04-22 15:33:04: Successfully deleted the database ‘newdb’
    INFO: 2018-04-22 15:33:09: Attempting to cleanup the SNAP entries for the database: newdb
    INFO: 2018-04-22 15:33:09: Successfully deleted the SNAP entries


    Step 4: Verify that the database is dropped


    [root@odanode01 ~]# oakcli show databases
    Name     Type       Storage   HomeName             HomeLocation                                Version                     
    —–    ——     ——–  ————–       —————-                            ———-                  
    odatest  RAC        ACFS      OraDb12102_home1     /u01/app/oracle/product/12.1.0.2/dbhome_1   12.1.0.2.170117(24732082,24828633)


    Conclusion


    In this article we have learned how to Delete database on Oracle Database Appliance (ODA). Using oakcli delete database database is extremely simple and easy to drop a database which otherwise required to use database utilities like DBCA or SQL command to drop the database.

  • Mount External USB Drive On Exadata Compute Node

    You have files on an External USB drive that you want to connect to Exadata Compute node to copy them over to the server file system. This can be done for several reasons such as Database Migration.




    In this article I will demonstrate step by step how to mount an Exadata USB drive to Exadata Compute node.


    Steps to mount External USB on Exadata Compute node


    • Connect the External USB drive to Exadata Compute node. This can be done easily by Data Center Engineer who has access to Data Center and Exadata Rack.
    • Once the USB is connected, Verify you can see it on the Exadata Compute node by running the following command.

    [root@dm01db01 ~]# multipath -l
    33e41384658514e52 dm-5 Seagate,Expansion Desk
    size=3.6T features=’0′ hwhandler=’0′ wp=rw
    `-+- policy=’round-robin 0′ prio=0 status=active
      `- 7:0:0:0 sdb 8:16 active undef unknown


    You can also use “fdisk -l” command to list the connected USB.


    [root@dm01db01 ~]# fsdisk -l
    ….
                             Device Boot      Start         End      Blocks   Id  System
    /dev/mapper/33e41384658514e52p1               1      267350  2147483647+  ee  GPT
    Partition 1 does not start on physical sector boundary.


    [root@dm01db01 ~]# ls -l /dev/mapper/
    total 0
    lrwxrwxrwx 1 root root       7 Apr 24 18:53 33e41384658514e52 -> ../dm-5
    lrwxrwxrwx 1 root root       7 Apr 24 18:53 33e41384658514e52p1 -> ../dm-6
    crw-rw—- 1 root root 10, 236 Apr 22 14:23 control
    lrwxrwxrwx 1 root root       7 Apr 24 18:53 VGExaDb-LVDbOra1 -> ../dm-3
    lrwxrwxrwx 1 root root       7 Apr 24 18:53 VGExaDb-LVDbSwap1 -> ../dm-2
    lrwxrwxrwx 1 root root       7 Apr 24 18:53 VGExaDb-LVDbSys1 -> ../dm-0
    lrwxrwxrwx 1 root root       7 Apr 24 18:53 VGExaDb-LVDbSys2 -> ../dm-1
    lrwxrwxrwx 1 root root       7 Apr 24 18:53 VGExaDb-LVDoNotRemoveOrUse -> ../dm-4


    • Create a mount point

    [root@dm01db01 mnt]# mkdir -p /mnt/dbmigration


    • Verify the file system type for mounting purpose. Here the it is ext4

    [root@dm01db01 mnt]# mount -l
    /dev/mapper/VGExaDb-LVDbSys1 on / type ext4 (rw) [DBSYS]
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    tmpfs on /dev/shm type tmpfs (rw,size=775461m)
    /dev/sda1 on /boot type ext4 (rw,nodev) [BOOT]
    /dev/mapper/VGExaDb-LVDbOra1 on /u01 type ext4 (rw,nodev) [DBORA]
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
    nfsd on /proc/fs/nfsd type nfsd (rw)


    • Mount the External USB on the local mount point created.

    [root@dm01db01 ~]# mount -t ext4 /dev/mapper/33e41384658514e52p1 /mnt/dbmigration


    • Verify the UBS is mounted successfully

    [root@dm01db01 ~]# df -h /mnt/dbmigration
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/33e41384658514e52p1
                          2.0T   99G  1.8T   6% /mnt/dbmigration


    • Change directory permissions and ownership to Oracle

    [root@dm01db01 ~]# chown oracle:oinstall -R /mnt/dbmigration


    [root@dm01db01 ~]# chmod 775 -R /mnt/dbmigration


    • Verify the permissions and ownership

    [root@dm01db01 ~]# ls -ld /mnt/dbmigration
    drwxrwxr-x 4 oracle oinstall 4096 Apr 25 09:49 /mnt/dbmigration


    • Verify that that you can access and list the contents from USB.

    [root@dm01db01 ~]# cd /mnt/dbmigration


    [root@dm01db01 dbmigration]# ls -ltr
    total 103004260
    -rw-r—– 1 500 500 6786600960 Apr 25 11:25 expdp_full.dmp
    -rw-r—– 1 500 500 7231434752 Apr 25 11:25 expdp_schema.dmp
    -rw-r–r– 1 500 500     129609 Apr 25 11:30 expdp_schemas.log




    Conclusion


    In this article we have learned how to mount an External USB drive on Exadata Compute node.

  • Oracle Database Appliance Pocket Reference Guide

    Here is the link to download Oracle Database Appliance Pocket Reference Guide

    Oracle Database Appliance Pocket Reference Guide

  • Exadata Database Machine Health Check Using Exachk Utility


    Oracle provides “Exachk” utility to conduct a comprehensive Exadata Health Check on Exadata Database Machine to validate hardware, firmware and configuration.

    Exachk Utility is available for Oracle engineered systems such as Exadata (V2 and above), Exalogic, Exalytics, SuperCluster, MiniCluster, ZDLRA & Big Data. Exachk utility performs the following checks:


    • Configuration checks for Compute nodes, Storage cells and InfiniBand Switches
    • Grid Infrastructure, Database and ASM and Operating System software checks
    • MAA Scorecard which conducts an automatic MAA Review
    • Exadata Software Planner, Software prechecks, Exadata and Database Critical Issue alerts

    It is recommended to execute the latest exachk at the following situation:


    • Monthly
    • Before any planned maintenance activity
    • Immediately after completion of planned maintenance activity
    • Immediately after an outage or incident

    Steps to Exadata Health Exachk Using Exachk Utility



    • Download latest Exachk utility from the MOS note. As of writing the latest Exachk verion available is “12.2.0.1.4_20171212”
    Oracle Exadata Database Machine exachk or Health Check (Doc ID 1070954.1)

    Note: It is recommended to use latest Exachk to perform Exadata Health Check







    • As root user, create ‘Exachk’ directory on compute node 1 as follows
    [root@dm01db01 ~]# cd /root
    [root@dm01db01 ~]# mkdir Exachk


    • Using Winscp Copy the Downloaded Exachk utility from your desktop/laptop to the Exadata compute node 1 under /root/Exachk


    • As root user, Login to Exadata Compute node 1 and unzip the Exachk utility
    [root@dm01db01 ~]# cd /root/Exachk/

    [root@dm01db01 Exachk]# ls -ltr


    total 112576
    -rw-r–r– 1 root root 115158363 Apr 10 05:11 exachk.zip

    [root@dm01db01 Exachk]# unzip exachk.zip




    • Ensure that the SSH is setup across all Compute nodes, Storage cells and Ibswitches
    [root@dm01db01 Exachk]# dcli -g ~/all_group -l root ‘uptime’


    To Setup SSH across the cluster, use the following command:




    [root@dm01db01 ~]# cd /opt/oracle.SupportTools/


    [root@dm01db01 oracle.SupportTools]# ./setup_ssh_eq.sh ~/all_group root welcome1

    • As root user, Execute the Exachk utility
    [root@dm01db01 ~]# cd /root/Exachk/

    [root@dm01db01 Exachk]# ls -ltr




    [root@dm01db01 Exachk]# ./exachk



    Depending on the Exadata Cluster Size and number of databases it may take several minutes to complete Exachk execution.
    • Using Winscp, copy the Exachk zip file and/or html file to your desktop/laptop to review
    • Open the html file, review it and take necessary action if necessary
    • Under the table of contents there are different component listed. Look out for the CRITICAL and FAIL components.
    Click on the ‘view’ hyperlink for more details and the recommendation to fix the problem.


    MAA Scorecard



    Conclusion


    In this article we have learned to perform complete Exadata Stack Health Check using Exachk utility. Exachk Utility is available for Oracle engineered systems such as Exadata (V2 and above), Exalogi, Exalytics, SuperCluster, MiniCluster, ZDLRA & Big Data.