Scripts
Identify Locked Objects in Oracle Database
Sep 3, 2024 / · 16 min read · Oracle Database Administration SQL v$locked_object dba_objects v$lock v$session v$transaction ·Identify Locked Objects in Oracle Database using v$locked_object, dba_objects, v$lock and v$session Purpose A developer reports that an INSERT that should finish in seconds is still running after ten minutes. No error has come back to the application, no timeout has fired, and nothing is moving. In the vast majority of …
Read MoreOracle Database: Show Currently Executing SQL Statements Purpose The help desk reports that the database is slow, and you open a session to look. You can see that sessions are connected, but you need to know what they are running. Session names do not tell you that. The SQL text does. It shows whether the load is a …
Read MoreOracle User Table Constraints Query with dba_constraints
Sep 1, 2024 / · 10 min read · Oracle SQL Database Constraints Data Integrity DBA_CONSTRAINTS Primary Key Foreign Key Oracle Administration ·Oracle Database: Show All Table Constraints for a User using dba_constraints Purpose This Oracle SQL query is designed to retrieve a comprehensive list of all constraints associated with tables owned by a specific user in your Oracle database. Constraints are essential rules that ensure data integrity and consistency. …
Read MoreOracle: Find Parent Tables for Repair Using dba_constraints
Oracle Database: Identifying Parent Tables for Repair or Re-import using dba_constraints Purpose When working with Oracle databases, ensuring data integrity is paramount. Foreign key constraints play a crucial role in maintaining relationships between tables, but disabled constraints can signal potential issues that …
Read MoreORA-02298: Find Missing Foreign Key Values in Oracle
Aug 30, 2024 / · 4 min read · Oracle SQL Database Data Integrity Troubleshooting DBA_CONSTRAINTS DBA_CONS_COLUMNS ·Oracle SQL: Finding Missing Foreign Key Values (ORA-02298) Purpose This Oracle SQL query is designed to help identify missing foreign key values within your database. This is particularly useful when troubleshooting the ORA-02298: cannot validate (constraint_name) - parent keys not found error, which indicates a …
Read MoreOracle Session Statistics with v$sesstat and v$statname
Oracle Database: Deep Dive into Session Statistics Purpose This Oracle SQL query is designed to retrieve a snapshot of active session statistics for a specific session within your Oracle database. Session statistics provide invaluable insights into the current activity and resource utilization of a particular database …
Read MorePinpoint Resource-Hungry SQL in Oracle: A Performance Optimization Deep Dive Purpose This Oracle SQL query is your go-to tool for identifying SQL statements that are putting a strain on your database resources. By analyzing execution statistics, it highlights queries that are consuming significant disk reads and buffer …
Read MoreOracle Database: Unlocking File I/O Insights for Performance Tuning Purpose This Oracle SQL query provides a crucial window into your database's file input/output (I/O) activity. It displays statistics like physical reads, writes, and associated timings for each data file, empowering you to identify I/O bottlenecks and …
Read MoreOracle In-Session SQL Tracing with DBMS_SYSTEM
Oracle Database: Real-Time SQL Tracing for In-depth Performance Insights Purpose This Oracle database technique empowers you to dynamically enable or disable SQL tracing for specific sessions. SQL tracing captures detailed information about SQL statements executed within a session, providing valuable insights into …
Read MoreOracle Performance Tuning: Harness the Power of Event 10046 Tracing Purpose This Oracle Database technique allows you to enable extended SQL tracing using Event 10046. This produces highly detailed trace files capturing SQL statements, wait events, and more, making it an indispensable tool for performance tuning and …
Read More