AWS: ALTER SYSTEM and Managing SYS Objects in RDS

I’m very often managing services over EC2 and there are a few actions clients are often getting some issues to perform in RDS. So I decided to list here 5 of them:

Kill sessions:

begin
rdsadmin.rdsadmin_util.kill(
sid => &sid,
serial => &serial,
method => 'IMMEDIATE');
end;
/

Flush shared_pool or buffer_cache:

exec rdsadmin.rdsadmin_util.flush_shared_pool;
exec rdsadmin.rdsadmin_util.flush_buffer_cache;

Grant Privileges to SYS Objects

# Grant

begin
    rdsadmin.rdsadmin_util.grant_sys_object(
        p_obj_name  => 'V_$SESSION',
        p_grantee   => 'GREPORA',
        p_privilege => 'SELECT');
end;
/

# Grant with Grant Option

begin
    rdsadmin.rdsadmin_util.grant_sys_object(
        p_obj_name     => 'V_$SESSION',
        p_grantee      => 'GREPORA',
        p_privilege    => 'SELECT',
        p_grant_option => true);
end;
/

# Revoke

begin
    rdsadmin.rdsadmin_util.revoke_sys_object(
        p_obj_name  => 'V_$SESSION',
        p_revokee   => 'GREPORA',
        p_privilege => 'SELECT');
end;
/

 

Hope it Helps!

Clear Exadata Component Messages After Maintenance

Hi all,

Quick one today: So you completed a maintenance in a component (a memory component, as per example below) but keep receiving messages of failure?

Well, try clearing all the error messages after complete the maintenance and lets check if the threshold is reached again. If so, we may need to really replace it.

How to do it? Easy:

ssh root@grepora01-ilom
-> show /SYS/MB/P0/D3
Expected:
[...]
fault_state = Faulted
[..]
-> set /SYS/MB/P0/D3 clear_fault_action=true
Are you sure you want to clear /SYS/MB/P0/D3 (y/n)? y
-> show /SYS/MB/P0/D3
[Expected]
 /SYS/MB/P0/D3
    Targets:
        PRSNT
        SERVICE
Properties:
type = DIMM
ipmi_name = MB/P0/D3
fru_name = 16384MB DDR4 SDRAM DIMM
fru_manufacturer = Samsung
fru_part_number = %
fru_rev_level = 01
fru_serial_number = %
 fault_state = OK
clear_fault_action = (none)

ORA-02019 While SELECT From A View Owned By Another User Using Dblink

Quick case today.

This week I had a client experiencing ORA-02019 while SELECT from a View with dblink and CONNECT BY PRIOR … START WITH into SELECT.
The situation involved Views on a DB which need to be accessed by a groups of users from another DB using proxy user and a DB link but encounter this ORA error.

The root cause?

ORA-02019 while performing select on a view or while selecting a view owned by another user, with dblink, is a match to Bug 26558437 – DATABASE LINK FAILS WITH ORA-2019 WHEN SELECT ANOTHER USER VIEW.

But MOS doesn’t have workaround besides applying patch, as usual. What we did and solved on our case?

We created a materialized view refreshed every 15 mins (solution supported this delay0 using the DBLink if the view owner.
In this case, the other users instead of executing the query on the view, will be actually querying the table created (and refreshed) by the mview code, which would be only be executed by the mview owner.

By the way, 2 good side effects:
1) Once view was executed more often then the period of refresh, this solution is also saving some efforts database wise, once executing select from mview is way better then the view code, besides not using the network on dblink
2) If the remote database get slow, or down, the data would be still available from last mview refresh.

Conclusions:
1) Use MATERIALIZED VIEW!
2) MOS not always give you all the steps. Sometimes you can easily solve your problem by thinking a little bit more on the root cause problem.

Cheers

Installing EM 13c Agent on AIX 5.3

Hi,

Issues to install an Enterprise manager 13c agent on Database on AIX 5.3? Well, I found some errors I’d like to share with you:

First, to deploy agent manually by agentDeploy script, seems the ResponseFile is not working properly in some cases, so I recommend passing parameters manually:

