Oracle DBaaS 1z0-160 part 29 :- DBaaS monitor in Oracle cloud

How to access DBaaS monitor from console

Please open port 443 (https) using “Access Rules”

Please enable oar_p2_httpssl

Now the port ora_p2_httpssl open now

If you do not want to enable port 443 from console,you need to enable port forwarding.

If you enable port forwarding,you need to open using localhost after enable putty session.

When prompted for a user name and password, enter dbaas_monitor as the user name and the password specified during the database deployment creation process, and then click OK

After logging to DBaaS monitor,You can see below

Using Oracle DBaaS Monitor

Oracle DBaaS Monitor provides monitoring and management of the Oracle database and listener on Oracle Database Cloud Service.

Note:

This section does not apply to database deployments that use Oracle Real Application Clusters. Such deployments do not currently include Oracle DBaaS Monitor.

The following are key things you can do using DBAAS Monitor

  • Administering the Listener
  • Starting and Stopping the Database Instance
  • Viewing and Modifying Initialization Parameters
  • Viewing User Account and Expiring Password Information
  • Viewing Tablespace and Segment Space Usage
  • Changing the TDE Keystore Password
  • Viewing Alert Log Entries and Checking for Errors
  • Viewing Real Time SQL Monitor
  • Administering Pluggable Databases.

Oracle DBaaS Monitor provides monitoring and management of the Oracle database and listener on Oracle Database Cloud Service.

DBaaS Monitor provides quick and easy access to a variety of information about the database instance running on a database deployment:

  • Overall, how much storage is allocated to tablespaces, and how much of that storage is used.
  • For each tablespace, how much storage is allocated and how much of that storage is used, with additional drill-down capabilities to view segments.
  • A real-time graph showing wait events across several selectable categories.
  • The alert log, with log searching capabilities.
  • A list of open user sessions, with drill-down capabilities to view session details such as the last SQL statement, explain plan, waits, contention, and so on.
  • A list of initialization parameters, with the ability to change parameter values, both in memory and in the SPFILE.
  • Indication of whether certain database options are enabled.
  • Monitoring of current and past SQL Developer PDB uploads.
  • A list of the SQL statements that are being monitored in the database, with real time display of details such as the status, duration, degree of parallelism, and so on.

You can use DBaaS Monitor to view information about the compute node:

  • CPU utilization information in an interactive table format, with automatic refresh intervals
  • OS process information, with filtering and automatic refresh capabilities DBaaS Monitor also provides the following management capabilities:
  • Start up and shut down the database instance.
  • Open and close a pluggable database.
  • Create and drop a pluggable database.
  • Plug in and unplug a pluggable database.
  • Clone a pluggable database.
  • Start and stop the listener.

There are various menus by which you can administer Database.

You can check status of listener and turn off if required

You may also stop/start database using this menu of DBaaS monitor

Please keep in my mind following notes when you shutdown database using DBaaS monitor

You can use DBaaS Monitor to shut down the database instance in IMMEDIATE mode. In this mode, no new connections are allowed. No new transactions are allowed to be started and any uncommitted transactions are rolled back.If you need to shut down the database instance in any other mode (ABORT,NORMAL, or TRANSACTIONAL), use SQL*Plus instead of DBaaS Monitor.

Oracle DBaaS 1z0-160 part 28:- Backup and recovery in RAC in oracle cloud

Backup and Recovery from DB Console

You may face problem in taking backup to oracle container for oracle cloud RAC. Please follow below link to troubleshoot.

https://clouddba.co/kbhs-00712-ora-29024-received-from-local-http-service-during-backup-in-rac-oracle-cloud/

Once you have resolved the issue,You can proceed with backup

Please proceed to take backup

Backup log location

You can find backup of RMAN log for oracle cloud in following location:-

[oracle@pocracdemo1 ~]$ cd /home/oracle/bkup/logs/rman/

Please note that actually RMAN commands are being executed from backend
Recovery Manager: Release 12.2.0.1.0 – Production on Fri Apr 13 07:50:38 2018
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1500943058)
RMAN> set command id to “Backup_-8270960425676936486”;
2> list db_unique_name all;
3> list incarnation of database;
4> show all;
5> report schema;
6> set encryption on;
7> backup device type sbt backupset all;
8> backup device type sbt datafilecopy all;
9> delete force noprompt obsolete recovery window of 7 days device type disk;

