Advertisement

Thursday, June 21, 2018

Hadoop V2 - Cloudera - Setup Services and Roles (Steps and Screenshots)

If you have followed my previous blog on adding hosts to cluster. You should be now at a stage where the role assignments and setup should take place. 

From where we left of you should now see be adding roles.

1. Select type of services  you want to install (Custom Services or any of your choice)



2. Select role assignments (careful, but you can change these later)



3. Review the Databases (and click on Test Connection if required)


4. Review changes (careful, it's a long list)



5. Wait 






Wednesday, June 20, 2018

Hadoop V2 - Cloudera - Add Hosts to Cluster (Steps and Screenshots)


If you have installed the Cloudera Manager properly and followed the instructions then, below screenshots will help you in adding hosts to the cluster. 

 1. Go All Hosts on the Home Page 
 

2. Click on Add New Hosts to Cluster

3. Specify Search String for hosts and click on search

4. Choose the installation type (default here, no changes done)

5. Accept the License

6. Do NOT choose single user mode
7. Enter Credentials to Login


8. Proceed with the installation

 9. Finish up the installation.





Tuesday, June 19, 2018

HadoopV2 - Cloudera - Install (Steps and Screenshots)

In this blog I cover quick installation of cloudera manager. 

Download Installer file 

curl http://archive.cloudera.com/cm5/installer/5.10.1/cloudera-manager-installer.bin -o cloudera-manager-installer.bin

Create repo files 

cat /etc/yum.repos.d/cloudera-cdh5.repo
[cloudera-cdh5]
# Packages for Cloudera's Distribution for Hadoop, Version 5, on RedHat    or CentOS 7 x86_64
name=Cloudera's Distribution for Hadoop, Version 5
baseurl=https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/5/
gpgkey =https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/RPM-GPG-KEY-cloudera   
gpgcheck = 0
 


cat /etc/yum.repos.d/centos57-updates.repo
[updates]
name=Updates
baseurl=http://vault.centos.org/5.7/updates/\$basearch/
gpgcheck=0

Refres cache for Yum repos
yum makecache

Install Execute  (as root)

 chmod u+x cloudera-manager-installer.bin

 Log Location

1. /var/log/cloudera-manager-installer
2.  and /var/log/cloud-init.log
 

If your installation fails refer to /var/log/cloudera-manager-installer directory for logs. Look for the last update log. 

Other things you should make sure to have ease of installation for next steps
1. ntp is installed  and running (either pointing to local or internet server)
NTP Enabled (sudo  systemctl enable ntpd, sudo service ntpd start )
2. /etc/hosts or DNS -  The canonical name of each host in /etc/hosts must be the FQDN (for example myhost-1.mynet.myco.com), not the unqualified hostname (for example myhost-1). The canonical name is the first entry after the IP address. (server 192.168.1.200 prefer)
Do not use aliases, either in /etc/hosts or in configuring DNS.


3. Add /etc/yum.conf the proxy configuration - in case you want yum to use proxy servers (this is for hosts addition) "proxy=http://192.168.1.200:3128/"
4. Java installed on all hosts to be managed (sudo yum install oracle-j2sdk1.7 -y)









 Login using admin/admin for the first time



Post this you can click on Home , we will add hosts individually later


Check for the services installed on the box where you installed

 chkconfig --list | grep cloudera


cloudera-scm-server     0:off   1:off   2:off   3:on    4:on    5:on    6:off
cloudera-scm-server-db  0:off   1:off   2:off   3:on    4:on    5:on    6:off
 

Oracle Database - RMAN New features (till 18c from 11g)

IN this blog I have tried to capture the new features in brief what rman is supporting now till the 18c release after Database 11g.

IN this blog I talk about RMAN New features introduced till date
 

12.1.0.2
Backup and Restore
1. CDB
2. PDB
3. PDB + CDB

Recover Point in Time
1. CDB
2. CDB + PDB
3. PDB


Standby
1. Recover from Service
2. Restore From Service

Multisection
1. Incremental
2. Image Copies

Duplication
1. Active Duplication but retrieve Backupsets over network rather than DF (confusing?? )
2. NOOPEN Clause will not open DB in resetlogs

12.2.0.1

Flashback
1. Flashback to Point in time PDB only

Sparse DB
1. Backup, Restore and Recover

18c
1. BCT (Active DG) on Multiinstance redo apply now possible
2. Preplugin backups now usable (Plugout from CDB1 and Plugin to CDB2, backup from CDB1 are usable)
3. Non-cdb backups usable (Backups before converting to PDB)
4. Duplicate PDB Directly




Oracle Database - PDB Status Lifecycle (12c+) (Beautifully :) ?)