./agentDeploy.sh AGENT_BASE_DIR = / u01 / app / oracle / agent13c -ignorePrereqs -invPtrLoc /etc/oraInst.loc AGENT_PORT = 3872 EM_UPLOAD_PORT = 4903 OMS_HOST =  ORACLE_HOSTNAME =  AGENT_INSTANCE_HOME = / u01 / app / oracle / agent13c / agent_inst AGENT_REGISTRATION_PASSWORD =  SCRATCHPATH = / backup / joao / temp

Al good? Not really, when starting the services, I started facing:

ERROR: Agent Configuration Failed SEVERE: emctl secure agent command failed with status = 1SEVERE: emctl secure agent command failed with status = 1SEVERE: emctl secure agent command failed with status = 1

Hmm… Why? So, seems this error is due to AIX secure with OMS (Linux). After a while, here is the workaround:

$ emctl secure agent -protocol TLS

That’s it! Try testing it now:

$ emctl upload agent

EMD upload completed successfully

Great! Agent installed. Now, to autodiscover further targets on host:

$ emctl config agent addinternaltargets

Now monitoring is complete!

[]s, Bicca.

Oracle Application Express Hands-On in Brasília!

Hello all!

I’m happy to announce here the next GUOB Meetup in Brasília focused on APEX .

The meeting will be conducted by

When?
Next October 9th!
2PM to 6PM

Where?
Ed. Corporate Financial Center (Oracle).
Setor Comercial Norte Q 2 – North Wing, Brasilia – Federal District

Cost? FREE
Just confirm you presence here.

IMPORTANT: bring your laptop.

Agenda:
2PM – Autonomous Database and Oracle Application Express – Monica Godoy
4PM – Coffee-break
4:30PM – Dynamic Actions in Action – Anderson Ferreira
5:30PM – Open Mic
6PM – Closure

NewScreenshot 2019-09-23 às 16.42.37

Oracle Application Express Hands-On in São Paulo!

Hello all!

I’m happy to announce here the next GUOB Meetup in São Paulo focused on APEX .

The meeting will be conducted by Monica Godoy, Product Manager do Oracle Application Express.

When?
Next October 7th!
6PM to 8PM

Where?
Rua Dr. José Áureo Bustamante, 455

Cost? FREE
Just confirm you presence here.

IMPORTANT: bring your laptop.

Agenda:
6PM – Autonomous Database and Oracle Application Express – Monica Godoy
7:30PM – Open Mic
8PM – Closure

NewScreenshot 2019-09-23 às 16.48.00

2º Meetup GUOB 2019 – Indexes and Partitioning

Hello all!

I’m happy to announce here the next Meetup to happen in Campinas nex October 5th. It’s being organized by GUOB and PL/SQL Camp.

When?
Next October 5th!

Where?
Av João Erbolato, 376, Jd Chapadão · Campinas

Cost? FREE
Just confirm your presence here.

IMPORTANT: bring your laptop.

Agenda
Oracle Indexes Myths“, by Ricardo Portilho Proni.
Oracle Partitioning for Devs: Why, When and How“, by Franky Weber Faust.

Schedule
09:00 – Opening
09:30 – Session “Oracle Indexes Myths
10:30 – Coffee break
11:00 – Session “Oracle Partitioning for Devs: Why,When and How
12:00 – Closure

Speakers
Ricardo Portilho Proni
Franky Weber Faust

Don’t miss it!

ORA-00600: internal error code, arguments: [kghfrempty:ds]

Hi all,
Annoying thing, just because that sounded veeery unsual to me. I would expect a different error.

I have seen this “[kghfrempty:ds]” in past a couple times, and if you did see it too you may have noticed, this is almost as much generic as the ORA-600 itself. It happens because this is usually in the top of KGH errors in general. Some examples:

1.

kghnerror <- kghfrempty <- kghfrempty_ex <- qerhjFreeSpace
<- qerhjFetch <- qersoProcessULS <- qersoFetch <- opifch2 <- kpoal8
<- opiodr <- kpoodrc <- rpiswu2 <- kpoodr <- upirtrc
<- kpurcsc <- kpufch0 <- kpufch <- OCIStmtFetch2 <- qksanExecSql <- qksanAnalyzeSql

