Wednesday, April 1, 2026

ORA-01194 Error Fix in Oracle 11g/12c – File Needs More Recovery (Step-by-Step)

Fix ORA-01194 error in Oracle Database with step-by-step recovery methods. Learn how to recover database and open with RESETLOGS safely.

Introduction

If you are facing ORA-01194: file needs more recovery to be consistent, this guide will help you fix it step-by-step in Oracle 11g, 12c, and higher versions.

The error ORA-01194: file 1 needs more recovery to be consistent occurs in an Oracle database when you attempt to open the database after incomplete recovery.

This issue typically arises when the database files are not fully synchronized with the required redo or archive logs.

Error Message

ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '<path>/system01.dbf'


Root Cause

According to Oracle Corporation documentation:

  • The database recovery process was incomplete
  • Required redo/archive logs are missing or not applied
  • The datafile was not closed cleanly
  • Backup restoration was not properly followed by recovery

In simple words:
The database is not in a consistent state, and Oracle requires more recovery steps before opening it.

Solution Methods

Method 1: Proper Database Recovery (Recommended)

Step 1: Start Database in Mount Mode

SQL> startup mount;

Step 2: Perform Recovery

SQL> recover database;

If you encounter errors like:

  • ORA-00283
  • ORA-01610
  • ORA-01547
  • ORA-01194

Then proceed with incomplete recovery using backup control file:

Step 3: Recover Using Backup Controlfile

SQL> recover database using backup controlfile until cancel;
  • Press AUTO or provide archive logs when prompted
  • Continue applying logs until no more are required
  • Type:
CANCEL;

 

Step 4: Open Database with RESETLOGS

SQL> alter database open resetlogs;

This method ensures the database becomes consistent by applying all available logs.

Method 2: Force Open Database (Last Resort)

Use this method only when:

  • Required archive logs are missing
  • Normal recovery fails

Step 1: Shutdown & Mount

SQL> shutdown immediate;
SQL> startup mount;

Step 2: Enable Hidden Parameter

SQL> ALTER SYSTEM SET "_allow_resetlogs_corruption"=TRUE SCOPE=SPFILE;
SQL> ALTER SYSTEM SET undo_management=MANUAL SCOPE=SPFILE;

Step 3: Restart Database

SQL> shutdown immediate;
SQL> startup mount;

Step 4: Open with RESETLOGS

SQL> alter database open resetlogs;

Step 5: Reconfigure UNDO

SQL> CREATE UNDO TABLESPACE undo1 
DATAFILE '<path>/undo1.dbf' SIZE 200M AUTOEXTEND ON;
SQL> ALTER SYSTEM SET undo_tablespace=undo1 SCOPE=SPFILE;
SQL> ALTER SYSTEM SET undo_management=AUTO SCOPE=SPFILE;

Step 6: Restart Database

SQL> shutdown immediate;
SQL> startup;

This method forces the database to open but may cause data inconsistency or corruption, so always take a full backup afterward.

Important Notes

  • Always try Method 1 first
  • Ensure all archive logs are available
  • Avoid using _allow_resetlogs_corruption unless absolutely necessary
  • After recovery:
    • Take a full backup immediately
    • Validate database integrity

Conclusion

The ORA-01194 error indicates that your database recovery is incomplete. The safest solution is to apply all required archive logs and open the database using RESETLOGS.

If logs are missing, you can force open the database—but this should only be done as a last resort due to potential data loss.

 

Frequently Asked Questions

Q1: What causes ORA-01194?
        Incomplete recovery or missing archive logs.

Q2: Can I open database without recovery?
        Yes, but only using RESETLOGS with risk of data loss.

Monday, March 30, 2026

MRP: Background Media Recovery process shutdown on Physical standby Dataguard


MRP: Background Media Recovery process shutdown on Physical standby Dataguard

Applies to: 
Oracle Database 10gR2

Description:
RFS process successfully running, archive logs successfully shipped from Primary server to standby, but archive logs did not apply. MRP process going to shutdown automatically. After doing some research work I found the following solution:

Solution:
SQL> alter database recover managed standby database cancel;
SQL> alter database recover managed standby database cancel;
alter database recover managed standby database cancel
*
ERROR at line 1:
ORA-16136: Managed Standby Recovery not active

SQL> alter database recover managed standby database disconnect from session;

