Showing entries 21 to 30
« 10 Newer Entries
Displaying posts with tag: Oracle 11g (reset)
Function or Procedure?

Somebody asked for a simple comparison between a PL/SQL pass-by-value function and pass-by-reference procedure, where the procedure uses only an OUT mode parameter to return the result. This provides examples of both, but please note that a pass-by-value function can be used in SQL or PL/SQL context while a pass-by-reference procedure can only be used in another anonymous of named block PL/SQL program.

The function and procedure let you calculate the value of a number raised to a power of an exponent. The third parameter lets you convert the exponent value to an inverse value, like 2 to 1/2.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CREATE OR REPLACE FUNCTION find_root_function
( pv_number   BINARY_DOUBLE
, pv_power    BINARY_DOUBLE
, pv_inverse  BINARY_INTEGER DEFAULT 0 ) RETURN BINARY_DOUBLE IS
 
  -- Declare local variable for return value. …
[Read more]
Java Generics in Oracle

Somebody posed the question about using a Comparator in the sorting examples provided in this earlier post on Updating Table View Columns (columns using a Varray or Nested Table of a single scalar data type). It seems the individual thought that you can’t use Java Generics inside an Oracle Database 11g’s Java libraries. It’s seems odd since they’ve been around since Java 5.

You can use Generics like those shown in the following example. It builds on explanation from the prior post. If you want to get the whole set of facts click the link above but you should have all the code you need in this post.

An example like this requires you first define a collection of strings in the database. This one uses the following definition:

1
2
[Read more]
Oracle 11gR2 on Windows 7

Here are step-by-step instructions for installing Oracle Database 11g Release 2 on Windows 7. It’s provided in response to questions posted on my step-by-step instructions for installing Oracle 11gR1 on Windows 7. For reference, I posted the former because it didn’t work without intervention. I hadn’t updated step-by-step instructions because Oracle Database 11g Release 2 has always worked for me when installing on Windows 7.

A number of students and blog readers have mentioned that it didn’t work for them. My guess is that they had configuration issues within the Windows 7 environment. There are some Windows 7 configuration caveats before you perform this installation, and they are:

Windows 7 Configuration Steps

  1. Make sure you have at least 3 GB of memory on your Windows PC, or that you can …
[Read more]
Log Buffer #205, A Carnival of the Vanities for DBAs

A very warm welcome to the Log Buffer, the premier medley of fresh information culled from the blogs related to the technology which stores the world, yes, the databases.

In this edition, the Log Buffer #205, we have yet again found the pulse of the industry.

Oracle:

On the Oracle front, leading Oracle technologist Andrey Goryunov carries on his hands-on experiments of newest version of the Oracle database. This time he slices away chopt.

It’s always very informative and exciting to know about internals of RAC Stuff like what actually is maintained in the Voting Disk . Riyaj has it …

[Read more]
Log Buffer #204, A Carnival of the Vanities for DBAs

Welcome to Log Buffer, the weekly roundup of happenings in the database world.

Lots to cover this week, so let’s get on with Log Buffer #204. Enjoy!

Oracle:

Pythian’s Gwen Shapira dabbles with MySQL and explores MySQL troubleshooting for the Oracle DBA.

Venkat Janakiraman explores how connectivity works for BI EE 11g on …

[Read more]
Installing Oracle 11g on Ubuntu 8.04 LTS (Hardy Heron)

Note: Installing Oracle 11gR1 on Ubuntu 8.10 Intrepid Ibex is now published.

After our last post about installing Oracle 11g on Ubuntu 7.10 (November, 6th), and considering Ubuntu 8.04 LTS was released on April 21st, I spent some time reviewing and putting together this new HOWTO for the installation.

Please note: I’ve used the x86 server version of Ubuntu 8.04, but the same steps should work without any problems for the Desktop version. Also notice that this whole procedure can easily take over six hours to complete, so don’t complain I didn’t …

[Read more]
Oracle 11g: Another New SQL*Plus Command

I have been using this SQL*Plus command for a while now:

SQL> show spparameter service_names

SID      NAME          TYPE        VALUE
-------- ------------- ----------- ---------
*        service_names string      REDX

And guess what ?

  • The right syntax is actually show spparameters (with a “s” at the end of it).
  • It’s an 11g New Feature!

It doesn’t work with 10g:

SQL> show spparameters service_names

SP2-0735: unknown SHOW option beginning "spparamete..."
SP2-0735: unknown SHOW option beginning "service_na..."

I thought MySQL was trying to become as big as Oracle but it could be that Oracle is trying to become as cool as MySQL — it has had something like this for a long time! Now Oracle should add SHOW TABLES too.

Anyway, this is really 11g’s most useful feature so far, though. …

[Read more]
Installing Oracle 11g on Ubuntu Linux 7.10 (Gutsy Gibbon)

Note: Installing Oracle 11gR1 on Ubuntu 8.10 Intrepid Ibex is now published.

After many requests from readers, I’ve put together new, revised version of the Oracle 11g on Ubuntu recipe. This new version is a little different than the first one published: it’s based on a bare-bones install of Ubuntu 7.10 (Gutsy Gibbon) server version instead of the desktop version. As an improvement, I’ve tried to pare down dependencies to a minimal set.

Your feedback is more than welcome — it’s the main reason why I wrote a new version of this HOWTO. I’ve also tested and repeated this procedure twice. Even so, it might still have problems, so please let me know so we can improve it …

[Read more]
Oracle 11g: New Pivot Table Feature

I was very pleased when I heard about Oracle adding pivot functionality in select statements. Finally — we wouldn’t have to copy the data to a spreadsheet or code a ton of sum(case when col1 = 'X' then amount else 0 end) total_X for each column we would want to display.

I am basically looking for three things in a pivot-style query:

  1. the ability to specify which column will be pivoted as one or more columns in the resulting query
  2. row subtotals
  3. column subtotals

The first item is the only one that really matters. I can work around the other two, so let’s get started.

Create a test table with a few rows:

create table bob_pivot_test( id number, cost number, tx_date date, product_type varchar2(50));
insert into bob_pivot_test values (1,10.99,sysdate-10,'Toy');
insert into bob_pivot_test values (1,10.99,sysdate-9,'Toy');
insert into bob_pivot_test values …
[Read more]
Installing Oracle 11g on Ubuntu Linux 7.04

Note: Installing Oracle 11gR1 on Ubuntu 8.10 Intrepid Ibex is now published.

Note: I have now published “Installing Oracle 11g on Ubuntu Linux 7.10 (Gutsy Gibbon)”

Note: This page focuses on Ubuntu installs. Oracle has published a web page for successfully installing Linux on unsupported platforms that you may find helpful.

I come from a MySQL background, and I have been given the challenge of learning Oracle. I can’t just play around with our customers’ databases, but I remembered that Paul Vallée said that there is …

[Read more]
Showing entries 21 to 30
« 10 Newer Entries