Wednesday, 20 November 2024

oracle database 23ai new features for administrators

Oracle Database 23ai brings over 300 new features, focusing heavily on AI integration, simplifying developer operations, and strengthening database administration. Key administration highlights include built-in AI SQL firewalls, True Cache for application scaling, AI-driven auto-indexing, and simplified Schema-level privilege

The most impactful enhancements for Database Administrators (DBAs) are detailed below:


Security & Governance

  • Oracle SQL Firewall: Built directly into the database kernel, this inspects incoming connections and SQL statements against an allowlist of approved commands, actively blocking unauthorized execution and potential SQL injection attacks.
  • Schema Privileges: You can now grant access to all existing and future objects within a single schema using a single command, vastly reducing the administrative overhead of individual privilege management.
  • Passwordless Authentication: Streamlines security compliance by supporting biometric logins (Face ID, fingerprints), hardware security keys (YubiKey), and OAuth-based logins.
  • Immutable Backups: RMAN now supports immutable storage integration with OCI Object Storage, preventing backups from being deleted or modified during a ransomware event


 Performance & Caching
  • Oracle True Cache: A diskless, read-only cache layer you can deploy at the middle tier. It automatically maintains data consistency with the primary database, improving application response times and reducing the workload on database servers.
  • AI-Driven Auto-Index Optimization: The database can now learn query patterns and dynamically create or drop indexes based on workload, mitigating under-indexing (which slows queries) and over-indexing (which slows updates).

Operational Management
  • Data Pump Enhancements: Troubleshooting is much faster with three new views (V$DATAPUMP_PROCESS_INFO, V$DATAPUMP_PROCESSWAIT_INFO, and V$DATAPUMP_SESSIONWAIT_INFO) which expose Data Pump processes and wait events to identify bottlenecks quickly.
  • Read-Only PDBs: Administrators can make individual Pluggable Database (PDB) users or entire connected sessions strictly read-only, preventing unwanted write operations.
  • AutoUpgrade Utility Enhancements: Upgrading to 23ai from versions 19c or 21c is highly streamlined using the updated AutoUpgrade tool, and patching is simplified with proactively provided monthly updates
 AI Workloads & Operations
  • AI Vector Search: Allows the database to store and query semantic meanings of unstructured data (text, images) alongside relational predicates, all without needing an external vector database.
  • SQL AI Syntax: You can interact with and query the database directly using natural language queries, speeding up day-to-day administrative exploration

Oracle Database 23ai brings critical enhancements to Real Application Clusters (RAC) administration, focusing on patching, containerization, and automated disaster recovery. For database administrators, these updates significantly streamline cluster operations and improve high availability without requiring major infrastructure overhauls

Key RAC features for administrators in 23ai include:
  • Rolling Patching for Complex Changes: Administrators can now perform rolling patches for complex grid infrastructure modifications, minimizing downtime and human intervention.
  • DBMS_ROLLING Integration with Transparent Application Continuity (TAC): This integration allows for completely seamless, uninterrupted database operations during rolling upgrades or patching, routing sessions transparently without application disruption.
  • Reduced Grid Infrastructure Disk Footprint: The GI disk footprint has been reduced by more than 50% compared to previous versions. This enables up to 33% faster initial installations and significantly quicker "add node" operations.
  • Lightweight Container Support: The highly optimized disk footprint makes deploying RAC environments in containers—such as Docker or Podman—faster, lighter, and much more practical for testing and dev or microservices architectures.
  • RAC Fast Pluggable Database Open: Administrators can now manage pluggable database (PDB) opening and closing operations in RAC environments much faster, localizing PDB status changes without impacting the whole CDB instance.
  • True Cache Integration: For read-heavy, latency-sensitive applications, administrators can leverage Oracle True Cache, a middle-tier, in-memory cache that automatically scales with RAC environments without requiring complex application change

Oracle Database 23ai introduces several architectural changes and features specifically related to memory structures that assist administrators in optimizing performance for AI and mission-critical workloads. 

