This presentation is the attempt to switch sides and show code management from the developer's point of view. It stays outside of various VCS solutions and focuses on hands-on approaches: activity control via system triggers, conditional compilation, synonym manipulation, utilization of Edition-Based Redefinition (EBR).
The Hidden Face of Cost-Based Optimizer: PL/SQL Specific StatisticsMichael Rosenblum
Database statistics are not limited to tables, columns, and indexes. PL/SQL functions also have a number of associated statistics, namely costs (CPU, I/O, network), selectivity, and cardinality (for functions that return collections). These statistics have default values that only somewhat represent reality. However, these values are always used by Oracle's cost-based optimizer to build execution plans. This session uses real-life examples to illustrate how properly managed PL/SQL statistics can significantly improve executions plans. It also demonstrates that Oracle's extensible optimizer is flexible enough to support packaged functions.
The document discusses views in Oracle databases and how they have evolved beyond simple stored SQL queries. Views can now serve as an isolation layer between applications and tables, accept DML operations directly or through triggers, and include complex functionality through features like parameterized conditions, dynamic SQL, and INSTEAD OF triggers. The document outlines techniques for optimizing DML operations on views, such as using dynamic SQL to only update changed columns, and leveraging compound triggers for shared program logic. It also warns of performance issues that can arise from logical primary keys on views.
Managing Unstructured Data: Lobs in the World of JSONMichael Rosenblum
This document discusses managing unstructured JSON data in Oracle databases. It describes how a company initially stored JSON files in VARCHAR2 columns, but then the files grew larger than 4000 characters requiring a change to CLOB storage. This change caused issues until developers understood that CLOBs have different access, storage, and processing mechanisms compared to VARCHAR2. The document provides an overview of CLOB architecture including data access, internal storage, caching, logging, and indexing. It emphasizes that properly understanding CLOBs is important when storing and manipulating JSON data in Oracle databases.
The document discusses calling user-defined functions within SQL statements. It notes that functions may be called multiple times depending on the structure of the SQL statement. Functions in the SELECT and WHERE clauses of a query will be called independently for each row. Functions in an ORDER BY clause may also be called twice if an inline view or view is used due to query rewrite. The number of function calls can be tracked using a package to inspect execution.
Data Tracking: On the Hunt for Information about Your DatabaseMichael Rosenblum
Behind the scenes, Oracle databases hide a myriad of processes to ensure that your data can be safely stored and retrieved. These processes also leave “tracks” (or they COULD leave tracks if you set them up properly). These tracks, together with application-specific data, create a complete representation of the system’s day-to-day activity. Too often this representation is lost at the DBA/Developer borderline, mostly because one side is not aware of the needs of the other. This presentation strives to bridge this gap. It focuses on key sources of database information and techniques that are useful for both DBAs and developers:
- Data Dictionary
- Oracle Logging
- Oracle Tracing
- Advanced code instrumentation
Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...Michael Rosenblum
In any large ecosystem, there are always areas that stay in the twilight, outside of the public’s attention. This deep dive attempts to change the trend regarding two, at first glance, unrelated PL/SQL topics: hierarchical profiler (HProf) and database triggers. But if you look closer, there’s something in common: they’re significantly underused! HProf because nobody heard about it, database triggers because of decades-old stigma. Let’s put both of them back into our development toolset!
Part #1. One of the most critical FREE SQL and PL/SQL performance tuning tools is almost totally unknown! If you ask, how much time is spent on routine A? How often is function B called? Most developers would hand-code something instead of using the Oracle PL/SQL HProf. This isn’t because the provided functionality is disliked, but because developers aren’t aware of its existence! This presentation is an attempt to alter this trend and reintroduce HProf to a wider audience.
Part #2. There isn’t anything “evil” about database triggers; they just have to be used where they can actually solve problems. In this presentation, various kinds of triggers will be examined from a global system optimization view, including tradeoffs between multiple goals (e.g., depending upon the available hardware, developers can select either CPU-intensive or I/O-intensive solutions). This presentation will focus on the most common performance problems related to different kinds of DML triggers and the proper ways of resolving them.
This document discusses techniques for detecting and preventing SQL injection using the Percona Toolkit and Noinject!. It begins by introducing SQL injection and how attackers can modify SQL queries without changing server code. It then discusses using query fingerprints to detect new queries that may indicate injection attempts. The Percona Toolkit tools pt-query-digest and pt-fingerprint are used to generate and store fingerprints in a whitelist. Pt-query-digest can detect new fingerprints that have not been reviewed. The Noinject! proxy script uses fingerprints to inspect queries in real-time and block any that do not match whitelisted patterns. The document concludes by discussing limitations and ways to improve the fingerprinting approach.
The document provides guidance on optimizing PL/SQL code performance. It discusses avoiding unnecessary row-by-row processing, nested row-by-row processing, and excessive access to the DUAL table. Instead, it recommends performing set-based operations using SQL and caching frequently accessed values in memory to reduce database hits. The document also covers reducing excessive function calls and unnecessary parsing through techniques like result caching and inline views.
The Hidden Face of Cost-Based Optimizer: PL/SQL Specific StatisticsMichael Rosenblum
Database statistics are not limited to tables, columns, and indexes. PL/SQL functions also have a number of associated statistics, namely costs (CPU, I/O, network), selectivity, and cardinality (for functions that return collections). These statistics have default values that only somewhat represent reality. However, these values are always used by Oracle's cost-based optimizer to build execution plans. This session uses real-life examples to illustrate how properly managed PL/SQL statistics can significantly improve executions plans. It also demonstrates that Oracle's extensible optimizer is flexible enough to support packaged functions.
The document discusses views in Oracle databases and how they have evolved beyond simple stored SQL queries. Views can now serve as an isolation layer between applications and tables, accept DML operations directly or through triggers, and include complex functionality through features like parameterized conditions, dynamic SQL, and INSTEAD OF triggers. The document outlines techniques for optimizing DML operations on views, such as using dynamic SQL to only update changed columns, and leveraging compound triggers for shared program logic. It also warns of performance issues that can arise from logical primary keys on views.
Managing Unstructured Data: Lobs in the World of JSONMichael Rosenblum
This document discusses managing unstructured JSON data in Oracle databases. It describes how a company initially stored JSON files in VARCHAR2 columns, but then the files grew larger than 4000 characters requiring a change to CLOB storage. This change caused issues until developers understood that CLOBs have different access, storage, and processing mechanisms compared to VARCHAR2. The document provides an overview of CLOB architecture including data access, internal storage, caching, logging, and indexing. It emphasizes that properly understanding CLOBs is important when storing and manipulating JSON data in Oracle databases.
The document discusses calling user-defined functions within SQL statements. It notes that functions may be called multiple times depending on the structure of the SQL statement. Functions in the SELECT and WHERE clauses of a query will be called independently for each row. Functions in an ORDER BY clause may also be called twice if an inline view or view is used due to query rewrite. The number of function calls can be tracked using a package to inspect execution.
Data Tracking: On the Hunt for Information about Your DatabaseMichael Rosenblum
Behind the scenes, Oracle databases hide a myriad of processes to ensure that your data can be safely stored and retrieved. These processes also leave “tracks” (or they COULD leave tracks if you set them up properly). These tracks, together with application-specific data, create a complete representation of the system’s day-to-day activity. Too often this representation is lost at the DBA/Developer borderline, mostly because one side is not aware of the needs of the other. This presentation strives to bridge this gap. It focuses on key sources of database information and techniques that are useful for both DBAs and developers:
- Data Dictionary
- Oracle Logging
- Oracle Tracing
- Advanced code instrumentation
Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...Michael Rosenblum
In any large ecosystem, there are always areas that stay in the twilight, outside of the public’s attention. This deep dive attempts to change the trend regarding two, at first glance, unrelated PL/SQL topics: hierarchical profiler (HProf) and database triggers. But if you look closer, there’s something in common: they’re significantly underused! HProf because nobody heard about it, database triggers because of decades-old stigma. Let’s put both of them back into our development toolset!
Part #1. One of the most critical FREE SQL and PL/SQL performance tuning tools is almost totally unknown! If you ask, how much time is spent on routine A? How often is function B called? Most developers would hand-code something instead of using the Oracle PL/SQL HProf. This isn’t because the provided functionality is disliked, but because developers aren’t aware of its existence! This presentation is an attempt to alter this trend and reintroduce HProf to a wider audience.
Part #2. There isn’t anything “evil” about database triggers; they just have to be used where they can actually solve problems. In this presentation, various kinds of triggers will be examined from a global system optimization view, including tradeoffs between multiple goals (e.g., depending upon the available hardware, developers can select either CPU-intensive or I/O-intensive solutions). This presentation will focus on the most common performance problems related to different kinds of DML triggers and the proper ways of resolving them.
This document discusses techniques for detecting and preventing SQL injection using the Percona Toolkit and Noinject!. It begins by introducing SQL injection and how attackers can modify SQL queries without changing server code. It then discusses using query fingerprints to detect new queries that may indicate injection attempts. The Percona Toolkit tools pt-query-digest and pt-fingerprint are used to generate and store fingerprints in a whitelist. Pt-query-digest can detect new fingerprints that have not been reviewed. The Noinject! proxy script uses fingerprints to inspect queries in real-time and block any that do not match whitelisted patterns. The document concludes by discussing limitations and ways to improve the fingerprinting approach.
The document provides guidance on optimizing PL/SQL code performance. It discusses avoiding unnecessary row-by-row processing, nested row-by-row processing, and excessive access to the DUAL table. Instead, it recommends performing set-based operations using SQL and caching frequently accessed values in memory to reduce database hits. The document also covers reducing excessive function calls and unnecessary parsing through techniques like result caching and inline views.
The document discusses various PL/SQL programming concepts including PL/SQL block structure, procedures, functions, packages, cursors, exceptions, and dependencies. It provides guidelines for proper naming conventions, restrictions on calling functions from SQL expressions, and best practices for cursor and package design. The document also covers object types, subtypes, and working with collections in PL/SQL.
The document discusses how the Oracle optimizer can sometimes choose suboptimal execution plans, leading to performance deterioration. It presents a scenario where the same query runs much slower when bind variables are used. The document then shows how SQL profiles can be used to enforce a better execution plan. It argues that manually creating profiles is not ideal for 24/7 environments. The document proposes using machine learning for outlier detection to identify performance issues and then automatically generate SQL profiles to address the issues. Code examples are provided for outlier detection and generating profiles through the Oracle API to allow automating the process.
This document provides an overview of advanced PL/SQL concepts such as flow control, bulk processing, Oracle hints, and resources. It discusses techniques for optimizing PL/SQL code through improved loop and conditional logic. Bulk processing using FORALL is described as enabling set-based operations. Oracle hints are introduced as a way to suggest execution plans to the optimizer. Parallel query is explained as a way to improve performance on multi-processor systems. Finally, resources for further reading are listed.
The document provides instructions for logging into SQL*Plus, executing SQL statements, installing SQL Developer, browsing database objects, using the SQL worksheet, using PL/SQL in SQL Developer, creating reports, SQL*Plus file commands, and finding additional self-help tutorials. It includes steps for downloading and installing SQL Developer, selecting data from a sample customers table, and saving SQL scripts and output using commands like SAVE, GET, START, @, EDIT, and SPOOL.
This document provides an overview of PL/SQL programming. It outlines an agenda that introduces PL/SQL and covers basic and advanced syntax. The introduction defines PL/SQL and outlines its advantages like block structures, procedural capabilities, and error handling. Basic syntax covers blocks, operators, comments, variables and data types. Advanced topics include cursors, procedures, functions, parameters, and exception handling. Triggers are also introduced as PL/SQL blocks triggered by data changes. Examples are provided throughout to illustrate key PL/SQL concepts.
This document discusses procedures and functions in PL/SQL. It defines a procedure as a group of PL/SQL statements that can be called by name and does not need to return a value. A function is similar to a procedure but must return a single value. The document provides the syntax for creating procedures and functions, and examples of standalone and recursive procedures and functions. It explains how to call procedures and functions, and the differences between them, such as procedures not having a return value while functions do.
By using specially crafted parameters in double quotes, it is possible to bypass the input validation of the Oracle dbms_assert package and inject SQL code. This allows dozens of already patched Oracle vulnerabilities to be exploited again across versions 8.1.7.4 to 10.2.0.2. The researcher notified Oracle of the problem in April 2006. To mitigate risks, privileges like CREATE PROCEDURE should be revoked to prevent injection of malicious functions or procedures.
This document provides an introduction to SQL and the Oracle database system. It includes sections on SQL queries, data definition and modification, views, stored procedures and functions using PL/SQL, embedded SQL, integrity constraints, triggers, and database architecture. The document also references additional recommended literature for further learning about Oracle and SQL. It aims to provide a detailed overview of the core concepts for working with Oracle databases using SQL.
The document discusses various components of a Struts application including:
1. The struts-config.xml file which specifies the flow control and mappings between view components and controllers.
2. Form beans (ActionForms) which are JavaBeans that hold view data temporarily and extend ActionForm.
3. Action classes which extend Action and handle requests by capturing input, invoking business logic, and returning view mappings.
4. The ActionServlet which acts as the front controller, handling requests and dispatching them to subcontrollers (Action classes) based on configuration.
5. JSPs which are used to generate the input and response pages, using Struts tag libraries.
The document
This document provides a tutorial on summarizing the Spring Framework. It introduces the main packages in Spring Framework including the JDBC package for data access. The JDBC package has two main subpackages - com.interface21.jdbc.core which implements low-level persistence and com.interface21.jdbc.object which presents an object-oriented view. It provides code samples demonstrating how to perform queries, updates and retrieve results using these packages.
Tony Jambu (obscure) tools of the trade for tuning oracle sq lsInSync Conference
This document provides an overview of various tools that can be used for tuning Oracle SQL statements. It discusses tuning methodology, generating explain plans and traces, and tools like SQL*Plus autotrace, DBMS_XPLAN, TRCA trace analyzer, and SQLTXPLAIN. Demo examples are provided for many of the tools to analyze SQL performance.
This document discusses Hibernate and Java persistence. It begins by explaining that Hibernate is an open source Java application framework used to implement object/relational mapping (ORM). It allows Java applications to communicate with relational databases using Hibernate's API instead of directly using JDBC. The document then discusses the traditional and ORM approaches to Java persistence and how Hibernate implements the ORM approach using mapping files, configuration files, and its engine to generate SQL statements. It also covers persistent classes, Hibernate's architecture, and how CRUD operations are performed using Hibernate.
Procedures in pl/sql,CREATE PROCEDURE Syntax, Compiling and Showing Errors, Parameters, Defining the IN, OUT, and IN OUT Parameter Modes, Parameter Constraint Restrictions, Example – Procedure with No Parameters,Example – Passing IN and OUT Parameters, Dropping a Procedure
PL/SQL is a programming language that combines the SQL operations of querying and manipulating data in an Oracle database with the procedural language constructs of variables, conditions, and loops. PL/SQL can be used for database-side programming as well as client-side application development. It provides advantages like better performance, portability, higher productivity, and integration with Oracle. PL/SQL supports various data types, control structures, exception handling, and object-oriented programming features. Cursors allow processing of multiple rows returned from a SQL statement and can be static, dynamic, or reference types. Procedures and functions are reusable program units that allow passing parameters and returning values.
The document provides templates and examples for creating Swing-based GUI applications, servlets, Java Server Pages (JSP), Java Database Connectivity (JDBC), Java Server Faces (JSF), Enterprise Java Beans (EJB), Hibernate, Struts, and web services in Java. It includes templates for common GUI components, servlets, JSP tags, database queries, managed beans, navigation rules, entity beans, Hibernate mappings, actions, and web service providers/consumers.
Triggers are stored PL/SQL blocks that are associated with a table, view, schema or database and execute automatically when a triggering event occurs. There are two types of triggers: application triggers that fire on application events and database triggers that fire on data or system events. Triggers can be used to centralize global operations, perform related actions, enforce complex integrity constraints and compute derived values automatically. The timing of a trigger determines whether it executes before or after the triggering event.
This document discusses techniques for improving SQL query performance by avoiding function calls in SQL queries and leveraging caching mechanisms. It covers scalar subquery caching, which caches the results of functions used in scalar subqueries to avoid repeated execution. Deterministic functions are also discussed, which Oracle can optimize by caching results. The document then introduces the cross-session PL/SQL function result cache and SQL result cache available in Oracle 11g, which cache and reuse function results and full query results across sessions to improve response times for repetitive queries and functions.
The document discusses different ways to implement threading in Java programs. It provides code examples to demonstrate creating threads by extending the Thread class and implementing the Runnable interface. The code examples show printing output from both the main thread and child threads to illustrate threading concepts. Socket programming and RMI examples are also provided with code to implement client-server applications using threads.
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Fwdays
Here in DS team in WIX we want to help to create stunning sites by applying recent achievement of AI research to production. Since Data Science engineering practices are still not fully shaped we found out that it is crucial to bring the best practices from software engineering - give Data Scientist ability to deliver models fast without loss in quality and computation efficiency to stay competitive in this overhyped market. To achieve this we are developing our own infrastructure for creating pipelines and deploying them to production with minimum (to none) engineer involvement.
This talk will cover initial motivation, solved technical issues and lessons learned while building such ML delivery system.
Website: https://fwdays.com/en/event/data-science-fwdays-2019/review/continuous-delivery-of-ml-pipelines-to-production
Retail Analytics, with Oracle Data Integrator 11G.
Points about ODI Objects, Interfaces, Variables, Packages, Scenarios, Load Plans, Scheduling.
Batch Scheduling with RA 14.2, UAF in 14.2, Error Managment in RA 14.2
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
This document provides a summary of several database administration (DBA) commands and concepts relevant for developers. It discusses topics such as count(1) vs count(*), gathering system statistics, setting the DB_FILE_MULTIBLOCK_READ_COUNT parameter, analyzing tables, explaining plans, monitoring SQL performance, full table scans, pending statistics, restoring statistics history, parallel DML, Flashback Query, DBMS_APPLICATION_INFO, and privileges for reading tables. The document is intended to help developers better understand and work with database configurations and operations.
The document discusses various PL/SQL programming concepts including PL/SQL block structure, procedures, functions, packages, cursors, exceptions, and dependencies. It provides guidelines for proper naming conventions, restrictions on calling functions from SQL expressions, and best practices for cursor and package design. The document also covers object types, subtypes, and working with collections in PL/SQL.
The document discusses how the Oracle optimizer can sometimes choose suboptimal execution plans, leading to performance deterioration. It presents a scenario where the same query runs much slower when bind variables are used. The document then shows how SQL profiles can be used to enforce a better execution plan. It argues that manually creating profiles is not ideal for 24/7 environments. The document proposes using machine learning for outlier detection to identify performance issues and then automatically generate SQL profiles to address the issues. Code examples are provided for outlier detection and generating profiles through the Oracle API to allow automating the process.
This document provides an overview of advanced PL/SQL concepts such as flow control, bulk processing, Oracle hints, and resources. It discusses techniques for optimizing PL/SQL code through improved loop and conditional logic. Bulk processing using FORALL is described as enabling set-based operations. Oracle hints are introduced as a way to suggest execution plans to the optimizer. Parallel query is explained as a way to improve performance on multi-processor systems. Finally, resources for further reading are listed.
The document provides instructions for logging into SQL*Plus, executing SQL statements, installing SQL Developer, browsing database objects, using the SQL worksheet, using PL/SQL in SQL Developer, creating reports, SQL*Plus file commands, and finding additional self-help tutorials. It includes steps for downloading and installing SQL Developer, selecting data from a sample customers table, and saving SQL scripts and output using commands like SAVE, GET, START, @, EDIT, and SPOOL.
This document provides an overview of PL/SQL programming. It outlines an agenda that introduces PL/SQL and covers basic and advanced syntax. The introduction defines PL/SQL and outlines its advantages like block structures, procedural capabilities, and error handling. Basic syntax covers blocks, operators, comments, variables and data types. Advanced topics include cursors, procedures, functions, parameters, and exception handling. Triggers are also introduced as PL/SQL blocks triggered by data changes. Examples are provided throughout to illustrate key PL/SQL concepts.
This document discusses procedures and functions in PL/SQL. It defines a procedure as a group of PL/SQL statements that can be called by name and does not need to return a value. A function is similar to a procedure but must return a single value. The document provides the syntax for creating procedures and functions, and examples of standalone and recursive procedures and functions. It explains how to call procedures and functions, and the differences between them, such as procedures not having a return value while functions do.
By using specially crafted parameters in double quotes, it is possible to bypass the input validation of the Oracle dbms_assert package and inject SQL code. This allows dozens of already patched Oracle vulnerabilities to be exploited again across versions 8.1.7.4 to 10.2.0.2. The researcher notified Oracle of the problem in April 2006. To mitigate risks, privileges like CREATE PROCEDURE should be revoked to prevent injection of malicious functions or procedures.
This document provides an introduction to SQL and the Oracle database system. It includes sections on SQL queries, data definition and modification, views, stored procedures and functions using PL/SQL, embedded SQL, integrity constraints, triggers, and database architecture. The document also references additional recommended literature for further learning about Oracle and SQL. It aims to provide a detailed overview of the core concepts for working with Oracle databases using SQL.
The document discusses various components of a Struts application including:
1. The struts-config.xml file which specifies the flow control and mappings between view components and controllers.
2. Form beans (ActionForms) which are JavaBeans that hold view data temporarily and extend ActionForm.
3. Action classes which extend Action and handle requests by capturing input, invoking business logic, and returning view mappings.
4. The ActionServlet which acts as the front controller, handling requests and dispatching them to subcontrollers (Action classes) based on configuration.
5. JSPs which are used to generate the input and response pages, using Struts tag libraries.
The document
This document provides a tutorial on summarizing the Spring Framework. It introduces the main packages in Spring Framework including the JDBC package for data access. The JDBC package has two main subpackages - com.interface21.jdbc.core which implements low-level persistence and com.interface21.jdbc.object which presents an object-oriented view. It provides code samples demonstrating how to perform queries, updates and retrieve results using these packages.
Tony Jambu (obscure) tools of the trade for tuning oracle sq lsInSync Conference
This document provides an overview of various tools that can be used for tuning Oracle SQL statements. It discusses tuning methodology, generating explain plans and traces, and tools like SQL*Plus autotrace, DBMS_XPLAN, TRCA trace analyzer, and SQLTXPLAIN. Demo examples are provided for many of the tools to analyze SQL performance.
This document discusses Hibernate and Java persistence. It begins by explaining that Hibernate is an open source Java application framework used to implement object/relational mapping (ORM). It allows Java applications to communicate with relational databases using Hibernate's API instead of directly using JDBC. The document then discusses the traditional and ORM approaches to Java persistence and how Hibernate implements the ORM approach using mapping files, configuration files, and its engine to generate SQL statements. It also covers persistent classes, Hibernate's architecture, and how CRUD operations are performed using Hibernate.
Procedures in pl/sql,CREATE PROCEDURE Syntax, Compiling and Showing Errors, Parameters, Defining the IN, OUT, and IN OUT Parameter Modes, Parameter Constraint Restrictions, Example – Procedure with No Parameters,Example – Passing IN and OUT Parameters, Dropping a Procedure
PL/SQL is a programming language that combines the SQL operations of querying and manipulating data in an Oracle database with the procedural language constructs of variables, conditions, and loops. PL/SQL can be used for database-side programming as well as client-side application development. It provides advantages like better performance, portability, higher productivity, and integration with Oracle. PL/SQL supports various data types, control structures, exception handling, and object-oriented programming features. Cursors allow processing of multiple rows returned from a SQL statement and can be static, dynamic, or reference types. Procedures and functions are reusable program units that allow passing parameters and returning values.
The document provides templates and examples for creating Swing-based GUI applications, servlets, Java Server Pages (JSP), Java Database Connectivity (JDBC), Java Server Faces (JSF), Enterprise Java Beans (EJB), Hibernate, Struts, and web services in Java. It includes templates for common GUI components, servlets, JSP tags, database queries, managed beans, navigation rules, entity beans, Hibernate mappings, actions, and web service providers/consumers.
Triggers are stored PL/SQL blocks that are associated with a table, view, schema or database and execute automatically when a triggering event occurs. There are two types of triggers: application triggers that fire on application events and database triggers that fire on data or system events. Triggers can be used to centralize global operations, perform related actions, enforce complex integrity constraints and compute derived values automatically. The timing of a trigger determines whether it executes before or after the triggering event.
This document discusses techniques for improving SQL query performance by avoiding function calls in SQL queries and leveraging caching mechanisms. It covers scalar subquery caching, which caches the results of functions used in scalar subqueries to avoid repeated execution. Deterministic functions are also discussed, which Oracle can optimize by caching results. The document then introduces the cross-session PL/SQL function result cache and SQL result cache available in Oracle 11g, which cache and reuse function results and full query results across sessions to improve response times for repetitive queries and functions.
The document discusses different ways to implement threading in Java programs. It provides code examples to demonstrate creating threads by extending the Thread class and implementing the Runnable interface. The code examples show printing output from both the main thread and child threads to illustrate threading concepts. Socket programming and RMI examples are also provided with code to implement client-server applications using threads.
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Fwdays
Here in DS team in WIX we want to help to create stunning sites by applying recent achievement of AI research to production. Since Data Science engineering practices are still not fully shaped we found out that it is crucial to bring the best practices from software engineering - give Data Scientist ability to deliver models fast without loss in quality and computation efficiency to stay competitive in this overhyped market. To achieve this we are developing our own infrastructure for creating pipelines and deploying them to production with minimum (to none) engineer involvement.
This talk will cover initial motivation, solved technical issues and lessons learned while building such ML delivery system.
Website: https://fwdays.com/en/event/data-science-fwdays-2019/review/continuous-delivery-of-ml-pipelines-to-production
Retail Analytics, with Oracle Data Integrator 11G.
Points about ODI Objects, Interfaces, Variables, Packages, Scenarios, Load Plans, Scheduling.
Batch Scheduling with RA 14.2, UAF in 14.2, Error Managment in RA 14.2
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
This document provides a summary of several database administration (DBA) commands and concepts relevant for developers. It discusses topics such as count(1) vs count(*), gathering system statistics, setting the DB_FILE_MULTIBLOCK_READ_COUNT parameter, analyzing tables, explaining plans, monitoring SQL performance, full table scans, pending statistics, restoring statistics history, parallel DML, Flashback Query, DBMS_APPLICATION_INFO, and privileges for reading tables. The document is intended to help developers better understand and work with database configurations and operations.
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
This document provides a summary of several database administration (DBA) commands and concepts relevant for developers. It discusses topics such as count(1) vs count(*), gathering system statistics, setting the DB_FILE_MULTIBLOCK_READ_COUNT parameter, analyzing tables, explaining plans, monitoring SQL performance, full table scans, pending statistics, restoring statistics history, parallel DML, Flashback Query, DBMS_APPLICATION_INFO, schema management, adding columns with defaults, object and system privileges. The document is intended to help developers better understand and work with database concepts.
This module discusses completing the installation of Oracle Applications by reviewing required post-installation tasks such as configuring client software and passwords, implementing product and country-specific functionality, and tasks specific to the installation such as setting up printers or resizing the database. It also covers logging into Oracle Applications and understanding system administration and maintenance tasks.
(Lab Project) (2)Table of ContentsIntroduction.docxaryan532920
The document outlines the implementation of security policies and procedures for a retail store database. It includes conceptual and logical data models showing users, roles, and views. The physical database design includes tables for customers, employees, products, orders, and order lines. Test cases are defined for various security policies controlling user access and privileges. The goal is to secure customer and purchase data in the database after security breaches occurred.
This document discusses establishing a process for controlling Oracle implementation and upgrade projects. It recommends defining different environments (e.g. development, test, production) with varying access restrictions. Source code should be stored and version controlled in a central repository. Incremental builds should be deployed to environments and strictly controlled to ensure changes are thoroughly tested before moving to more restricted environments.
This document provides release notes and supplementary information for Delphi 7. It notes that some components have been deprecated and recommends newer alternatives. It also describes changes made to string handling functions, warnings added by the compiler, and issues fixed in streaming of subcomponents. Finally, it provides notes on various other topics like Apache, UDDI, Windows XP input, and databases.
The document describes several software development life cycle models:
1. The classical waterfall model divides the life cycle into sequential phases from requirements to maintenance.
2. The iterative waterfall model adds feedback loops to allow correcting defects in earlier phases.
3. The prototyping model develops prototypes to refine requirements before development.
4. The evolutionary model incrementally develops modules and delivers functioning systems in successive versions.
5. The spiral model represents each phase as a loop through objective setting, risk assessment, development, and review.
The document discusses stored procedures and functions in Oracle databases. It describes how procedures are compiled code stored in the database that can be called from client environments. Procedures allow encapsulating common operations like inserting records or updating salaries. The document provides examples of creating procedures and functions, specifying arguments, debugging errors, and managing dependencies.
The document discusses OpenObject, an open-source Rapid Application Development (RAD) framework written in Python. OpenObject features include an Object-Relationship Mapping (ORM) layer, template-based Model-View-Controller (MVC) interfaces, and report generation. The document also provides instructions on installing OpenObject, describes its typical module structure, and explains how to define business objects using the ORM.
Generating Code with Oracle SQL Developer Data ModelerRob van den Berg
This presentation discusses code generation capabilities in Oracle SQL Developer Data Modeler. Key features that support code generation include logical and relational modeling, domains, naming standards, and transformation scripts. The presenter demonstrates how to generate various types of code like entity rules, triggers, and packages by writing custom transformation scripts to query the model object and output code to files. Well-designed models can be transformed into maintainable application code automatically.
Oracle applications r12.2, ebr, online patching means lot of work for devel...Ajith Narayanan
This document discusses the implications of Oracle Applications R12.2's architecture and online patching capabilities for developers. It begins with introducing the speaker and providing an overview of R12.2's dual application tier architecture. It then covers key concepts around Edition Based Redefinition (EBR) and the rules and steps required for online patching. The main implications for developers are that objects must be uniquely named at 29 bytes or less, references to editioned objects require special handling, and code must work across editions that can change without warning during patching. Extra steps are required for table, seed data, view, trigger and other changes to support editions. Close coordination is needed when multiple developers are working concurrently.
This document provides an overview of tips, considerations, and processes for migrating a DB2 database environment to a Teradata data warehouse. It discusses gathering important information about the existing DB2 environment, the high-level phases of the migration including establishing Teradata infrastructure, migrating data, processes and applications, and establishing a production environment. It also covers specific considerations for migrating the physical database including options for converting DB2 tables and indexes to Teradata.
RivieraJUG - MySQL 8.0 - What's new for developers.pdfFrederic Descamps
This document summarizes Frédéric Descamps' presentation on new features in MySQL 8.0 for developers. It introduces Descamps and covers several new features in MySQL 8.0, including the new volcano iterator and optimizer refactoring, EXPLAIN ANALYZE for analyzing query performance, hash joins replacing block nested loops, common table expressions, lateral derived tables, window functions, JSON functions, table value constructors, functional indexes, invisible indexes, check constraints, expressions as default values, lock modes like NOWAIT and SKIP LOCKED, and support for generated invisible columns as primary keys.
This document discusses object-oriented design principles including encapsulation, abstraction, inheritance, polymorphism, and decoupling. It then introduces the SOLID principles of object-oriented design: single responsibility principle, open/closed principle, Liskov substitution principle, interface segregation principle, and dependency inversion principle. Code examples are provided to demonstrate how to apply these principles and improve code maintainability, reusability, and testability.
This document provides an overview of SQL procedural language (SQL PL) programming tips for DB2 stored procedures on z/OS. It discusses topics like when to use native SQL procedures, benefits of templates, compound blocks, dynamic SQL, XML support, and new features in DB2 11 like array data types and global variables. The document is intended for application developers to help simplify applications using SQL PL procedures.
maXbox Starter 43 Work with Code Metrics ISO StandardMax Kleiner
Today we step through optimize your code with metrics and some style guide conventions. You cannot improve what you don’t measure and what you don’t measure, you cannot prove. A tool can be great for code quality but also provides a mechanism for extending your functions and quality with checks and tests.
The document discusses the building blocks of a SystemVerilog testbench. It describes the program block, which encapsulates test code and allows reading/writing signals and calling module routines. Interface and clocking blocks are used to connect the testbench to the design under test. Assertions, randomization, and other features help create flexible testbenches to verify design correctness.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Developer's Approach to Code Management
1. 1 of 44
#415
A Developer’s Approach
to
Code Management
Michael Rosenblum
www.dulcian.com
2. 2 of 44
Who Am I? – “Misha”
Oracle ACE
Co-author of 3 books
PL/SQL for Dummies
Expert PL/SQL Practices
Oracle PL/SQL Performance Tuning Tips & Techniques
Known for:
SQL and PL/SQL tuning
Complex functionality
Code generators
Repository-based development
3. 3 of 44
Code Management???
The biggest problem:
No agreement about what MANAGEMENT is
Even less agreement about what CODE is
Results:
Instead of comparing concepts we usually compare
implementations therefore we are comparing apples to
oranges!!!
… because each implementation = a very specific set of requirements.
4. 4 of 44
Definitions (1)
Code = Anything that defines and implements business
rules
Programs
Structural rules (constraints!)
Metadata + Generators (programs that write programs that …)
5. 5 of 44
Definitions (2)
Management = Understanding how your code base
transforms over a period of time and being able to explain:
What changes happen?
How do the changes happen?
Why did the changes happen?
6. 6 of 44
Who benefits?
Implementations:
Management-oriented approach
Key question: “Who done it?”
Solution: Try to preserve every line change and associate it with a
specific person foremost forensic tool [blaming game?!]
Problem: Large systems are quickly overwhelmed by the total volume
of micro-changes.
Development-oriented approach
Key question: “How do we create the next release?”
Solution: Managing macro-changes instead of micro-changes
Problem: Requires a different level of organization
9. 9 of 44
K.I.S.S.
Please, remember:
There is no such thing as an “all-or-nothing” approach!
Complexity/cost of the solution should match the scope of a
problem
10. 10 of 44
Synonym Manipulation
Solution:
Synonyms for external references + unique object names for all
versions:
… i.e. synonym A_PKG + package A_PKG_V1, A_PKG_V2 etc.
Downside:
Recompilation of referenced objects
Useful in:
Environments with clear separation of engine code vs. customer
code
11. 11 of 44
Synonyms - Illustration
Synonyms:
* Engine Package A
* Engine Package B
User code 1
User code 3
User code 2
Engine Package A - V1
Engine Package A – V2
Engine Package A – V3
Engine Package B - V1
Engine Package B – V2
Engine Package B – V3
12. 12 of 44
Triggers
Solution:
Setting up BEFORE/AFTER DDL triggers in relevant schemas
Database-level triggers must be disabled before any Oracle patches
high cost of error strongly NOT recommended
Invalid triggers would block ANY DDL from being fired
BEFORE-triggers also work as security features
Example: blocking TRUNCATE command
Exceptions raised in AFTER-trigger would not impact
execution itself
13. 13 of 44
Triggers – Example (1)
CREATE TABLE ddl_audit_tab (
ddl_type_tx VARCHAR2(30),
object_type_tx VARCHAR2(30),
object_name_tx VARCHAR2(30),
ddl_date_dt TIMESTAMP,
code_cl CLOB);
CREATE OR REPLACE TRIGGER ddl_audit_trg BEFORE DDL ON SCHEMA
DECLARE
v_lines_nr PLS_INTEGER;
v_sql_tt ora_name_list_t;
v_cl CLOB;
PROCEDURE p_add (i_tx VARCHAR2) IS
BEGIN
dbms_lob.writeappend(v_cl,length(v_buffer_tx), v_buffer_tx);
END;
...
Oracle’s own type
TABLE OF VARCHAR2(64)
14. 14 of 44
Triggers – Example (2)
BEGIN
-- security section
IF ora_dict_obj_name = 'DDL_AUDIT_TAB' THEN
raise_Application_error(-20001,'Cannot touch DDL_AUDIT_TAB!');
END IF;
-- put DDL together
v_lines_nr := ora_sql_txt(v_sql_tt);
dbms_lob.createTemporary(v_cl,true,dbms_lob.call);
FOR i IN 1..v_lines_nr LOOP
p_add(v_sql_tt(i));
END LOOP;
-- store
INSERT INTO ddl_audit_tab
(ddl_type_tx,object_type_tx,object_name_tx,ddl_date_dt,code_cl)
VALUES
(ora_sysevent,ora_dict_obj_type,ora_dict_obj_name,SYSTIMESTAMP,v_cl);
END;
This is also
OUT-parameter!
16. 16 of 44
Triggers – Example (3)
SQL> CREATE TABLE tst1(a number);
Table created.
SQL> SELECT * FROM ddl_audit_tab;
DDL_TYPE_TX OBJECT_TYPE_TX OBJECT_NAME_TX DDL_DATE_DT CODE_CL
----------- --------------- -------------- ----------- ---------------------------
CREATE TABLE TEST01 29-JAN-14 create table tst1(a number)
SQL> TRUNCATE TABLE ddl_audit_tab;
TRUNCATE TABLE ddl_audit_tab
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-20001: Cannot touch DDL_AUDIT_TAB!
ORA-06512: at line 24
SQL> SELECT count(*) FROM ddl_audit_tab;
COUNT(*)
----------
1
17. 17 of 44
Homegrown Versioning (1)
Problem:
Classic 3-tier IT system significant downtime cost/efforts
Small part of a system has constant flow of change requests
Structure of requests is very clear
Take N parameters / Do something / Show results
Conclusion:
The most efficient method is to introduce a localized
repository-based purpose-built solution.
18. 18 of 44
Homegrown Versioning (2)
Solution:
1. The system must store a list of registered modules in the
repository.
2. Each module must satisfy the following conditions:
Take up to 5 input parameters (some optional, some mandatory).
Return formatted CLOB as an output
3. The system has a notion of editions that can be associated with the
module.
4. The system uses the default edition.
5. Each user may have access to different editions instead of the
default.
19. 19 of 44
Sample
CREATE FUNCTION f_getEmp_CL (i_job_tx VARCHAR2, i_hiredate_dt DATE:=NULL)
RETURN CLOB
IS
v_out_cl CLOB;
PROCEDURE p_add(pi_tx VARCHAR2) IS BEGIN
dbms_lob.writeappend(v_out_cl,length(pi_tx),pi_tx);
END;
BEGIN
dbms_lob.createtemporary(v_out_cl,true,dbms_lob.call);
p_add('<html><table>');
FOR c IN (SELECT '<tr>'||'<td>'||empno||'</td>'||
'<td>'||ename||'</td>'||'</tr>' row_tx
FROM emp
WHERE job = i_job_tx
AND hiredate >= NVL(i_hiredate_dt,add_months(sysdate,-36))
) LOOP
p_add(c.row_tx);
END LOOP;
p_add('</table></html>');
RETURN v_out_cl;
END;
Optional parameter
only for one user
Returns CLOB
20. 20 of 44
Data Model
MODULE_TAB
module_id NUMBER [PK]
displayName_tx VARCHAR2(256)
module_tx VARCHAR2(50)
v1_label_tx VARCHAR2(100)
v1_type_tx VARCHAR2(50)
v1_required_yn VARCHAR2(1)
v1_lov_tx VARCHAR2(50)
v1_convert_tx VARCHAR2(50)
v2_label_tx VARCHAR2(100)
v2_type_tx VARCHAR2(50)
v2_required_yn VARCHAR2(1)
v2_lov_tx VARCHAR2(50)
v2_convert_tx VARCHAR2(50)
EDITION_TAB
edition_id NUMBER [PK]
name_tx VARCHAR2(50)
edition_rfk NUMBER
MODULE_EDITION
module_edition_id NUMBER [PK]
module_id NUMBER
edition_id NUMBER
0..* 0..*
0..1
0..*
USER_EDITION
user_edition_id NUMBER [PK]
user_tx NUMBER,
edition_id NUMBER
1
0..*
21. 21 of 44
Data Repository (1)
-- register modules
INSERT INTO module_tab (module_id,displayName_tx,module_tx,
v1_label_tx, v1_type_tx, v1_required_yn,
v2_label_tx, v2_type_tx, v2_required_yn, v2_convert_tx)
VALUES
(100, 'Filter Employees by Job/Hire Date','f_getEmp_cl',
'Job','TEXT','Y',
'Hire Date','DATE','N','TO_DATE(v2_tx,''YYYYMMDD'')'
);
INSERT INTO module_tab (module_id,displayName_tx,module_tx,
v1_label_tx, v1_type_tx, v1_required_yn)
VALUES
(101, 'Filter Employees by Job','f_getEmp_cl',
'Job','TEXT','Y'
);
Same
function!
22. 22 of 44
Data Repository (2)
-- create two editions
INSERT INTO edition_tab (edition_id, name_tx, edition_rfk)
VALUES (10, 'Default', null);
INSERT INTO edition_tab (edition_id, name_tx, edition_rfk)
VALUES (11, 'New Edition',10);
-- associate modules with editions
INSERT INTO module_edition (module_edition_id,module_id,edition_id)
values (20,100,10); -- two registered parameters Default
INSERT INTO module_edition (module_edition_id,module_id,edition_id)
values (21,101,11); -- one registered parameter New
-- associate users with editions
INSERT INTO user_edition (user_edition_id, user_tx, edition_id)
values (30,'HR',10); -- HR has access to Default
INSERT INTO user_edition (user_edition_id, user_tx, edition_id)
values (31,'OE',11); -- OE has access to New
23. 23 of 44
Query Repository
SQL> SELECT m.module_id, m.displayname_tx
2 FROM module_tab m,
3 module_edition me
4 WHERE m.module_id = me.module_id
5 AND me.edition_id IN (SELECT edition_id
6 FROM user_edition
7 WHERE user_tx = 'HR');
MODULE_ID DISPLAYNAME_TX
---------- ----------------------------------------
100 Filter Employees by Job/Hire Date
SQL> SELECT m.module_id, m.displayname_tx
2 FROM module_tab m,
3 module_edition me
4 WHERE m.module_id = me.module_id
5 AND me.edition_id in (SELECT edition_id
6 FROM user_edition
7 WHERE user_tx = 'OE');
MODULE_ID DISPLAYNAME_TX
---------- ----------------------------------------
101 Filter Employees by Job
Different
users
Different
modules
24. 24 of 44
Wrapper (1)
CREATE OR REPLACE FUNCTION f_wrapper_cl
(i_module_id NUMBER,
i_v1_tx VARCHAR2:=null,
i_v2_tx VARCHAR2:=null)
RETURN CLOB IS
v_out_cl CLOB;
v_param_tx VARCHAR2(32767);
v_rec module_tab%ROWTYPE;
BEGIN
SELECT * INTO v_rec FROM module_tab WHERE module_id=i_module_id;
-- build list of parameters
IF v_rec.v1_label_tx IS NOT NULL THEN
v_param_tx:=nvl(v_rec.v1_convert_tx,'v1_tx');
END IF;
IF v_rec.v2_label_tx IS NOT NULL THEN
v_param_tx:=v_param_tx||','||nvl(v_rec.v2_convert_tx,'v2_tx');
END IF;
Use transformation
function if specified
25. 25 of 44
Wrapper (2)
-- build real call
v_sql_tx:='DECLARE '||chr(10)||
' v1_tx VARCHAR2(32767):=:1;'||CHR(10)||
' v2_tx VARCHAR2(32767):=:2;'||CHR(10)||
'BEGIN '||CHR(10)||
' :out:='||v_rec.module_tx||'('||v_param_tx||');'||CHR(10)||
'END;';
--- fire!
EXECUTE IMMEDIATE v_sql_tx
USING i_v1_tx,
i_v2_tx,
OUT v_out_cl;
RETURN v_out_cl;
END;
User’s data -
only via bind variables!
Structural elements –
from the repository
26. 26 of 44
Usage
Safe solution:
All user-enterable data is passed via bind variables.
All structural elements are selected from the repository.
SQL> SELECT f_wrapper_cl (100,'PRESIDENT','19001010') call_cl
2> FROM DUAL;
CALL_CL
----------------------------------------------------------------
<html><table><tr><td>7839</td><td>KING</td></tr></table></html>
28. 28 of 44
Real Life
Major challenge:
Incremental roll-over, i.e. co-existence of old and new
code base
Manual solutions = nightmare!
Alternative (starting with Oracle 11gR2) –
Edition-Based Redefinition (EBR)
29. 29 of 44
What is EBR(1)?
Enabling editions:
Done for a specified user (when user created or via ALTER
USER)
Editionable objects are uniquely identified by name and edition
Multiple versions of the same object may exist at the same time
Different data dictionary views
Editions are shared across the database.
You need to have at least one edition (default =ORA$BASE)
Editions are linked in a chain (ORA$BASE – Edition 1 – Edition 2)
11g/12.1 - All other editions are children/[grand]children of ORA$BASE.
12.2 - You can drop all earlier editions (not just intermittent) and have a new
root.
30. 30 of 44
What is EBR(2)?
One current edition in the session
… but you can change it with ALTER SESSION.
For the new session – the current edition is
… either the default [ALTER DATABASE DEFAULT EDITION…]
… or explicitly specified in the connection string.
Special editioning views and cross-edition triggers
Fire different code in Parent/Child edition
Synch data during transition period
31. 31 of 44
What objects are editionable?
As of Oracle 12c:
SYNONYM
VIEW
SQL translation profile
All PL/SQL object types:
FUNCTION
LIBRARY
PACKAGE and PACKAGE BODY
PROCEDURE
TRIGGER
TYPE and TYPE BODY
32. 32 of 44
But…
Key restriction:
Non-editioned objects cannot depend upon editioned ones
33. 33 of 44
Key Improvements in Oracle 12.1 (1)
Changed granularity of what can/cannot be editioned
11gR2: Editioned-enabled schema means that ALL
types/objects become editioned.
12c: You can edition-enable only some objects/types of objects:
ALTER USER user ENABLE EDITIONS [ FOR type [, type ]...
]
34. 34 of 44
Key Improvements in Oracle 12.1 (2)
You can explicitly make potentially editionable objects NON-
editionable:
… for example, to build function-based indexes
SQL> CREATE USER ebr1 IDENTIFIED BY ebr1
2 DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP
3 ENABLE EDITIONS;
User created.
SQL> CREATE NONEDITIONABLE FUNCTION ebr1.f_toDate_udf
2 (i_tx VARCHAR2, i_format_tx VARCHAR2:='YYYYMMDD')
...
15 /
Function created.
SQL> CREATE INDEX ebr1.test_idx ON ebr1.test_tab(f_toDate_udf(ddl_tx));
Index created.
New clause
35. 35 of 44
Other Improvements in Oracle 12c
New clauses for materialized views and virtual columns
=> more functionality
-- [ evaluation_edition_clause ]
EVALUATE USING { CURRENT EDITION | EDITION edition |
NULL EDITION }
-- [ unusable_before_clause ]
UNUSABLE BEFORE { CURRENT EDITION | EDITION edition }
-- [ unusable_beginning_clause ]
UNUSABLE BEGINNING WITH {CURRENT EDITION | EDITION
edition| NULL EDITION}
36. 36 of 44
Impact for Code Management (1)?
YES, you can
Create logical packaging of server-side code base
… i.e. clearly separate different code groups
Have multiple versions of the code in the database at the same
time
… i.e. you can compare behavior/performance precisely under the
same conditions (data/hardware).
Quickly switch between versions without any installation
required
… i.e. shorten response time in an emergency.
37. 37 of 44
Impact for Code Management (2)?
NO, you cannot
Easily edition structural elements (i.e. tables/indexes etc.)
… although you can play synonym games which ARE editionable.
Easily edition data
… although you can introduce temporary data visibility rules.
Have lots and lots of editions for every micro-change
… sorry, EBR has not been designed to handle that scenario
39. 39 of 44
Deployment Architectural Flaw
Condition:
Code is constantly moving between DEV/TEST/PROD
DEV <> TEST <> PROD!
Problem:
How can you be sure that functionally correct changes don’t
negatively impact performance???
... Well, you can’t
40. 40 of 44
Areas of Interest
Hardware/Networking
… because even the smallest firewall setting can be disastrous.
Data volume
… because PROD is ALWAYS larger than TEST.
User volume
… because Oracle has lots of shared resources, you can
encounter unexpected bottlenecks.
41. 41 of 44
Most Important Deployment Question
You MUST have a clear answer BEFOREHAND:
If anything goes wrong, how do you fall back?
Why?
More time to figure this out – more losses/more bugs
… and more stress on everybody
Management should understand costs/risks associated with
code versioning.
… otherwise you get into continuous deployment nightmare (aka
Agile Development )
42. 42 of 44
Approaches
1. Entire system versioning
Recovery is based on complete backup of the system
… preferably on separate hardware
2. Limited-scope code modification
Recovery is based on knowing exactly what changed
… preferably via metadata-based form (EBR, repositories)
3. Everything else
… sorry, no idea what to do
43. 43 of 44
Summary
Fixing problems in existing systems is one of the main development
tasks in any organization.
… so, you have to think about code management from the very beginning.
Logical notion of “editions” helps thinking about code deployments
… whether you use EBR or not.
Some concepts are common:
Micro-managing your changes <> good code versioning
Performance problems are resolved only when they are deployed to PROD
and there are no side effects.
Successful code versioning leads to better overall system performance.
The best way to validate performance is to have old/new code coexist at the
same time [hint: EBR!]
44. 44 of 44
Contact Information
Michael Rosenblum – mrosenblum@dulcian.com
Dulcian, Inc. website - www.dulcian.com
Blog: wonderingmisha.blogspot.com
Available NOW:
Oracle PL/SQL Performance Tuning Tips & Techniques