I ran into this little bug when trying to restore a databases server parameter file using RMAN.

The scenario

Oracle 9iR2, RMAN using a recovery catalog, incremental level 0 backup of the complete database.

I shut down my test database and removed the spfile. I should be able to recover it easily with the following commands:

$ rman target=backup_admin/password catalog=rcat_user/password@rman

RMAN> startup nomount;

RMAN> restore spfile from autobackup;

But instead I get this error:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/29/2006 16:48:26
RMAN-12010: automatic channel allocation initialization failed
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

Now my ORACLE_SID is set and dandy, the target most certainly is in the recovery catalog, so why do I get this error?

The solution

Since I was only using an spfile (no init.ora at all) there was nothing to set the db_name as the database started up. To resolve this I created an initdoomed.ora in the default location with only the following line in it (my database is named doomed.)

db_name=doomed

Returned to RMAN and tried all this again:

RMAN> restore spfile from autobackup;

Starting restore at 30-JUN-06

allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=9 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20060630
channel ORA_DISK_1: autobackup found: c-2546195804-20060630-01
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 30-JUN-06

Success! You can now shutdown the database, remove the spfile if desired and startup the database with the spfile in place.

oracle, database, backup, 9ir2, rman, dba

Donald Burleson has compiled a rather large list of his webcasts. The topics range from deep technical Oracle topics to some good tricks for improving Google search results.

The webcasts are on different services and in different formats but they are all fairly short. Some of the topics are best suited to advanced audiences, but there’s plenty there for everyone.

Donald Burleson’s Oracle Webcasts

webcasts, oracle, oracle database, rdbms

FingerprintDon Burleson over at Burleson Consulting has written an interesting survey of Oracle biometrics applications.

With the inherent problems associated with passwords Oracle security administrators are finding that Oracle biometrics is a more secure and cost-effective solution. Oracle biometrics system offer more secure environments and also remove the need to dedicate a help-desk person to manage changing passwords for hundreds of end-users.

It’s interesting to see what’s out there, but as Zach will always remind us, biometrics will not hold up in the long run. As biometrics become commonplace they will be hacked. What will you do when someone steals your fingerprints (or the digital representation of them.) You can’t change them. Hell, you can’t even keep from leaving them behind just about everywhere you go.

If a lock can be opened, it can be picked; and if your password can be used, it can be forged. The more common biometrics become (Don mentions in his article that fingerprint readers are now less than $31) the more folks will set their sights on hacking them. These devices work on common interfaces and pass their information over networks potentially exposing your personal password to unknown parties.

If biometrics catch on you could be required to provide fingerprint identification to use your credit card at your local convenience store. Do you really trust them, or worse yet, the government (who can’t even keep your SSN secure) with your password to your bank account, business account, desktop computer and medical history?

So if biometrics isn’t the holy grail of electronic security what is?

I don’t know what the future of password management is. The most holistic solution I’ve seen yet is the one that Zach and I proposed last year where users are provided with a “password change authorization code” which they are encouraged to keep with their birth certificate (or in another safe place) which allows them to change their password through a self-service page in the case of password loss.

biometrics, fingerprint, security, hacking, hacks, oracle

Three separate people have commented on my previous article on How to Create Auto Increment Columns in Oracle asking how they can retrieve the value of an auto increment column for use later in their code. Well Daniel, Shaun and Zach, here’s the answer.

After you have referenced sequence.NEXTVAL for a particular sequence (or it is referenced on your behalf by, say, a trigger), you can then reference sequence.CURRVAL to get the value just used for NEXTVAL.

To illustrate this we’ll use the table, sequence, and trigger created in my previous article.

If we insert a row into the table test, the trigger test_trigger automatically calls test_sequence.NEXTVAL.

SQL> insert into test (name) values ('Matt');

1 row created.

We now have test_sequence.CURRVAL available in that session.

SQL> select test_sequence.currval from dual;

CURRVAL
----------
8

In this simple example we can confirm this is the same value just used with this simple query:

SQL> select * from test
where name='Matt';

ID NAME
---------- ------------------------------
8 Matt

Now if we wanted to use this value in another SQL statement, say for an insert on a table which uses this as a foreign key constraint, we can include it on our insert like this:

SQL> insert into tool (owner_id, tool)
values (test_sequence.CURRVAL, 'hammer');

1 row created.

SQL> select * from tool;

OWNER_ID TOOL
---------- ------------------------------
8 hammer

Of course, if we just want to see the value of test_sequence.CURRVAL we can select it from our favorite table dual.

SQL> select test_sequence.currval from dual;

CURRVAL
----------
8

For the table, sequence and trigger used here see my original article on auto increment fields.

Donald Burleson of Burleson Consulting points out some interesting statistics from Tim O’Reilly on trends in the tech book market.

If we assume that people are buying books because of a market demand, we see Oracle is steep decline and SQL Server book sales up 83%, followed closely by PostgreSQL. We saw this exact same trend in 1992-1995 when Oracle books started to dominate the database book market, displacing DB2 and IDMS/R books.

As a whole, the big news is that database book sales are way-down with the exception of PostgreSQL and SQL Server books, which are up 83% and are now double the size of the Oracle market.

Check out Donald Burleson’s full article

Some of this shift may be due to the recent release of Microsoft SQL Server 2005. Dispite it’s small overall percentage, the growth in PostgreSQL book sales is significant enough to keep an eye on it in the near future.

Also interesting is the stagnation of the MySQL book sales, down 2% from last year. With the number of blogs, wikis and other relatively hot technologies running on MySQL I’m surprised this number is down.

In contrast to the book sales, Alexa, which measures a number of statistics to determine rank among web pages, shows increased web ranking for Oracle, MySQL and PostgreSQL, while showing decreased traffic to Microsoft’s corporate site.

Graph by Alexaholic.com

For the full scoop according to Tim O’Reilly, check out his articles State of the Computer Book Market, Part 1, Part 2, and Part 3.

books, book, tech books, technology, computers, database, dba, database administration, publishing, oracle

« Previous PageNext Page »