Convert values from LONG to CLOB using dbms_metadata_util.long2clob in SQL queries

Oracle: 12.2.0.1.0

Today I’ll show you a small simple function to convert values from LONG to CLOB in SQL queries.
I’ve seen many articles where authors create their convert fuctions or create a table and insert the LONG value via INSERT INTO SELECT statement.
Oracle has also made its own, so we don’t need to create our own:)
Continue reading “Convert values from LONG to CLOB using dbms_metadata_util.long2clob in SQL queries”

AWR – SQL Statistics

Oracle: 12.1.0.1

Probably most of you have access to AWR report or have your own scripts to find TOP SQL statements in your database.

But if you don’t and you don’t have access to dbms_workload_repository and you don’t have permission to run awrrpt.sql script and you don’t like Enterprise Manager (yuck)  or you just want to add some information to existing AWR report (e.g. plan_hash_value ), you should read this article 🙂
Continue reading “AWR – SQL Statistics”