2.

kghfrempty <- kghfrempty_partial <- kghgex <- kghfnd <- kghalo <- kghgex <- kghalf <- ktmrProcessCRClone 
<- ktmbRead <- ktmrget_int <- ktmrget <- kdmsTransGet <- kdst_fetch_imc  <- kdsttgr  <- qertbFetch

And as being it can be related either to analyze bugs (as per stack 1), In-Memory Column Store – IMC (as per stack 2), create views, rollback over cluster, trigger creation, use function based indexes, or several other generic situations (there is no pattern, as you can see).

So what do to if you get this message? Well, generically, read all the MOS notes available and try to match you case. IF you match, pray to have a bug for your current version, or open an SR to either have a backport or start a new investigation.

A few examples of things to check:

  • ALERT: Bug 13605839 ORA-600 [ktbsdp1] ORA-600 [kghfrempty:ds] ORA-600 [kdBlkCheckError]. Corruption in Rollback with Clusterwide Global Transactions in RAC (Doc ID 1527740.1)
  • SQL Analyze Fails with ORA-600[kghfrempty:ds] (Doc ID 2247180.1)
    Bug 21556276 – dataguide createviewonpath hit ora 600 [kghfrempty:ds] (Doc ID 21556276.8)
  • Bug 20878625 – ORA-600[kghfrempty:ds] with IMC enabled (Doc ID 20878625.8)
  • Bug 19212166 – ORA-600 [KGHFREMPTY:DS] With Cache Line Alignment Enabled (Doc ID 19212166.8)
  • Bug 6797925 – ORA-600 [kghfrempty:ds] During Creation Of Trigger In XML Schema (Doc ID 6797925.8)
  • 11.1: ORA-600 [17147] AND [kghfrempty:ds] On Select Using Functional Indexes (Doc ID 884882.1)
  • ORA-600 [kghfrempty:ds] And ORA-600 [kghrcdepth:ds] While Gathering Statistics (Doc ID 1480132.1)

BUUT I just noticed some undocumented scenario causing this and it might help you on fixing this as well.
I noticed I was getting this error for different queries but always from same application. So I addressed a complete review on application layer and noticed the JDBC 7 on this application. Happens we had just upgraded from 12.1 to 19c.

SO, after upgrading jdbc, it started to work again properly and no MOS SR was required. So lesson learned: When you receive this kghfrempty:ds], speacially after migration, also check for your application JDBC version.

For compatibility Matrix: Starting With Oracle JDBC Drivers – Installation, Certification, and More! ( Doc ID 401934.1 )

Hope it helps, cheers!

Oracle Container for Kubernetes Hands-On – Porto Alegre

Hello all!

I’m happy to announce here the next Meetup in Porto Alegre speaking over Oracle Container for Kubernetes  and how Oracle works with Cloud Native.

The meeting will be conducted by Diogo Shibata, from Oracle.

When?
Next October 2nd!

Where?
ATTIVE Coworking – Rua Carlos Gardel nº 55 – Bela Vista – Porto Alegre

Cost? FREE
Just confirm you presence here.

IMPORTANT: bring your laptop.

WhatsApp Image 2019-09-23 at 22.54.55.jpeg

guobguors

Oracle cloud computing hand on

Oracle and others cloud providers are doing nice stuff building their cloud strategies.

Oracle is granting U$ 300 to quickly deploy OLTP /DW and other technology platforms.

With cloud and distributed infrastructure we can code, test, deploy and quickly build any lab purpose as a free* offer.

Let’s review and run the fastest & free sandbox machines for cloud improvements purpose.

cloud 1.PNG

It runs good enogth 🙂

cloud 2

Quickly deploy machines. And receive classic middleware connection files.

\o/

cloud 3

It run’s so easy,  but it may cost money/digital value as it ‘soon it burn’ credit at Oracle.

Why not to test it and build muilt-cloud solution?

Don’t forget security and data privacy standards and Oracle availability.

With this solution at cloud is so simple to run a ‘DB as a button’, it spent 2 minutes in my lab. It actually available on What is amazing time for typical lab or tech hand.

Let’s test it and CHEERS.