Oracle 12c

Sharding videos on Youtube

I've uploaded 3 videos on installing and configuring sharding in Oracle Database 12c Release 2. I use Virtual Box running Oracle Linux to create a sharded database and run a swingbench workload against it. In part 3 I then add a new shard online and monitor the database as the data is rebalanced across the cluster. You can see them below but I reccomend running them full screen because there's quite a lot going on.

Part 1






Part 2






Part 3


Comments

Application Continuity in Oracle Database 12c (12.1.0.2)

In this entry I’ll try and detail the steps required to get application continuity working with swingbench. I’ll create a video with a complete walk through of the build. It’s also possible this blog is likely to be updated regularly as I get feedback

Assumptions


The following assumptions are made

  • You have a working Oracle RAC Database 12c ideally running at version 12.1.0.2 (Database and Clusterware)
  • You have downloaded the very latest version of swingbench
  • You’ve installed the SOE benchmark using the oewizard
  • You’re running on a Physical or Virtual Machine (Virtual Box)
  • You are using the thin jdbc driver with swingbench

My configuration


In this example I’m using a 2 node RAC cluster for simplicity but I’ve validated the configuration on an 8 node cluster as well. My configuration

OS : Linux 6
Nodes : RAC1, RAC2
SCAN : racscan
CDB : orcl
PDB : soe
schema : soe

So after you’ve confirmed that the soe benchmark has been installed correctly the next step is to define the services. I created two new ones to show the difference between Application Continuity and standard Fast Application Failover. First a non Application Continuity Service

srvctl add service -d orcl -s soepdb -pdb soe -preferred orcl1,orcl2
srvctl modify service -db orcl -service soepdb -failoverdelay 5
srvctl modify service -db orcl -service soepdb -failoverretry  60
srvctl modify service -db orcl -service soepdb -clbgoal SHORT
srvctl modify service -db orcl -service soepdb -rlbgoal SERVICE_TIME


Now a service defined for Application Continuity

srvctl add service -db orcl -service soepdb_ac -commit_outcome TRUE -retention 86400 -preferred orcl1,orcl2
srvctl modify service -db orcl -service soepdb_ac -failovertype TRANSACTION
srvctl modify service -db orcl -service soepdb_ac -failoverdelay 5
srvctl modify service -db orcl -service soepdb_ac -failoverretry  60
srvctl modify service -db orcl -service soepdb_ac -session_state STATIC
srvctl modify service -db orcl -service soepdb_ac -clbgoal SHORT
srvctl modify service -db orcl -service soepdb_ac -rlbgoal SERVICE_TIME

Then grant access to the Application Continuity package to the SOE use


SYS@//rac1/soepdb > GRANT EXECUTE ON DBMS_APP_CONT TO SOE;

And thats it for the database/grid. All we need to do now is to configure swingbench to connect to the services. You can do this either in the command line, swingbench GUI or by editing the config file. The connect string should look similar to this (for application continuity)

(DESCRIPTION=
  (TRANSPORT_CONNECT_TIMEOUT=5)
  (RETRY_COUNT=6)
  (FAILOVER=ON)
  (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = racscan)
    (PORT = 1521)
  )
  (CONNECT_DATA=
    (SERVER = DEDICATED)
    (SERVICE_NAME = soepdb_ac)
  )
)


NOTE : EZConnect strings won’t work for this.

We’ll also need to use connection pooling. The pool definition is only example and should reflect the total number of threads you plan to run with. If you’ve edited the definition in the config file you should end up with something similar to


            40
            20
            60
            50
            45
            10
            120


Or if you modify it via the GUI.

ac1

The final step is to enable the application continuity driver and FAN you can again do this in the config file with the following settings

            50
            true
            20
            nodes=rac1:6200,rac2:6200
            true


or via the GUI

ac2

For my test I used the following Load configuration


        60
        0
        0
        50
        500
        120
        -1
        0:0
        5
        1000
        false
        false
        0:0
        0:0
        0

Or via the GUI

ac3

My complete config file is available here for reference

I’d initially suggest running with swingbench to enable the monitoring of errors. Start swingbench

ac4


You should see a balanced number of users logged on across your instances. Although though may fluctuate depending on a number of factors.

ac5

The next step is to cause an unexpected termination of one of the resources. I’d suggest killing PMON i.e.
[oracle@rac2 ~]$ ps -def | grep pmon
oracle    4345     1  0 05:00 ?        00:00:00 asm_pmon_+ASM2
oracle   18093     1  0 08:11 ?        00:00:00 ora_pmon_orcl2
oracle   25847  6655  0 08:37 pts/1    00:00:00 grep pmon
[oracle@rac2 ~]$ kill -9 18093

You should see a little disruption in the TPS as you kill the instance. How long will depend on your RAC configuration and power of machine. The following screen shot is from 2 VMs running on my mac. But the important point is that swingbench won’t get any errors.

ac6


To try and see what happens without application continuity try changing the connect string to point at the non application continuity service.

ac7

Then delete the property that forces swingbench to use the Application Continuity Driver.

ac8

Rerunning and terminating the instance should result in something like this.

ac9

The important point here is the errors which normally an application developer would need to handle without the guarantee of transactions not being applied more than once.





Comments

Some simple videos on 12.1.0.2 functionality

I’ve added a couple of simple youtube videos on Oracle Database 12c release 1 (12.1.0.2) functionality. I’ll be adding a few more over the new few weeks as well... Let me know what you think.

Comments