Disclaimer

Saturday, 31 January 2026

Domain-Default Domain - User - Policy in OCI

 

The Oracle Cloud Infrastructure policy specifies who has access to which resources in OCI. Policies simply allow a group to manage certain types of resources in a specific compartment in certain ways.

Policy basic Syntax:

Allow group <group_name> | <group_ocid> to <verb> <resource-type> in compartment <compartment_name>

Allow group <group_name> | <group_ocid> to <verb> <resource-type> in tenancy

Verbs:

inspect: Resource listing without access to confidential information or user-specified metadata.
read: It includes inspect as well as the ability to get user-specified metadata as well as the resource itself.
use: Includes reading and working with existing resources. Includes updating the resource, except for resource types where “update” has the same effect as “create”. In general, this verb doesn’t include the ability to create or delete.
manage: Includes all permissions associated with the resource.

Resource types:

all-resources: All Oracle Cloud Infrastructure resource-types
compute-management-family: Compute
database-family: Autonomous Database, Bare Metal and Virtual Machine DB Systems
virtual-network-family: Networking


Scenario :-






In Domain we are going to create users and group






Users are created 


Now we need to create IAM policy for Amit and Sankar


Amit is - Linux Admin Guy 


Now Create group - VM-ADMIN



Create Policy







allow group VM-ADMIN to manage instance-family in tenancy




VM-ADMIN-POLICY at ROOT level 



Amit logged in to OCI console




Amit is not able to see anything 

We created a group and wrote a policy but we didn't add you in the group.

It doesn't work until and unless you add into the group.


Admin user :- Task

Adding Amit user into VM-ADMIN group





Now Amit's Task -

Note:- Amit won't be able to create any VM because he doesn't have any Networking access yet.


Administrator is going to Create Instance 







Now Amit is able to see Virtual Machin - VM-1




But Amit is not able to see   Users and Groups because amit is not IAM admin guy









We wrote Instance-Family 


VIMP:- below statement

Instance-Family is very important in order to give Virtual Machin Admin access







So, Amit can see any VM Machines which are created in any Compartment, admin guy at root level




===========2nd Scenario=====================================

 Sankar :- 

We will write a policy only for TEST Compartment and he will be only able to see Bucket


When you are creating Policy , there are only two steps 

Step 1) Create Group

Step 2) Create the policy 












Policy :-



By default Policy = Tenant Admin Policy 


ALLOW GROUP Administrators to manage all-resources IN TENANCY 

all-resources - Means you are having access to all resources in OCI







allow group VM-ADMIN to manage users in tenancy

allow group VM-ADMIN to manage groups in tenancy 


Note: Amit is not able to see the policy because admin didn't give 




Note: Amit is able to see the users because of below statements


allow group VM-ADMIN to manage users in tenancy

allow group VM-ADMIN to manage groups in tenancy 







Creating another Policy for Sankar user:-







allow group STORAGE-ADMIN to manage buckets in compartment test-dev-cmp


Let's create Bucket 

















Now Sankar will check .. 




issue







Sankar doesn't have access so need to add policy 



Go to the policy




Before







Now Sankar screen:-



Sankar can start and stop the instance




Admin :- changing the policy statement for Sankar




changed from Manage to Read 



Now after changing the policy, sankar is not able to Stop the instance








allow group STORAGE-ADMIN to inspect instance-family in compartment test-dev-cmp


Sankar screen







Note:- Sankar won't be able to shape of the machine , as we updated policy --> inspect 

Sankar only able to IP address but not the name of VM instance 




Admin-





use - it will be only getting information 


Sankar -












Admin:-



Storage level - STORAGE_ADMIN



Sankar:- is not able to delete the VM 


















Monday, 19 January 2026

OCI - Interview Questions and Answers - 2

 

OCI Foundations – Mock Test 2 (40 Questions)---

Section 1: Getting Started with OCI (6 Questions)
Q1. What happens when you create a new OCI tenancy?
A. A VCN is created automatically
B. A root compartment is created automatically
C. A compute instance is provisioned
D. Multiple regions are assigned
Ans-B 




Q2. OCI Regions are connected using:
A. The public internet
B. VPN tunnels
C. Oracle’s private backbone network---------------------
D. Third‑party ISPs
Ans-C