Alert log:
alter database recover managed standby database disconnect from session
Sat Jun  9 09:51:56 2012
Attempt to start background Managed Standby Recovery process (PROD)
MRP0 started with pid=18, OS id=6591
Sat Jun  9 09:51:56 2012
MRP0: Background Managed Standby Recovery process started (PROD)
Managed Standby Recovery not using Real Time Apply
MRP0: Background Media Recovery terminated with error 1111
Sat Jun  9 09:52:01 2012
Errors in file /d01/oracle/proddb/10.2.0/admin/PROD_pebsdbdrrt/bdump/prod_mrp0_6591.trc:
ORA-01111: name for data file 59 is unknown - rename to correct file
ORA-01110: data file 59: '/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059'
ORA-01157: cannot identify/lock data file 59 - see DBWR trace file
ORA-01111: name for data file 59 is unknown - rename to correct file
ORA-01110: data file 59: '/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059'
Sat Jun  9 09:52:01 2012
Errors in file /d01/oracle/proddb/10.2.0/admin/PROD_pebsdbdrrt/bdump/prod_mrp0_6591.trc:
ORA-01111: name for data file 59 is unknown - rename to correct file
ORA-01110: data file 59: '/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059'
ORA-01157: cannot identify/lock data file 59 - see DBWR trace file
ORA-01111: name for data file 59 is unknown - rename to correct file
ORA-01110: data file 59: '/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059'
Sat Jun  9 09:52:01 2012
MRP0: Background Media Recovery process shutdown (PROD)
Sat Jun  9 09:52:02 2012
Completed: alter database recover managed standby database disconnect from session

SQL> select thread#,max(sequence#) from v$log_history group by thread#;
   THREAD# MAX(SEQUENCE#)
---------- --------------
248980

SQL> select severity, error_code,message,to_char(timestamp,'DD-MON-YYYY HH24:MI:SS') from v$dataguard_status;

SQL> archive log list

SQL> ho ls -ltra /archive/logs/

SQL> select process,status,sequence# from v$managed_standby;

PROCESS   STATUS        SEQUENCE#
--------- ------------ ----------
ARCH      CONNECTED             0
ARCH      CONNECTED             0
RFS       IDLE                  0
RFS       IDLE                  0

SQL> ho ps -ef|grep mrp
oracle   30350 30330  0 09:24 pts/2    00:00:00 /bin/bash -c ps -ef|grep mrp
oracle   30352 30350  0 09:24 pts/2    00:00:00 grep mrp

SQL> select file#,name from v$datafile where name like '%UNNAMED%';
     FILE#
----------
NAME
--------------------------------------------------------------------------------
        59
/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059
SQL> alter database create datafile '/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059' AS '/data3/proddata/daw_INV_06.dbf';

SQL> alter database recover managed standby database cancel;
alter database recover managed standby database cancel
*
ERROR at line 1:
ORA-16136: Managed Standby Recovery not active

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> select thread#,max(sequence#) from v$log_history group by thread#;

   THREAD# MAX(SEQUENCE#)
---------- --------------
         1         248980
SQL> /

   THREAD# MAX(SEQUENCE#)
---------- --------------
         1         248981


Problem has been resolved, now MRP process started and recovering the archive logs.

Your comments, especially which will help us improve the functionality, will be greatly appreciated :)

Thursday, March 26, 2026

How to Extend Swap space on LVM Disk Linux

How to Extend Swap space on LVM Disk Linux

 Applies to:

            Oracle Database 12.2

            Oracle Linux 7

Description:

            Want to extend Swap space on LVM disk. Assumes that space is available in the volume group on which the current swap partition is located as logical volume.

Solution:

            To extend the amount of swap space in a LVM environment follow the below steps.

To verify the swap space exists and is a logical volume issue the following command:

           

To view the swap volume using fdisk command:

[root@ora12c ~]# fdisk -l

We see that current swap space is 7.88GB and we want to extend 2GB to this swap volume.

Stop or terminate all program/services which are using swap space and then stop existing swap volume using swapoff command.

[root@ora12c ~]# swapoff -a

Now increase the size of current swap space logical volume by 2GB using following command:

You can see that size has been increased by 2GB successfully.

Now to make the volume as a swap partition issue the following command:

Now turn on swap space as:

[root@ora12c ~]# swapon -a

You can also check and verify swap space by free and lsblk command:

 

 

Your comments especially which will help us to improve the functionality and make the post user friendly, will be greatly appreciated J

You are requested to follow my Blog.

Error ORA-06413 Connection not open