New Memory Structures & Frameworks
  • Managed Global Area (MGA): This is a significant addition to the Oracle Database Architecture. The MGA is a memory framework designed to share and coordinate memory across a set of trusted Oracle processes, improving efficiency in modern, high-concurrency environments.
  • Oracle True Cache: A new, high-performance, middle-tier caching solution. It functions as a read-only, memory-consistent replica of the primary database, satisfying queries directly from its own buffer cache to reduce the load on the main database server.
  • AI Vector Search Memory speed: Support for high-speed vector searches in memory. Specifically on Exadata platforms, this includes "Memory Speed Vector Search," which leverages memory-optimized structures to handle multi-dimensional vector mappings for AI similarity searches
Memory-Related Performance Improvements 
  • In-Memory Columnar Speed for JSON: The database now provides In-Memory Columnar speed for JSON queries, allowing JSON data to be stored and processed in the In-Memory Column Store using optimized columnar formats.
  • Fast Ingest (Memoptimized Rowstore) Enhancements: Improvements to the Memoptimized Rowstore now include support for direct in-memory column store population and fast flush using direct writes, which streamlines high-frequency data ingestion.
  • Large Column Fetch Efficiency: Internal protocol changes have made fetching large columns more efficient for modern drivers, reducing the memory overhead during large-scale data transfer
Administrative Controls
  • Automatic KEEP Object Load: On Exadata systems, administrators can benefit from the automatic loading of "KEEP" objects into Flash Cache, ensuring critical data remains in the fastest memory-adjacent storage.
  • Lock-Free Column Value Reservations: This feature allows for the creation of rules for data row locking, which improves memory throughput and reduces contention in high-volume transaction environments.
  • Memory Usage Monitoring: New administrative scripts and documentation are available to monitor and manage the System Global Area (SGA) and Program Global Area (PGA) more effectively
 

1. AI & Performance Management
  • AI Vector Search: Allows direct storage, indexing, and querying of vector data alongside relational data, enabling semantic search capabilities without moving data to specialized vector databases.
  • Automatic SQL Plan Management (SPM): The database actively monitors and auto-repairs suboptimal query execution plans to improve stability.
  • True Cache: A memory-only, read-only cache that offloads read workloads and satisfies queries locally

Upgrading to Oracle Database 23ai requires a source version of Oracle 19c or 21c. The upgrade process is streamlined using the Oracle AutoUpgrade Utility, which automates pre-checks, fixups, and post-upgrade steps, replacing the older DBUA tool
Upgrade Considerations
  • Direct Path: You can upgrade directly from Oracle 19c or 21c to 23ai. Direct upgrades from older releases (like 11g or 12c) require an intermediate upgrade step.
  • AutoUpgrade Process: The recommended method involves executing the AutoUpgrade Utility in -mode analyze to generate reports and fix potential pre-upgrade issues before pushing to deployment.
  • Client and Grid Infrastructure: If running RAC, Grid Infrastructure must be upgraded prior to the database upgrade. It is also highly recommended to upgrade client software for full interoperability


Oracle Database 23ai introduces several performance monitoring and administrative enhancements focused on AI-driven automation, real-time diagnostics, and streamlined data management. 

Key Performance Monitoring Features
  • Automatic SQL Plan Management (SPM): The system can now automatically detect and correct suboptimal SQL plans by providing real-time optimization.
  • Real-Time SQL Monitoring & Statistics: Enhanced tools for tracking query performance as it happens, including improved diagnostics and real-time statistics to identify bottlenecks quickly.
  • SQL Performance Watch: A new feature to help DBAs monitor and maintain consistent performance during and after database upgrades.
  • True Cache: A middle-tier caching solution that satisfies queries using a read-only replication of the primary database's buffer cache, significantly improving application response times and reducing server load.
  • Enhanced Observability: New observability dashboards and telemetry provide proactive alerting and resource monitoring
Administrative & Performance Enhancements
  • Lock-Free Column Value Reservations: Allows developers and administrators to create rules for row locking, improving throughput and end-user experience for high-concurrency workloads.
  • Priority Transactions: Enables automatic prioritization of urgent transactions to prevent them from being blocked by lower-priority row access.
  • Data Pump Performance Views: Three new views—(G)V$DATAPUMP_PROCESS_INFO, (G)V$DATAPUMP_PROCESSWAIT_INFO, and (G)V$DATAPUMP_SESSIONWAIT_INFO—help administrators identify bottlenecks and troubleshoot Data Pump operations more effectively.
  • Automatic Transaction Quarantine: Automatically handles problematic transactions that might otherwise impact system stability.
  • Unrestricted Parallel DMLs: Improvements to parallel data manipulation language (DML) and direct loads to enhance data processing speed.Flashback Log Placement: Administrators can now manage Flashback database logs outside the Fast Recovery Area (FRA) for better storage flexibility


