SlideShare a Scribd company logo
1 of 14
Download to read offline
Oracle BI EE
JDE Cadran – Accelerate
Usage Tracking
Date: 25-11-2015
Author: Rick Brobbel
Last Edited: Rick Brobbel
Cadran Consultancy b.v.
Project: Oracle BI EE
Subject: Usage Tracking
Version: v98
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 2 of 14
Subject : Usage Tracking Date : 25-11-15
1
Table of Contents
1 Usage Tracking.......................................................................................................................32
3
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 3 of 14
Subject : Usage Tracking Date : 25-11-15
Oracle BI - JDE Cadran - Accelerate – Usage Tracking
1 Usage Tracking
Usage Tracking is BI on BI and targets ICT-departments to bring insight in the usage of BI. It collects information about users, analytics,1
dashboards, queries and subject areas and can then provide information about frequency, data sizes, query times and so on.2
The summary is already logged by the BI-server in the logfiles and OEM-diagnostic pages and in the Administration panel (sessions):3
4
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 4 of 14
Subject : Usage Tracking Date : 25-11-15
See http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi1116/ut/ut.html for Tutorial.1
This tutorial has been used to set up Usage Tracking in Oracle BI Server.2
3
Component Explanation Screen Print
Database
Connection
The database connection used is the Oracle BI Repository
database of the schema OBIEE_BIPLATFORM as it has
been created by the RCU (Repository Creation Utility)
during the installation of Oracle BI.
The Connection Pool connects to this database where the
table S_NQ_ACCT resides, which is the key table
containing the information.
In the Write Back tab the value of Unicode Database
Type has been left unchecked as it turned out that
this would mash up the data in the table (prefixes like
N' start to appear in text fields).
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 5 of 14
Subject : Usage Tracking Date : 25-11-15
Component Explanation Screen Print
Variables To make this connection flexible the connection parameters
(database, user, password) are using repository variables.
The Connection Pool uses the variables to connect to the
location of this database, the correct schema and user and
password.
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 6 of 14
Subject : Usage Tracking Date : 25-11-15
Component Explanation Screen Print
Physical
Layer
In the physical layer aliases have been created on this
single table to support either Facts and Dimensions. The
star schema is fairly straight forward.
Logical Layer In the logical layer multiple dimension tables with
hierarchies have been created to support the various
corners to access all metrics.
Multiple facts (base and derived) with their specific
aggregations have been created.
In all Logic Table Sources the following filtering has been in
applied in the Content - WHERE - clause:
"BIRepository".""."OBIEE_BIPLATFORM"."BI_UT
_FACT_S_NQ_ACCT_UsageTrackingFacts"."SUBJEC
T_AREA_NAME" <> 'UT'
This prevents the queries on Usage Tracking to be included
in the statistics. Therefore Usage Tracking itself is not
tracked.
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 7 of 14
Subject : Usage Tracking Date : 25-11-15
Component Explanation Screen Print
Logical Layer Logical Table Sources
The Time Dimension has been purified to Year - Quarter -
Month - Start Date - Start Time. All redundant attributes
(such Week, Ran, etc) and references to End Date and End
Time were removed in order to support better working of
zoom-in or drill-down and for ago-functions.
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 8 of 14
Subject : Usage Tracking Date : 25-11-15
Component Explanation Screen Print
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 9 of 14
Subject : Usage Tracking Date : 25-11-15
Component Explanation Screen Print
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 10 of 14
Subject : Usage Tracking Date : 25-11-15
Component Explanation Screen Print
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 11 of 14
Subject : Usage Tracking Date : 25-11-15
Component Explanation Screen Print
Presentation
Layer
The components of the Presentation Layer have been
copied from Oracle BI SampleApp.
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 12 of 14
Subject : Usage Tracking Date : 25-11-15
Component Explanation Screen Print
Oracle
Enterprise
Manager
Configured to the letter according to the instructions in
http://www.oracle.com/webfolder/technetwork/tutorials/obe/f
mw/bi/bi1116/ut/ut.html.
Our specifics are the reference to the correct Connection
Pool and database schema as configured in the Repository
File.
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 13 of 14
Subject : Usage Tracking Date : 25-11-15
Analytics &
Dashboards
All Analytics Queries are prefixed to bypass caching in
order to be real time always:
SET VARIABLE DISABLE_CACHE_HIT=1;
The database tables involved (S_NQ_ACCT and S_NQ_DB_ACCT) will grow over time. Purging might be in place. This can be achieved by
periodically applying the following scripts:
ã Cadran Consultancy b.v.
Author : Rick Brobbel Date printed : 25-11-15
Project : Oracle BI EE Page : 14 of 14
Subject : Usage Tracking Date : 25-11-15
DELETE S_NQ_DB_ACCT
WHERE START_TS < '01-APR-2014'; -- SET THE AGING DATE HERE BY WHICH YOU WANT TO PURGE
DELETE S_NQ_ACCT
WHERE START_TS < '01-APR-2014'; -- SET THE AGING DATE HERE BY WHICH YOU WANT TO PURGE
The table S_NQ_DB_ACCT has children for the S_NS_ACCT. They are related by entry ID. The S_NQ_ACCT.ID =
S_NQ_DB_ACCT.LOGICAL_QUERY_ID. These are related and kept integer in the database. That means that you can only delete records from
the S_NQ_ACCT that has no children in the S_NQ_DB_ACCT. The above DELETE-statement does not take this into account. When this becomes
problematic you need to delete records in the S_NQ_DB_ACCT based on date first and then from the S_NQ_DB_ACCT based on ID does not
exist in LOGICAL_QUERY_ID.

More Related Content

Similar to Oracle BIEE - Usage Tracking

SQL Analytics Powering Telemetry Analysis at Comcast
SQL Analytics Powering Telemetry Analysis at ComcastSQL Analytics Powering Telemetry Analysis at Comcast
SQL Analytics Powering Telemetry Analysis at Comcast
Databricks
 
2 ways to get total sum of interactive grid column oracle apex ontoor blogs
2 ways to get total sum of interactive grid column oracle apex   ontoor blogs2 ways to get total sum of interactive grid column oracle apex   ontoor blogs
2 ways to get total sum of interactive grid column oracle apex ontoor blogs
sulimankareem
 
Fl2008 B3 Miley Luzardo Portfolio
Fl2008 B3 Miley Luzardo PortfolioFl2008 B3 Miley Luzardo Portfolio
Fl2008 B3 Miley Luzardo Portfolio
mileyluzardo
 

Similar to Oracle BIEE - Usage Tracking (20)

Oracle BIEE - Everything you always wanted to know about cache
Oracle BIEE - Everything you always wanted to know about cacheOracle BIEE - Everything you always wanted to know about cache
Oracle BIEE - Everything you always wanted to know about cache
 
RBJayaram
RBJayaramRBJayaram
RBJayaram
 
Architectural Builds and Design V3 Land Fabrications
Architectural Builds and Design V3 Land FabricationsArchitectural Builds and Design V3 Land Fabrications
Architectural Builds and Design V3 Land Fabrications
 
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
 
Scope of Glass Projects Part I Benchmarking.pdf
Scope of Glass Projects Part I Benchmarking.pdfScope of Glass Projects Part I Benchmarking.pdf
Scope of Glass Projects Part I Benchmarking.pdf
 
[EN] Building modern data pipeline with Snowflake + DBT + Airflow.pdf
[EN] Building modern data pipeline with Snowflake + DBT + Airflow.pdf[EN] Building modern data pipeline with Snowflake + DBT + Airflow.pdf
[EN] Building modern data pipeline with Snowflake + DBT + Airflow.pdf
 
Resume - RK
Resume - RKResume - RK
Resume - RK
 
IBM THINK 2018 - IBM Cloud SQL Query Introduction
IBM THINK 2018 - IBM Cloud SQL Query IntroductionIBM THINK 2018 - IBM Cloud SQL Query Introduction
IBM THINK 2018 - IBM Cloud SQL Query Introduction
 
Dbm 380(new) education changes / sellfy.com
Dbm 380(new) education changes / sellfy.comDbm 380(new) education changes / sellfy.com
Dbm 380(new) education changes / sellfy.com
 
SQL Analytics Powering Telemetry Analysis at Comcast
SQL Analytics Powering Telemetry Analysis at ComcastSQL Analytics Powering Telemetry Analysis at Comcast
SQL Analytics Powering Telemetry Analysis at Comcast
 
2 ways to get total sum of interactive grid column oracle apex ontoor blogs
2 ways to get total sum of interactive grid column oracle apex   ontoor blogs2 ways to get total sum of interactive grid column oracle apex   ontoor blogs
2 ways to get total sum of interactive grid column oracle apex ontoor blogs
 
Uponor Exadata e-Business Suite Migration Case Study
Uponor Exadata e-Business Suite Migration Case StudyUponor Exadata e-Business Suite Migration Case Study
Uponor Exadata e-Business Suite Migration Case Study
 
Novinky ve světě Oracle DB a koncept konvergované databáze
Novinky ve světě Oracle DB a koncept konvergované databázeNovinky ve světě Oracle DB a koncept konvergované databáze
Novinky ve světě Oracle DB a koncept konvergované databáze
 
Strayer cis-515-week-7-assignment-6-sql-concepts-and-database-design
Strayer cis-515-week-7-assignment-6-sql-concepts-and-database-designStrayer cis-515-week-7-assignment-6-sql-concepts-and-database-design
Strayer cis-515-week-7-assignment-6-sql-concepts-and-database-design
 
Fl2008 B3 Miley Luzardo Portfolio
Fl2008 B3 Miley Luzardo PortfolioFl2008 B3 Miley Luzardo Portfolio
Fl2008 B3 Miley Luzardo Portfolio
 
Fl2008 b3mileyluzardoportfolio
Fl2008 b3mileyluzardoportfolioFl2008 b3mileyluzardoportfolio
Fl2008 b3mileyluzardoportfolio
 
Sql Server 2008 Portfolio
Sql Server 2008 PortfolioSql Server 2008 Portfolio
Sql Server 2008 Portfolio
 
A Journey into Databricks' Pipelines: Journey and Lessons Learned
A Journey into Databricks' Pipelines: Journey and Lessons LearnedA Journey into Databricks' Pipelines: Journey and Lessons Learned
A Journey into Databricks' Pipelines: Journey and Lessons Learned
 
The True Cost of NoSQL DBaaS Options
The True Cost of NoSQL DBaaS OptionsThe True Cost of NoSQL DBaaS Options
The True Cost of NoSQL DBaaS Options
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligence
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Oracle BIEE - Usage Tracking

  • 1. Oracle BI EE JDE Cadran – Accelerate Usage Tracking Date: 25-11-2015 Author: Rick Brobbel Last Edited: Rick Brobbel Cadran Consultancy b.v. Project: Oracle BI EE Subject: Usage Tracking Version: v98
  • 2. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 2 of 14 Subject : Usage Tracking Date : 25-11-15 1 Table of Contents 1 Usage Tracking.......................................................................................................................32 3
  • 3. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 3 of 14 Subject : Usage Tracking Date : 25-11-15 Oracle BI - JDE Cadran - Accelerate – Usage Tracking 1 Usage Tracking Usage Tracking is BI on BI and targets ICT-departments to bring insight in the usage of BI. It collects information about users, analytics,1 dashboards, queries and subject areas and can then provide information about frequency, data sizes, query times and so on.2 The summary is already logged by the BI-server in the logfiles and OEM-diagnostic pages and in the Administration panel (sessions):3 4
  • 4. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 4 of 14 Subject : Usage Tracking Date : 25-11-15 See http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi1116/ut/ut.html for Tutorial.1 This tutorial has been used to set up Usage Tracking in Oracle BI Server.2 3 Component Explanation Screen Print Database Connection The database connection used is the Oracle BI Repository database of the schema OBIEE_BIPLATFORM as it has been created by the RCU (Repository Creation Utility) during the installation of Oracle BI. The Connection Pool connects to this database where the table S_NQ_ACCT resides, which is the key table containing the information. In the Write Back tab the value of Unicode Database Type has been left unchecked as it turned out that this would mash up the data in the table (prefixes like N' start to appear in text fields).
  • 5. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 5 of 14 Subject : Usage Tracking Date : 25-11-15 Component Explanation Screen Print Variables To make this connection flexible the connection parameters (database, user, password) are using repository variables. The Connection Pool uses the variables to connect to the location of this database, the correct schema and user and password.
  • 6. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 6 of 14 Subject : Usage Tracking Date : 25-11-15 Component Explanation Screen Print Physical Layer In the physical layer aliases have been created on this single table to support either Facts and Dimensions. The star schema is fairly straight forward. Logical Layer In the logical layer multiple dimension tables with hierarchies have been created to support the various corners to access all metrics. Multiple facts (base and derived) with their specific aggregations have been created. In all Logic Table Sources the following filtering has been in applied in the Content - WHERE - clause: "BIRepository".""."OBIEE_BIPLATFORM"."BI_UT _FACT_S_NQ_ACCT_UsageTrackingFacts"."SUBJEC T_AREA_NAME" <> 'UT' This prevents the queries on Usage Tracking to be included in the statistics. Therefore Usage Tracking itself is not tracked.
  • 7. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 7 of 14 Subject : Usage Tracking Date : 25-11-15 Component Explanation Screen Print Logical Layer Logical Table Sources The Time Dimension has been purified to Year - Quarter - Month - Start Date - Start Time. All redundant attributes (such Week, Ran, etc) and references to End Date and End Time were removed in order to support better working of zoom-in or drill-down and for ago-functions.
  • 8. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 8 of 14 Subject : Usage Tracking Date : 25-11-15 Component Explanation Screen Print
  • 9. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 9 of 14 Subject : Usage Tracking Date : 25-11-15 Component Explanation Screen Print
  • 10. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 10 of 14 Subject : Usage Tracking Date : 25-11-15 Component Explanation Screen Print
  • 11. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 11 of 14 Subject : Usage Tracking Date : 25-11-15 Component Explanation Screen Print Presentation Layer The components of the Presentation Layer have been copied from Oracle BI SampleApp.
  • 12. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 12 of 14 Subject : Usage Tracking Date : 25-11-15 Component Explanation Screen Print Oracle Enterprise Manager Configured to the letter according to the instructions in http://www.oracle.com/webfolder/technetwork/tutorials/obe/f mw/bi/bi1116/ut/ut.html. Our specifics are the reference to the correct Connection Pool and database schema as configured in the Repository File.
  • 13. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 13 of 14 Subject : Usage Tracking Date : 25-11-15 Analytics & Dashboards All Analytics Queries are prefixed to bypass caching in order to be real time always: SET VARIABLE DISABLE_CACHE_HIT=1; The database tables involved (S_NQ_ACCT and S_NQ_DB_ACCT) will grow over time. Purging might be in place. This can be achieved by periodically applying the following scripts:
  • 14. ã Cadran Consultancy b.v. Author : Rick Brobbel Date printed : 25-11-15 Project : Oracle BI EE Page : 14 of 14 Subject : Usage Tracking Date : 25-11-15 DELETE S_NQ_DB_ACCT WHERE START_TS < '01-APR-2014'; -- SET THE AGING DATE HERE BY WHICH YOU WANT TO PURGE DELETE S_NQ_ACCT WHERE START_TS < '01-APR-2014'; -- SET THE AGING DATE HERE BY WHICH YOU WANT TO PURGE The table S_NQ_DB_ACCT has children for the S_NS_ACCT. They are related by entry ID. The S_NQ_ACCT.ID = S_NQ_DB_ACCT.LOGICAL_QUERY_ID. These are related and kept integer in the database. That means that you can only delete records from the S_NQ_ACCT that has no children in the S_NQ_DB_ACCT. The above DELETE-statement does not take this into account. When this becomes problematic you need to delete records in the S_NQ_DB_ACCT based on date first and then from the S_NQ_DB_ACCT based on ID does not exist in LOGICAL_QUERY_ID.