Quantcast
Channel: Oracle – Rants & Raves – The Blog!
Browsing latest articles
Browse All 296 View Live

Image may be NSFW.
Clik here to view.

Shell Variable Indirection in a Database Build Script

Ever wanted to set a variable to the name of another variable, and from there, somehow get the value of the other variable? I did, recently, and this is what I had to do. I work with numerous databases...

View Article


Tnsnames Checker Utility

I have made available for free a utility that will parse a tnsnames.ora file and report back on anything that it doesn’t like such as duplicate entries, invalid characters, redefinitions of parameters,...

View Article


Image may be NSFW.
Clik here to view.

Convert a Tnsnames.ora File to a Toad Session Import File

Have you ever wanted a quick and easy way of converting all those database entries in your tnsnames.ora file, into something that Toad can use to populate the “sessions” grid? Read on. Normally Toad...

View Article

Image may be NSFW.
Clik here to view.

Beware of the Silent Database Killer!

There is, out there in Oracle Land, a silent database killer. You never know when it will strike and it affects all databases right up to and including 12c. When it strikes, it does so silently, there...

View Article

Oracle RAC – Flashback Database

It was a simple enough request, flashback this particular database to a guaranteed restore point. What could possibly go wrong? Database names etc have been changed to protect the innocent, and me! $...

View Article


Image may be NSFW.
Clik here to view.

RMAN Error ORA-15028: Archived Log Not Dropped.

The following error popped up in an RMAN backup which was attempting to delete archived logs that had been backed up twice, at least, and were created more than two days ago: RMAN-03009: failure of...

View Article

Asmcmd or ASM Instance Backups or Queries Hang

Sometimes an ASM instance hangs for no apparent reason and this causes problems when backing up the ASM Metadata. Running queries against V$ASM_DISK and similar views may also hang. This blog post...

View Article

How to Fix a Broken ASM SPFILE, held within ASM

My server rebooted itself and when it came back up, none of the databases or ASM had restarted. Everything is 11.2.0.3 or 11.2.0.1 with ASM being 11.2.0.3 – so Oracle Restart should have kicked in. As...

View Article


Impdp Hangs Importing Materialized Views