Now you can see your backup successfully executed

Updating password by using RACCLI utility

1.Connect to the compute node as the opc user.Update the password:

2.$ raccli update backupconfig -params ‘{“cloudStorageUser”:”user-name“,”cloudStoragePwd”:”new-password“}’

where user-name is the user name of the Oracle Cloud user whose credentials are used to access the Storage Cloud Service container and new-password is this user’s new password.

If you have used the update rdk subcommand of the raccli utility to update the cloud tooling to 16.4.5 or later, you must manually update the opc installer for the Oracle Database Cloud Backup Module before you use the update backupconfig subcommand. For instructions, see in Updating the cloud tooling on a deployment hosting Oracle RAC requires manual update of the Oracle Database Cloud Backup Module in Known Issues for Oracle Database Cloud Service.

Customizing with files in RAC needs to be backed up

Customizing Which System Files Are Backed Up

1.Connect as the opc user to the compute node.

2.Edit the contents of the /opt/oracle/dcs/rdbaas/config/oscfg.spec file.

3.The backup feature provided by Oracle Database Cloud Service backs up the files and folders listed in this specification file.

Customizing Which Database Configuration Files Are Backed Up

1.Connect as the opc user to the compute node.

2.Edit the contents of the /opt/oracle/dcs/rdbaas/config/dbcfg.spec file.

3.The backup feature provided by Oracle Database Cloud Service backs up the files and folders listed in this specification file.

Customizing Which Grid Infrastructure Configuration Files Are Backed Up

1.Connect as the opc user to the compute node.

2.Edit the contents of the /opt/oracle/dcs/rdbaas/config/gicfg.spec file.

3.The backup feature provided by Oracle Database Cloud Service backs up the files and folders listed in this specification file.

RACCLI command to update disk recovery window

[opc@pocracdemo1 ~]$ raccli update backupconfig -params '{"diskRecoveryWindow" : 3}'
{
  “jobId” : “22”,
  “requestStatus” : “SUCCESS”
}

[opc@pocracdemo1 ~]$ raccli describe job 22

{
  “requestStatus” : “SUCCESS”,
  “jobStatus” : “RUNNING”,
  “response” : [ ]
}

where days is the number of days for which you want to retain backups.

Changing recovery window in cloud storage

[opc@pocracdemo1 ~]$ raccli update backupconfig -params '{"ossRecoveryWindow" : 15}'
{
  “jobId” : “23”,
  “requestStatus” : “SUCCESS”
}

where days is the number of days for which you want to retain backups.

Please check now that retention policy got changed.

[oracle@pocracdemo1 ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 – Production on Fri Apr 13 08:12:55 2018
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1500943058)

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 DAYS;

Customizing time of automatic daily backup

1.Connect as the opc user to the compute node.

2.Enter this raccli command:

     $ raccli update backupconfig -params '{"cronDate" : "time"}'

 where time is the time (using 24-hour, HH:MM format) when daily backups are to occur. For example, "02:45" is 2:45 AM, and "14:45" is 2:45 PM.

Changing backup configuration for RAC cloud storage

1.Connect as the opc user to compute node 1.

2.Use the raccli update backupconfig command to update the configuration.

3.To change the backup destination to Both Cloud Storage and Local Storage, enter the following command. Line breaks have been added for clarity; you must enter the command on a single line.

$ raccli update backupconfig -params '{"diskEnabled" : true, "ossEnabled" : true, 
  "cloudStorageUser" : "username", "cloudStoragePwd" : "password", 
  "cloudStorageContainerUrl" : "container-URL"}'

where:

  • username is the user name of an Oracle Cloud user who has read/write access to the container.
  • password is the password of the user specified in cloudStorageUser.
  • container-URL is the URL of the Oracle Storage Cloud container.
Example:-raccli update backupconfig -params '{"diskEnabled" : true, "ossEnabled" : true, "cloudStorageUser" : "sadhuarun1980@gmail.com", "cloudStoragePwd" : "xxx", "cloudStorageContainerUrl" : "https://sadhuarun.eu.storage.oraclecloud.com/v1/Storage-sadhuarun/racbackup"}'

