SQL Developer 1.2.1 — RAW datatype issue

Well, I’ve been using SQL Developer for about three weeks now. When SQL Developer was first released a few years ago, I was not a big fan of this free tool. I’m still not a big fan at this point, but I will say that the tool is growing on me everytime I use it. What I’m finding interesting about it at this time is how it deals with RAW datatypes. When you select a RAW column from a table all you get in the column is (RAW) in the column.

Sql Script
—————-
select job_id, job_name, job_owner, job_description, job_type
from sysman.mgmt_job
where rownum < 4

Results
—————-
JOB_ID JOB_NAME JOB_OWNER JOB_DESCRIPTION JOB_TYPE
(RAW) LOAD USER_QUEUE DATATEAM SQLScript
(RAW) LOAD SDA DSUMMS DATATEAM SQLScript
(RAW) UPDATE PROCESS_TIMESTAMP DATATEAM SQLScript

As you can see if you are trying to find a job_id for one of the listed jobs it is difficult from SQL Developer. Now, from TOAD this issue is not relative; however, I’ve decided to use SQL Developer recently since I cannot get the company to purchase new TOAD licenses. What can you do when you are pretty much told that the company doesn’t like Quest due to pricing issues.

So the solution to gettting around this issue is to covert the column to hex using the RAWTOHEX() function. To do this I modified the query to allow the job_id column to displace the relative information that I was looking for.

Sql Script
—————–
select rawtohex(job_id), job_name, job_owner, job_description, job_typefrom sysman.mgmt_job
where rownum < 4
(for simplicity reason only used the first two columns)
Results
—————-
JOB_ID JOB_NAME
4883A26B1F5806A2E0400A0A4A020878 LOAD USER_QUEUE
4883A26B1F6306A2E0400A0A4A020878 LOAD SDA DSUMMS
4883A26B1F6A06A2E0400A0A4A020878 UPDATE PROCESS_TIMESTAMP
Hope this helps.

Another good post for issues with RAW datatypes and PL/SQL see http://thinkoracle.blogspot.com/2005/11/raw-datatype.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Mrs. Jaye's Class Blog

Coordinate Algebra & Advanced Algebra

Pardy DBA

ORA-00001: unique constraint (ORA.BLOG_TAGLINE_PK) violated

Martin Widlake's Yet Another Oracle Blog

Oracle performance, Oracle statistics and VLDBs

HeliFromFinland

Heli's thoughts on Database Designing, Oracle SQL Developer Data Modeler, User Groups etc.

Julian Dontcheff's Database Blog

The good DBA is one who learns from his mistakes, the best DBA is one who learns from other DBA's mistakes

Martins Blog

Trying to explain complex things in simple terms

The Data Warrior

Changing the world, one data model at a time. How can I help you?

Maaz Anjum's Blog

A life yet to be lived...

PeteWhoDidNotTweet.com

Stuff that interests me, if not you!

%d bloggers like this: