Sunday 31 December 2017

Worth Sharing: Things you should NOT do when you are angry


 Things you should NOT do when you are angry  😼

*Hit your phone/gadgets on the wall.
*Punch the door/wall multiple times until your knuckles start to bleed.
*Verbally abuse people who love you and care for you, online or offline.
(All these things will only add up to the pain and will hurt you even more later.)


Things you can do when you get angry 😊

*Punch a pillow/cushion/a pile of blankets. (Find a punching bag if these are too soft for you).
*Use this anger to better yourself and do a ton of crunches/pushups/your fav. exercise at home/gym.
*Go on a long drive, preferably alone and notice the beauty of nature that surrounds you. You can also simply walk or run.
*Grab a pen and write the hell out of your thoughts. It's not childish. It's one of the smartest things you can do to yourself. Don't hesitate, no one except you is going to see that.
(Vent your anger. Don't contain it. Anger is like poison. You need to let it You need to let it out and make sure you don't hurt yourself in the process.)
Best of luck. Share to others in need. 💙 😊

Happy New Year
May this new year bring all your dreams and happiness come true.. 
Stay Blessed



Steps to Schedule any RMAN Jobs In Windows Server



This post is about the backup configuration made in Windows server and what are the backup strategies mainly used in most of production databases.

Backup strategy followed in most of  production Databases.
1) Weekly RMAN full backup
2) Daily Archive log backup
3) Daily incremental backup

In windows server environment, we use “scheduler” (such as cronjob in UNIX) to schedule any job.


The important steps to configure a scheduler are as follows :

Taking Database backup weekly(incremental level 0):
First create a cmd file (command file ) in windows: 

Let us create a file name week_backup.cmd using a text file editor(any editor) write the rman script to take the backup.

Assume, I want to take full backup (i.e, LEVEL 0 Backup)
-        Then the script for taking the weekly Level 0 backup would be like this, (here controlfile autobackup is off(default)).

Step 1.
week_backup.cmd



RMAN>run{ 
Allocate channel ch1 type disk format '\path of taking backup_\%d_data_%U'; 
Backup incremental level=0 database tag=full_backup'; 
Release channel ch1; 
Allocate channel t1 type disk format '\ backup location \%d_ctrl_%U'; 
Backup current controlfile; 
Release channel t1; 
}




Step 2.

Create the .bat file (Batch file is for batch job execution by scheduler)
Let us create a batch file week_backup.bat

The script looks like as below:


week_backup.bat 

rman target sys/db1@db1

cmdfile=\Path of cmd file\week_backup.cmd   <-------- you need to mention the file location we created at Step 1 above.
log=E:\Path of log file\Full_DB_Backup_%date:~4,2%_%date:~7,2%_%date:~10%.log
The file will be created as follows
Full_DB_Backup_<Current_Date>.log

This batch file is used executing this file through schedule.



Step 3.
Here comes the scheduling part. We have to use scheduler for scheduling job:
Goto- Start Menu>
 control panel >scheduler tasks >Add scheduler task >command prompt >Perform this task > weekly >choose day and timings when you want to run this job weekly >specify your administrator username and password >finish
 

Configuring  Database backup Daily(incremental LEVEL 1)

For this activity, all the above steps remains same, but the scripts and scheduler task option changes here:

1. backup_incr_1.cmd  

run{
allocate channel ch1 type disk format '\path of backup location_\%d_data_%U';
backup incremental level=1 database tag=Level_1_Backup';
release channel ch1;
}

2. backup_incr_1.bat 


rman target sys/db1@DBNAME 
cmdfile=\Path of cmd file created in Step1 above\ backup_incr_1.cmd 
log=E:\Logfile location\Level_1_Backup_%date:~4,2%_%date:~7,2%_%date:~10%.log

Now, Configure the scheduler as we did above in Step 3 and  simply  change the Scheduler option > as ‘daily’ and timings whichever  you want.


 -


For information on  UNIX System Commands you can check an article here – UNIX for DBA's


Click here for RMAN recovery scenarios





Everything comes to us that belongs to us, if we create the capacity to receive it

-Rabindranath Tagore

Wednesday 13 December 2017

Topic need to get clear to become expert in Oracle DBA






Oracle Architecture.😍

Structures for connecting a user to an oracleInstance, Common database administrative tools for DBA,
Features of the oracle universal Installer, Optimal flexiblearchitecture, Setting of Password file authentication, maincomponents of oracle enterprise manager and their uses.


Create  Database

·         Prerequisite for database creation.
·         Creating a database manually.
·         Using the Database Configuration Assistant (DBCA).
·         Using the DBCA to Create a Database.
·         Performing Other Actions with the DBCA.
·         Using the DBCA to Manage Templates.