Restore latest backup in RAC

[opc@pocracdemo1 ~]$ raccli create recovery -latest

{
  “jobId” : “24”,
  “joburi” : “http://localhost:7070/dcs/24/responses”,
  “requestStatus” : “SUCCESS”
}

[opc@pocracdemo1 ~]$ raccli describe job 24

{
  “requestStatus” : “SUCCESS”,
  “jobStatus” : “RUNNING”,
  “response” : [ {
    “startTime” : “Fri Apr 13 08:25:58 UTC 2018”,
    “status” : “RUNNING”,
    “taskId” : “TaskZJsonRpcExt_5749”,
    “taskName” : “Database Recovery”
  } ]

}

Now once it successfully restore,You can describe the job again

[opc@pocracdemo1 ~]$ raccli describe job 24

{
  “requestStatus” : “SUCCESS”,
  “jobStatus” : “SUCCESS”,
  “response” : [ {
    “startTime” : “Fri Apr 13 08:25:58 UTC 2018”,
    “endTime” : “Fri Apr 13 08:32:44 UTC 2018”,
    “status” : “SUCCESS”,
    “taskId” : “TaskZJsonRpcExt_5749”,
    “taskResult” : “Resource { id: 104049597281494, name: rdbaas_recovery_database, type: RecoveryComponent }”,
    “taskName” : “Database Recovery”
  }, {
    “startTime” : “Fri Apr 13 08:32:44 UTC 2018”,
    “endTime” : “Fri Apr 13 08:32:44 UTC 2018”,
    “status” : “SUCCESS”,
    “taskId” : “TaskZJsonRpcExt_5751”,
    “taskResult” : “Resource { id: 104456071050168, name: null, type: Recovery }”,
    “taskName” : “Persist Recovery Metadata”
  } ]

}

Restoring to specific point in time using RACCLI

[opc@pocracdemo1 ~]$ raccli create recovery -pitr -timestamp '04/13/2018 08:30:30'
{
  “jobId” : “25”,
  “joburi” : “http://localhost:7070/dcs/25/responses”,
  “requestStatus” : “SUCCESS”
}

cd /home/oracle/bkup/logs/rman

RMAN> list db_unique_name all;
2> list incarnation of database;
3> show all;
4> report schema;
5> run { set until time =”to_date(’04/13/2018 08:30:30′,’mm/dd/yyyy hh24:mi:ss’)”; restore database; recover database; }
6> alter database open resetlogs;
7> shutdown immediate;
8>

You can also recover using DB console

 

Oracle DBaaS 1z0-160 part 27 :-Updating cloud tooling using raccli

1.Connect as the opc user to the compute node.

2.Execute the raccli update rdk subcommand:

$ raccli update rdk -tag tag-number

where tag-number is the version of tooling you want to update to, without the dots in the version number. For example, to update to 17.2.5 tooling you would enter 1725.

If you are updating the cloud tooling on a database deployment that also uses Oracle Data Guard, you must also execute the update databasepassword command to store the password in the keystore (wallet) if you are updating from release 17.2.1 or earlier.

or

3.You can update cloud tool for RAC using below command.

[opc@pocracdemo1 ~]$ raccli update rdk -tag latest
{
 “jobId” : “41”,
 “requestStatus” : “SUCCESS”
}

Oracle DBaaS 1z0-160 part 26 :- Install RAC from console in oracle database cloud

Please select create instance after selecting “Database” option

Please select one of following options(I choose custom)

Please select the option to create RAC

Please provide SSH public key or create new key

SSH key will be generated now

Please provide other relevant information

The instance will be now creating and will take 2-3 hours

After installation you will get following screen

RAC characteristics

Database file storage: for each Oracle RAC database, storage for database data files, the fast recovery area, and the redo logs is created and managed using Oracle Automatic Storage Management (ASM) and Oracle Automatic Storage Management Cluster File System (ACFS) instead of Linux LVM.

Included software: Oracle Application Express, Oracle REST Data Services, and Oracle DBaaS Monitor are not currently included.