A simple exercise to refresh a schema in a test database caused no end of problems when it hung at 99% complete. The last message on screen indicated that it was importing the Materialized Views (yes,...

View Article


Tnsnames.ora Parser

Have you ever wanted to use a tool to parse the manually typed up “stuff” that lives in a tnsnames.ora file, to be absolutely certain that it is correct? Ever wanted some tool to count all the opening...

View Article

Image may be NSFW.
Clik here to view.

Add and Drop Discs From ASM in a Single Command

Recently I was tasked to do something that I hadn’t done before. I was required to swap out all the existing discs in the two diskgroups +DATA and +FRA, with minimal downtime. Almost all the places I...

View Article

Image may be NSFW.
Clik here to view.

So, How Do You Change a User’s Password

The Oracle database allows the users to change their passwords as follows: SQL> ALTER USER me IDENTIFIED BY my_new_password; or, alternatively, to use the PASSWORD command, which prompts for the old...

View Article

Interesting Data Guard Problem

While checking out a dataguarded database prior to being handed over into production, I needed to test that both OEM and dgmgrl could carry out a switchover and failover from the (stand-alone) primary...

View Article


Cannot Send Emails, or Read Web Servers From Oracle 11g

Accessing a web server or an email server, directly from within a database, used to be quite simple. However, it all stops working at 11g. Why is that and what can be done to fix it? Introduction Prior...

View Article

Transportable Tablespace Migrations with Expdp/Impdp

In the old days of exp/imp doing a Transportable Tablespace export/import was relatively simple – unless you had Spatial data, in which case, it wasn’t. Then we got hold of expdp/impdp and it became...

View Article


Setting Oracle Environment in Scripts

A quickie! How do you set the correct Oracle environment in scripts? Do you hard code? You better not. I’ve lost count of the times I’ve ended up with, for example, a 10g database running with bits of...

View Article

Image may be NSFW.
Clik here to view.

TNS-01189: The listener could not authenticate the user

Ever see this error? I have, just today. An interesting one to debug. I got there in the end though. The database is running on a two node VERITAS cluster. To protect the innocent, I shall refer to...

View Article


Ever deleted a Data File From a Running Database?

http://jarneil.wordpress.com/2013/04/23/recovering-from-rm-rf-on-a-datafile/ has all you need to know to help avert a total disaster. Tanel Poder, who knows these things, advises that the file should...

View Article

Swap 2 Values, in SQL, Without Using a Temporary Variable

Recently, I saw a mention of an interview question for SQL developers. It was something along the lines of: There is a table with a sex column. It has been discovered that the values are swapped around...

View Article

Image may be NSFW.
Clik here to view.

Statspack Snapshot Fails ORA-01400 Cannot Insert NULL …

Oh hum. An 11.2.0.3 Enterprise Edition production database has statspack taking a regular snapshot under the control of a dbms_scheduler job. For no apparent reason, the snapshot started failing with...

View Article

Internet Explorer Won’t Upload Files to MOS?

Are you forced to use Internet Explorer at work? Are you, like me, forced to use an old, insecure, broken version of IE at work, because it’s the Government Standard version? And are you, like me,...

View Article


ORA-03262 While Dropping Empty Datafile

Tired of trying to drop empty datafiles from a tablespace, which you know is empty? Keep getting errors telling you the data file isn’t empty? Getting frustrated with the whole thing? Me too. This link...

View Article


Image may be NSFW.
Clik here to view.

This Listener Problem is Driving Me Mad!

I have been looking at this far too long, and I’m stumped. I resolved a similar problem yesterday on another server. That was down to the ORACLE_HOME setting in listener.ora having a ‘1’ in it rather...

View Article

Spatial Indexes and Oracle Errors. How to fix.

If, like me, you have suffered from ORA-29902 Error in executing ODCIIndexStart() routine errors where Spatial indexes are involved, the following might help you fix it. The error involved in the...

View Article

Oracle Proxy Users – What Are They Used For?

This post has also been categorised under “rants and raves” as you will see below! Oracle 10g was the first time that proxy users could be used easily from SQL. Prior to that only Java and/or OCI...

View Article


Image may be NSFW.
Clik here to view.

Oracle RMAN for Beginners – Part 9

It’s been a while since the previous post in this series, but I’m back again. This time out, we are looking at incremental backups. What they are, how they work, and how – of course – to take them and...

View Article

Oracle RMAN for Beginners – Part 10

A slight variation on the incremental backups. In this (short) article, I demonstrate the use of database file copy backups which are themselves updated on a regular basis to avoid having to restore...

View Article

Image may be NSFW.
Clik here to view.

Introduction to Oracle Datapump – Part 1

Oracle Datapump, aka expdp and impdp were introduced at Oracle 10g to replace the old faithful exp and imp utilities. Many DBAs around the world find that it’s hard to change from what we know like the...

View Article

Image may be NSFW.
Clik here to view.

Introduction to Oracle Datapump – Part 2

In this, the second part of the Introduction to Oracle Datapump mini-series, we take a look at importing dump files using impdp. If you missed the first part which concentrated on exporting with expdp,...

View Article



UTL_FILE Operation fails with ORA-29283

A process that called ”UTL_FILE” was failing in the test system, but worked fine with exactly the same set up in production. Why? The error was ORA-29283: invalid file operation. How do we find out...

View Article

Archivelog Deletion Policy Changes Don’t Always Take Immediate Effect.

The standby database had the RMAN archivelog deletion policy set to ‘NONE’ instead of being ‘APPLIED ON ALL STANDBY’ and the FRA filled up to within an inch of its life, or 99% of its allocated quota!...

View Article

TraceMiner – An Oracle Utility to Mine 10046 Trace Files

Have you ever needed to trawl through an Oracle Trace file to extract the SQL statements executed and found a whole load of bind variables have been used, so you need to find the BINDS section, extract...

View Article

Tnsnames.ora, IFILE and Network Drives on Windows

I’ve recently begun a new contract migrating a Solaris 9i database to Oracle 11gR2 on Windows, in the Azure cloud. I hate windows with a vengeance and this hasn’t made me change my opinion! One of the...

View Article


RMAN Connection Troubles, RMAN-03010 & RMAN-10038

For no reason, after many weeks of use, RMAN suddenly cannot connect: rman target sys/******@dbadb01 catalog ... ... RMAN-00571: =========================================================== RMAN-00569:...

View Article

How to Start an Oracle Database When You Are Not in the DBA Group

This applies to Linux, Unix as well as Windows, but affected me on a Windows 2012 Server running Oracle 11.2.0.4 Enterprise Edition. My user on the server was an administration user, but not in the...

View Article

Dropping Temporary Tables (With Bonus, Broken Check Constraints!)

I found a broken check constraint, one that simply wouldn’t work, on a database. It was created as: ... CHECK(COLUMN_NAME IN ('Y','N',NULL)) ; Try it yourself, it doesn’t work! Anyway, I needed to find...

View Article


Which Extra Cost Oracle Options is my Windows Server Running?

It’s always nice to know which extra cost Oracle options are enabled, whether deliberately or silently as the result of some patching that has taken place. Copy and paste the code below into a Windows...

View Article


Oraenv for Windows

Having recently had to learn a whole new way of working when I took on a contract migrating a database to the Windows “cloud”, I realised that there’s no equivalent to the useful Unix oraenv utility. I...

View Article

Oraenv for Windows – Updated

I recently posted a useful oraenv for Windows utility. This has been updated so that you can run it in batch files by passing the desired Oracle SID on the command line. Details at...

View Article

Interesting Foible with Oracle Dates

I have a table with dates in, and some NULLs. Two people, on the same database, running the same SELECT query, in the same schema, with the same privileges, get vastly differing results. Why? Fine...

View Article

TraceMiner Utility – Updated

TraceMiner has been updated after a couple of foibles were found during the processing of a trace file. The version has been bumped to 0.19 as of today, 2nd December 2016. The bugs fixed were: The...

View Article


Image may be NSFW.
Clik here to view.

TraceMiner Updated Again

TraceMiner has been updated again. Mostly bug fixes, but there’s a little enhancement too. The current release is 0.21. TraceMiner is a utility that parses an Oracle trace file, with binds listed...

View Article

TraceMiner2 and TraceAdjust

TraceMiner has been updated and rewritten. Numerous bugs and foibles have been fixed. TraceAdjust is a new, useful, utility to carry out some pre-processing on a trace file before you have to use your...

View Article


IMPDP Hangs, or Appears to Hang – But Has it?

You know the score, you are running an impdp and it looks to have hung up. You’ve watched the log file (or on screen messages) and it’s sitting at something like: Processing object type...

View Article

Snorkelling in the Oracle Listener Logs.

(Snorkelling is not quite as in depth as a “deep dive”!) Attempting to parse a listener.log will probably bend your brain, but I needed to do it recently to determine which unique servers and/or...

View Article


Image may be NSFW.
Clik here to view.

Generate Entity Relationship Diagrams from a SQL Script.

Sometimes, just occasionally, you find yourself as a DBA on a site where, for some strange and unknown reason, you don’t have an Entity Relationship Diagram (ERD) for the database that you are working...

View Article

RMAN-20033: control file SEQUENCE# too low

Have you ever seen the error RMAN-20033: control file SEQUENCE# too low and wondered what could be causing it?  If you look on MOS, you will probably see that the error is caused by the control file in...

View Article

ENQ: TS – Contention

Thanks to http://www.dbaglobe.com/2010/08/drop-temporary-tablespace-hang-with-enq.html it was a simple matter to resolve the above enqueue wait on an attempt to drop a previously default temporary...

View Article

Oracle Deadlock Analysis

There’s a new utility to assist in diagnosing the underlying cause of Oracle deadlocks. Interested? You can download source code as well as binaries for Linux and Windows at...

View Article


Build 64bit OCILIB Libraries for CodeBlocks

I tend to compile with gcc, in a bash session, on Windows 7. I use Code::Blocks as my IDE of choice and one of my projects, well, quite a few, use the excellent OCILIB library for accessing Oracle...

View Article

Browsing latest articles
Browse All 296 View Live


Latest Images