Managing the Oracle Instance😊
·         Oracle Instance Management.
·         Oracle Processes.
·         Oracle Memory Structures.
·         Starting the Instance and Opening the Database.
·         Shutting Down an Oracle Database Instance.
·         Viewing and Modifying Initialization Parameters.
·         Managing Memory Components.
·         Viewing the Alert Log.

Managing Database Storage 😻Structures
·         Oracle Database Structures.
·         Exploring the Storage Structure of the Oracle Database.
·         Multiplexing the Redo Log.
·         Enlarging the Database.
·         Creating, Modifying, and Dropping Tablespaces.
·         Reclaiming Space in Your Tablespace.
·         Managing Undo Data.
·         Using the Undo Advisor to Compute the Minimum Undo Tablespace Size.
·         Implement oracle managed files tablespaces.

Maintaining Control file😍

·         Use of control file, Control file, Multiplex and manage thecontrol file, manage control file with oracle managed files.


Maintaining redo log files

😺·         Purpose & structure of online redo log files, Controllock switches and check points, Multiplex and maintainonline redo log files, Manage online redo log files withOMF.

Data dictionary content and usage

·         Data dictionary components, contents and uses of datadictionary, query the data dictionary.

Managing users, privileges and roles

·         Overview of Users and Security
·         Oracle-Defined Users
·         Creating, Modifying, and Dropping Users
·         Locking and Unlocking Accounts
·         Unlocking a User Account and Resetting the Password
·         Setting the Password Policy
·         Modifying the Default Password Policy
·         Administering Privileges and Roles.
·         Identify system and object privileges, grant and revoke privileges.
·         Create and modify roles, Control availability of roles, remove roles, user predefined roles.
·         Display role information from the data dictionary.
·         Identify auditing capabilities.
·         Managing password security, resources and data integrity, manage passwords using profiles, administrator profiles, and controluse of resources using profile.



Storage structure and relationships

·         Logical structure of segments, segment types and uses,keywords that control block spaces usage, get informationabout storage structures from the data dictionary.


Managing Schema Objects
·         Creating, Modifying, and Dropping Tables
·         Understanding Data Integrity and Defining Constraints
·         Viewing the Contents of a Table
·         Creating and Dropping Indexes
·         Managing Views
·         Managing Program Code Stored in the Database
·         Managing Access to Schema Objects
·         Loading Data thru SQL Loader ,exp/imp ,datapump  etc.
Configuring the Oracle Network Environment
·         Tools for Configuring and Managing the Oracle Network
·         Accessing the Enterprise Manager Net Services Administration Page
·         Managing the Oracle Net Listener with Enterprise Manager
·         Using the Listener Control Utility
·         Connecting to an Oracle Database
·         Oracle Net: Naming Methods
·         Using Enterprise Manager to Configure Local Naming
·         Using Oracle Net Manager to Configure Local Naming

Managing Oracle Database Software
·         Understanding Software Management and Patch Releases
·         Patching Oracle Database Software
·         Using the Database Upgrade Assistant to Upgrade the Database

Performing Backup and Recovery
·         Backup, Restore, and Recovery Concepts
·         Basics of database backup, restore and recovery,
·         Types of failure in an oracle environment, backupand recovery strategy.
·         Instance and media recovery structures.
·         Oracle processes, memory structures and files related torecovery, importance of check points, redo log files andarchived log files, instance recovery.
·         Configuring the database archiving mode.
·         Difference between archive log and no archive logmodes; configure a database for archive log mode,automatic archiving, and multiple archiving processes.

·         Using the Oracle-Suggested Backup Strategy
·         RMAN features, components, configuringRMAN.

·         User managed backups and RMAN backups.

·         User managed backups and recovery operations,backup issues with read table spaces, performclosed and open database backups, backup thecontrol file, cleanup after a failed online backup, DBverify utility to detect corruption, types of RMANspecific backups backing up with RMAN, copycommand to create image copies.

·         User managed complete recovery and RMAN completerecovery.

·         Recovery in non-archive log mode andcomplete recovery in archive log mode using usermanaged and RMAN, restore data files to differentlocations, relocate and recover a table space by usingarchived redo log files.

·         User managed incomplete recovery and RMANincomplete recovery. Necessity of incompleterecovery, Methods for incomplete recovery,incomplete recovery with user managed backups,incomplete recovery using RMAN and usingenterprise manager, recovery of the control file,recovery through reset logs.

·         RMAN maintenance and recovery catalog creation andmaintenance. Cross checking of backups, updating therepository, changing the status of backup and copies, catalogbackups made with operating system commands, contents ofrecovery catalog, creating the recovery catalog andmaintaining it by using RMAN commands, using RMAN toregister, resynchronize and reset a database, queryingrecovery catalog to generate reports and lists, create, storeand run scripts.