The following is storage distribution for this installation we carried in previous slide.

Oracle DBaaS 1z0-160 part 25 :- Recover database in oracle database cloud

1.Recover database from console

2.Please select among below options

3.Please check the recovery progress now

4.Point in time recovery using PITR

[root@MYTST ORCL]#  dbaascli orec –args -list

[root@MYTST ORCL]#  dbaascli orec –args -pitr TAG20180409T051640

DBAAS CLI version 1.0.0
Executing command orec –args -pitr TAG20180409T051640
–args : -pitr TAG20180409T051640
OREC version: 16.0.0.0
Starting OREC
Logfile is /var/opt/oracle/log/ORCL/orec/orec_2018-04-09_12:39:36.log
Config file is /var/opt/oracle/orec/orec.cfg
DB name: ORCL
OREC:: RUNNING IN NON DATAGUARD ENVIRONMENT
OREC:: Catalog mode:  Disabled
OREC:: Checking prerequirements before recovery process.
OREC:: DB Status : OPEN
OREC:: Changing instance to MOUNT stage.
OREC:: Shutting down the database… Completed.
OREC:: (RMAN) Startup MOUNT… Completed.
OREC:: PITR is within current incarnation 3
INFO : DB instance is up and running after recovery procedure.

OREC:: PITR Completed.

5.Point in time recovery using SCN

# dbaascli orec –args -scn SCN

where SCN is the system change number (SCN) for the end point of the recovery.

The restore and recover process performs these steps:

  • Shuts down the database
  • Extracts and restores configuration files
  • Prepares for recovery
  • Performs the recovery
  • Restarts the database instance after recovery.

6.In data guard configuration,you need to do following

1.Start a root-user command shell:

2.$ sudo -s
#

3.Run the duplicate option of orec.

4.# dbaascli orec –args -duplicate

5.Exit the root-user command shell and disconnect from the compute node:

6.# exit
$ exit

7.Switching backup from the None destination

8.Configuring TDE wallet and backup configuration file

[opc@MyCLONE ~]$ sudo su –

[root@MyCLONE ~]# /var/opt/oracle/dbaascli/dbaascli tde config –ks_login auto

DBAAS CLI version 1.0.0
Executing command tde config –ks_login auto

[root@MyCLONE ~]# cd /var/opt/oracle/ocde/assistants/bkup/

[root@MyCLONE bkup]# ls bkup*.cfg

bkup.cfg

[root@MyCLONE bkup]# mv bkup.cfg bkup_bak.cfg

[root@MyCLONE bkup]# vi bkup.cfg

9.Changing parameter of backup configuration file

# The bkup.cfg file will hold all the config info for BKUP.This configuration for both cloud storage and local disk

bkup_cfg_files=yes
bkup_disk=yes
bkup_disk_recovery_window=7
bkup_oss=yes
bkup_oss_url=https://surcloudworld.au.storage.oraclecloud.com/v1/Storage-surcloudworld/MYCLONE
bkup_oss_user=rsurajit@rediffmail.com
bkup_oss_passwd=Test#123
bkup_oss_recovery_window=30

For the Cloud Storage Only destination, enter:

# The bkup.cfg file will hold all the config info for BKUP

bkup_cfg_files=yes
bkup_disk=no
bkup_oss=yes
bkup_oss_url=https://surcloudworld.au.storage.oraclecloud.com/v1/Storage-surcloudworld/MYCLONE
bkup_oss_user=rsurajit@rediffmail.com
bkup_oss_passwd=Test#123
bkup_oss_recovery_window=oss-days

10.Run the backup assistant with the bkup.cfg file

[root@MyCLONE bkup]# chown root bkup.cfg

[root@MyCLONE bkup]# chmod 0600 bkup.cfg

[root@MyCLONE bkup]# ./bkup -cfg bkup.cfg

using file : /var/opt/oracle/log/ORCL/bkup/temp.sh
Configuring Backup to disk
Common RMAN Config
Instantiating obkup
Instantiating dbcfg.spec
Configuring backup of Config File
Updating Control File Record Keep Time
Enabling block change tracking
Updating RMAN defaults
Adding entry to crontab
INFO: Archivelog management enabled.
Adding entry to crontab
Accessing to your Database ID ..
The DBaaS instance database id is: 1500760727

