asmcmd “connected to an idle instance” – not

This is more a note to myself in case I’ll encounter a similar environment. But maybe it helps others – at least my search results weren’t suitable to Windows in the first place. Issue C:\> set ORACLE_HOME=C:\path\to\grid\home C:\> set ORACLE_SID=+ASM1 C:\> asmcmd connected to an idle instance. Environment Windows 2012R2 Oracle Grid Infrastructure 12.1.0.1 2 […]

ORA-01450: maximum key length (3800) exceeded

This is an oddity as essentially I have an index on a table but I cannot rebuild it because it suggests the block size should be bigger than 8K – however both the database and tablespace block size are 16K already.

The maximum allowed index key length depends on your block size. So the minimum allowed size reported in ORA-01450 varies, depending on which block size your index is using:

ORA-01450 maximum key length (758) (more...)

“Collection iterator pickler fetch”: pipelined vs simple table functions

Alex R recently discovered interesting thing: in SQL pipelined functions work much faster than simple non-pipelined table functions, so if you already have simple non-pipelined table function and want to get its results in sql (select * from table(fff)), it’s much better to create another pipelined function which will get and return its results through PIPE ROW().

A bit more details:

Assume we need to return collection “RESULT” from PL/SQL function into SQL query “select (more...)

Getting Ready

I don't think it's any big secret that we're getting close to R13 of Oracle Cloud Applications.  We've been talking about it publicly since Oracle OpenWorld 2017.  Having seen R13 up close, I'm very excited to see it come to market.

But, my excitement notwithstanding, I also know that existing customers get a bit antsy in the face of an impending upgrade.  Because preparation for an upgrade is important, and that preparation requires information.  What (more...)

manage ORACLE_HOMEs and patches in a centralised way

Managing many ORACLE_HOMEs in a complex environment can be tricky, especially when questions about their patches & bugs or comparisons should be done.

It's required to understand the different types of patches available. This can be (according to the documentation & my interpretation). Especially the differences between SYSTEM PATCH (in our case only Bundle Patches), COMPOSITE and SINGLETON patches, and BUGs - of course.

A way to handle all the information is to (more...)

Docker : My First Steps

In a blog post after OpenWorld I mentioned I might not be writing so much for a while as something at work was taking a lot of my “home time”, which might result in some articles, but then again might not… Well, that something was Docker…

After spending a couple of years saying I was going to start looking at Docker, in June I wrote a couple of articles, put them on the website, but (more...)

The hang manager

Recently I was looking in the trace directory in the diag dest of my (12.2.0.1) instance, and found some trace files which were different from the others:

$ ls | grep dia0
test_dia0_9711_base_1.trc
test_dia0_9711_base_1.trm
test_dia0_9711_lws_1.trc
test_dia0_9711_lws_1.trm
test_dia0_9711.trc
test_dia0_9711.trm

The dia0 ‘test_dia0_9711.trc’ file is fully expected. But what are these ‘..lws_1.trc’ and ‘..base_1.trc’ files? And ‘base’ is something that I understand, but (more...)

DBMS_COMPRESSION can be run in parallel, at least from 11.2.0.4

I was trying to use DBMS_COMPRESSION on an 11gR2 (11.2.0.4 on RHEL 6.3) database the other day and was helped by this article from Neil Johnson. I was having some trouble with permissions until I read that article which nicely summarises everything you need to know – thanks Neil!

One thing I did notice is that Neil stated that you can’t parallelise the calls to the advisor since it uses the (more...)

Oracle Code Online December 2017

This week Oracle Code will be having an online event consisting of 5 tracks and with 3 presentations on each track. This online Oracle Code event will be given in 3 different geographic regions on 12th, 13th and 14th December. NewImage I've been selected to give one of these talks, and I've given this talk at some live Oracle Code events and at JavaOne back in October. The present is pre-recorded and I recorded this video (more...)

Oracle 12c and PHP

This answers “How you connect PHP programs to an Oracle 12c multitenant database. This shows you how to connect your PHP programs to a user-defined Container Database (CDB) and Pluggable Database (PDB). It presupposes you know how to provision a PDB, and configure your Oracle listener.ora and tnsnames.ora files.

CDB Connection:

This assumes you already created a user-defined c##plsql CDB user, and granted an appropriate role or set of privileges to the (more...)

Type Dependent Tree

While trying to explain a student question about Oracle object types, it seemed necessary to show how to write a dependency tree. I did some poking around and found there wasn’t a convenient script at hand. So, I decided to write one.

This assumes the following Oracle object types, which don’t have any formal methods (methods are always provided by PL/SQL or Java language implementations):

CREATE OR REPLACE TYPE base_t AS OBJECT
( base_id  NUMBER  (more...)

SQL*Plus tips #8: How to read the output of dbms_output without “serveroutput on”

When “serveroutput” is enabled, SQL*Plus executes “BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;” after each command.
That’s why I don’t like when it is always enabled: it adds extra calls and round-trips and it is inconvenient when I want to get a plan of the last executed query:

SQL> set serverout on;
SQL> select * from dual;

D
-
X

SQL> select * from table(dbms_xplan.display_cursor('','','allstats last'));

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------
SQL_ID  9babjv8yq8ru3, child number 0

BEGIN  (more...)

Substitutable Columns

Oracle’s substitutable columns are interesting and substantially different than Oracle’s nested tables. The benefit of substitutable columns is that you can create one for an object type or any subtypes of that object type. Unfortunately, you can’t create the same behavior with nested tables because Oracle’s implementation of collection types are always final data types and you can’t extend their behaviors.

The Oracle Database has three types of collections. Two are SQL scoped collection types (more...)

Bug with integer literals in PL/SQL

This interesting question was posted on our russian forum yesterday:

We have a huge PL/SQL package and this simple function returns wrong result when it’s located at the end of package body:

create or replace package body PKGXXX as
  ...
  function ffff return number is
  nRes number;
  begin        
    nRes :=  268435456;
    return nRes;
  end;
end;
/

But it works fine in any of the following cases:
* replace 268435456 with power(2, 28), or
* replace (more...)

Shooting the DBA isn’t a Silver Bullet to the Cloud

We’ve all been watching numerous companies view value in bypassing the Database Administrator and other critical IT roles in an effort to get IT faster to the cloud.  It may look incredibly attractive to sales, but the truth of it is, it can be like setting up land mines in your own yard.

Having the right people in the right roles, doing the right tasks is essential to having a complete cloud deployment.  (more...)

UKOUG Tech17 : It’s a Wrap!

Just a quick reflection on the UKOUG Tech17 event…

Here are the posts I wrote over the event.

Things went pretty well for me this week. My timetable allowed me to come for two full days, which was nice. It’s a lot less stressful when you are not trying to (more...)

Oracle Integration Cloud Update

As previously mentioned, ICS is going to be incorporated into Oracle Integration Cloud.  Since we have had the announcement we have had some more information about OIC released. The keypoints here are: OIC Standard Edition OIC Enterprise Edition What we used to know as Integration Cloud Service, which includes … Various integration patterns including Orchestration […]

The post Oracle Integration Cloud Update appeared first on Implementing Oracle Integration Cloud Service.

UKOUG Tech17 : Wednesday

Wednesday started with a quick trip to the doctor, then I got a bus into town for the conference. I kept bumping into interesting people and chatting, so I didn’t manage to get to any of the early sessions.

I missed picking up my Best UK Speaker award and the group photo yesterday, so I picked it up today and did a photo with Linda and Jennifer, two of the ladies that keep the Oracle ACE (more...)

UKOUG Tech17 : Tuesday

Tuesday was a work day for me, so I was in work until the late afternoon, then left for the conference to do my APEX session. A little while later I was sitting in traffic thinking, “I’m not going to make it!” The traffic opened, I got a parking spot really quickly and I made it with 3 minutes to spare… 🙂

The session was based around API first development for APEX. I was quite (more...)

UKOUG and Microsoft Marathon Webinar

I’m here for the last day of UKOUG Tech17 and it’s been an awesome event.  This is my first time to this event while in Birmingham and although quite the party town on the weekends, its a great city to have an event like UKOUG’s trio of events during the week.

I was welcomed to great turnouts to both my presentations and then enjoyed numerous sessions by other’s, such as Richard Foote, Jonathan (more...)