·         Performing Backup Maintenance Tasks
·         Flashback Technologies
·         Performing Flashback Table and Flashback Drop
·         Performing User-Managed Backup and Recovery
Clone Database.

Introduction to Oracle Data Guard

·         Causes of Data Loss
·         Oracle Data Guard Architecture
·         Types of Standby Databases (benefits of each type)
·         Differentiating Between Standby Databases and Data Guard Broker Configuration
·         Data Protection Modes
·         Performing Role Transitions

Creating a Physical Standby Database by Using SQL and RMAN Commands

·         Preparing the Primary Database
·         Creating the Physical Standby Database

Creating and Managing a Snapshot Standby Database

·         Snapshot Standby Database: Architecture
·         Converting a Physical Standby Database to a Snapshot Standby Database
·         Activating a Snapshot Standby Database: Issues and Cautions
·         Viewing Snapshot Standby Database Information
·         Converting a Snapshot Standby Database to a Physical Standby Database

Using Oracle Active Data Guard

·         Using Real-Time Query
·         Enabling and Disabling Real-Time Query
·         Enabling Block Change Tracking on a Physical Standby Database
·         Creating Fast Incremental Backups
·         Monitoring Block Change Tracking

Configuring Data Protection Modes

·         Preparing to Create a Logical Standby Database
·         Checking for Unsupported Objects , Data Types, and Tables
·         Ensuring Unique Row Identifiers
·         Creating the Logical Standby Using SQL Commands and Grid Control
·         Securing your Logical Standby Database

 

 

Performing Role Transitions

·         Contrast switchover vs. failover
·         Preparing for a Switchover
·         Performing a Switchover using DGMGRL and Enterprise Manager
·         Types of Failovers
·         Re-enabling Disabled Databases

Using Flashback Database in a Data Guard Configuration

·         Overview of Flashback Database
·         Configuring Flashback Database
·         Using Flashback Database Instead of Apply Delay
·         Using Flashback Database and Real Time Apply
·         Flashback Through Standby Database Role Transitions
·         Using Flashback Database After Failover

Enabling Fast-Start Failover

·         Installing the Observer Software
·         Configuring Fast-Start Failover
·         Configuring Automatic Reinstatement of the Primary Database
·         Initiating Fast-Start Failover from an Application
·         Disabling Fast-Start Failover
·         Starting and Stopping the Observer
·         Moving the Observer to a new Host

 

Performing Backup and Recovery Considerations in an Oracle Data Guard Configuration

·         Backup and Recovery of a Logical Standby Database
·         Using the RMAN Recovery Catalog in a Data Guard Configuration
·         Creating the Recovery Catalog
·         Registering a Database in the Recovery Catalog
·         Configuring Daily Incremental Backups
·         Using a Backup to Recover a Data File on the Primary Database
·         Recovering a Data File on the Standby Database

Patching and Upgrading Databases in a Data Guard Configuration

 

Monitoring the Database and Using the Advisors
·         Monitoring General Database State, Workload, and Performance
·         Setting Metric Thresholds
·         Setting Up Direct Alert Notification
·         Diagnosing Performance Problems
·         Viewing ADDM Performance Analysis and Responding to Findings
·         Using the SQL Tuning and SQL Access Advisors
·         Configuring the Automatic SQL Tuning Advisor
·         Viewing Automatic SQL Tuning Results

 

 


List of Practical:
1) Demonstration of Installation of Oracle database software
2) Create a database with database configuration assistant.
3) Starting up and shutting down database with SQL and Plus and with database control
and viewing parameters with database control.
4) Use enterprise manager to create after and drop a table space.
5) Use enterprise manager to grant system and manage database user.
6) Use enterprise manager to grant system and object privileges.
7) Use enterprise manager to create and manage roles and profiles.
8) Create database objects and constraints using enterprise manager.
9) Create and Us password profiles
10) Create a listener with database control, oracle net service alias and configure
dynamic service registration.
11) Configure and verify shared server and configure a client to choose the connection type.
12) Create and undo table space with database control and monitor undo with SQL plus.
13) Detect and resolve log connection.
14) Instance recovery and MTTR to demonstrate the effect of check pointing on MTTR.
15) Multiplex the redo log and translation the database to archive log mode.
16) Run a whole database backup and back up the control file to trace with SQL plus and
manage RMAN backups.
17) Recovery the data from loss of control file and multiplex online redo log file. Recovery
alost of multiplexed online log file and recovery the data from loss of non critical data
files.
18) Set a listener password with isnrctl and creating a listener for external procedural calls.
19) Configure RMAN.
20) Create backup sets using RMAN and managing backups.
21) Set, view and clean alerts using DBMS_SERVER_ALERT_AMI and database.
22) Perform an incomplete recovery with RMAN, and carrying out control file auto backup
and restore.
23) Use the SQL tuning adviser for database management.