To compare performance and resolve issues after an upgrade to Oracle Database 23ai,


To compare performance and resolve issues after an upgrade to Oracle Database 23ai, you should use Oracle's built-in performance validation tools. These tools allow you to compare a "before" (pre-upgrade) baseline with an "after" (post-upgrade) trial to pinpoint regressions

Core Tools for Comparison
  • SQL Performance Analyzer (SPA): This is the primary tool for identifying SQL regressions. It captures a representative workload into a SQL Tuning Set (STS) from your pre-upgrade environment and re-executes it in 23ai to generate a comparison report.
  • SQL Performance Watch: A feature within OCI Database Management and Enterprise Manager that helps automate the comparison of workload performance across two time periods (pre- and post-upgrade).
  • Database Replay: For high-load environments, this tool captures actual production concurrency and re-plays it on the upgraded 23ai system to identify system-level bottlenecks that single SQL execution might miss
Comparison Workflow
  1. Capture Baseline: Use your pre-upgrade system (e.g., 19c) to capture a representative workload during peak time into an STS.
  2. Execute Post-Upgrade Trial: Import the STS into the 23ai database and run a "trial" execution. Tools like SQL Performance Analyzer will generate the execution plans and statistics for the new version.
  3. Generate Comparison Report: Run a comparison task to view the net impact. Focus on metrics like Elapsed Time, CPU time, and changes in execution plan hash values.
  4. Identify Regressions: Review the report for SQL statements with "Regressed" status. These are queries that performed better in the previous version
Post-Upgrade Performance Fixes
If you find performance issues after the move to 23ai:
  • Gather Fixed Object Statistics: Run DBMS_STATS.GATHER_FIXED_OBJECTS_STATS after the system has run a representative workload in 23ai. This helps the optimizer understand the internal memory structures of the new version.
  • Gather Dictionary Statistics: Use DBMS_STATS.GATHER_DICTIONARY_STATS to ensure the data dictionary metadata is accurately represented for the 23ai optimizer.
  • SQL Tuning: Use the SQL Tuning Advisor or SQL Plan Management (SPM) to force the 23ai engine to use a better-performing plan if a regression is found.
  • Check Initialization Parameters: Ensure parameters that affect performance haven't changed defaults significantly during the upgrade


How to transfer optimizer statistics and execution plans from your source database to your 23ai target database


 you can absolutely transfer both optimizer statistics and execution plans from your source database to your 23ai target database. This is a standard and highly recommended practice to prevent performance regressions following an upgrade

Method 1: Transferring Optimizer Statistics
You can move statistics by exporting them from the source data dictionary to a temporary staging table, moving that table via Data Pump, and importing it into the target.
1. Create a staging table on the Source:
EXEC DBMS_STATS.CREATE_STAT_TABLE('SYSTEM', 'MY_STAT_TABLE');

2. Export statistics from the Source (Schema Level):
EXEC DBMS_STATS.EXPORT_SCHEMA_STATS(ownname=>'YOUR_SCHEMA', stattab=>'MY_STAT_TABLE', statid=>'SOURCE_STATS', ownname_old=>'SYSTEM');

(Note: You can also export by table or database using EXPORT_TABLE_STATS or EXPORT_DATABASE_STATS.)
3. Move and Import to Target:
  • Use Oracle Data Pump (expdp/impdp) to export MY_STAT_TABLE from the source, transfer the .dmp file, and import it into the target database.
  • Once imported, apply the statistics to your 23ai target's data dictionary
sql
EXEC DBMS_STATS.IMPORT_SCHEMA_STATS(ownname=>'YOUR_SCHEMA', stattab=>'MY_STAT_TABLE', statid=>'SOURCE_STATS', ownname_old=>'SYSTEM');

