Ever Run a Truncate, Drop, or Delete in the Wrong Database?

Hurts, doesn’t it? And tools make it so easy to do this. Even though your tool probably reminds you where you’re at, your brain often just starts running after the next task. And usually your fingers are even a few steps ahead of your brain. And then you get into (more...)

Clickable SQL*Plus Errors

Running lots of scripts in SQL*Plus is nice when they are working correctly. But what about when they fail?  Its a pain to figure out what went wrong, unless you have a log file and even then, you have to hunt the errors down.

Well, I've had enough of that. (more...)

Clickable SQL*Plus Scripts

When you have a load of SQL*Plus scripts, they can be a pain to manage and just simply get around.
In the next version of SQL Developer, you'll be able to hold the ctrl key down and click on the file name and have it open up.  This also works (more...)

An Oracle Designer Feature: Generating Table APIs with Oracle SQL Developer

Have you heard of Oracle Designer? Perhaps you even still use it?

Designer incorporates support for business process modeling, systems analysis, software design and system generation.

I don’t want to get you too excited, because this technology is being phased out. You can read the official statement of direction here (more...)

How to Synch your Oracle SQL Developer Data Model to a Different Database

First a couple of quick notes:

So the challenge presnted is: who do I (more...)

Oracle SQL Developer: Database Object Shortcuts?

An interesting question popped up on the forum, and I thought I’d share my ‘answer’ with you folks. I figure this is something a lot of folks do several hundred times a day – pulling up a frequently used database objects in the browser.

The question:

Is there a way (more...)

Oracle SQL Developer: What’s Next?

Software development never really stops. The development cycle is truly a circle. Once a release is ready, the developers don’t go on break awaiting orders. There’s always the next sprocket to build or widget to refactor.

And so comes one of the best parts of my job: helping figure out (more...)

Oracle SQL Developer Data Modeler v3.3 is Now Available

sqldevDM33Oracle’s free data modeling solution, Oracle SQL Developer Data Modeler, has been updated with the release of version 3.3. I’ve already previewed a few of the new features here, and I’ll continue to talk more about the latest and greatest features. You can see the full list of (more...)

Oracle SQL Developer Report: Tables By DataType

When I’m doing demonstrations of Oracle SQL Developer, I’m frequently asked about our support for datatypes like XML, BLOBS, Timestamp, etc. When I’m put on the spot like that, I have a tendency to forget that I already have tables setup for this. So I end up writing a query (more...)

How to Create or Open a Data Model in Oracle SQL Developer

The Oracle SQL Developer family currently has two ‘SQL Developer’ branded products:

  1. Oracle SQL Developer
  2. Oracle SQL Developer Data Modeler

Oracle SQL Developer is the database IDE and Oracle SQL Developer Data Modeler is our dedicated data modeling solution. Where it gets interesting is that the entire Data Modeler product (more...)

Managing Table and Column Comments in Oracle SQL Developer

An interesting question came up on the ORACLE-L mailing list this morning regarding table comments:

Just wanted to get a general opinion on using comments in the database. For example COMMENT ON COLUMN table.column “No comment”.

Does anyone do this as a regular best practice? I would prefer to (more...)

Four Oracle SQL Developer Preferences You Should Know

In an earlier blog post I listed my ‘Top 10 Preferences to Tweak…’ Instead of amending that to Top 14, I wanted to give a fresh and updated take on some features that directly impact productivity and data quality.

After doing three customer calls in three consecutive days, (more...)

Why Can’t I See My Tables in Oracle SQL Developer?

Because you don’t have any tables.

I hate to be the bearer of bad news, but you don’t actually ‘OWN’ any tables. What you mostly likely DO have are SYNONYMS that point to tables in a application schema. When you log on to Oracle, you are seeing this:

Your Table List is Empty!

Your Table List is Empty!

The solution is simple!

Enable Synonym Support in the Tables Filter Dialog

Mouse-right click on your tables tree node, and select ‘Apply Filter…’