Oracle Database - What all ways to Create PDB (Beautifully :) ?)







Monday, June 18, 2018

Oracle Database - PDB Architecture Explained (Beautifully :) ? )

Images speak more than words. 
I will let the images speak for me.








Oracle Database - DataGuard Enhancements in Oracle Releases (from 11g to 18c)

DataGuard Enhancements in Oracle Releases

Oracle has been great in terms of enhancing it's Dataguard feature.

Here is list what has been seen from the release of 12c
This will update you with what all changes / enhancements Oracle has come up in past few years from1 11g.

12.1.0.1

GDS - Global Data Services
Automatic Workload Management by deploying a Global Service spawning the replication set.
https://docs.oracle.com/database/121/NEWFT/chapter12101.htm#NEWFT275

Dataguard Enhancements
1. DG Broker now supports Cascaded Standbys configuration and management
2. Fast Sync - NOAFFIRM with SYNC redo transport supported i.e. Primary does not wait for the write to complete at the Stanby Site  (Probably few milliseconds of RPO?)
3. Single Command Role Transitions
4. Real Time Apply Default Setting
5. Resumable Switchover Operations (in case you encounter an issue)
6. ADG supports DML on GTT (Great enhancement), so your standby is not readonly, you can do some changes but only to temporary tables
7. ADG Cascade - Cascade Redo in Cascaded configuration directly from Standby Redo log files
8. Far Sync Instance - To support low B.W far away network configurations DataGuard


(More - https://docs.oracle.com/database/121/NEWFT/chapter12101.htm#NEWFT291)

12.2.0.1
1. DB Compare - Compare blocks in primary and Standby (not so useful in Big databases I guess?)
2. Subset Standby - Only 2 out of 4 PDB's are in Standby configuration
3. DG Broker Multiple Observers (Good now we use them like quorum?)
4. Multi Instance Redo Apply (Wow 2 instances now can mount the recovery thread, but there is a cache which is resolved in 18c)
5. DG Broker support for Hetrogeneous Endiancess configuration (is it really great - Obviously, as cloud migration experts)
6. Automatic Synchronize Password files (really love it)


(More - https://docs.oracle.com/en/database/oracle/oracle-database/12.2/newft/new-features.html#GUID-A6211BAC-0534-44B9-B988-A7CC2B97044F)

18c (181)
1. Multi Instance Redo apply supports Block Change Tracking (this is what I was really looking for)
2. Automatic Correction of Non-Logged Blocks at Standby.
    Two modes
    i. Standby Nologging for Load Performance
    ii. Standby Nologging for Data Availability


(More - https://docs.oracle.com/en/database/oracle/oracle-database/18/newft/new-features.html#GUID-1C4BE6BE-B58C-46EA-87D2-D222E772B58E)

Oracle Database - Create DB DBCA silent mode (18c)

If you have followed my previous blog on DB Creation on 18c, you now should be aware of creating a database 18c on Linux with the tweak to start the instance. 

Now how do you speed it up and use dbca.

Below is a simple dbca command which can be used for the same. 
This will create your db instance and you are ready to work on it. 

The key parameter again is exadata features which I have higlighted in bold green


dbca -silent -createDatabase -gdbName ORCL -sid ORCL -responseFile NO_VALUE \
-templateName /u01/app/oracle/product/181/db1/assistants/dbca/templates/General_Purpose.dbc  \
-dbOptions JSERVER:false,DV:false,SPATIAL:false,CWMLITE:false \
-redoLogFileSize 150 -automaticMemoryManagement false \
-characterSet AL32UTF8 -nationalCharacterSet AL16UTF16 -databaseConfigType SI   \
-datafileDestination '{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/' \
-enableArchive false  -sysPassword Oracle123 -systemPassword Oracle123  \
-variables 'DB_UNIQUE_NAME=ORCL_PR,ORACLE_BASE=/u01/app/oracle,PDB_NAME=,DB_NAME=ORCL,ORACLE_HOME=/u01/app/oracle/product/181/db1,SID=ORCL' \
-initParams 'undo_tablespace=UNDOTBS1,processes=640,db_recovery_file_dest_size=8192MB,nls_language=AMERICAN,pga_aggregate_target=512MB,sga_target=2048MB,dispatchers=(PROTOCOL=TCP) (SERVICE=ORCLXDB),db_recovery_file_dest={ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME},db_block_size=8192BYTES,diagnostic_dest={ORACLE_BASE},audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump,nls_territory=AMERICA,control_files=("{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/control01.ctl", "{ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME}/control02.ctl"),db_name=ORCL,audit_trail=db,remote_login_passwordfile=EXCLUSIVE,use_large_pages=ONLY,db_unique_name=ORCL_PR,open_cursors=300,_exadata_feature_on=true'

Friday, June 15, 2018

Oracle Database - Patching Model 18c

With the advent of 18c new release, Oracle completely re-thought of Patching and the way releases are sent to the customer 

Key highlights here are 

1. Yearly new major release
2. Quarterly new release update
3. Quarterly new release update revision

So what are these

Let's understand by example

1. Oracle released 18.1.0 release in 2018 Production (yearly release)

2. In April they released 18.2.0 
This is a release update.  It contains all the regressions,  security fixes, optimizer and functional fixes
3. Similarly in July they will release 18.3.0
This is again a Release update

A release update is quarterly 

4. In July they will also release 18.2.1 - a patch or a release update revision (RUR)
 A RUR is like a patch and is installed on top of existing Release Update, however it does not contains any Optimizer or Functional Fixes, they are only present in Release Update. 

5. Now in October they will release
  • RU - 18.4.0 
  • RUR - 18.3.1
  • RUR - 18.2.2
6. finally Every year a new release 19 in 2019, 20 in 2020. 
The licensing aspect is to be decided by Oracle, that is which all releases are going to part of same license set.

Here is what I mean in a photo. 
If you notice the # of lines corresponding to each feature (functional, optimizer etc), you will notice they are only added as part of Release updates and not part of Release updates revisions on the release. 

However if you do a sum  for example 
18.4.0 and 18.3.1 (sum of second 2 decimal places), the fixes for regressions and security are same (but not optimizer and functional)



Upgrades (Release and RU) and patches (RUR) ?
A complete timeline example of Oracle releases and upgrades is below - 

You can upgrade in the same column from bottom to top (i.e keep adding features, you cannot remove any)
Upgrade (or patch) from left to right. All the green arrows are supported and the red ones are not. 

Thursday, June 14, 2018

Oracle Database - 18c DB Creation (for Exadata Release on Linux)

If you are looking to create a DB and start an instance  on the Exadata Linux release of 18c then it won't allow you and throw up errors
you can -

go to the end and stop at the point of instance  creation and just create scripts, do modify to the init ora file and this shall create the database for you and have your instance running. 

You will see that in last of my blog, the blog consist of complete installation though.
(As an experienced DBA, you can do this manually as the only thing what is required is to put the parameter _exadata_feature_on=true in your init file)
















Post the Scripts are created you should do below steps to create your DB (make logical changes to dbname )
1. cd /u01/app/oracle/admin/orcldb/scripts
2. export ORACLE_HOME=/u01/app/oracle/product/180/db1
3. Add to file init.ora --> _exadata_feature_on=true
4. Add this entry in the /etc/oratab: orcldb:/u01/app/oracle/product/180/db1:Y
5. Run orcldb.sh and db should be created