Method 2: Transferring Execution Plans (SQL Plan Management)
To lock in exact execution plans that were performing well on your source version, you can capture them as SQL Plan Baselines and migrate them. [1]
1. Load plans into a SQL Tuning Set (STS) on the Source:

sql
BEGIN
  DBMS_SQLTUNE.CREATE_SQLSET(sqlset_name => 'GOOD_PLANS_STS');
END;
/

DECLARE
  l_cursor DBMS_SQLTUNE.SQLSET_CURSOR;
BEGIN
  OPEN l_cursor FOR
    SELECT VALUE(p) FROM TABLE(DBMS_SQLTUNE.SELECT_CURSOR_CACHE('sql_id = ''YOUR_SQL_ID''')) p;
  DBMS_SQLTUNE.LOAD_SQLSET(sqlset_name => 'GOOD_PLANS_STS', populate_cursor => l_cursor);
END;
/

2. Transport and Unpack:
  • Package the STS into a staging table using DBMS_SQLTUNE.PACK_STGTAB_SQLSET and export it using Data Pump.
  • Import the Data Pump file into your 23ai target database and unpack it using DBMS_SQLTUNE.UNPACK_STGTAB_SQLSET. [1]
3. Evolve into Baselines on the Target:
  • Once the SQL Tuning Set is on your 23ai target, you can easily load those historical plans as active baselines: [1]

DECLARE l_plans PLS_INTEGER; BEGIN l_plans := DBMS_SPM.LOAD_COV_SQLSET(sqlset_name => 'GOOD_PLANS_STS'); END; /


Pro-Tip for 23ai Post-Upgrade Performance
Before importing your source statistics, ensure that your 23ai database has its fixed object statistics properly gathered. Because the 23ai data dictionary and internal memory architectures (fixed tables) differ from older releases, running this after upgrading prevents critical performance degradation
sql
EXEC DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;



For more details

https://learn.oracle.com/ols/course/oracle-database-23ai-new-features-for-administrators/127088/133283

Thursday, 19 September 2024

Oracle DB RAC Server Reboot Process

 ORACLE RAC DATABASE SERVER REBOOT PROCESS

-----------------------------------------

Current RAC 4 node Setup

• FOR EASYDB (4-NODE RAC DATABASE on ASM) with four Node Standby Database


➢ DOWN PROCESS:


1) Check log sequence number of all four nodes and make sure it is in sync (DC & DR).


SQL> SELECT MAX(SEQUENCE#),THREAD# FROM V$LOGHIST GROUP BY THREAD#; (both DC & DR).


2) DEFER dataguard (DC side).


SQL> ALTER SYSTEM SET log_archive_dest_state_2='DEFER' SID='*';


3) Stop MRP process (DR side).


SQL> alter database recover managed standby database cancel;


4) Down all Instances.


Login with ‘oracle’ session on master node i.e., EASYNODE1:


EASYNODE1:/home/oracle#srvctl stop database –d EASYDB (both DC & DR).


5) Dismount diskgroups such as EASYDBDATA_DG1, EASYDBDATA_DG2,

EASYDBFRA_DGNEW, EASYDBREDO_DGNEW, and EASYDBTEMP_DGNEW.


Login with ‘orarac’ session and connect to ‘sqlplus / as sysasm’:


SQL> alter diskgroup EASYDBDATA_DG1 dismount;

SQL> alter diskgroup EASYDBDATA_DG2 dismount;

SQL> alter diskgroup EASYDBFRA_DGNEW dismount;

SQL> alter diskgroup EASYDBREDO_DGNEW dismount;

SQL> alter diskgroup EASYDBTEMP_DGNEW dismount;


6) Stop ASM service.


Login with ‘orarac’ session on master node i.e., EASYNODE1:


EASYNODE1:/home/orarac#srvctl stop asm


7) Stop cluster service and handover to UNIX team for reboot the nodes.


Login with ‘orarac’ session on master node i.e., EASYNODE1:


EASYNODE1:/home/orarac#srvctl stop asm

EASYNODE1:/home/orarac#crsctl stop cluster all


or 


stop cluster/crs on all node by root user after shutting down database .


cd /GRIDHOME/bin

./crsctl stop crs - run on each node or one by one as per requirement



