How to set the value of optimizer_adaptive_features parameter from SQL prompt in Oracle Database 12c?


Introduction

OPTIMIZER_ADAPTIVE_FEATURES enables or disables all of the adaptive optimizer features, including adaptive plan (adaptive join methods and bitmap plans), automatic re-optimization, SQL plan directives, and adaptive distribution methods.

Continue reading
  0 Comments

ERROR: ORA-12516: TNS:listener could not find available handler with matching protocol stack


Issue

Error comes while running Release 12.2.5 Release Update Pack (RUP).

Continue reading
  0 Comments

Oracle12c EM express issue with FireFox browser

failtoloadEM
firfox load
emexpressloaded

Issue Description

When we are done with all Oracle12c installation and just to go for EM express,you may face the following error in FireFox browser.

Continue reading
Tags:
  0 Comments

ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 11744051

SQLerror

This error occur in case you have miss used values of memory_target and memory_max_target.

To overcome the same follow the following steps

Continue reading
  0 Comments

Temporary tables in Oracle Database

Consider the following situation - a customer goes to a travel website to find out the different options for travelling to his vacation spot. For this, he/she creates a number of iteneraries out of which only one will be finalized at the end or all of them will be discarded. These iteneraries donot need to be stored in the database on a permanent basis. Storing them in a temporary table to be discarded/deleted at the end of session/transaction makes sense in such cases.

Simply put, temporary tables are used to store data temporarily during a transaction or session.

Continue reading
  0 Comments

Index on Database Tables- Performance Benefits and Costs

Why Indexes?

Basic use of index is to find data in a table more quickly by speeding up the query searches. Consider an employees table with 1 million records. If I query the table to extract data for 1 employee based on emp_id, all the records are compared for the emp_id. This approach will be very time taking in real time when many queries are searching for records. Thus we should use indexes to speed up the searching process.

Continue reading
  0 Comments

CASE statement and expressions: usage in PL/SQL

CASE statement is used to select one out of many set of statements to execute.

Types of CASE statements:

Continue reading
  0 Comments

Records and Pseudo Records in PL/SQL

How about this.. you can create a composite data structure in pl/sql which can hold an entire row's data. Records are made up of one or more fields of same or different datatypes, same as a row in a table.

Example:

Continue reading
  0 Comments

Difference between DETETE, DROP and TRUNCATE Commands in SQL

I had some difficulty working with these 3 commands back when I was learning SQL particularly when deciding which one to use. SO, I've dedicated this blog to differentiating the three of them.

DELETE: used to remove rows selectively from a table. Delete is a DML command, so it will cause any delete triggers on the table to fire. You may need to explicitly commit after deleting from a table to make changes permanent.

Continue reading
  0 Comments

A Brief Description about INSTEAD OF Triggers

So folks, I’m not going to explain the trigger syntax here as its same for all types of triggers. I’ll start off with INSTEAD OF trigger straight away.

INSTEAD OF triggers hold a special functionality as they can be used to update views which are normally not updateable and perform insert, update, delete, merge operations on them.

Continue reading
  0 Comments

Module Overloading in Oracle PL/SQL

Introduction

Module overloading is a concept used across many programming languages mainly because it’s a very powerful feature which improves the usability of your software.

Continue reading
  0 Comments

When to use PL/SQL Autonomous Transactions?

Another cool and powerful feature that gives us the independence of carrying out a specific task as a separate transaction while inside the main transaction. The main transaction merely suspends for the duration the autonomous transaction runs.

It has great applications and uses while writing pl/sql code.

Continue reading
  0 Comments

DYNAMIC SQL - an introduction

What is the difference between dynamic sql and static sql?

Dynamic sql refers to statements that are constructed and executed at runtime. Whereas static sql statements are constructed when the pl/sql block containing the statement is compiled.

Continue reading
  0 Comments

Including User Defined Functions in SQL Queries

Functions are a great and fun way to implement any functionality in our code. Not only are they easy to code and include almost anywhere we need them, their reusability and the large acceptance of return datatypes make them a coder's superpower.

One of the benefits of user defined functions is that they can be included in sql queries just like any other oracle predefined functions.

Continue reading
  0 Comments