Posts

Showing posts from December, 2024

ORA-05031 error in Oracle Autonomous Database

  The ORA-05031 error in Oracle Autonomous Database indicates that the SGA (System Global Area) usage for a Pluggable Database (PDB) has exceeded its limit. This issue can arise due to resource constraints or misconfiguration and can significantly impact the performance of your database, especially during resource-intensive operations like Oracle Data Pump. Here are some steps to address and prevent this issue: mmediate Actions Check Resource Usage: Use the following query to monitor the SGA usage: SELECT NAME, VALUE / 1024 / 1024 AS VALUE_MB FROM V$SYSSTAT WHERE NAME IN ( 'session pga memory' , 'session pga memory max' , 'session uga memory' , 'session uga memory max' ); Verify if the SGA_TARGET or MEMORY_TARGET settings are close to the configured limits. Terminate Long-Running Sessions: Identify and terminate any runaway sessions or jobs that are consuming excessive resources: SELECT SID, SERIAL#, PROGRAM, STATUS, SQL_ID FROM V$SESSION W...

Upgrade Pluggable Database to Oracle Database 23ai

  Here’s a simplified way to upgrade your Oracle Database in OCI to Oracle Database 23c AI using a refreshable clone PDB and AutoUpgrade. Benefits of This Approach: Reduced Downtime: It minimizes downtime compared to an in-place upgrade. New Base Database System: You’ll get a new system with an updated OS and Oracle Grid Infrastructure version. You can use this approach for a Base Database Service, Exadata Database Service, Exadata Cloud@Customer, or any Oracle Database option. My Environment PDB to Upgrade: SALES Source: Version: 19.23.0 Name: DBS19 Target: Version: 23.4.0 Name: DBS23 Steps to Upgrade: 1. Prepare AutoUpgrade Download the latest version of AutoUpgrade from My Oracle Support. Copy it to both source and target systems, optionally placing it in $ORACLE_HOME/rdbms/admin . Create an AutoUpgrade config file ( sales.cfg ), and save it on both servers: global.autoupg_log_dir=/u01/app/oracle/cfgtoollogs/autoupgrade global.keystore=/u01/app/oracle/cfgtoollogs/keystore...

Key points on Read-Only Instance and Read-Only Database

 In Oracle, both Read-Only Instance and Read-Only Database provide mechanisms to limit data modifications, but they are used in different contexts and for different purposes. Here's a comparison: 1. Read-Only Instance Definition : A read-only instance is a configuration in Oracle Real Application Clusters (RAC) where one or more instances of a multi-instance database are set up to operate in read-only mode. This is typically done in environments with high concurrency for both read and write operations. Key Features : Allows real-time query scaling by dedicating specific instances to read-only operations. Write operations are not allowed on the designated read-only instance, but other instances in the cluster can still handle write operations. Useful in RAC configurations for load balancing , where read workloads can be distributed across multiple read-only instances. Instance-specific: The database remains fully functional (read-write) when accessed through other instances. Us...

Steps to create database link between Oracle database and SQL Server

 Creating a database link between SQL Server and Oracle allows seamless data exchange between the two systems. Here’s a step-by-step guide: Step 1: Install the Required Drivers Install Oracle Database Gateway for SQL Server (ODG4MS). This acts as a bridge between Oracle and SQL Server. Ensure the Oracle Client is installed on the Oracle database server or the server acting as the gateway. Step 2: Configure the Oracle Database Gateway Locate Configuration Files: Navigate to the $ORACLE_HOME/network/admin directory on the Oracle Gateway server. Edit tnsnames.ora: Add an entry for the database link pointing to the SQL Server database: dg4msql =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = <SQL_SERVER_HOSTNAME>)(PORT = 1521))     (CONNECT_DATA = (SID = dg4msql))     (HS=OK)  -- Required for heterogeneous services   )   Edit listener.ora: Update the Oracle listener configuration to recognize the gateway: SID_LIST_LISTENE...