Querying a Object Type

I demonstrated a number of SQL approaches to reading object types in Appendix B of the Oracle Database 12c PL/SQL Programming book. For example, the easiest one to construct and return the results from a TO_STRING member function uses the TREAT function:

SELECT TREAT(base_t() AS base_t).to_string() AS "Text"
FROM   dual;

However, it seems that I could have provided one more. Here’s an example of how you can (more...)

Finding Direct Indexes

If you’re not using Toad DBA Suite, it’s sometimes hard to find solutions. Somebody wanted to know how to find indexes that aren’t that aren’t indirect. Indirect indexes are those created for a primary key because a primary key column or set of columns are both not null and uniquely constrained. You can’t drop a unique index for a primary key without dropping the primary key constraint that indirectly created it.

The following query (more...)

Configure Oracle Exadata Write Back Flash Cache

In addition to improving read I/Os, Oracle Exadata Write back flash cache also provides the ability to cache write I/Os directly to PCI flash. Exadata storage software version 11.2.3.2.1 is the minimum version required to use write back flash cache. Grid infrastructure and database homes must run 11.2.0.3.9 or later to use with Write-back Smart […]

The post Configure Oracle Exadata Write Back Flash Cache appeared first on VitalSoftTech.

Check Constraints

Oracle Database 12c introduces a SEARCH_CONDITION_VC column to the CDB_, DBA_, ALL_, and USER_CONSTRAINTS views. The SEARCH_CONDITION_VC column is a VARCHAR2 data type equivalent to the search condition in the LONG data type SEARCH_CONDITION column. Unfortunately, Oracle Database 11g and earlier versions requires you to convert the LONG data type to a VARCHAR2 for the equivalent behavior. This post provides you with a function to help you do that in (more...)

Oracle Database 10g Certifications to Expire in March 01, 2015

Oracle Database is one of the leading relational database management system and is used all over the world. It has various training’s, exams and certifications for its Database and other products. However due to regular update in Database, they have to redesign their trainings, certification and exams to add new features and to remove old […]

The post Oracle Database 10g Certifications to Expire in March 01, 2015 appeared first on VitalSoftTech.

Wrapping SQL*Plus

One annoying thing from installing Oracle Database 11g on Fedora, was that the up arrows for command history didn’t work. I decided to fix that today after seeing Lutz Hartmann’s article on rlwrap. Unfortunately, the epel (Extra Packages for Enterprise Linux) package he recommended doesn’t run on Fedora 20. You can read my tale of woe, or skip to the .bashrc function that fixed it when I installed only rlwrap.

Attempting it on yum, (more...)

Current_Schema and the Data Dictionary

Being a huge fan of Logger, the PL/SQL logging utility, I really wanted this be to included in the project that I'm currently working on. So I downloaded it (link at the bottom of this blog) and included it in our deployment scripts. Done.... at least I thought so, but of course this wasn't the case.

The regular install script for Logger looks something like the following (parts removed and table names are changed):


set (more...)

PIVOT and UNPIVOT

The PIVOT and UNPIVOT operators were introduced in Oracle 11g and the other day I helped out a friend using these operators.
He wanted the data in the columns to be "shifted to the left". To explain a little more, take a look at the following data:

ID V1 V2 (more...)

Free e-book giveaway: “Oracle Database XE 11gR2 Jump Start Guide” (Packt Publishing, 2012)

Last week I reviewed “Oracle Database XE 11gR2 Jump Start Guide” (Packt Publishing, 2012) in this post. Packt guys did like the review, and today I am pleased to announce that I will be giving away two free e-copies of the book. All you need to do is just comment below the post and win [...]

Book review: “Oracle Database XE 11gR2 Jump Start Guide” by Asif Momen

About a year ago Packt Publishing approached me and offered to write a book on (one of the technologies in) Oracle 11g. After careful consideration I had to decline the offer. Which was the right decision as I have hardly had any spare time in the past 12 months. However, Packt guys have kept in [...]

Who is using your Undo space? – Improved Script

Add to Technorati FavoritesVer este articulo en Español

Hi folks!
I have extended the Undo usage scripts to include two additional indicators:
1) undo change vector size statistics
2) Used undo records/blocks

and support for RAC infrastructure, so you can spot the hungriest UNDO eaters for any given instance.