➢ UP PROCESS:


1) After get back the servers from UNIX team, First check binary mount points


such as ‘/oracle’ & ‘/asm_grid’ from all 4 nodes.


EASYNODE1:/home/dxc_subhankar#df –gt


2) Start cluster services if it is not started automatically


Login with ‘orarac’ session:


EASYNODE1:/home/orarac#crsctl start cluster all


3) Start ASM services.


Login with ‘orarac’ session on master node i.e., EASYNODE1:

EASYNODE1:/home/orarac#srvctl start asm


4) Mount diskgroups such as EASYDBDATA_DG1, EASYDBDATA_DG2, EASYDBFRA_DGNEW,EASYDBREDO_DGNEW, and EASYDBTEMP_DGNEW.


Login with ‘orarac’ session and connect to ‘sqlplus / as sysasm’:


SQL> alter diskgroup EASYDBDATA_DG1 mount;

SQL> alter diskgroup EASYDBDATA_DG2 mount;

SQL> alter diskgroup EASYDBFRA_DGNEW mount;

SQL> alter diskgroup EASYDBREDO_DGNEW mount;

SQL> alter diskgroup EASYDBTEMP_DGNEW mount;


or 

start the clusterware if it is not started from root user

cd $ORACLE_GRID/bin

./crsctl start crs -- run it on all node or one by one based on requirement


5) UP all Instances.


Login with ‘oracle’ session on master node i.e., EASYNODE1:

EASYNODE1:/home/oracle#srvctl start database –d EASYDB (both DC & DR).


6) ENABLE dataguard (DC side).


SQL> ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SID='*';


7) Start MRP process (DR side).


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


8) Do some alter switch (DC side) and check archives are receiving (DR side).


SQL> alter system switch logfile;


9) Do tnsping to check network connectivity, if everything looks fine handover to application team. 


General Oracle DB Check And Recommendation

 General DB Check And Recommendation

------------------------------------------------


Database Configuration Analysis

------------------------------

1 Optimize Redo Logs

2 Table Partitioning for Big table


Database Performance Analysis.

--------------------------------

3 Check Stale Statistics for Tables

4 Check Fragmented Tables/ Index

5 Check Statistics for SYS tables

6 Check User objects in SYSTEM tablespace 

7 Check Un-indexed foreign keys  

select * from (

select ct.table_name, co.column_name, co.position column_position

from user_constraints ct, user_cons_columns co

where ct.constraint_name = co.constraint_name

and ct.constraint_type = 'R'

minus

select ui.table_name, uic.column_name, uic.column_position

from user_indexes ui, user_ind_columns uic

where ui.index_name = uic.index_name

)


Best Practices

-----------------

8 use Switchover Verify during switch over  

9 Check Temp file mismatch on nodes  

10 OS Watcher need to be installed on each node  

11 Backup Table Deletion from Database

12 Block Corruption Check  

13 Purge Recyclebin regularly

14      check Hardparsing for SQL


Other Recommendation

---------------------

15 check Compatibility parameter

16 Check Sequence Cache

17 DOP Removal from object

18 Check Invalid Object 

19 Check AWR Rentention

20 Check Datafiles count in each Tablespace 

21 Table space usages

22 Undo TS Mismatch on each node  

23 Puging for large table  

24 ASM Space usages  

25 Unusable Indexes

26 Invisible indexes

27 Check Default Degree for table

28      Check ORA-ERRORS in alert log

30 Check Auto extensible for datafiles

31 Check Redo Transport Destination

32 set hidden _use_single_log_writer value to  true if it is not set

33 check archive_lag_target parameter


Oracle DB Role And Reponsibility

 SL No. Most common Activity Performed by Database Team 

1 Server load monitoring and Memory Utilization.

2 File system monitoring and space management (by deleting old archive) as per database growth.

3 Connecting SQL Plus console to perform Database activity.

4 Monitoring Database through  SAM (Simple Automated Manager).

5 Current SQL Activity (To check which sql is running and finding query cost).                                

6 Tablespace Status and its Management (like tablespace creation, allocated sapce ,max extent,fee space)

7 Datafile addition based on growth of database.

8 Parallel process Status.

9 Lock - Transaction Lock check & Release.

