Skip to main content

Posts

Showing posts from October, 2022

Connect to private instance in OCI using bastion service

By Gowthami | apps-dba.com | Oracle Cloud Infrastructure Series Connecting to private OCI compute instances without a public IP is a common security requirement. OCI Bastion Service provides a fully managed, secure way to access private resources without requiring a jump server or VPN. This post walks through setting up and using OCI Bastion to connect to a private instance. What You Will Learn: How to create an OCI Bastion, create a managed SSH session, and connect to a private compute instance using the OCI Bastion Service—no public IP or VPN required. What Is OCI Bastion Service? OCI Bastion is a managed service that provides restricted, time-limited SSH access to private resources in your VCN. Key features: No need for a public IP on the target instance Sessions are time-limited (max 3 hours by default) Access is logged and auditable via OCI Audit Supports SSH port forwarding for database connections Prerequisites A private OCI compute instance (no public IP...

Modify AWR interval and retention periods in 12C

By Gowthami | apps-dba.com | Oracle Database Administration Series AWR (Automatic Workload Repository) is Oracle's built-in performance data collection framework. By default, AWR snapshots are taken every 60 minutes and retained for 8 days. For detailed performance analysis or compliance requirements, DBAs often need to adjust these settings. This post covers how to modify AWR snapshot interval and retention in Oracle 12c. What You Will Learn: How to view current AWR settings, modify the snapshot interval and retention period using DBMS_WORKLOAD_REPOSITORY, and verify the changes in Oracle Database 12c. Default AWR Settings Parameter Default Value Description Snapshot Interval 60 minutes How often AWR takes a snapshot Retention Period 8 days (11520 minutes) How long snapshots are kept Top SQL Top 30 Number of top SQL statements captured Check Current AWR Settings Query the DBA_HIST_WR_CONTROL view to see current configuration: SQL> SELECT dbid, sna...

Create New OS User, Enable SSH and Generate Key Pair in OCI Compute Instance

=> Here I am creating a user called xxtomcat under new group xxtomcat Note : Below commands to be run as root user. Login as opc and switch to root [opc@oci-compute-host-001 ~]# sudo su - root [root@oci-compute-host-001 ~]# groupadd xxtomcat [root@oci-compute-host-001 ~]# useradd -g xxtomcat -d /home/xxtomcat xxtomcat [root@oci-compute-host-001 ~]# id xxtomcat uid=54324(xxtomcat) gid=54332(xxtomcat) groups=54332(xxtomcat) [root@oci-compute-host-001 ~]# => Create .ssh directory under $HOME directory and give 0700 permissions.  Note 1 : Below commands should be run as xxtomcat user Note 2 : These permissions are required for Public and Private Key authentication to work. [xxtomcat@oci-compute-host-001 ~]$ mkdir .ssh [xxtomcat@oci-compute-host-001 ~]$ chmod 0700 .ssh [xxtomcat@oci-compute-host-001 ~]$ cd .ssh => Create authorized_keys under .ssh directory and give 0600 permissions Note 1 : Below commands should be run as xxtomcat user Note 2 : These permissions are ...