Close

Introduction to ASH Data, part 2

What is ASH? AWR and Activity Types (this page) Average Active Sessions Graphical Visualizations Previously I showed a few queries using (G)V$ACTIVE_SESSION_HISTORY, but only mentioned the DBA_HIST_ACTIVE_SESS_HISTORY view. Here I’ll extend the query patterns into this historical repository. Where V$ACTIVE_SESSION_HISTORY is a once-per-second snapshot of sessions from memory and kept in memory, the DBA_HIST_ACTIVE_SESS_HISTORY data…

Looking Through Holes in Time

While testing some date/time functions today I came across an interesting quirk in Oracle’s Gregorian calendar and different date representations. In the Gregorian calendar, the day after October 4, 1582 is October 15, 1582 (not all countries adopted the calendar immediately, so they have different gaps, but Oracle observes the calendar as it was originally…

Introduction to ASH Data

What is ASH? (this page) AWR and Activity Types Average Active Sessions Graphical Visualizations The Oracle database captures session activity approximately once each second. This data can then be used to identify usage patterns and performance problems. Many performance experts have written very good suites of scripts and tools to query, analyze, and chart the…

How to use DBMS_LDAP (part 4: Attributes)

Table of Contents Introduction Establishing a Connection Searching Hierarchical Data Browsing Attributes (this page) Timeouts Modifying Data Searching Hierarchical Data with Attributes Returning attributes with search results The examples in the prior chapter use the “1.1” code to return no attributes. In this example we’ll return two of the attributes associated with an entry. Instead…

LTRIM, RTRIM, and TRIM

The trimming functions in Oracle frequently are used by many developers; but not all know the full set of options available and how they compare to each other. Sometimes I need to remind myself so this post is as much for me as for others. I hope you find it helpful. The LTRIM and RTRIM…

How to use DBMS_LDAP (part 2: Connecting)

Table of Contents Introduction Establishing a Connection (this page) Searching Hierarchical Data Browsing Attributes Timeouts Modifying Data Establishing a Connection The DBMS_LDAP.INIT function is used to connect to an LDAP server. On success, the function returns a session handle of DBMS_LDAP.SESSION type. FUNCTION init (hostname IN VARCHAR2, portnum IN PLS_INTEGER ) RETURN SESSION; DBMS_LDAP.PORT is…

My KScope2018 slides

Finally getting around to posting these, sorry about the delay. My powerpoint slides can be downloaded here. Some of the slides included simplified queries so the text would fit on a single screen and remain legible. To find who is using temp, a more functionally robust query can be found here: /2018/03/08/who-is-using-temp-and-what-are-they-doing/ Similarly, the who…

18c JSON TO_UTC_TIMESTAMP_TZ bug

I tried the following query on 18c via Oracle’s LiveSQL site and the results don’t correspond to the documented functionality; or, at least, not my reading of the functionality. select to_utc_timestamp_tz(‘2018-04-27’) t from dual union all select to_utc_timestamp_tz(‘2018-04-27T17:40:25+00:00’) from dual union all select to_utc_timestamp_tz(‘2018-04-27T17:40:25Z’) from dual union all select to_utc_timestamp_tz(‘20180427T174025Z’) from dual union all select…

How big is a table?

I’ve been asked this question in various forms and forums over the years and the askers are often surprised when I tell them there is more than one way to answer that question. Furthermore, each method yields a different but not necessarily wrong answer! First, let’s take a simple, maybe even obvious method: SELECT avg_row_len…

Oracle 18c Documentation is now available on OTN!

https://docs.oracle.com/en/database/oracle/oracle-database/18/index.html Definitely interested in looking into the json functionality https://docs.oracle.com/en/database/oracle/oracle-database/18/adjsn/changes.html#GUID-8C9B00DD-45D8-499B-919C-8632E034B664 and digging in more with analytic views https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/Changes-in-This-Release-for-Oracle-Database-SQL-Language-Reference.html#GUID-9D1C204A-91C3-4B8D-A882-374F78118862

Using Object Types: constructors

When an object type is instantiated (i.e. assigned a non-null value) it will execute initialization code. This initialization code is called a CONSTRUCTOR function. Every object type includes an implicit constructor which simply assigns values to the object attributes according to the values provided in the object assignment. For example: CREATE OR REPLACE TYPE simpleobject…

Oracle ACE

Oracle gave me an unexpected present for Christmas this year by naming me an Oracle ACE! I’m truly honored to be included in the ranks of so many I’ve read and learned from. Of course I’m also extremely happy to know my efforts to return the favor and share my knowledge and experience has been…

PBKDF2 in Oracle 12c

When I wrote my article on Oracle passwords I included a small, limited implementation of the PBKDF2 algorithm in order to illustrate the 12c hashing methodology.    Here I’m publishing a fuller implementation with parameters for determining the derived key length, number of hashing iterations, and a choice of hashing methods (SH1, SH256, SH384, or SH512.) …