Q3. Which component provides fault isolation within an Availability Domain?
A. Region
B. Compartment
C. Fault Domain---
D. Subnet
Ans-C


Q4. Which of the following is TRUE about compartments?
A. They are tied to a single region
B. They can span regions
C. They are required for VCN peering
D. They cannot be nested
Ans-B  

Q5. OCI follows which cloud service model primarily?
A. SaaS only
B. IaaS and PaaS
C. On‑prem only
D. Hardware as a Service
Ans-B 

Q6. Availability Domains in OCI are designed to be:
A. Logically separated only
B. Connected using public IPs
C. Physically isolated
D. Dependent on each other
Ans-C

Section 2: Core OCI Services (20 Questions)
Networking
Q7. Which component defines the IP address range of a VCN?
A. Subnet
B. CIDR block
C. Route table
D. Security List
Ans-B 

Q8. Which gateway is required for ingress and egress internet traffic?
A. NAT Gateway
B. Service Gateway
C. Internet Gateway----------------
D. DRG
Ans-C


Q9. DRG is mainly used for:
A. Internet access
B. Private peering within region
C. On‑premises connectivity
D. Load balancing
Ans-C


Q10. Which OCI component acts as a virtual firewall?
A. Route Table--
B. Security List---------------
C. Subnet
D. Compartment
Ans-B 



Q11. Which VCN peering type connects VCNs in different regions?
A. Local Peering
B. Remote Peering
C. NAT Peering
D. Public Peering
Ans-B 


Compute
Q12. Bare Metal instances provide:
A. Shared hardware
B. Dedicated physical servers
C. Serverless execution
D. Containers
Ans-B 


Q13. Which OCI feature improves availability by distributing instances?
A. Autoscaling
B. Fault Domains-----------------
C. Compartments
D. Regions
Ans-B 


Q14. A stopped VM instance retains which resource?
A. Local NVMe
B. Boot Volume-----------
C. Ephemeral IP
D. Temporary storage
Ans-B 

Q15. Horizontal scaling refers to:
A. Increasing CPU only
B. Increasing memory only
C. Adding/removing instances
D. Changing region
Ans-C

Storage
Q16. Object Storage durability in OCI is approximately:
A. 99%
B. 99.9%
C. 99.99%
D. 11 nines (99.999999999%)
Ans-D 

Q17. Boot Volumes are a type of:
A. Object Storage
B. File Storage
C. Block Storage-------------------------
D. Local storage
Ans-C


Q18. File Storage is typically used for:
A. Database redo logs
B. Shared application data------------------
C. Long‑term archiving
D. Object storage workloads
Ans-B

Q19. Which storage type is best for database datafiles?
A. Object Storage
B. File Storage
C. Block Volume
D. Local NVMe only
Ans-C

Load Balancing
Q20. Which OCI load balancer supports SSL termination?
A. Network Load Balancer
B. OCI Load Balancer
C. DRG
D. NAT Gateway
Ans-B 

Q21. Load balancers improve application:
A. Storage capacity
B. Security policies
C. Availability and scalability--------------
D. IAM permissions
Ans-C


Q22. Which health check type is supported by OCI Load Balancer?
A. TCP
B. HTTP
C. HTTPS
D. All of the above
Ans-D 

Section 3: Security & Compliance (10 Questions)
Q23. Who manages physical data centers in OCI?
A. Customers
B. Oracle
C. Partners
D. Government
Ans-B 

Q24. Which OCI service provides temporary, secure access to instances?
A. WAF
B. IAM
C. Bastion--------------------
D. Vault
Ans-C 


Q25. OCI IAM policies grant access based on:
A. IP address
B. User location
C. Group membership--------
D. Instance shape
Ans-C



Q26. What is the default IAM authentication method?
A. Certificate
B. Token
C. Username and password--
D. Biometric
Ans-C 

Q27. Which service encrypts data at rest by default?
A. Object Storage
B. Block Volume
C. File Storage
D. All OCI storage services--
Ans-D 

Q28. Network Security Groups are used to:
A. Control billing
B. Route traffic
C. Control network traffic for resources
D. Create subnets
Ans-C


Q29. Which OCI service provides audit events?
A. Logging
B. Audit
C. Events
D. Monitoring
Ans-B 