Treat Local Synonyms for Tables as Tables

Treat Local Synonyms for Tables as Tables

With this checked, bam!

Oh my sweet, sweet darlings, how I missed you.

Oh my sweet, sweet darlings, how I missed you.

Note: This is also (more...)

Run Scripts in SQL Developer

Uncategorized
| Feb 21, 2013
I finally decided to save a script that cleans out a couple of tables for me.

Now I have a script, how do I run it in SQL Dev? In SQL*Plus, I would run it like @clean_tables. Two things to note there, 1, I didn't have to put the extension on the file and b, I assumed SQL*Plus was running from the directory where my file was located. If I was running the script from a different directory, I would have to use either a relative path...or something, but I digress.

I wanted to be able to run my (more...)

Fun with Date Math

Uncategorized
| Feb 10, 2013
(First off, sorry Mike, I'm hoping this will break my writer's block...)

On Friday I was asked to look at a report that wasn't returning all of the data. Sample:
Year/Month  Total Sales Total Sales (YAGO)
------------------------------------------
01/31/2013 $1,000,000 $900,000
03/31/2013 $950,000
For reference, YAGO is "Year Ago."

Notice anything funny there?

Yeah, February is missing. The (OBIEE) report has a filter on Jan, Feb and Mar of 2013. But it wasn't showing up. I confirmed via manual SQL (hah!) that there was (YAGO) data in there for February. Any ideas?

I immediately suspected one of two (more...)

SQL Developer, COLLECT and CAST

Uncategorized
| Dec 9, 2012
This one is a quick hint for SQL Developer and the COLLECT function.

In case you're not familiar with it, COLLECT is an aggregate function that was introduced in 10gR2 and simply gathers all the items up into a VARRAY/TABLE style collection type. If you use it in PL/SQL programs, you can handle the collection programmatically.

But sometimes it can be handy to see the elements in a quick ad-hoc query.

In SQL*Plus, you'll get an output that is ugly, but usable:


SQL> l
  1  select country_id, collect(city)
  2  from hr.locations
  3* group by country_id
SQL> (more...)

Application Migration – Part 3

Ok, Finally, we have got to part 3 of Application Migration.  In Part 1, we outlined a program which runs in Sybase through iSQL.  We then followed this, in part 2 with 2 important pieces.
  1. Recognizers to identify the file types of the source we post
  2. Rules to identify items within the files and report on the them
In this part, We will take the rules we used for the previous part, and add some replacement rules.  So, lets recap.  Our recogniser is set for shell files as below.

<?xml version="1.0" encoding="UTF-8"?>
<rulesfile version="1.0" name="Shell (more...)

SQL Developer tip: Don’t open the table

One of things I don't like about Oracle SQL Developer is that if you are browsing and clicking on tables, it can automatically open the table on the right side of the IDE.
There is a simple way to switch that off, just heard how to switch this feature off. Navigate to the Preferences settings:
Goto Database >> Objectviewer, and uncheck the tickbox labelled "Open Object on Single Click"
And that's it.

Using History Keys in SQL*Plus

I was working through a bug the other day and using SQL*Plus, which for the most part doesn't annoy me too much.  However, one of the things that does, is having to retype lots of stuff. (We dont have that problem in SQL Developer).

Having hunted around for a few minutes, I found rlwrap which is a GNU readline wrapper.  All this means is that when we use it on SQL*Plus, it give us keyboard history and user defined completion.  I've found a few posts about it too, which are referred to below, but I wanted to do this for our (more...)

Add a new hard drive to your Oracle Developer Days VM

For those of you who end up using the Oracle Developers Day VM for more that just demo's but playing with other things too, will find that at some point, you'll need more space. (Like I did)   Today's post is about just that.  We're going to add a new VMDK drive to our virtual machine and configure it so its available to you in the machine.


First thing we want to do is to have a list of the devices in your linux box.  This will save you searching for it once you add it later.



[oracle@localhost ~]$ cd (more...)