Wednesday, June 30, 2010

ORA-12705: Cannot access NLS data files or invalid environment specified

Yesterday I got to "help" a colleague out with the aforementioned ORA-12705. I had never seen it before and there doesn't seem to be a whole lot of information out there, especially in regards to OBIEE.

Here's the definition from the docs:

Cause:
Either an attempt was made to issue an ALTER SESSION command with an invalid NLS parameter or value; or the environment variable(s) NLS_LANG, ORA_NLSxx, or ORACLE_HOME was incorrectly specified, therefore the NLS data files cannot be located.

Action:
Check the syntax of the ALTER SESSION command and the NLS parameter, correct the syntax and retry the statement, or specify the correct directory path/values in the environment variables.


This would occur when trying to import tables into the RPD (OBIEE). First thing that pops up is the Select Data Source screen:

select data source

Then this beauty would pop up:

ORA-12705

Ultimately the solution that, sort of worked, was here.

Windows - The NLS_LANG must be unset in the Windows registry (re-named is best). Look for the NLS_LANG subkey in the registry at \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE, and rename it.

We tried changing it to what I had in my registry: AMERICAN_AMERICA.WE8MSWIN1252

That didn't work.

Tried renaming it as the article suggested, that didn't work.

Finally, my colleague (without prompting from me), cleared the key (didn't delete, just blanked it)...and voila!

Monday, June 28, 2010

Oracle OpenWorld 2010 - Free Passes

oow google resultsLast year my post on how to obtain free passes to Oracle OpenWorld usually ended up at or near the top of Google results, I figured I'd do it again for this year's event.

Almost 2 weeks ago I received noticed that I would be attending via the Blogger program. I promise, no theatrics (not going, going, not going) from me this year, I am going. I may be using a service like airbnb (h/t Jake via TechCrunch), I don't really care. I am going.

So, it's not too late to register but if you want to go free (like me), here's what you can do:
- Blogger Program - I don't see any mention of it being closed yet, so give it a go.
- Nominate Your Company for the Oracle Fusion Middleware Innovation Awards
Hey! Do you use any of these products?

*Oracle application grid products
*Oracle SOA Suite
*Oracle Identity Manager
*Oracle Fusion Middleware with Oracle Applications
*Enterprise 2.0

If so, nominate your company for the Oracle Fusion Middleware Innovation Awards! If you win, you'll get all of these great prizes:

*FREE pass to Oracle OpenWorld 2010 in San Francisco for select winners in each category. Special honors at Innovation Awards ceremony, held during Oracle OpenWorld 2010 in San Francisco.
*13 meetings with Oracle executives during Oracle OpenWorld 2010
*Oracle Middleware Innovation Award Winner Plaque
*And lots more

- 'Enable the Eco-Enterprise' Awards - added 7/8/2010, h/t IOUG
Is your company using Oracle products to help protect the environment while reducing costs? For example, you may be using Oracle Self-Service E-Billing for paperless invoicing, Oracle Advanced Compression for reduced disk space and power usage, or Oracle's Sun servers for energy efficiency. If so, submit this nomination form for an 'Enable the Eco-Enterprise' award. These awards will be presented to selected customers and their partners (system integrators, consultants, ISVs, etc.) who are using any of Oracle's products to not only take an environmental lead, but also to reduce their costs and improve their business efficiencies by using green business practices.


Added 07/26/2010 h/t leight0nn
- There's now a way through MOS to receive a free pass.
This year, we’re offering a chance to win a free conference pass to Oracle OpenWorld as your reward for sharing documents. Creating a document to share in My Oracle Support Community enters you in the drawing and the information you share will help other members succeed! Write up of the best practices you defined for new implementations based on your past experience, show someone how to avoid a tricky situation, or lay out how you plan for successful upgrades. Areas that are familiar territory for you can be new for your peers. And if you are blazing new trails at your company, someone else may upload just what you’re looking for as a shared document. Amaze us all with your knowledge; see your document become one of the most popular or have another member reward you with a comment about how you helped resolve an issue.


Added 07/28/2010 h/t @surachart (via LinkedIn Updates email) and @brhubart
- Oracle Video Challenge
Convince your peers why you should be selected to win a FREE conference pass to Oracle OpenWorld, JavaOne or Oracle Develop!

Put together a short video convincing your peers why you should get a FREE conference pass to Oracle OpenWorld, JavaOne or Oracle Develop. Is it because of the great Java, SOA, Oracle Database, or Oracle Solaris sessions? Or are you a diehard OTN Night partygoer? The community will pick the top five finalists in each category: Oracle OpenWorld, JavaOne, and Oracle Develop. Then a panel of Oracle judges will pick one winner from each category to receive a full conference pass to that event.

Everyone who submits a valid video entry will be given a discount code to pay the Early Bird price at time of registration. This is a savings of $400 or more over the onsite price. See FAQ page for details*.


Added 09/01/2010
Calling All Student Developers: Get into JavaOne and Oracle Develop for FREE!
Students: Want to see the future of Java? Want to network with the geekiest of the geeks? JavaOne and Oracle Develop are offering Discover Passes FREE to ' qualifying students. You must be enrolled in an accredited nonprofit institutions of learning during the Fall semester/quarter of 2010, taking a minimum of six (6) units, and you must be at least 18 years old.

What Students Get: Admission to any session in the Java Frontier track for students (schedule below), JavaOne, Oracle Develop and OpenWorld keynotes, three Exhibition Halls and the Mason street tent (more info below). Space permitting, you can also attend any JavaOne and Oracle Develop technical sessions, Birds-of-a-Feather sessions (BOFs), and Hands-on-Lab (HOL) sessions.


That's all I have so far, but I'll keep the list updated as I find more.

OBIEE: Parse NQQuery Log

It's been quite some time since I've dabbled in Java, thankfully JDeveloper makes it pretty easy for me.

I've been annoyed at how often I have to go dig through the NQQuery logs lately. Yes, I know about Session Manager and the ability to view logs there.

So I decided to write a quick and dirty java program that will pull the physical SQL out of the file. I believe there are 7 log levels in OBIEE, this is done at level 5 so no guarantee it will work on anything but 5.

I'll be putting the source code up soon and will update as appropriate. For the time being, here it is:
package oraclenerd;
import java.io.*;

public class ParseSQL
{
public static void main(String[] args)
{
ParseSQL run = new ParseSQL();
String query = new String();
int i = 0;
try
{
FileInputStream file = new FileInputStream( "/opt/projects/oraclenerd/classes/oraclenerd/test.log" );
DataInputStream in = new DataInputStream( file );
BufferedReader br = new BufferedReader( new InputStreamReader( in ) );
String strLine;
while ( ( strLine = br.readLine() ) != null )
{
if ( strLine.startsWith( "-------------------- Sending query" ) )
{
i = 1;
}
else if ( i == 1 )
{
if ( strLine.startsWith( "+++" ) )
{
System.out.println( "***************" );
System.out.println( query );
System.out.println( "***************" );
query = "";
i = 0;
}
else
query = query + "\r\n" + strLine;
}
}
in.close();
}
catch (Exception e)
{
System.err.println( "Error: " + e.getMessage() );
}
}
}
Obviously you'll need to change the path unless you have that exact path at home. You can find the log I used here.

There are 17 physical SQL statements in the log file. You should get 17 back.

The 17 SQL statements I retrieved are here (via console).

The source code is up above...until I get unlazy enough to put it under source control (Google Code). If you do make it pretty or add some functionality to it, please let me know, I'd love to include it.

Friday, June 25, 2010

OBIEE: Hillbilly RPD Source Control

No, this isn't a reference to @hillbillyToad.

During all the hullabaloo the other day and me fretting that I might have irrevocably destroyed the metadata, Frank Davis showed me a cool little trick.

In the Admin tool go the BMM layer, right click on the model you want and select "Duplicate with Presentation Catalog."

duplicate with presentation catalog

You'll then be prompted to name your new BMM and Presentation layer.

empty

Enter in the new names

empty

And you now have a copy of your BMM and Presentation layer

empty

What good is this you ask?

Well, it will allow you to do metadata development without affecting what any report writers are doing. It will also allow you to blow things up, quite easily if you wish, without major repercussions. That's nice to have.