Error ORA-06413 Connection not open


Applies to:
            Windows 7 64bit
            Oracle Database 11.2.0.4

Description:
After re-install the windows 7 64-bit, I am unable to connect my Oracle Database instance using Toad 9.7.2.5. TNSNAMES.ora, SQLNET.ora and LISTENER.ora files are configured correctly. - When try to connect my database using Toad it shows the following error:
Error: ORA-06413 Connection not open

Solution:
            I have found that the error caused by the parenthesis in the path:
“C:\Program Files (x86)/..” where Toad install.

To fix the error execute the following command from command prompt to make a link:
C:>mklink /j “Program Files x86” “Program Files (x86)”

Now update shortcut of Toad with new path “C:\Program Files x86\..”

It’s working fine.
           

Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ

Thursday, March 12, 2026

Oracle AI Vector Search - DML and Indexing Strategy

 

The Architect’s Guide to Oracle AI Vector Search: DML & Indexing Strategy

By: Rana Abdul Wahid

Executive Summary

As Generative AI moves from prototype to production, the bottleneck is often the efficient management of high-dimensional vector data. Oracle Database 23ai introduces native AI Vector Search, allowing organizations to manage embeddings with the same ACID-compliant rigor as traditional relational data.

This article provides a technical blueprint for performing DML (Data Manipulation Language) operations and selecting the optimal indexing strategy HNSW vs. IVF to balance search precision with system performance.

  

I. Data Foundation: The VECTOR Data Type

Oracle treats vectors as a native data type. This ensures that your embeddings are stored alongside your business metadata, eliminating the need for external specialized vector databases.

Schema Definition

SQL

CREATE TABLE corporate_knowledge_base (

    doc_id        NUMBER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,

    page_content  CLOB,

    updated_at    TIMESTAMP DEFAULT CURRENT_TIMESTAMP,

    doc_vector    VECTOR(1536, FLOAT32) -- Optimized for OpenAI/Cohere embeddings

);

 

 

II. Mastering Vector DML Operations

Managing a vector store requires more than just "inserts." It requires an understanding of how embeddings are generated and maintained.

1. High-Performance Ingestion (INSERT)

You can insert pre-computed vectors from an external application or use Oracle's internal functions to generate them during the transaction.

  • Literal Entry: Useful when your application layer handles the embedding.
  • In-Database Embedding: Uses a loaded ONNX model to ensure data consistency.

SQL

INSERT INTO corporate_knowledge_base (page_content, doc_vector)

VALUES ('Oracle 23ai integrates AI within the kernel.',

        VECTOR_EMBEDDING(doc_model USING 'Oracle 23ai integrates...' AS data));

2. Strategic Updates (UPDATE)

Vectors must be updated whenever the source text changes or if you migrate to a more advanced embedding model.

SQL

UPDATE corporate_knowledge_base

SET doc_vector = VECTOR_EMBEDDING(new_v2_model USING page_content AS data)

WHERE doc_id = 501;

3. Row-Level Deletion (DELETE)

Standard SQL DELETE commands automatically trigger index maintenance. Oracle’s Vector Memory Pool ensures that when a row is removed, its corresponding entry in the HNSW graph or IVF partition is invalidated or cleaned up.

 

 III. The Indexing Decision: HNSW vs. IVF

Choosing an index is a trade-off between Memory, Latency, and Scale.

Technical Comparison Table

Feature

HNSW (Hierarchical Navigable Small World)

IVF (Inverted File Index)

Architecture

Memory-resident graph structure.

Disk-based centroid partitioning.

Best For

Ultra-low latency requirements.

Massive scale (Billions of rows).

Memory Footprint

High: Requires significant VECTOR_MEMORY_SIZE.

Low: Optimized for standard SGA/PGA.

Search Speed

Superior (Sub-millisecond).

Efficient, but slower than HNSW.

DML Efficiency

Fast, but graph rebuilds are CPU intensive.

Excellent for batch-loading large data.

 

Implementation Examples

SQL

-- Use HNSW for real-time Chatbots/RAG applications

CREATE VECTOR INDEX idx_hnsw_docs ON corporate_knowledge_base (doc_vector)

ORGANIZATION INMEMORY NEIGHBOR GRAPH;

 

-- Use IVF for multi-terabyte archival search

CREATE VECTOR INDEX idx_ivf_archive ON corporate_knowledge_base (doc_vector)

ORGANIZATION NEIGHBOR PARTITIONS;

 