10 Lock - DD Lock check & Release.

11 Lock - Table Lock check & Release Using Synonym.

12 checking Latches on database and release.

13 Checking Blocking session by other instance or on same instance and release it.

14 Lock -Unknown locks release.

15 Lock Clear Based on SOL_ID,

16 ABH Sessions and Finacle Branches and Sessions.

17 Resource Status ( Max process,Max sessions and other resource).

18 Events and it's details.

19 User account - Check user account status & privileges.

20 Create  and drop  Database user.

21 Lock and unlock Database User.

22 Grant and Revoke privileges to Database User (like select ,upadate,delete.insert )

23 Table analysis and including partition Table.

24 After Monitoring Database generating Health Status Report.

25 DC and DR Sync Status.

26 Checking Temporary tablespace status.

27 Checking Sequence information.

28 Monitoring Long running sql full table scans.

29 Database objects details(like Object Name,Object Type).

30 Archive gap between DC and DR database.

31 Index Information.

32 ASM Disks Status (like ASM Free Space,ASM Disks Status,ASM DBFile Info,ASM Disk Groups).

33 Release Space from ASM Disk Groups by removing OLD Archive.

34 Wait Session Monitoring.

35 Job Monitoring.

36 Generate Performance Statistics Reports.                                          

37 Table Information in Detail.

38 Clear active inactive sessions before down the database.

39 Clear inactive session after requesting by application Team.

40 Configure Job using Crontab.

41 Running  Rman backup on scheduled time and checking confirmation.

42 Complete database analysis on Sunday.

43 down the database to take cold backup after DC-DR in sync

44 index creation and drop as per CR.

45 Table creation purging and truncation.

46 Table insertion and deletion activity.

47 DC-DR drill activity.

48 TDE Encryption implementation.

49 Masking Activity.

50 Database Migration, Upgradation

51 Patching activity on ASM level and database level.

52 Sql tuning after bad sql observation.

53 Awr report ,ASH report,ADDM report.

54 Generating Global AWR report.

55 sqltrt report for problemtic  Sql_id.

56 Database log monitoring .

57 Report Database refresh on daily basis.

58 Database restoration as per request on quarterly Basis.

59 Db link creation and its management ( like Tns entries ,user creation based on requirement).

60 check listener status.

61 raising oracle support for bug fix and other performance issue.

62 Filesystem Utilization monitoring and audit / listener log purging proactively

63 checking SQL plan for specific SQL if plan changes , need to set profile.

------------------

S.No DAILY ACTIVITY Resource Type

-----------------------------------------------------------------------------

1 Oracle Database instance is running or not L1/L2

2 Database Listener is running or not. L1/L2

3 Check any session blocking the other session L1/L2

4 Check the alert log for an error L1/L2

5 Monitor DBA jobs / DBA Scheduler Jobs running status and take proactive/reactive action.L1/L2

6 Check the Top session using more Physical I/O L1/L2

7 Check the number of log switch per hour L1/L2

8 How_much_redo_generated_per_hour.sql L1/L2

9 Tablespace utilization L1/L2

10 Detect lock objects L1/L2

11 Check the SQL query consuming lot of resources. L2/L3

12 Check the usage of SGA L1/L2

13 Display database sessions using rollback segments L1/L2

14 State of all the DB Block Buffer L2/L3

15 DataGuard Sync Status L1/L2

16 Temp Tablespace Size and utilization L1/L2

17 Long running session L1/L2

18 Database status & DB Role (Mount, Open, Primary /Standby) L1/L2

19 FRA utilization L1/L2

20 Wait event on databases, is it available? L1/L2

21 Ensure the flash backup and RMAN backup status [ In case of any other 

backup strategies respective monitoring should be in place] L1/L2

22 Materialized View Refresh / Refresh Group / Job status monitoring and proactive action.L1/L2

23 Filesystem Utilization monitoring and audit / listener log purging proactively L1/L2


WEEKLY ACTIVITY Resource Type

-----------------------------------------------------------------------

1 Check the objects fragmented       L2

2 Check the Chaining & Migrated Rows L2

3 Check the tables having more Indexes and take consultation as and when require with Next Level.L2

4 Check for unindexed FK L2