#### Completed Execution.

11.Details about parameters used for backup configuration

1.disk-days is the number of days for which backups and archived redo logs are maintained on local storage. The interval always ends with the current time and extends back in time for the specified number of days.

2.oss-url is the REST endpoint of the cloud storage container.

3.username is the username for accessing the cloud storage container.

4.password is the password for accessing the cloud storage container.

5.oss-days is the number of days for which backups and archived redo logs are maintained on cloud storage. The interval always ends with the current time and extends back in time for the specified number of days.

 12.Create database from existing backup

Please select “create instance from existing backup”

Now you get confirmation screen and proceed further

 

Oracle DBaaS 1z0-160 part 24 :- Backup in single instance oracle cloud

Backup types

When you create a database deployment, you choose one of the following backup destinations:

  • Both Cloud Storage and Local Storage. Backups are configured to be created automatically and stored both on local compute node storage and on an Oracle Storage Cloud Service container.
  • Cloud Storage Only. Backups are configured to be created automatically and stored on an Oracle Storage Cloud Service container.

Note:This choice is not currently available for database deployments that use Oracle Real Application Clusters (Oracle RAC).

  • None. No backup configuration is created.

Identify backup location from storage classic section

Please select “Storage Classic” section from customize dashboard

Please note REST end point

Please open service console after login to cloud account

Create the container

The storage container end point will look as below

https://surcloudworld.au.storage.oraclecloud.com/v1/Storage-surcloudworld/MyRACBKP

Backup configuration

The backup configuration created when you choose a destination other than None follows a set of Oracle best-practice guidelines:

  • Full (level 0) backup of the database followed by rolling incremental (level 1) backups on a seven-day cycle (a 30-day cycle for the Cloud Storage Only destination)
  • Full backup of selected database configuration files.
  • Full backup of selected system files.
  • Automatic backups daily at a time between 11 PM (23:00) and 3 AM (03:00), with the specific time set during the database deployment creation process.

Retention period and Encryption in backup

Retention period:

– Both Cloud Storage and Local Storage: 30 days, with the 7 most recent days’ backups available on local storage

– Cloud Storage Only: 30 days

Encryption:

– Both Cloud Storage and Local Storage: All backups to cloud storage are encrypted; backups of Enterprise Edition databases to local storage are encrypted; backups of Standard Edition databases to local storage are not encrypted.

– Cloud Storage Only: All backups to cloud storage are encrypted.

How to get existing backup configuration