Then the script for Oracle 11g is as follows:
set pagesize 400
set linesize 140
col name for a25
col program for a50
col username for a12
col osuser for a12
SELECT a.inst_id, a.sid, c.username, c.osuser, c.program, b.name,
a.value, d.used_urec, d.used_ublk
FROM gv$sesstat a, v$statname  (more...)

Install Oracle Express XE 11gR2 on Oracle Linux 6.1 x64. (No bitmap index conversion on the fly!)

Some time ago, if you said you had installed Linux and, heavens forbid, Oracle on Linux, you’d be considered an utter geek. Fast forward 15 year. These days, when people (who have experience with other databases and operating systems) ask me about Oracle/Linux, I feel somewhat embarrassed. Let me illustrate what I mean. Install Oracle [...]

Tiny tips: Use Gateways to connect Oracle database to Microsoft SQL Server

When you have two Oracle databases and want to exchange data between them, it is easily done via database links. So for your local database you would go select * from local_table and for the remote one select * from remote_table@link_to_remote_db But what if the remote database isn’t Oracle, what if it’s (for example) Microsoft [...]

Oracle Database Firewall – What is it?


It all started with acquisition of Secerno, a database firewall vendor, in 2010. Secerno's product “DataWall” helped analyze how databases are accessed so that DBA’s can set up policies to control the access.
The database firewall has the ability to analyze SQL statements sent from database clients and determine whether to pass, block, log, alert, or substitute SQL statements, based on a defined policy. Users can set whitelist and blacklist policies to control the firewall. It can detect injected SQL’s and block them.  According to Oracle, the database firewall can do the following -

The Oracle Exadata: latest Business Weapon

Add to Technorati Favorites
Ver este articulo en Español

Sorry I’ve been having a lot of work installing, maintaining and migrating to Database Machines all over Latinamerica for the latest 10 months; that means lot of travels abroad, all of them very exciting, but the real excitement comes from my job working with this wonderful Machine.

Was on the last project when realized how important is this investment for our customers, having this big caribbean Telco installed their first Exadata and later migrated their databases meant for them dramatic performance improvements and the ability to get more up-to-date analytical information and compete (more...)

Database Upgrade Guide – 10g to 11g


I came across this useful upgrade advisor/guide on Metalink(ID 251.1) so thought I should share this. I think it was available earlier as well but in some crude format. It’s a nice step-by-step guide / reference for anyone who wants to upgrade to 11g. It explains you the benefits of 11g and guides you through a 6-step approach (Evaluate, Plan, Configure, Test, Implement and Accept) to get to 11g. It explains each phase with expected deliverables/outcomes and lists a host of referenceable material – documents / guides, ppts, multimedia trainings, metalink notes etc. one can refer to.

1Z1-058 (1Z0-058 beta) 11g R2 RAC Expert. Answers.

Last week’s article on 1Z0-058 questions was quite popular, more popular than I expected. So if you enjoyed the questions, now it’s time to get some answers! (1) Kevin is a database administrator at Fictional Real Estate Co. All he hears everyday is location, location, location. He is asked by one of the Sales team [...]

Oracle Database on Amazon Cloud – Now Available


Amazon has kept its promise of making Oracle 11g available on per hour billing. Finally, after its announcement in Feb 2011, Oracle 11g database is now available on Amazon RDS. Which means you can use Oracle database on cloud with the same per hour billing rates (pay-as-you-go model) you pay for other resources.
Amazon RDS brings Oracle Standard One, Standard and Enterprise editions on RDS. It’s now the 2nd database to be available on RDS; MySQL was available for quite some time now. As I had mentioned in my earlier post, Oracle will be available under 2 difference (more...)

1Z1-058 (1Z0-058 beta) 11g R2 RAC Administration Expert

If you get emails from Oracle University, you might have received a notification that 1Z1-058 (1Z0-058 beta) “Oracle 11g R2 RAC Administration” exam is now available. It earns you an 11g R2 RAC Oracle Certified Expert (OCE), but you need to be an 11g DBA Oracle Certified Professional (OCP) first to get that. If you [...]

How to Configure Oracle Restart on Standalone Server


In one of my previous post, I had talked about Oracle Restart – a new feature in 11gR2 that enhances availability in case of single/standalone instances. In this post, I am briefly describing the steps to install and use this great feature for an existing database installation.
Oracle Restart is part of Oracle Grid Infrastructure which needs to be installed without which Oracle Restart cannot be used. One either installs Grid infrastructure first and database later or vice-versa. The difference being that the components either gets automatically added to Oracle restart configuration (if Grid is installed first) or need (more...)