SQL

Patch for SQuirreL SQL Client v3.2.1 - adds keyboard shortcut for SQL Query rerun/re-execution

SQuirreL SQL Client is a really awesome piece of software. It's a universal SQL client written in pure Java, thus it's portable to virtually any platform (at least all major desktop environments -Mac OSX, Windows, Linux- that people use nowadays). It's very compact and it allows you to work with all sorts of databases that have a pure Java JDBC driver available (most DBs do). A small annoyance has been bugging me for quite some time now and today I took the time to make a patch for it (big hurray for open source! Smiling ).

JDBC Navigator

"JDBC Navigator is a free database browser and editor. It lets you open JDBC database connections, browse schemas and tables, traverse relations by finding rows referencing a row's primary key, traverse relations by finding rows referenced by a row's foreign keys, edit table data (inserting new rows, and editing or deleting existing rows)."

SQuirreL SQL Client

"SQuirreL SQL Client is a graphical Java program that will allow you to view the structure of a JDBC compliant database, browse the data in tables, issue SQL commands, etc."

Changing values in the XML DB configuration

To get to the point, here's an example for changing the HTTP port of XML DB's WebDav server:
CALL DBMS_XDB.CFG_UPDATE(
  UPDATEXML(
    DBMS_XDB.CFG_GET(),
    '/xdbconfig/descendant::http-port/text()',
    '8888'
  )
);
Run it with user "SYS as SYSDBA" in the database.
Read on for some explanation of the details.

NO_MERGE hint without an argument

I just found out (by accident) that you can use the NO_MERGE optimizer hint in two ways:
  1. either in the surrounding query, where you're referencing the subquery (or view) that is not to be merged (here you've to add an argument specifying which subquery/view you mean)
  2. or in the query itself that is not to be merged (here you use the hint without an argument)
I've used only the first approach til now, but the latter is most useful too (eg. if you've a view that you want not to be merged anywhere in your application's queries ... using the second syntax you don't have to include the hint in all the queries where you use the view).

Moving columns of LONG datatype from one table to another

The easiest method is to use the COPY command in SQLPLUS. Tom Kyte has a nice example on this.

Syndicate content