Wednesday, July 8, 2009

Oracle Installation error: ORA-12560

I'm setting up a development environment on my machine for a new web app in Ruby on Rails with an Oracle back-end. This was my first time installing an Oracle database. It's quite an archaic and un-user-friendly process. The good news is, I've spent a lot more time praying than I usually do while at work. I'll try to keep this short.

OS: Windows XP, SP3
Installing: Oracle 10g Standard Edition
Steps:
  1. Download the zipped 10gR2 installer package from Oracle's website (~625MB).
  2. Extract the zip file somewhere on my hard drive.
  3. Run the setup file in the extracted folder.
  4. Follow the wizard, selecting not to create the sample database at the beginning. Use the defaults for everything else. Yay, now we've got an empty Oracle installation.
  5. Now to create a database. Click Start > All Programs > Oracle - OraDb10g_home1 > Configuration and Migration Tools > Database Configuration Assistant.
  6. Follow the wizard, keeping the defaults (except I changed the character encoding to Unicode).
The Problem: I got a whole ton of error dialog boxes popping up. I chose "ignore" on all of them, allowed the database to finish being created, and then took a look at the log file (myOracleFolder\product\10.2.0\db_1\cfgtoollogs\dbca\myDatabaseName\emConfig.log). The log file mentions:

CONFIG: ORA-12560: TNS:protocol adapter error

oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-12560: TNS:protocol adapter error

at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1467)
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.connect(SQLEngine.java:814)
at oracle.sysman.emcp.util.GeneralUtil.initSQLEngine(GeneralUtil.java:363)
at oracle.sysman.emcp.DatabaseChecks.validateUserCredentials(DatabaseChecks.java:986)
at oracle.sysman.emcp.ParamsManager.validatePassword(ParamsManager.java:2694)
at oracle.sysman.emcp.EMDBPreConfig.checkConfigParams(EMDBPreConfig.java:1268)
at oracle.sysman.emcp.EMDBPreConfig.checkParameters(EMDBPreConfig.java:1060)
at oracle.sysman.emcp.EMDBPreConfig.invoke(EMDBPreConfig.java:174)
at oracle.sysman.emcp.EMDBPreConfig.invoke(EMDBPreConfig.java:160)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:141)
at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:430)
at java.lang.Thread.run(Thread.java:534)
Jul 8, 2009 9:50:33 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Invalid username/password.
Refer to the log file at C:\oracle\product\10.2.0\db_1\cfgtoollogs\dbca\orcl\emConfig.log for more details.
Jul 8, 2009 9:50:33 AM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Invalid username/password.
at oracle.sysman.emcp.EMDBPreConfig.checkConfigParams(EMDBPreConfig.java:1272)
at oracle.sysman.emcp.EMDBPreConfig.checkParameters(EMDBPreConfig.java:1060)
at oracle.sysman.emcp.EMDBPreConfig.invoke(EMDBPreConfig.java:174)
at oracle.sysman.emcp.EMDBPreConfig.invoke(EMDBPreConfig.java:160)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:141)
at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:430)
at java.lang.Thread.run(Thread.java:534)


The solution:
Uninstall the half-created database I just made, restart my machine, and then recreate the database. Now it works. *smacks forehead*

Monday, July 6, 2009

Haikus on learnjapanesepod.com

I often listen to a podcast called learnjapanesepod. It's excellent --highly recommended for anyone studying Japanese as a part of this balanced breakfast, including classes, listening to Japanese music, going to Japan, watching anime, and writing nerdy things in Japanese to your wife on your whiteboard at home.

A couple of haikus that I wrote in the their forums were read "on the air" on their podcast last Friday... I'm excited :) . Btw, the name I used was "jensengo".

Here's the link for that episode: http://learnjapanesepod.com/fun-friday-for-3rd-july-2009/.