[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api get_config_info –all

DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : get_config_info
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
{
    “bkup_cfg_db_spec”: “dbcfg.spec”,
    “bkup_cfg_files”: “yes”,
    “bkup_cfg_os_spec”: “oscfg.spec”,
    “bkup_cfg_recovery_window”: “30”,
    “bkup_cron_entry”: “yes”,
    “bkup_daily_time”: “2:53”,
    “bkup_disk”: “yes”,
    “bkup_disk_recovery_window”: “7”,
    “bkup_nfs_mount_dir”: “/mnt/dbaas_backup”,
    “bkup_oss”: “yes”,
    “bkup_oss_recovery_window”: “30”,
“bkup_oss_url”: “https://surcloudworld.au.storage.oraclecloud.com/v1/Storage-surcloudworld/MYRACBKP”,
    “bkup_oss_user”: “rsurajit@rediffmail.com”,
    “bkup_rman_retention”: “8”,
    “bkup_script_loc”: “/home/oracle/bkup/ORCL”,
    “bkup_type”: “diskoss”,
    “fra_loc”: “/u03/app/oracle/fast_recovery_area”,
    “opc_oss_url”: “https://surcloudworld.au.storage.oraclecloud.com/v1/Storage-surcloudworld”,
    “oss_base”: “MYRACBKP”,
    “oss_url”: “https://surcloudworld.au.storage.oraclecloud.com/v1/Storage-surcloudworld/MYRACBKP”,
    “oss_user”: “rsurajit@rediffmail.com”

}

Checking latest backup from DB console

Taking ad hoc backup

Make a selection for the Keep Forever option and then click Backup.

The Keep Forever option controls the backup retention policy, as follows:

  • No — specifies that the backup is produced and maintained in accordance with the automatic backup retention policy  that is associated with the database deployment.
  • Yes — specifies that the backup is a long-term backup, which is produced and maintained independently of the automatic backup retention policy that is associated with the database deployment.

Long-term backups remain until you explicitly remove them  from the system.

 

Start backup using command line

[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api bkup_start

DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : bkup_start
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
UUID 0a9b991c-3bb6-11e8-a931-021ff53ddc9b for this backup
** process started with PID: 29350
** see log file for monitor progress

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

Mon, 09 Apr 2018 05:28:55 -> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log

Mon, 09 Apr 2018 05:28:55 -> Listing all backups
Mon, 09 Apr 2018 05:28:55   Backup Tag             Completion Date (UTC)            Type          keep
Mon, 09 Apr 2018 05:28:55 ———————-   ———————–      ———–    ——–
Mon, 09 Apr 2018 05:28:55    TAG20180403T025607     04/03/2018 02:56:07       incremental        False
Mon, 09 Apr 2018 05:28:59 API::7238:: Backup list synchronization in background.

Mon, 09 Apr 2018 05:29:08 API::7238:: Backup list synchronization completed.

Backup status check from command line

To create a long-term backup that persists until you delete it, enter the following bkup_api command:

# /var/opt/oracle/bkup_api/bkup_api bkup_start –keep

[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api bkup_status

DBaaS Backup API V1.5 @2016 Multi-Oracle home

DBaaS Backup API V1.5 @2015 Multi-Oracle home

-> Action : bkup_status

-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log

Warning: unable to get current configuration of: catalog

* Current backup settings:

* Last registered Bkup: 04-09 05:23 API::29350:: Starting dbaas backup process

* Bkup state: finished

**************************************************

Listing all backup

 [root@MYTST ~]#  /var/opt/oracle/bkup_api/bkup_api list –keep

DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : list
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
-> Listing all backups
  Backup Tag             Completion Date (UTC)            Type          keep
———————-   ———————–      ———–    ——–

[root@MYTST ~]#  /var/opt/oracle/bkup_api/bkup_api list

DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : list
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
-> Listing all backups
  Backup Tag             Completion Date (UTC)            Type          keep
———————-   ———————–      ———–    ——–
   TAG20180409T051640     04/09/2018 05:16:40       incremental        False
   TAG20180409T052528     04/09/2018 05:25:28       incremental        False

Delete backup with tag

[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api bkup_delete –bkup=TAG20180409T051640

DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : bkup_delete
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
UUID 841a5e78-3bdd-11e8-bc4d-021ff53ddc9b for delete backup
Notes:
 *)  Only keep forever backups can be deleted
 *)  Regular backups are part of the retention policy
 *)  Regular backups are hot and incremental and they share their backup pieces
-> Verifying if the specified backup is a keep forever backup
Starting delete of backup
841a5e78-3bdd-11e8-bc4d-021ff53ddc9b command /var/opt/oracle/ocde/assistants/bkup/obkup -keep -delete=TAG20180409T051640
841a5e78-3bdd-11e8-bc4d-021ff53ddc9b The delete process failed
*
* RETURN CODE:1
##################################################

Updating the Password by Using the bkup_api Utility

You use the bkup_api utility to update the Oracle Wallet file containing the backup user’s password:

  1. Connect to the compute node as the opc user.
  2. Start a root-user command shell: $ sudo -s
  3. Create a file that contains the updated password. The file must contain only the following entry: password=new-password (where new-password is the backup user’s updated password).

Also, the file permissions must be set as follows:

# chmod 600 password-file (where password-file is the name of the file that contains the updated password.)

  1. Update the password. # /var/opt/oracle/bkup_api/bkup_api update_wallet –cfg=password-file where password-file is the name of the file that contains the updated password.

Checking retention period of backup and changing it.

RMAN> show all;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
#/var/opt/oracle/bkup_api/bkup_api bkup_chgcfg –retention=15
INFO: Backups that are older than 15 days will be deleted during next bkup.
* Update
INFO: Updating the policy with the following parameters:
 -> Backup policy : 15 days (rman retention period)
 -> Backup cycle  : 8 days (obkup retention period)
INFO: Update RMAN retention policy:
 -> configure retention policy to recovery window of 30 days;
 -> New value: 15 days
INFO: Update bkup_oss_recovery_window:
 -> Old value: 30 days
 -> New value: 15 days
I* RETURN CODE: 0

Customizing which system files are backed up

 Login to oracle user and Edit the contents of the /home/oracle/bkup/ORCL/oscfg.spec file. The backup feature provided by Oracle Database Cloud Service backs up the files and folders listed in this specification file. An example of an oscfg.spec file with a default configuration is as follows:

# Directories

/etc/rc.d
/home/oracle/bkup

# Single files

/home/oracle/.bashrc
/etc/crontab
/etc/sysctl.conf
/etc/passwd
/etc/group
/etc/oraInst.loc
/etc/oratab
/etc/fstab

Customizing Which Database Configuration Files Are Backed Up

 Please edit /home/oracle/bkup/ORCL/dbcfg.spec using oracle user

# Directories

/u01/app/oracle/product/12.1.0/dbhome_1/admin/ORCL/xdb_wallet
/u01/app/oracle/admin/ORCL/xdb_wallet
/u01/app/oracle/admin/ORCL/db_wallet

# Note: tde_wallet must be backed up in a different location than DATA bkup.

/u01/app/oracle/admin/ORCL/tde_wallet
/u01/app/oracle/admin/ORCL/cat_wallet

# Single files

/u01/app/oracle/admin/ORCL/opcORCL.ora
/u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcORCL.ora
/u01/app/oracle/product/12.1.0/dbhome_1/dbs/orapwORCL
/u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
/u01/app/oracle/product/12.1.0/dbhome_1/network/admin/sqlnet.ora
/u01/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk
/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk

# Creg

/var/opt/oracle/creg/ORCL.ini

The backup feature provided uses the Linux cron job scheduler to perform automatic backups

[root@MYTST ORCL]# cat /etc/crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=””
HOME=/

# For details see man 4 crontabs

# Example of job definition:

# .—————- minute (0 – 59)

# |  .————- hour (0 – 23)

# |  |  .———- day of month (1 – 31)

# |  |  |  .——- month (1 – 12) OR jan,feb,mar,apr …

# |  |  |  |  .—- day of week (0 – 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat

# |  |  |  |  |

# *  *  *  *  * user-name command to be executed

15 03 * * 6 oracle /var/opt/oracle/cleandb/cleandblogs.pl
53 2 * * * root /var/opt/oracle/bkup_api/bkup_api bkup_start –dbname=ORCL
0,30 * * * * root /var/opt/oracle/bkup_api/bkup_api bkup_archlogs –dbname=ORCL

Disabling and Enabling automatic backup

If some activity you want to perform requires you to temporarily disable regularly scheduled backups of a database deployment, you can do so by removing the scheduling information from the system-wide /etc/crontab file.

Currently, disabling and re-enabling scheduled backups is not supported for Database Cloud Service database deployments that use Oracle Real Application Clusters (RAC).

  1. Start a root-user command shell: $ sudo -s #
  2. Navigate to the /etc directory, which contains the system-wide crontab file: # cd /etc.
  1. Make a copy of the crontab file to preserve the configuration, for example: # cp crontab crontab.bak.
  2. Edit the original crontab file and remove the lines related to backup from the file.

To re-enable automatic backup , Copy the crontab.bak file you created when disabling scheduled backups to its original name,

# cp /etc/crontab.bak /etc/crontab

Oracle DBaaS 1z0-160 part 23 :- Dataguard Administration in oracle cloud

1.Please check status on primary

dbaascli dataguard status –details yes

2.Please check status of dataguard in standby

dbaascli dataguard status –details yes

3.Perform Switchover from primary to standby from console

4.Please note primary is standby and standby is now primary

5.Perform switchover from command line to switchover to primary again

Use the password option to supply the SYS user password if you changed it since creating the Data Guard configuration.

dbaascli dataguard switchover

Please restart ords service

[root@MYPRIM-dg02 ~]# /etc/init.d/ords restart

INFO: Stopping Oracle REST Data Services…
INFO: Oracle REST Data Services stopped
INFO: Starting Oracle REST Data Services…
INFO: Oracle REST Data Services bound to ports 8080 27834
INFO: Oracle REST Data Services started with PID 27834

6.You may do failover in case of failure of primary database

dbaascli dataguard failover

Force option can be specified if Dataguard configuration is in warning or error state

Use the force option if the status subcommand shows that the Data Guard configuration is in a warning or error state. Use the password option to supply the SYS user password if you changed it since creating the Data Guard configuration.

Please start ords services

7.You may reinstate the dataguard again to return back normal state

If Flashback Database is enabled on the primary database, it can be reinstated as a standby for the new primary database once the reason for the failure is corrected. A failover is typically used only when the primary database becomes unavailable, and there is no possibility of restoring it to service within a reasonable period of time.

To determine whether the database can be reinstated, use the dataguard status subcommand as described in Checking the Status of the Oracle Data Guard Configuration. A status of ORA-16661: the standby database needs to be reinstated indicates the standby database can be reinstated.

dbaascli dataguard reinstate

8.Please check the dataguard status again

Oracle DBaaS 1z0-160 part 22 :- OS Patching in oracle cloud

login as: opc

Authenticating with public key “rsa-key-20180316”

[opc@ORCL ~]$ sudo su –

[root@ORCL ~]# /var/opt/oracle/patch/dbpatchmsm -list_ospatches

INFO: non async case

INFO: cmd is: /var/opt/oracle/patch/dbpatchm -list_ospatches

Starting DBPATCHM

Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-03-28_11:49:32.log

Config file is /var/opt/oracle/patch/dbpatchm.cfg

<json begin>{“available_ospatch”:”yes”,”severity_ospatch”:”Critical”,”packages_list”:””}<json end>

[root@ORCL ~]#  /var/opt/oracle/patch/dbpatchmsm -apply_ospatch_async

INFO: async case

INFO: patch number given is :

<start txn>4<end txn>

INFO: system cmd is: “nohup /var/opt/oracle/patch/dbpatchm -apply_ospatch_async”

[root@ORCL ~]# nohup /var/opt/oracle/patch/dbpatchm -apply_ospatch_async

nohup: ignoring input and appending output to `nohup.out’

[root@ORCL ~]#

[root@ORCL ~]#

Broadcast message from opc@ORCL

(unknown) at 11:57 …

The system is going down for reboot in 1 minute!

Rebooting to finalize the OS security patching.

[root@ORCL ~]#

Broadcast message from opc@ORCL

(unknown) at 11:58 …

The system is going down for reboot NOW!

Rebooting to finalize the OS security patching.

Oracle DBaaS 1z0-160 part 21 :- Patching in dataguard oracle cloud

Please check pre-requisites first

You need to run the following command to check latest available patch

dbaascli dbpatchm –run -list patches

You may patch to be applied from dataguard side as well

Please go to database console and check the Administration section

Please run the prereq now for checking all pre-requisites already applied and check log as in screenshot

Precheck failed for patch [26609783-SE]. Error [please upgrade to recommended dbaastools version… (Doc ID 2367349.1)

You will be able to successfully complete pre-check

[root@TestDB-dg02 ~]#  rpm -qa|grep -i dbaastools

Dbaastools-1.0-1+18.1.4.1.0_180312.1800.x86_64

Please start patching now

Please select “Switchover” option to minimize downtime

You may check patch progress status

Now you have successfully applied the patches

Oracle DBaaS 1z0-160 part 20 :- Dataguard Setup for Single Instance in oracle cloud

Please select the “Single Instance with Data Guard Standby” as Database Type in drop down.

–> High Availability—The standby database is placed in a different availability domain from the primary database, thus providing isolation at the infrastructure level.

–> Disaster Recovery—The standby database is placed in a different data center from the primary database, thus providing isolation at the infrastructure level .

 

Please select standby database as “Disaster Recovery”

Please wait until it finish.You may check status from Details

Please check now both primary and standby databases are ready.