Advertisement

Thursday, August 8, 2019

Oracle Exadata: How to find Serial # (to Put in Service Request)

In this blog I am going to talk about, how to find out the serial number of Exadata. 
it is a single command, which can be run from any node (compute or storage) using root user , the output will give you the serial number


# ipmitool sunoem cli 'show System' | grep -i Serial

        serial_number = AK00418863

You can put this serial number when raising SR for an engineering system. (Assuming the CSI is already added into your Support account)

Wednesday, August 7, 2019

Oracle Exadata : AIDE (Advanced Intrusion Detection System)

AIDE (Advanced Intrusion Detection System) is basically a utility which keeps the database of all file system files on the server and  alerts you via e-mail (as configured) what files and their content have changed. 
(AIDE was released with Image release 19 of Exadata)

This can help in detecting any security threats. 

It is a daily cron job which runs, scans and alerts

To know if it is enabled 
$  /opt/oracle.SupportTools/exadataAIDE -status

AIDE: daily cron is currently enabled.

If you are getting alerts and have changed the FS and are happy with the log in '/var/log/aide/aide.log'
then you can update the AIDE database which will ensure alerts are not sent to you.

$  /opt/oracle.SupportTools/exadataAIDE -update

Tuesday, August 6, 2019

Oracle Exadata / ODA : How to find which version of engineered system you are running

A common question which new comers ask me is how to find out which version of  Engineered system are we running.


The answer is easy and straight forward. Just one command run as root on compute node or Storage Node (As root)

# ODA Example  $  ipmitool sunoem cli 'show System' | grep model
         model = ODA X7-2M
        component_model = ORACLE SERVER X7-2

# Exadata Example  $  ipmitool sunoem cli 'show System' | grep model
        model = Exadata X7-8
        component_model = ORACLE SERVER X7-8

Friday, August 2, 2019

Oracle Database: Permissions to Execute Job Class

There is a great mis conception in DBA's who primarily work on OLTP about Job classes.

Job classes are one of the essentially used components in job definitions which people seldom use and seldom know about. 

This blog however is a small and nice one which talks about how to see permissions to execute a job class.

Yes you read that right. You need execute permission for a job class. 
Only if you have execute permission to job class, you will be able to add it to your create job. 

the way to grant is same 

Grant execute 'on job class' to <user>';

to verify you should use dba_tab_privs to know if your user has execute privilege on job class or not. 

select * from dba_tab_privs where grantee = '<your user>' and type = 'JOB CLASS';

Example output below (from TOAD)



By default permission to execute 'DEFAULT JOB CLASS' is granted to PUBLIC, so you if you do not specify any job class name, default job class will be taken and it will be okay. 

Friday, June 14, 2019

Oracle Database 19c: Silent Database Deletion

In this blog I am going to present on how to delete database silently (RAC / Non RAC)


$ export ORACLE_BASE=/u01/app/oracle
$export ORACLE_HOME=/u01/app/oracle/product/190/db/
$ export PATH=$ORACLE_HOME/bin:$PATH
$ dbca -silent -deleteDatabase -sourceDB  ORPL
Enter SYS user password:

[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
39% complete
42% complete
45% complete
48% complete
52% complete
55% complete
58% complete
65% complete
Updating network configuration files
68% complete
Deleting instances and datafiles
77% complete
87% complete
97% complete
100% complete
Database deletion completed.
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orpl/orpl.log" for further details.

Oracle Database - 19c DB Creation (RAC)

In this blog, I present on how to create a RAC DB for 19c. 
I have already put down in my previous blogs on how to create a RAC DB in silent mode. 
In this we will look into the Graphical Mode.

Login as Oracle user and go to Oracle home directory

$ cd $ORACLE_HOME/bin # (/u01/app/oracle/product/190/db/bin)
# Run insalller
$./dbca

Next follow the instructions as are in the screenshots





















this completes the installation.

Oracle Database - 19c - RAC Silent Disk Group Creation

In this blog, I am going to talk about Disk Group Creation in RAC 18c in silent mode. (no UI)

First I am going to create the disks at the OS level and discover it in oracleasm. 


1. Create Partition for New Disks. Do this for all the disks you have attached to your system. Make sure disks are attached to both nodes and partition is created on only one Node. 
Details on Creating the partition are present in end of the blog.

2.  Create Disks using oracleasm on Node 1

$ oracleasm createdisk FRA001 /dev/xvdf1
Writing disk header: done
Instantiating disk: done

$ oracleasm createdisk FRA002 /dev/xvdg1
Writing disk header: done
Instantiating disk: done

$ oracleasm createdisk FRA003 /dev/xvdh1
Writing disk header: done

Instantiating disk: done

3.  Scan for disks using oracleasm on Node 2

$ oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "FRA001"
Instantiating disk "FRA002"

Instantiating disk "FRA003"

4. Login as Grid and set the environment run asmca  and create Disk Group 

$  asmca -silent -sysAsmPassword Oracle123 -asmsnmpPassword Oracle123 -createDiskGroup -diskGroupName FRA -diskList  /dev/oracleasm/disks/FRA001,/dev/oracleasm/disks/FRA002,/dev/oracleasm/disks/FRA003 -redundancy EXTERNAL -au_size 4 -compatible.asm 19.0.0.0.0 -compatible.rdbms 19.0.0.0.0


[INFO] [DBT-30001] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-190614AM043742.log for details.


Disk group creation complete. Verify using asmcmd (lsdg command)

New Disk Partition Creation 
$ fdisk /dev/xvdf
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xc0515184.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-251658239, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-251658239, default 251658239):
Using default value 251658239
Partition 1 of type Linux and of size 120 GiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.


Syncing disks.