In a previous article, you learned how to create a simple Oracle Application Express application to store the content of any file into a BLOB column in the database.
In this article, you will learn how to include in a report a file download link to the content stored in a BLOB column. If the BLOB contains an image, you’ll learn how to display it in the report as well. Application Express makes this functionality extremely simple to implement.
Leave a comment | Filed in Oracle | Tags: apexHere is the set up: The host is a Windows 7 machine, 64 bit with Oracle client. the guest is a Windows XP Virtualbox VM running Oracle Database 11.2.0.2. All default installations and configurations.
You want to be able to connect to the Oracle database (SQL*Plus, SQL Developer, TOAD…) from the host.
Here is what I did to enable Oracle TNS connection between the host and the guest.
Note: As mentioned in the comments, there are two other ways to accomplish connectivity between the host and the guest VM: NAT with port forwarding and host-only adapter. This article assumes that networking between the host and the guest is done via a bridged adapter.
7 Comments | Filed in Oracle | Tags: howto, virtualboxI had the privilege to be a guest blogger on the ODTUG blog. I wrote about Kscope and my role in putting together the Developer’s Toolbox track as well as why you should attend Kscope. Here is a short excerpt:
This year’s Kscope is a special one to me. I volunteered to lead the Developer’s Toolbox track team. My task was to build a team of volunteers from the Oracle community and then together determine appropriate sub-tracks, review and rate the submitted abstracts and create a draft schedule for the track.
Read the full blog post here.
Comments Off | Filed in Oracle | Tags: kscope12, odtugMichael posted a comment on Martin’s blog, that I previously quoted, about a “hack” to add a comment on a default value definition. Here is an example of how it works (tested in 11.2.0.1):
SQL> CREATE TABLE t (
2 x VARCHAR2 (10) DEFAULT 'Hi' -- There. This will be stored too.
3 );
Table created.
Notice the comment after the default value. The comment would be ignored, right? think again:
SQL> COLUMN column_name FORMAT a14
SQL> COLUMN data_default FORMAT a40
SQL> SELECT column_name, data_default
2 FROM user_tab_columns
3 WHERE table_name = 'T';
COLUMN_NAME DATA_DEFAULT
-------------- ----------------------------------------
X 'Hi' -- There. This will be stored too.
1 row selected.
Well, basically this is bug 8546537:
When trying to add a COMMENT to a table, if the ‘)’ is on a new line, then the COMMENT is successfuly created when an error should be raised. The COMMENT also makes it to the Data Dictionary. If the ‘)’ is on the same line, an error is raised.
Interesting!
Comments Off | Filed in Oracle | Tags: databaseMartin Widlake thinks so:
Comments are great, you can put 4000 characters of information into the database about each table, view and column. This can be a brief description of the object, a full explanation of what a column is to hold or even a list of typical entries for a column or table. But you can’t add a comment on indexes or constraints. Why would I want to? Well, constraints and indexes should only be there for a reason and the reason is not always obvious from either the names of the columns or the name of the constraint or index, especially where you have a naming standard that forces you to name indexes and constraints after the columns they reference.
He goes on to explain the advantages:
If I was able to add comments to constraints and indexes within the database then they would there. You move the system from one platform to the other, they are there. If for any wildly unlikely reason the central documentation lets you down, the information is always there in the database and easy to check. You may not be able to track down the original design documents but you have the database in front of you, so comments in that will persist and be very easy to find.
Martin raises very good points. I believe that it would be a useful feature to have in a future database version.
2 Comments | Filed in Oracle | Tags: enhancement
Happy New Year!
One of the events I am looking forward to this year is ODTUG Kscope12. For those of you who have attended Kscope before, you know how much value you can get out of this conference. For those of you who don’t know what Kscope is, here is a quick introduction for you:
If you are a developer, architect, technical lead, or database administrator who works with Application Express, Business Intelligence, Oracle EPM; including Hyperion products, Essbase, Planning; Database Development or Fusion Middleware, Kscope12 is where you should be. It’s hard to find a conference that’s big enough to attract world renowned speakers and small enough to get the chance to share knowledge. Kscope12 is that conference.
This year, I will be presenting about data caching at Kscope12.
1 Comment | Filed in Oracle | Tags: kscope12, odtugThere is a third issue, after support cost, and availability, there is the big issue around the upgrade path. Oracle have always said that there would be an upgrade path from the latest two releases which at the time was 11.5.10 and 12.0, but now we also have 12.1 so there is only a path from 12.0 onwards. Is this fair, well I am not sure, in most cases I see the move to Fusion Apps as a replacement is not the best thing for an organisation, especially one who has not already moved to R12, so not having the option is not a problem.Comments Off | Filed in Oracle | Tags: EBS, fusion
[...]
I think a lot of people will take Fusion but in small steps, taking the co-existence route, after perhaps adopting some technology first, over time.
Suresh submitted this question on the Oracle Community forum:
in oracle 10 g , the below query results in alphabetical order , there is no order by caluse. but when i am running the same query in oracle 11g , it gives me in random order. what is the problem here?
People, it is really simple: You want an ordered result set? use ORDER BY.
Tom Kyte wrote about it in this blog post and in his books:
Do not ever count on the order of rows from a query unless you have an ORDER BY statement on your query!
The only way to retrieve data from the database in some sorted order is to include an ORDER BY on your query. There is no substitute for ORDER BY.
By the way, the query in the forum post looks suspiciously Hibernated. Don’t let Jeff know