-
How to extract user DDL and all privileges of a user in oracle
We often require to extract information such as User DDL and all privileges granted including roles, system and object privileges, tablespace quota etc. Using the following method we can extract it easily. Create a .sql file and paste the following code inside. Note:- While executing this sql make sure to enter the username in UPPERCASE. vi info.sql… Continue Reading
-
Steps to Clone A Pluggable Database From Existing PDB
Steps to Clone A Pluggable Database From Existing PDB So, I had a requirement for a customer where I had to clone a PDB from existing PDB on same CDB . I followed the following steps to do this. Step 1. Put the PDB in read only mode SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE—————————— ———-PDB$SEED… Continue Reading
-
Oracle datapump error ORA-39077: unable to subscribe agent KUPC$A_1_083325450472000
Oracle datapump error ORA-39077: unable to subscribe agent KUPC$A_1_083325450472000 During import we faced following error. Error Details:- D:\oracle\product\19.3.0\dbhome_1\bin>impdp HOSPITAL/HOSPITAL@ORCL dumpfile=EXP_HOSPITAL_20231113140110_A.DMP logfile=IMP_HOSPITAL_20231113140110_A.LOG directory=dumps Import: Release 19.0.0.0.0 – Production on Mon Nov 13 16:59:16 2023Version 19.13.0.0.0 Copyright (c) 1982, 2021, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – ProductionORA-31626: job does not… Continue Reading
-
batch script to send email notification once if any service goes down and sends mail once service is up
Hi Everyone, Recently I came across an issue where oracle service on windows was getting stopped due to some reason. Since customer was not using any monitoring tool, it was very hard to track when the service was going down. To mitigate the problem , I wrote a batch script which will monitor oracleservice and… Continue Reading
-
Shell script to convert physical standby database into snapshot standby and vice versa
Today I will show a scenario where a customer had a requirement to refresh their snapshot standby database. The setup was 1 primary database and 2 physical standby databases among which one standby database was always kept in physical standby mode but the other one was used by the developer and a daily refresh was… Continue Reading
-
How to purge dba_recyclebin older than 30 days in oracle database 19c
In the following post I will show you how to purge dba_recyclebin older than X number of days. For e.g I want to purge recyclebin data older than 30 days Oracle recommends not to use delete statement on dba_recyclebin as this doesn’t allow to delete data older than 7 days SQL> Delete from dba_recylebin where… Continue Reading
-
Handy Oracle Data guard Broker Commands Part-II
Following command will validate the configuration of the specified database. DGMGRL> validate database ‘db_name’;DGMGRL> validate database proddr; Database Role: Physical standby database Primary Database: prod Ready for Switchover: Yes Ready for Failover: Yes (Primary Running) Flashback Database Status: prod : On proddr: Off Managed by Clusterware: prod : NO proddr: NO Validating static connect identifier… Continue Reading
-
Shell script to purge diagnostic files using ADRCI utility
Using following shell script we can easily purge diagnostic files such as trace, alert, cdump etc. $ vi /home/oracle/adrci_purge.sh #!/usr/bin/ksh#### Description# Shell script to purge ADR contents using ADRCI utility.#### LOCKFILE=/tmp/adrci_purge_.lck ### ####### Start Of Functions## tidyup . common fuction called if error has occuredtidyup () { rm -f ${LOCKFILE} echo “ERROR: Purge aborted at `date` with exit code ${ERR}” exit ${ERR}} #######… Continue Reading
-
How to install and configure Oracle Cloud Infrastructure Storage Gateway: Easily and securely migrate data to the cloud
The Oracle Cloud Infrastructure (OCI) Storage Gateway extends on-premises application data to the cloud. Integration with OCI Object Storage and support for Network File Storage (NFS) makes it easy to securely move files to and from OCI. Data is encrypted both at rest and in-transit, and built-in data integrity checks provides protection. Local caching provides… Continue Reading
-
Set up automatic failover for your application using Oracle Cloud Infrastructure Traffic Management Steering
The Oracle Cloud Infrastructure (OCI) Traffic Management Steering Policies service is a critical component of domain name systems (DNS). Traffic Management Steering Policies service enables you to configure policies to serve intelligent responses to DNS queries, meaning different answers (endpoints) can serve for the query, depending on the logic that the customer defines in the… Continue Reading