IV. Architectural Workflow Overview

The following diagram illustrates the lifecycle of a Vector DML operation within the Oracle ecosystem:

  1. SQL Execution: The DML command is parsed.
  2. Vector Store: The raw vector is written to the table segment (Permanent Storage).
  3. Index Update: * HNSW: The graph is updated in the Vector Memory Pool.
    • IVF: The vector is assigned to a cluster on disk.
  4. Consistency: Oracle's Multi-Version Concurrency Control (MVCC) ensures search results remain consistent even during heavy DML activity.

 

Conclusion

Oracle AI Vector Search bridges the gap between enterprise data and LLMs. By mastering DML operations and selecting the appropriate index (HNSW for speed, IVF for scale), developers can build RAG (Retrieval-Augmented Generation) systems that are both high-performing and easily maintainable.

#OracleDatabase #AI #VectorSearch #GenerativeAI #DataEngineering #Oracle23ai #CloudComputing

 

Monday, March 9, 2026

Understanding VECTOR Data Types

 

Oracle AI Vector Search


Understanding VECTOR Data Types

A practical overview of vector data types, SQL usage, and similarity search concepts within Oracle

Database.

Introduction to Oracle AI Vector Search

The release of Oracle Database 23ai marks a paradigm shift in how we handle enterprise data. No longer is Artificial Intelligence a "sidecar" process; with AI Vector Search, the database itself becomes the engine for semantic understanding. At the heart of this revolution is the new, native VECTOR data type.

In this article, we will dive deep into the technical specifications, storage formats, and architectural advantages of the VECTOR data type.


  1. What is the VECTOR Data Type?

A vector is a mathematical representation of unstructured data (text, images, audio, or video) encoded as an array of numbers (dimensions). In Oracle 23ai, the VECTOR data type allows these embeddings to be stored, indexed, and queried using standard SQL.

Basic Syntax:

SQL

CREATE TABLE ai_documents (

    id           NUMBER PRIMARY KEY,

    content      CLOB,

    doc_vector   VECTOR(1024, FLOAT32)

);

 

2. Formats and Storage Efficiency

Oracle provides three primary formats to balance accuracy vs. performance. Choosing the right format is critical for storage optimization and search speed:

Format

Storage per Dimension

Use Case

FLOAT64

8 Bytes

Maximum precision; best for scientific or high-accuracy requirements.

FLOAT32

4 Bytes

The standard default; balances precision with performance.

INT8

1 Byte

Optimized for speed; significantly reduces storage footprint.

BINARY

1 Bit

32x smaller than FLOAT32; allows for ultra-fast bitwise distance calculations.

Architect’s Tip: Moving from FLOAT32 to BINARY can accelerate distance computations by up to 40x, though it requires models designed for binary quantization.

 

3. Dense vs. Sparse Vectors

Oracle 23ai supports both modern embedding architectures:

  • Dense Vectors: Most common for semantic search (e.g., BERT, Ada). Every dimension has a value.
  • Sparse Vectors: Used for keyword-sensitive searches (e.g., SPLADE). Only non-zero values are stored, saving massive amounts of space in high-dimensional vocabularies.

 

4. Why Native Integration Matters?

As an Oracle professional, the biggest advantage I see is the Converged Database approach. By using a native data type instead of a separate vector database:

  1. ACID Compliance: Your vectors stay in sync with your relational data.
  2. Security: Oracle’s Virtual Private Database (VPD) and Transparent Data Encryption (TDE) apply to vectors automatically.
  3. Unified Queries: You can join a VECTOR column with a JSON document or a relational MARKET_DATA table in a single SQL statement.

 

5. Similarity Search in Action

Once stored, we use specialized distance functions to find "meaning" rather than keywords:

  • COSINE_DISTANCE: Best for text/natural language.
  • EUCLIDEAN_DISTANCE: Ideal for spatial or image data.
  • DOT_PRODUCT: Used for normalized vectors.

 

Conclusion

The VECTOR data type is the foundation of Retrieval-Augmented Generation (RAG) within the Oracle ecosystem. For architects, it simplifies the stack by eliminating the need for complex ETL pipelines between the database and external AI tools.

 

ORA-01194 Error Fix in Oracle 11g/12c – File Needs More Recovery (Step-by-Step)

Fix ORA-01194 error in Oracle Database with step-by-step recovery methods. Learn how to recover database and open with RESETLOGS safely. I...