Subscribe to Posts by Email

Subscriber Count

    701

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

Oracle19c: EZConnect Enhancements

EZConnect is something very useful to make fast connection calls without requiring a TNS. Problem is that, until now, if you want to use some value pairs likes SDU, RETRY_COUNT, CONNECT_TIMEOUT, this wasn't possible and you would end-up using TNS. Now in 19c you will be able to write something like:

sqlplus user/pwd@//DB:1521/host?connect_timeout=100&transport_connect_timeout=10&retry_count=3

Oracle 20c : SecureFiles online defragmentation

SecureFiles Defragmentation

SecureFiles defragmentation provides online defragmentation of allocated and freed space in SecureFiles segments, for all types of SecureFiles LOBs - compressed, deduplicated, encrypted. Defragmentation can be done automatically by a background process, and the segment advisor can estimate the fragmentation levels and how much space can be saved. Defragmentation can be done mostly in-place, with some temp segment space needed to hold intermediate results.

SecureFiles defragmentation provides a transparent way to defragment or shrink the space used by SecureFiles segments, helping to reclaim space and improve performance, without compromising concurrent access to SecureFiles data, and without a significant impact on performance.

The alter table now having shrink_clause for secure lob files.

Alter table modify lob(a) shrink_clause ;

DevOps for DBA’s: Installing Kubernetes

Please watch the latest videos on installing kubernetes using Vagrant box on your laptop and practice for your devops stuff.

Pre-req

  1. Install vagrant on your laptop
  2. Get an account on container-registry.oracle.com
  3. Download https://github.com/oracle/vagrant-boxes repository

Navigate to the git repo that is downloaded and just run

On Command prompt,

cd <folder>/kubernetes

vagrant up master

once the machine is ready, perform

vagrant ssh master

sudo su -

cd /vagrant/scripts/

sh kubeadm-setup-master.sh

This will initiate the kubernetes cluster

Perform work node installation

On command prompt,

cd <folder>/kubernetes

vagrant up worker1

once the machine is ready, perform

vagrant ssh worker1

cd /vagrant/scripts

sh kubeadm-setup-worker.sh

Repeat the same with worker 2 as well.

Videos for the same.

Kubernetes Installation
Kubernetes Dashboard Setup

Parallel Hint Not honored on CDB (19c)

Thanks to Vasu N for sharing the details and discussing on this.

Issue with parallel hint on 19c CDB database where the hint is not honored and going for serial scans. Apparently seems to be Oracle bug Bug 30618478 - UPGRADE : SQLS WITH PARALLEL HINT RUNNING SERIALLY INTERMITTENTLY. Here is the test case for your reference.

Hint not effective

Hint effective - After restart of service as a workaround

Oracle 20c: Expression for Initialization Parameters

Starting 20c, One can keep expression in Initialization Parameters. some examples from documentation as below

Initialization parameter expressions can contain the following constructs:Integer values

OLAP_PAGE_POOL_SIZE = 1073741824

Decimal values, only when they are part of a numeric operation

CPU_COUNT = 8 * 0.6

If the operation resolves to a decimal value, then the result is truncated to an integer value. This example would set CPU_COUNT to 4.

An integer value followed by an indicator that the integer is expressed in kilobytes (k or K), megabytes (m or M), gigabytes (g or G), terabytes (t or T), petabytes (p or P), or exabytes (e or E) OLAP_PAGE_POOL_SIZE = 900m

MEMORY_TARGET = 2G

Other parameter names

JOB_QUEUE_PROCESSES = PROCESSES

The binary operators for multiplication (*), division (/), modulo (%), addition (+), and subtraction (-)

SHARED_SERVERS = MAX_SHARED_SERVERS / 2 DATA_GUARD_MAX_LONGIO_TIME = DATA_GUARD_MAX_IO_TIME + 10 * 3

Operator precedence: the multiplication, division, and modulo operators are evaluated first, from left to right, and then the addition and subtraction operators are evaluated from left to right.If the expression resolves to a decimal value, then the result is truncated to an integer value.

Parentheses, which allow you to override operator precedence

SHARED_SERVERS = (MAX_SHARED_SERVERS - 1) / 2 DATA_GUARD_MAX_LONGIO_TIME = (DATA_GUARD_MAX_IO_TIME + 10) * 3

The MIN and MAX functions. These functions take two operands and return the minimum and maximum value, respectively.

AQ_TM_PROCESSES = MIN(40, PROCESSES * .1) SESSIONS = MAX(200, PROCESSES * 1.5)

Environment variable values, which must be preceded by the dollar sign ($)CPU_COUNT = $SYSTEM_CPU/5

You can specify an expression when using any of the following methods to set an initialization parameter:

For example:

ALTER SESSION SET AQ_TM_PROCESSES = 'MIN(40, PROCESSES * .1)';

ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 'PROCESSES' SCOPE=BOTH;

Oracle 20c: New Datatype Json

In oracle 20c, JSON is a new SQL and PL/SQL data type for JSON data. The data is stored in the database in a binary form for faster access to nested JSON values. You can use JSON data type and its instances in most places where a SQL data type is allowed, including:

  • As the column type for table or view DDL
  • As a parameter type for a PL/SQL subprogram
  • In expressions wherever a SQL/JSON function or condition are allowed

Oracle 19c: How does DML redirect to standby works

In Oracle 19c, one can submit the DML to readonly standby database. the internals of the database detect a dml on standby and redirect that dml to primary apply it on primary and apply to standby back. However this require careful consideration of redo generation and identify the potential dml's or occasional dml;s that can go to standby.

Image Source: blogs.oracle.com

The DML Redirection process breaks down in 5 steps:

  1. The Client issues a DML against the read-only Standby Database
  2. The standby notices it is DML and sends this DML towards the primary database using an internal Db-link
  3. The primary executes the DML (which then generates redo)
  4. This redo is a normal redo stream and together with the normal redo stream this is sent to the standby database
  5. The standby database applies the received redo stream and releases the lock on the session so the session can see the result.

So consider before you put this feature in place and understand bandwidth and ideal candidates for DMLs that can run on standby.

Oracle 20c & 19c (RU): Standard Edition (2) High Availability

As per recent update in blogs.oracle.com, Oracle is planning to include a Standard Edition High Availability solution with Oracle Grid Infrastructure that provides cluster-based failover for Standard Edition Oracle Databases using Oracle Clusterware.

Image Source: Blogs.oracle.com

This will help customers who are on standard edition license to level high availability features that are part of enterprise edition earlier.

This feature will be available in 19c upcoming RU and in 20c as per Oracle announcements.

Suresh

Oracle 19c: Auto upgrade utility

Autoupgrade is compatible with 12.2 and 18.5 and you need to download the kit from 2485457.1

Autoupgrade.jar is available default in 19c

How this works

Prevent Issues : Analyze and Fixup Modes

java -jar autoupgrade.jar -config config.txt -mode analyze

java -jar autoupgrade.jar -config config.txt -mode fixups

Simplifying Upgrade: Deploy and upgrade

java -jar autoupgrade.jar -config config.txt -mode deploy/upgrade

Oracle 19c: DBCA Enhancements

In order to duplicate a database one must use rman duplicate command or manual procedure to copy and restore the files

From 19c, DBCA facilitates duplication of db with new “CreateDuplicateDB”

Requires easy connection string so that it duplicates the target db to wherever running §

From 19c, ability to create PDB from remote PDB using DBCA is possible

Use dbca –silent createpluggabledatabase with option “createFromRemotePDB”