In this post, we will be sharing the Oracle DBA to Cloud DBA Day 2, Day 3 & Day 4: Live Session Review and Q/A’s. This will help you in understanding some basic concepts.
The previous week, In Day 1 session we covered Roles and Responsibility of DBA’s in Oracle Cloud, Database Cloud Service Overview, Oracle Cloud Infrastructure(OCI), User-Managed Database(Virtual Machine, Bare Metal, Exadata Cloud Services, Exadata Cloud @ Customer), Autonomous Databases(Autonomous Data Warehouse, Autonomous Transaction Processing), MySQL Database, NoSQL Database, External Database.
And in Day 2, Day 3 & Day 4 Live Sessions, we have continued with Module 2: DB System VM/BM. We have covered
- Provisioning Concepts
- Prerequisite
- Provisioning DB Systems (VM, BM, ExaCS)
- SSH Public/Private Keys
- Provisioning Parameters
- Connect to DB System Host
- Create Database from Backup
- Backup and Restore
- Update DB Systems
- Patching DB System
We also covered hands-on Lab 4, Lab 11 and Lab 13 out of our 18+extensive step by step hands-on labs.
Provisioning Concepts
Provisioning is the process of setting up IT infrastructure. It can also refer to the steps required to manage access to data and resources, and make them available to users and systems.
Provisioning is all about allocating compute resourcing, storage, provisioning an Operating system and then assigning the required keys and privileges, install and configure the Database, configure the backups and configure the tools then you finally get access to the required resources and Database ready for use.
Users can provision Virtual Machine DB System (1-Node or 2-Node (RAC)) and Bare Metal DB System(1-Node).
The database can be provisioned using the following methods:
- Console (GUI)
- REST API: LaunchDbSystem
- Command Line Interface (CLI): dbcli create-database
Prerequisite
For provisioning a Database you must follow some pre-requisites that are mentioned below:
- Oracle Cloud Account
- VCN & Subnet
- SSH (Public/Private Key Pair)
- If backup to Object Storage or Patching O.S. (Yum) then Service Gateway
- If configuring 2-Node RAC then port 22, 1521 and ICMP Port open for EGRESS & INGRESS
Provisioning VM/BM DB Systems
When User create a DB system using the Console, the API, or the CLI, the system is provisioned to support Oracle databases, and an initial database is created based on the options provided by user and some default options.
On the Create DB System page, provide the basic information for the DB system:
- Select a compartment: By default, the DB system is created in your current compartment and you can use the network resources in that compartment.
- Name your DB system: A non-unique, display name for the DB system. An Oracle Cloud Identifier (OCID) uniquely identifies the DB system. Avoid entering confidential information.
- Select an availability domain: The availability domain in which the DB system resides.
- Select a shape type: The shape type you select sets the default shape and filters the shape options in the next field.
- Select a shape: The shape determines the type of DB system created and the resources allocated to the system. To specify a shape other than the default, click Change Shape, and select an available shape from the list.
Configure the DB system: Specify the following:
- Total node count: The number of nodes in the DB system, which depends on the shape you select. For virtual machine DB systems, you can specify either one or two nodes, except for VM.Standard2.1 and VM.Standard1.1, which are single-node DB systems.
- Oracle Database software edition: The database edition supported by the DB system. For bare metal systems, you can mix supported database releases on the DB system to include older database versions, but not editions. The database edition cannot be changed and applies to all the databases in this DB system. Virtual machine systems support only one database.
- CPU core count: Displays only for bare metal DB systems to allow you to specify the number of CPU cores for the system. (Virtual machine DB system shapes have a fixed number of CPU cores.) The text below the field indicates the acceptable values for that shape. For a multi-node DB system, the core count is evenly divided across the nodes.
- Choose Storage Management Software: 1-node virtual machine DB systems only. Select Oracle Grid Infrastructure to use Oracle Automatic Storage Management (recommended for production workloads). Select Logical Volume Manager to quickly provision your DB system using Logical Volume Manager storage management software. Note that the Available storage (GB) value you specify during provisioning determines the maximum total storage available through scaling.
- Configure storage: Specify the following:
- Available storage (GB): Virtual machine only. The amount of Block Storage in GB to allocate to the virtual machine DB system. Available storage can be scaled up or down as needed after provisioning your DB system.
- Total storage (GB): Virtual machine only. The total Block Storage in GB used by the virtual machine DB system. The amount of available storage you select determines this value. Oracle charges for the total storage used.
- Add public SSH keys: The public key portion of each key pair you want to use for SSH access to the DB system. You can generate a new SSH key pair, browse or drag and drop .pub files, or paste in individual public keys.
- Choose a license type: The type of license you want to use for the DB system. Your choice affects metering for billing.
- License Included means the cost of this Oracle Cloud Infrastructure Database service resource will include both the Oracle Database software licenses and the service.
- Bring Your Own License (BYOL) means you will use your organization’s Oracle Database software licenses for this Oracle Cloud Infrastructure Database service resource.
- Virtual cloud network: The VCN in which to create the DB system. Click Change Compartment to select a VCN in a different compartment.
- Client Subnet: The subnet to which the DB system attaches. For 1- and 2-node RAC DB systems: Do not use a subnet that overlaps with 192.168.16.16/28, which is used by the Oracle Cluster ware private interconnect on the database instance.
- Hostname prefix: Your choice of hostname for the bare metal or virtual machine DB system. The hostname must begin with an alphabetic character and can contain only alphanumeric characters and hyphens (-). The maximum number of characters allowed for bare metal and virtual machine DB systems is 16.
- Host domain name: The domain name for the DB system. If the selected subnet uses the Oracle-provided Internet and VCN Resolver for DNS name resolution, then this field displays the domain name for the subnet and it can’t be changed.
Provide information for the initial database:
- Database name: The name for the database, also known as the DB_NAME. The database name must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted.
- Database unique name suffix: Optional. The second portion of the database unique name. The complete database unique name is created by appending the database unique name suffix to the database name you specify.
- Database unique name: This read-only field displays the complete database unique name (DB_UNIQUE_NAME). The database unique name is a globally unique name for the database. Primary and standby databases in a Data Guard association can share the same database name, but must have different database unique names.
- Database image: This controls the version of the initial database created on the DB system. By default, the latest available Oracle Database version is selected. You can also choose an older Oracle Database version, or choose a customized database software image that you have previously created in your current region with your choice of updates and one-off (interim) patches.
- PDB name: Not applicable to Oracle Database 11g (11.2.0.4). The name of the pluggable database. The PDB name must begin with an alphabetic character, and can contain a maximum of eight alphanumeric characters. The only special character permitted is the underscore ( _).
- Create administrator credentials: A database administrator SYS user will be created with the password you supply.
- Username
- Password
- Confirm password: Re-enter the SYS password you specified.
- Select workload type: Choose the workload type that best suits your application:
- Online Transactional Processing (OLTP) configures the database for a transactional workload, with a bias towards high volumes of random data access.
- Decision Support System (DSS) configures the database for a decision support or data warehouse workload, with a bias towards large data scanning operations.
- After the DB system is active, you can create additional databases for bare metal systems. You can mix database versions on the DB system, but not editions. Virtual machine DB systems are limited to a single database.
Also Read: Our blog post on Oracle PAYG Model.
Compartment
A compartment is a collection of related resources (such as cloud networks, compute instances, or block volumes) that can be accessed only by those groups that have been given permission by an administrator in your organization.
For example, one compartment could contain all the servers and storage volumes that make up the production version of your company’s Human Resources system. Only users with permission to that compartment can manage those servers and volumes.
Availability Domain(AD) & Fault Domain
Availability Domain (AD) is one or more data centres located within a region. A region is composed of three availability domains. Services/Resources are either Region-Specific (like VCN) or Availability Domain Specific (like Compute).
A fault domain is a grouping of hardware and infrastructure within an Availability Domain, Provides a higher degree of protection from unexpected hardware failures or compute hardware maintenance. Each Availability Domain has 3 Fault Domains
Connect to DB System Host
For connecting VM DB System : Open putty.exe in your system
- Enter the following Host Name (or IP Address): Enter opc@Public IP of your instance
- Port: Enter 22
- Connection type: Select SSH
- Select Private Key and add in Auth section ——-
Q: Does dbcli work from database server level?
A: Yes, dbcli works from database server level.
Q: Difference b/w OCI DB System and OCI Database?
A: Oracle Cloud Infrastructure offers single-node DB systems on either bare metal or virtual machines, and 2-node RAC DB systems on virtual machines. If you need to provision a DB system for development or testing purposes, a special fast-provisioning single-node virtual machine system is available.
You can manage these systems by using the Console, the API, the Oracle Cloud Infrastructure CLI, the Database CLI (DBCLI), Enterprise Manager, or SQL Developer.
DB system is the set of one or more Databases.
Q: Can I create multiple databases within a DB system?
A: Virtual machine DB systems only contain one database. Bare metal DB systems can have multiple DB Homes, which can contain multiple databases. All the databases within a DB Home will have the same version, but each DB Home can have a different version. For example, an Enterprise Edition DB system might contain DB_Home11, which contains only Enterprise Edition 11.2.0.4 databases, and DB_Home12, which contains only Enterprise Edition 12.1.0.2 databases.
Q: Can I change the database edition after launching a DB system?
A: No, the edition can’t be changed. However, you can easily terminate the DB system and launch another with the preferred edition.
Q: Which Oracle Database software editions are supported?
A: The following Oracle Database software editions are supported and optimized for the cloud.
- Standard Edition
- Enterprise Edition
- Enterprise Edition High Performance
- Enterprise Edition Extreme Performance
Read More: About Oracle Data Guard.
Create Database from Backup
When provisioning from backup, AD for the database will same where the backup is hosted. Database created form backup of 1 node VM DB system can be 1 node only. Oracle Database Edition must be equal or greater than backed up database.
If create a database from an Automatic backup, you may choose any level 0 weekly backup, or a level 1 incremental backup created after the most recent level 0 backup
Q: How to change the shape of the VM DB system and how to clone it?
A: You can change the shape & Clone of the VM DB System via console.
- Go to the menu and select Bare Metal, Virtual Machine & Exadata.
- Select the DB system that you want to clone or change shape.
- Click on the DB system
For Example:
Backup of Database on OCI
Depending on type of database on Cloud, backup options & tools will differ, Depending on database type, you can store backup
- On Object Storage: High durability & availability, medium restore rate
- Local Storage on Server: Low durability, medium availability, high restore rate
Database Backup is of two types
- Managed Backups: Managed by OCI (You still need to configure options)
- Unmanaged Backups: RMAN, DBCLI
For backup to Object Storage, there are multiple ways to connect to Storage Endpoint
- Service Gateway (Preferred way)
- NAT Gateway
- Internet Gateway
Q: How many ways to take Backup in OCI?
A: For Managed Backups (using OCI Console or APIs), you can have
- Automatic (Scheduled): Weekly full & daily incremental
- On-Demand (One-Off): Full
With Automatic Managed Backups you can define
- Backup Window: 2 Hours window like 2:00-4:00 AM or 4:00-6:00 PM
- Backup Retention: 7 Days, 15 Days, 30 Days, 45 Days, 60 Days
Backup is Automatically Encrypted.
Q: Can you explain what are the pros and cons of different types of backup?
Restore Database on OCI
Depending on type of database on Cloud, restore options & tools will differ Depending on backup taken, you can restore from
- On Object Storage: High durability & availability, medium restore rate
- Local Storage on Server: Low durability, medium availability, high restore rate
Database restore tools will depend on backup type
- Managed Backup Restore: Restore from OCI (Console or API)
- Unmanaged Backup Restore: RMAN, DBCLI
At time of restore database will not be available and You can to any restore point in time, SCN number, or latest good state backup.
Update DB Systems
Database software images give you the ability to create a customized Oracle Database software configuration like:
- Updates (PSU, RU or RUR),
- List of one-off (or interim) patches
- Oracle Home inventory file
This reduces the time required to provision and configure your databases and Makes it easy for organization to create an approved “gold image” for developers and database administrators.
Q: What are the pre-requisites for OS Update?
A: There are some pre-requisites for OS update:
- Back up your DB system’s databases prior to attempting an OS update.
- Do not remove packages from a DB system. However, you might have to remove custom RPMs (packages that were installed after the system was provisioned) for the update to complete successfully.
- Oracle recommends that you test any updates thoroughly before updating a production system
- After you launch a DB system, you are responsible for applying the required OS security updates published through the Oracle public YUM server (Running Yum update commands)
- To apply OS updates, the DB system’s VCN must be configured to allow access to the YUM repository
Patching Pre-requisites
- DB System requires access to the OCI Object Storage Service, including connectivity to the applicable Swift endpoint for Object Storage.
- Oracle recommends using a Service Gateway with the VCN to enable this access.
- The /u01 directory on the database host file system has at least 15 GB of free space for the execution of patching processes.
- The Oracle Clusterware is up and running on the DB system.
- All nodes of the DB system are up and running.
Patch using DB CLI
There are some steps for apply patch.
Step 1: Check Prerequisites
Step 2: Update the CLI to ensure you have the latest patching commands
Step 3: Update the CLI by using the “cliadm update-dbcli” command
Step 4: Display the installed patch versions by using the “dbcli describecomponent” command
Step 5: Display the latest patch versions available in Object Storage by using the “dbcli describe-latestpatch” command
Q: Can we see patch history?
A: Yes, you can see patch history by following:
- Open the navigation menu. Under Database, click Bare Metal, VM, and Exadata.
- Choose your Compartment.
- A list of DB systems is displayed.
- Find the DB system you are interested in, and click the system name to display details about it.
- Under Resources, click Patch History.
- The history of patch operations for that DB system is displayed.
Q: Fault domain can be across regions?
A: No. we can not access the Fault domain across regions.
Q: Is it possible to recover any lost SSH keys?
A: No, it is not possible. If you lost an SSH key you can create a new SSH key, regain temporary access to your server via a passphrase, and authorize the new key on the server.
Q: When we use SQL developer also, do we need to upload public keys to the cloud?
A: No, we use the public key at the creation time of Instance/Database.
Q: What is the latest version of Puttygen?
A: Latest version of Puttygen is 0.76.
Q: I connected to the database via putty and shutdown the database, but in the cloud console it was still showing the database as available. Why is that?
A: You can only terminate the database.
Q: When I tried to create the DB system in the child compartment (PoCCompartment), while adding VCN details it didn’t show the VCN we created under root. What changes need to be done in policy to enable child compartment access to root VCN?
A: You need to create VCN in the child compartment to create the DB System and if you want to use the root compartment VCN then you need to give access to the networking at tenancy level.
Q: Is there a limit on the number of PDB’s per VM DB system?
A: A CDB can contain up to 252 PDBs and you can set the maximum number of PDBs by MAX_PDBS.
Q: How to check how much space is left for the New PDB? if we need to create a new PDB?
A: Check the Size of Oracle Database and PDB databases:
select sum(bytes)/1024/1024 size_in_mb from dba_data_files; Check the total space used by data. select sum(bytes)/1024/1024 size_in_mb from dba_segments; Check the size of User or Schema in Oracle.
Q: Can PDB be created using SQL PLUS commands, Also, can PDB be created without TDE encryption?
A: Yes PDB can be created using SQL PLUS commands you can go through this link for a better understanding of Creating PDB.
Check out: Oracle Docs
Q: ‘Create backup’ option is coming as disabled for my db system (private subnet). IS it because I created a data guard association and it’s still provisioning?
A: Yes when is it in the available state ‘create backup’ option is enabled.
Quiz Time (Sample Exam Questions)!
Quiz Time (Sample Exam Questions)! With our [1Z0-1093] Oracle Cloud Database Service Specialist training program, we cover 150+ Sample Exam questions to help you prepare for the certification [1Z0-1093].
Check out one of the questions and see if you can crack this…
Question: Which three are the capabilities of the dbaascli utility? (Choose any three.)
A. Patching the primary database deployment
B. Open port 1521 in the VCN to allow for traffic to the listener
C. Start and open the database instance
D. Switchover and failover in an Oracle Guard configuration
E. Clone a DB
Reply back with your answer.
The right answer will be revealed in my next week’s blog.
Feedback
We always work on improving and being the best version of ourselves from the previous session hence constantly ask feedback from our attendees.
Here’s the feedback that we received from our trainees who had attended the session…
Here 2108 is in YYMM format, represents the trainees from the batch of August 2021.
Related Links/References:
- Create Oracle Autonomous Data Warehouse 19c on OCI
- How to Connect to an Autonomous Database on Oracle Cloud
- 1Z0-998 | Oracle Database Cloud Service Certification: Documentation | Training
Next Task For You
If you want to upgrade your career from an Oracle DBA to Oracle Cloud DBA, and want to clear Oracle Cloud Database Service Specialist[1Z0-1093-21] & Oracle Cloud Autonomous Database Certification[1Z0-931-21], then register for a Free Class and don’t miss an opportunity to gain a plethora of insights on becoming a certified Oracle Cloud DBA.
Leave a Reply