Quantcast
Channel: Hemant's Oracle DBA Blog
Browsing all 151 articles
Browse latest View live

Python with Oracle using sqlalchemy and cx_oracle

 Here is a simple demo of using Python and the sqlalchemy and cx_oracle librariesThis is the code : #import required librariesimport pandas as pdimport cx_Oracleimport sqlalchemyfrom sqlalchemy.exc...

View Article



Primary and Standby in the same RMAN Catalog

 A quick demo of an RMAN Catalog shared by both Primary and Standby databasesFor this demo, the RMAN Catalog is in the "rmanschema" account in the "rmancat" database, accessible from both Primary and...

View Article

OJVM : Loading Java Code and Running it from a Database Session

 Oracle's JVM in the database, available since 8i and also known as "OJVM" allows you (Developer or DBA) to load Java code into the database and execute it from a database session.  Note that any OS...

View Article

Pro*C in Oracle

 Oracle also ships a Pro*C Precompiler that can convert a Pro*C source file to a C source file which can then be compiled  using a C Compiler (e.g  using "gcc").  Of course, you need the Pro*C...

View Article

My Posts on RMAN

 My series of posts on RMAN :1. 1 : Backup Job Details2. 2 : ArchiveLog Deletion Policy3. 3 : The DB_UNIQUE_NAME in Backups to the FRA4. 4 : Recovering from an Incomplete Restore5. 4b : Recovering from...

View Article


RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

 You are attempting to restore a database to another server.  So, you have verified that you have controlfile and datafile backups on the source server  :RMAN> list backup of controlfile;using...

View Article

Tracking the Standby Lag from the Primary

 Here is a quick way of tracking the Standby Lag from the Primary.This relies on the information in V$ARCHIVE_DEST on the Primary.Note that this query will not work if the lag is so great that the...

View Article

Parallel or Direct Path INSERT blocks Conventional INSERT

 Note : This test is in a 19c databaseA session executing Parallel (or Direct Path, with APPEND) INSERT will block conventional insert from another session.(a bit of explanation : A Parallel INSERT is...

View Article


Does a Conventional INSERT block Parallel or Direct Path INSERTs ?

Note : This test is in a 19c database In my previous post, I have demonstrated how a Parallel or Direct Path INSERT blocks a Conventional INSERT.Does a Conventional INSERT block a Parallel or Direct...

View Article


Email Subscriptions to be disabled (per notice from FeedBurner)

 I have received this notice from FeedBurner :Starting in July, we are transitioning FeedBurner onto a more stable, modern infrastructure. This will keep the product up and running for all users, but...

View Article

All Email Subscriptions have been removed

 I have removed email subscriptions to this blog.Please try the "Follow This Blog On follow.it"  link on the right

View Article

A DDL Trigger ... and writing to the alert log file

 Below is sample code for a DDL Trigger that writes to the alert log when a specific condition is encountered.SQL> show userUSER is "SYS"SQL> alter session set container=orclpdb1;Session...

View Article

Performance Hub for On-Premises Database

Previously, I have demonstrated the Performance Hub on an Oracle Autonomous Transaction Processing database on the Oracle Cloud. However, you can use the DBMS_PERF package for a similar report on your...

View Article


Restoring a Standby Database to the Primary

 When you lose the Primary database, you can restore a backup of the Standby to the Primary.First, I start with a backup of the Standby :SQL> select 2 i.host_name, i.status, 3 d.dbid, d.name,...

View Article

Using a Snapshot Standby Database for [destructive] D.R. Testing

 In a previous blog post I have demonstrated how to use the Flashback Database feature to allow you to open a Standby Database for "destructive" testing (whereby you make changes that you want...

View Article


Failover to a Standby with Data Loss

 One scenario I consider when testing a Standby Database -- actually testing a Disaster Recovery  site --  is to simulate complete loss of the Primary Database (at the Production site)Previously, I...

View Article

Creating [1 or more] Additional Standby Database[s]

 In my previous demos, I've shown 1 Standby (STDBYDB) for the Primary (ORCLCDB).However, an organisation may choose to have additional Standby Databases.  Note that each Standby Database must be...

View Article


A Standby that lags the Primary by a deliberate Delay

 As I noted in my previous blog post, with multiple Standby databases, you can have one or more of them, lagging the Primary. This allows the organisation a database that can be quickly opened for data...

View Article

Opening a Lagging Standby Database (to verify data ?)

 As shown in my previous blog post, you can create a Standby Database that lags the Primary by not applying Redo immediately but "waiting" for a specified interval.  It continues to receive and...

View Article

Failover and Database Incarnation

In previous blog posts, I have demonstrated : 1.  Using Flashback Database for [destructive] testing at a Standby2.  Using Snapshot Standby Database for [destructive] testing at a Standby3. Executing a...

View Article
Browsing all 151 articles
Browse latest View live




Latest Images