Q30. OCI policies follow which principle?
A. Maximum access
B. No restrictions
C. Least privilege
D. Public access
Ans-C


Section 4: Governance & Administration (4 Questions)
Q31. Budgets in OCI are used to:
A. Stop resource creation
B. Monitor and alert on spending
C. Assign IAM roles
D. Create reports
Ans-B 


Q32. Which tool limits the number of resources in a compartment?
A. Budgets
B. Cost Analysis
C. Quotas-------------------
D. Audit
Ans-C


Q33. Which OCI service allows tagging resources for cost tracking?
A. Compartments
B. Regions
C. Tags--
D. Shapes
Ans-C


Q34. OCI Free Tier allows users to:
A. Use all services without limits
B. Test services with limited resources
C. Deploy production systems
D. Avoid billing setup
Ans-B 

Bonus Review (6 Questions)
Q35. What happens if a Security List rule allows ingress but NSG blocks it?
A. Traffic is allowed
B. Traffic is blocked----------------
C. Route table decides
D. IGW controls it
Ans-B 

Q36. Which OCI feature helps meet compliance and audit requirements?
A. Audit service
B. Autoscaling
C. Load Balancer
D. NAT Gateway
Ans-A 

Q37. Object Storage data redundancy is provided:
A. Across compartments
B. Across ADs in a region-------------------
C. Across regions automatically
D. In the same rack only
Ans-B 

Q38. Which resource is created inside a VCN?
A. AD
B. Compartment
C. Subnet
D. Region
Ans-C


Q39. Which OCI service measures CPU, memory, and network metrics?
A. Audit
B. Logging
C. Monitoring
D. Budgets
Ans-C

Q40. To reduce OCI costs, you should:
A. Overprovision resources
B. Use autoscaling-----------
C. Ignore budgets
D. Use only public subnets
Ans-B 

OCI - Interview Questions and Answers - 1

 

Q1. What best describes an OCI Tenancy?
A. A compute instance
B. A root container for all OCI resources
C. A regional data center
D. A billing report
Ans -B

Q2. Which OCI component represents a geographical area?
A. Availability Domain
B. Compartment
C. Region
D. Fault Domain
Ans-C

Q3. Which statement about Availability Domains is true?
A. They share the same physical power source
B. They are isolated from each other within a region
C. They exist across regions
D. They are virtual constructs only
Ans-B

Q4. What is the purpose of compartments?
A. Network isolation
B. Billing separation only
C. Logical isolation and access control
D. Creating availability domains
Ans-C

Q5. A VCN can span which of the following?
A. Multiple regions
B. One region only
C. Multiple tenancies
D. Multiple cloud providers
Ans-B


Q6. Which OCI resource is created automatically when you create a tenancy?
A. VCN
B. Internet Gateway
C. Root compartment
D. Compute instance
Ans-C

Networking
Q7. What is a Virtual Cloud Network (VCN)?
A. A private data center
B. A customer‑defined virtual network
C. A compute instance group
D. A load balancer
Ans-B

Q8. Which gateway allows outbound internet access from a private subnet?
A. Internet Gateway
B. DRG
C. NAT Gateway
D. Service Gateway
Ans-C

Q9. Which OCI gateway provides private access to Object Storage?
A. Internet Gateway
B. NAT Gateway
C. Service Gateway---------------------
D. DRG
Ans-C

Q10. Which component controls traffic routing in OCI?
A. Security List
B. Route Table--------------------
C. NSG
D. DRG
Ans-B

Q11. Which of the following is NOT required for VCN peering?
A. CIDR blocks must overlap
B. Peering gateways
C. Route table updates
D. Security rules
Ans-A

Compute
Q12. OCI Compute provides which options?
A. Virtual machines only
B. Bare metal only
C. Both VM and bare metal
D. Containers only
Ans-C

Q13. In OCI, a “shape” defines:
A. The operating system
B. Network bandwidth only
C. CPU and memory configuration
D. Storage size
Ans-C

Q14. What is the purpose of autoscaling?
A. Manage IAM policies
B. Resize block volumes
C. Adjust compute resources automatically
D. Create backups
Ans-C

Q15. Which component stores the OS for a compute instance?
A. Block Volume
B. Object Storage
C. Boot Volume
D. File Storage
Ans-C