5 Check the objects having the more extents and take consultation as and when require with L3.L2

6 Check the free space at O/s Level          L1/L2

7 Check the CPU, Memory usage at O/s level to monitor the threshold and proactively act on it. L1/L2

8 Check for UNUSABLE INDEXES & Invisible indexes L2

9 Check the objects reaching to it’s Max extents              L2

10 Generating Statistics L1


MONTHLY ACTIVITY Resource Type

-------------------------------------------------------------------------------------------------

1 Find Tablespace Status, segment management, initial & Max Extents and Extent Management L2

2 Check default tablespace & temporary tablespace of each user L1/L2

3 Check for fragmentation of Indexes L2

4 Check Patch status of database & bug fixation L2

5 Check for Block corruption periodically L2


General Checks L1/L2

----------------------

➢ Check for Backup Tables in the database and send report to bank 

➢ Check for Compatible Parameter 

➢ Check for Purge Recycle bin

➢ Check for Invalid Objects

➢ Check for User objects in SYSTEM tablespace

➢ Check for Archive Generation 

➢ Check for db_files max number

➢ Check for Max db_files per tablespace

➢ Check for Database Registry Components 

➢ Check for UNDO Tablespace Size Mismatch 

➢ Check for ASM Free Space 

➢ Check for ORA-ERRORS in alert logs 

➢ Auto extensible datafiles



Convert RAC Physical Standby To Snapshot Standby in RAC enviroment

 

 

Convert RAC Physical Standby To Snapshot Standby in RAC enviroment

 Current : Standby Database with 4 node RAC enviroment

Step1 :-  Pre-requiste   

  •  FRA needs to be configured.
  •  Ensure the  ORL  path exist  (Online redo logs are created)

Show parameter db_recovery_files_dest

Show parameter db_recovery_file_dest_size

 

To Check if ORL (Online redo log path exist)

 

SELECT thread#, group#, sequence#, bytes, archived ,l.status, blocksize, member FROM v$log l join v$logfile f using (GROUP#) ORDER BY thread#, group#;

Step 2 :- Once FRA is configured and redo log created on Standby

Stop the db using srvctl command on standby

 srvctl stop database -d ORCLDR -o immediate

Startup db in mount stage

srvctl start database -d ORCLDR -o mount

srvctl status database -d ORCLDR

Confirm its mounted.                                                   

Step 3 : Connect to sqlplus and enable flashback

Creation of guarantee restore point instead of normal restore point

alter system set db_flashback_retention_target=1440;

create restore point before_snapshot_19c guarantee flashback database;

select scn, storage_size, time, name from v$restore_point;

or

Connect /as sysdba

Select status from v$instance;

Ensure it shows Mounted

alter database flashback on;

Alter system set db_flashback_retention_target=<value> scope=both sid='*' ;

Select flashback_on from v$database ;

Select * from v$flash_recovery_area_size ;

Select * from v$restore_point ;

 

 

Step 4 :- Shutdown the db and startup in mount stage

srvctl stop database -d ORCLDR -o immediate

srvctl status database -d ORCLDR

 

srvctl start database -d ORCLDR -o mount

srvctl status database -d ORCLDR

Ensure the instance is mounted

Step 5 :- Connect to sqlplus and convert to Snapshot standby

Connect /as sysdba

Select status from v$instance ; ===> Should show Mounted


Alter database convert to Snapshot standby ;

Alter database open ;

Once done

Select database_role,controlfile_type from v$database ;

 

Step 6 :- Restart the entire db if required

srvctl stop database -d ORCLDR -o immediate

srvctl status database -d ORCLDR

Start the db (Both instance using srvctl)

srvctl start database -d ORCLDR -o open

 

 

------------------Revert Back---------------------------

##once app testing is completed and confirmed by apps team

##shutdown DR , restart it in mount stage and convert to physical standby

                      

srvctl stop database -d ORCLDR -o immediate

srvctl start database -d ORCLDR -o mount

 

alter database convert to physical standby;

 

srvctl stop database -d ORCLDR -o immediate

srvctl start database -d ORCLDR 

 

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION.

 

alter database flashback off;

or

drop RESTORE POINT before_snapshot_19c;

 

Monitor DC -DR sync progress.