Storage
Q16. Which storage service is best for unstructured data and backups?
A. Block Volume
B. Object Storage
C. File Storage
D. Local NVMe
Ans-B

Q17. Which storage service supports NFS?
A. Object Storage
B. Block Volume
C. File Storage
D. Local NVMe
Ans-C

Q18. Block Volumes can be attached to:
A. Multiple instances simultaneously
B. Only one instance at a time--------------------------------------
C. Object Storage
D. File Storage
Ans-B

Q19. Which OCI storage service is regional?
A. Block Volume
B. Boot Volume
C. Object Storage------------------------
D. Local NVMe
Ans-C

Load Balancing
Q20. Which OCI load balancer works at both Layer 4 and Layer 7?
A. Network Load Balancer
B. Application Load Balancer
C. OCI Load Balancer
D. DRG
Ans-C

Q21. The Network Load Balancer operates at which OSI layer?
A. Layer 1
B. Layer 2
C. Layer 4 --------------
D. Layer 7
Ans-C

Q22. Load balancers are commonly used to:
A. Increase storage capacity
B. Improve availability and distribute traffic
C. Manage IAM users
D. Enable VCN peering
Ans-B

Section 3: Security & Compliance (10 Questions)
Q23. OCI follows which security approach?
A. Oracle‑only responsibility
B. Customer‑only responsibility
C. Shared Responsibility Model----------------------------------------
D. Third‑party security
Ans-C

Q24. Who is responsible for securing customer data in OCI?
A. Oracle
B. Customer
C. Both equally
D. Government
Ans-B

Q25. Which service manages users, groups, and policies?
A. Vault
B. IAM
C. WAF
D. Security List
Ans-B

Q26. IAM policies in OCI are written in:
A. SQL
B. YAML
C. JSON
D. Human‑readable statements
Ans-D

Q27. What is the purpose of OCI Vault?
A. Store VM images
B. Store network configs
C. Manage encryption keys and secrets
D. Store backups
Ans-C

Q28. Which provides firewall rules at the subnet level?
A. NSG
B. Route Table
C. Security List
D. DRG
Ans-C

Q29. Which provides firewall rules at the resource level?
A. Compartment
B. NSG  ----------------------------------
C. Route Table
D. IGW
Ans-B


Q30. Which service protects web applications from attacks?
A. IAM
B. Bastion
C. WAF
D. Vault
Ans-C


Section 4: Governance & Administration (4 Questions)
Q31. OCI pricing follows which model?
A. Fixed monthly pricing
B. Annual subscription
C. Pay‑as‑you‑go
D. Free‑tier only
Ans-C


Q32. Which tool helps visualize OCI spending?
A. IAM
B. Budgets
C. Cost Analysis
D. Quotas
Ans-C



Q33. Which OCI feature sends alerts when spending exceeds limits?
A. Quotas
B. Budgets
C. Compartments
D. Route Tables
Ans-B


Q34. Billing in OCI is associated with which entity?
A. Region
B. Compartment
C. Availability Domain
D. Tenancy-----------------------------------
Ans-D



Bonus Review Questions (6 Questions)
Q35. Which OCI service enables private subnet access to OCI services without internet?
A. IGW
B. NAT Gateway
C. Service Gateway----------------
D. LPG
Ans-C


Q36. What must be avoided when peering VCNs?
A. Route tables
B. Security rules
C. Overlapping CIDR blocks
D. Gateways
Ans-C



Q37. Which resource groups instances inside a subnet?
A. AD
B. Fault Domain-----------------------
C. Compartment
D. VCN
Ans-B




Q38. Which storage option loses data when instance stops?
A. Object Storage
B. Block Volume
C. File Storage
D. Local NVMe-----------------------
Ans-D 


Q39. IAM policies are always scoped to:
A. Region
B. Availability Domain
C. Compartment
D. Shape
Ans-C


Q40. Which OCI tool limits resource usage (not cost)?
A. Budgets
B. Cost Analysis
C. Quotas
D. Billing Reports
Ans-C

Undo Queries

  SQL> SQL> select sum(bytes /(1024*1024*1024)) from dba_undo_extents where status='EXPIRED'; select sum(bytes /(1024*1024*102...