Showing posts with label database. Show all posts
Showing posts with label database. Show all posts

Sunday, February 18, 2018

18c is now available (but only on the Cloud)

On Friday afternoon (16th February) we started to see tweets and blog posts from people in Oracle saying that Oracle 18c was now available. But is only available on Oracle Cloud and Engineered Systems.

It looks like we will have to wait until the Autumn before we can install it ourselves on our own servers :-(

Here is the link to the official announcement for Oracle 18c.

Oracle 18c is really Oracle 12.2.0.2. The next full new release of the Oracle database is expected to be Oracle 19.

The new features and incremental enhancements in Oracle 18c are:

  • Multitenant
  • In-Memory
  • Sharding
  • Memory Optimized Fetches
  • Exadata RAC Optimizations
  • High Availability
  • Security
  • Online Partition Merge
  • Improved Machine Learning (OAA)
  • Polymorphic Table Functions
  • Spatial and Graph
  • More JSON improvements
  • Private Temporary Tablespaces
  • New mode for Connection Manager

And now the all important links to the documentation.

Oracle 18c Documentation

Oracle 18c New Features

Oracle 18c Data Warehousing

To give Oracle 18c a try you will need to go to cloud.oracle.com and select Database from the drop down list from the Platform menu. Yes you are going to need an Oracle Cloud account and some money or some free credit. Go and get some free cloud credits at the upcoming Oracle Code events.

If you want a 'free' way of trying out Oracle 18c, you can use Oracle Live SQL. They have setup some examples of the new features for you to try.

NewImage

NOTE: Oracle 18c is not Autonomous. Check out Tim Hall's blog posts about this. The Autonomous Oracle Database is something different, and we will be hearing more about this going forward.

Wednesday, December 7, 2016

12.2 DBaaS (Extreme Edition) possible bug/issue with the DB install/setup

A few weeks ago the 12.2 Oracle Database was released on the cloud. I immediately set an account and got my 12.2 DBaaS setup. This was a relatively painless process and quick.

For me I wanted to test out all the new Oracle Advanced Analytics new features and the new features in SQL Developer 4.2 that only become visible when you are using the 12.2 Database.

When you are go to use the Oracle Data Miner (GUI tool) in SQL Developer 4.2, it will check to see if the ODMr repository is installed in the database. If it isn't then you will be promoted for the SYS password.

This is the problem. In previous version of the DBaaS (12.1, etc) this was not an issue.

When you go to create your DBaaS you are asked for a password that will be used for the admin accounts of the database.

But when I entered the password for SYS, I got an error saying invalid password.

After using ssh to create a terminal connection to the DBaaS I was able to to connect to the container using

sqlplus / as sysdba

and also using

sqlplus sys/ as sysdba

Those worked fine. But when I tried to connect to the PDB1 I got the invalid username and/or password error.

sqlplus sys/@pdb1 as sysdba

I reconnected as follows

sqlplus / as sysdba

and then changed the password for SYS with containers=all

This command completed without errors but when I tried using the new password to connect the the PDB1 I got the same error.

After 2 weeks working with Oracle Support they eventually pointed me to the issue of the password file for the PDB1 was missing. They claim this is due to an error when I was creating/installing the database.

But this was a DBaaS and I didn't install the database. This is a problem with how Oracle have configured the installation.

The answer was to create a password file for the PDB1 using the following

% orapwd file=$ORACLE_HOME/dbs/orapwPDB1 password= entries=10

I then changed the password again for SYS, then tried to connect as SYS to the PDB1, and if by magic I was connected.

I then tried installing the ODMr repository again (in SQL Developer) and when I entered the new password for SYS, it worked !

It's a pity that it took Oracle Support 2 weeks to get me to this point.

As 12.2 is a cloud service hopefully Oracle will get that issue fixed soon so that one one else has to suffer like I did.

Friday, October 10, 2014

Installing Oracle 12.1.0.2 on Windows 64bit

The following steps are what I did for installing 12.1.0.2 on Windows.

1. Download the Oracle installation ZIP files from the Oracle Downloads page.

DB Install 15

2. Unzip the two 12c downloads files into the same directory.

3. Go to the newly created directory (it is probably called 'database') and you will find a file called setup.exe. Double click on this file.

DB Install 1

After a couple of seconds you will see the Oracle Database 12c splash screen.

DB Install 2

4. Step 1 : Configure Security Updates : Un-tick the tick-box and click the Next button. A warning message will appear. You can click on the Yes button to proceed.

DB Install 3

5. Step 2 : Installation Options : select the Create and Configure a Database option and then click the Next button.

DB Install 4

6. Step 3 : System Class : Select the Server Class option and then click the Next button.

DB Install 5

7. Step 4 : Grid Installation Options : Select the Single Instance Database Installation option and then click the next button.

DB Install 6

8. Step 5 : Select Install Type : Select the Typical install option and then click the Next button.

DB Install 7

9. Step 6 : Oracle Home User Selection : Select the Use Windows Built-in Account option and then click the Next button. A warning message appears. Click the Yes button.

DB Install 8

10. Step 7 : Typical Install Configuration : Set Global Database Name to cdb12c for the container database name. Set the Administrative password for the container database. Set the name of the pluggable database that will be created. Set this to pdb12c. Or you can accept the default names. Then click the Next button. If you get a warning message saying the password does not conform to the recommended standards, you can click the Yes button to ignore this warning and proceed.

DB Install 9

11. Step 8 : Prerequisite Checks : the install will check to see that you have enough space and necessary permissions etc.

12. Step 9 : Summary : When the prerequisite checks (like checking you have enough space and privileges) are finished you will get a window like the following.

DB Install 10

13. Step 10 : Install : You are now ready to start the install process. To do this click on the Install button in the Summary screen.

DB Install 11

You can now sit back, relax and watch the installation of 12.1.0.2c (with the in-memory option) complete.

You may get some Windows Security Alert windows pop up. Just click on the Allow Access button.

Then the Database Configuration Assistant will start. This step might take a while to complete.

DB Install 12

When everything is done you will get something like the following.

DB Install 13


Congratulations you now have Oracle Database 12.1.0.2c installed.

But you are not finished yet!!!

14. Add entry to TNSNAMES.ORA : you will need to add an entry to your tnsnames.ora file for the pluggable database. There is be an entry for the container DB but not for the pluggable. Here is what I added to my tnsnames.ora.

DB Install 14


The last step you need to do is to tell the container database to start up the pluggables when you reboot the server/laptop/PC/VM. To do this you will need to create the following trigger in the container DB.

sqlplus / as sysdba

CREATE or REPLACE trigger OPEN_ALL_PLUGGABLES

    after startup

    on database

BEGIN

    execute immediate 'alter pluggable database all open';

END open_all_pdbs;

Restart your database or machine and you plug gage DB 'pdb12c' will no automatically start.

You are all finished now :-)

Enjoy :-)

Monday, April 14, 2014

Oracle Advanced Analytics and Oracle Fusion Apps

At a recent Oracle User Group conference, I was part of a round table discussion on Apps and BI. Unfortunately most of the questions were focused on Apps and the new Fusion Applications from Oracle. I mentioned that there was data mining functionality (using the Oracle Advanced Analytics Option) built into the Fusion Apps, it seems to come as a surprise to the Apps people. They were not aware of this built in functionality and capabilities. Well Oracle Data Mining and Oracle Advanced Analytics has been built into the following Oracle Fusion Applications.
  • Oracle Fusion HCM Workforce Predictions
  • Oracle Fusion CRM Sales Prediction Engine
  • Oracle Spend Classification
  • Oracle Sales Prospector
  • Oracle Adaptive Access Manager
Oracle Data Mining and Oracle Advanced Applications are also being used in the following applications:
  • Oracle Airline Data Model
  • Oracle Communications Data Model
  • Oracle Retail Data Model
  • Oracle Security Governor for Healthcare
I intend to submit a presentation on this topic to future Oracle User Group conferences as a way of spreading the Advanced Analytics message within the Oracle user community. If you would like me to present on this topic at your conference or SIG drop me an email and we can make the necessary arrangement :-)

Friday, April 11, 2014

Oracle 11.2g install on OLE 6.x

This notes are really just a reminder to myself of the typical "issues" that I encounter every time I do a new install of OEL 6.x and 11.2.0.4

These notes are in addition to the excellent installation instructions given by oracle-base.com: oel install, DB 11.2.0.x install

The notes listed below are just a reminder to myself of things that I seem to always have to look up. If you finish them useful then great.

1. Display issue & Installer not able to run

install says to do xhost +:0.0 this can give an error

instead do host +:0.0 and that should allow the installer to run


2. Now enough swap space when installer checks the pre-requisites

Need to add an addition 500M to the swap space


su (and then enter the password)

dd if=/dev/zero of=/tmp/swapfile bs=1M count=500

mkswap /tmp/swapfile

swapon /tmp/swapfile

exit (to return to the oracle user)


you can then turn off the extra space (if you really need to) after the install is finished


swapoff /tmp/swapfile

rm /tmp/swapfile


3. Post-Installation task

don't forget the final step, to set to restart flag

as root

vi /etc/oratab

change the following line to have the Y at the end (instead of the N)

DB11G:/u01/app/oracle/product/11.2.0/db_1:Y


4. Set up the automated start and stop of the DB

Again Oracle-Base gives an excellent set of instructions for doing this. Click here.

Monday, July 15, 2013

Installing Oracle 12c on Windows 7 64bit

Here are the steps I when through to install Oracle 12.1c on Windows 7 64 bit.

  • Unzip the two 12c downloads files into the same directory. I called this directory database

image

  • Go down a couple of levels in the database directory until you come to the directory that contains setup.exe. Double click on this to start the installer.
  • Step 1 – Configure Security Updates:  Un-tick the tick-box and click the Next button. A warning message will appear. You can click on the Yes button to proceed.
  • Step 2 – Software Update : select the Skip Software Updates option and then click the Next button.
  • Step 3 – Installation Option : select the Create and Configure a Database option and then click the Next button.
  • Step 4 – System Class: Select the Server Class option and then click the Next button
  • Step 5 – Grid Installation Options : Select the Single Instance Database Installation option and then click the next button.
  • Step 6 – Install Types : Select the Typical install option and then click the Next button.
  • Step 7 - Installation Location : Select the Use Windows Built-in Account option and then click the Next button. An warning message appears. Click the Yes button.
  • Step 8 – Typical Installation.  Set Global Database Name to cdb12c for the container database name. Set the Administrative password for the container database. Set the name of the pluggable database that will be created. Set this to pdb12c. Or you can accept the default names. Then click the Next button. If you get a warning message saying the password does not conform to the recommended standards, you can click the Yes button to ignore this warning and proceed.
  • Step 9 – Prerequisite Checks : the install will check to see that you have enough space and necessary permissions etc.
  • Step 10 – Summary – You should now be ready to start the install. Click the Install button.

You can now sit back, relax and watch the installation of 12.1c complete.

You may get some Windows Security Alert windows pop up. Just click on the Allow Access button.

image

Then the Database Configuration Assistant will start. This step might take a while to complete.

image

When everything is done you will get something like the following

image

Now you are almost ready to start using your Pluggable 12c database on windows. The final two steps that you need to do is to add an entry to your tnsnames.ora file. You can manually do this if you know what you are doing or you can select Net Configuration Assistant under the Oracle –Ora12cDB Home 1 section of the windows menu. The second thing you need to do is to create a new user/schema.

Check out my previous blog post called ‘My first steps with 12c’ for how to do these last two steps. The ‘My fist steps with 12c’ post was based on installing 12c on Linux 6.

Wednesday, January 30, 2013

Oracle Magazine-Nov/Dec. 1998

The headline articles for the Nov/Dec 1998 edition of Oracle Magazine were on building web based applications and thin client computing. A large part of the magazine was dedicated to these topics.  This was a bumper edition with a total of 152 pages of content.

image

Other articles included:

  • There was a few articles on using Oracle 8i, including how to use Java in the Database, the Internet File System, Intermedia and Data Warehousing.  Oracle 8i comes with over 150 new features
  • There was a couple of articles on the Millennium Bug and how to approach such projects. There was also some advice for organisations who would have to look at how to deal with the introduction of the Euro currency in Europe.
  • There was a section for articles on new product announcements from Oracle partners, including Quest, Nextek, Maxager, ObjectShare, Constellar (Warehouse Builder), Prism, DataMetrics, IQ Software, Eventus, DataMirror, Precise, Saville, DataShark, J-Database Exchange, Andataco, GeoMedia
  • Oracle makes available Oracle 8i and the Application Server on a Linux platform for the first time.
  • With Oracle 8i we have a number of ways of managing our constraints, including:
    • Deferrable integrity constraints
    • Non unique indexes for primary key and unique constraints
    • Immediate constraint enabling
  • Detecting lock and waiting transactions was always a task that consumed a lot of time for a DBA. A number of scripts was given to help you identify these and to resolve these problems.
  • For allow of Oracle Certified DBAs out there. There was an article promoting the OCP DBA program and Exam. Some hints and tips about the exam were given, along with some practice questions.
  • Plus there was 12 pages on adverts at the back of the magazine.

To view the cover page and the table of contents click on the image at the top of this post or click here.

My Oracle Magazine Collection can be found here. You will find links to my blog posts on previous editions and a PDF for the very first Oracle Magazine from June 1987.

Tuesday, December 18, 2012

BIWA Summit–9th & 10th January, 2013

The BIWA Summit will be on the 9th and 10th January, 2013. It is being held in the Sofitel Hotel beside the Oracle HQ at Redwood Shores, just outside of San Francisco.

The BIWA Summit looks to be leading event in 2013 focused on Analytics, Data Warehousing, Big Data and BI. If you are a data architect or a data scientist this is certainly one event that you should consider attending in 2013.

All the big names (in the Oracle world) will be there Tom Kyte, Mark Rittman, Maria Colgan, Balaji Yelmanchili, Vaishnavi Sashikanth, Charlie Berger, Mark Hornick, Karl Rexter, Tim and Dan Vlamis.

Oh and then there is me. I’ll be giving a presentation on the Oracle Data Scientist. This will be on the first day of the event (9th) at 11:20am.

For anyone interest in the Oracle Data Scientist World there are lots of presentations to help you get start and up to speed in this area. Here is a list of presentations and hands on labs that I can recommend.

image

As is typical with all good conferences there are many presentations on at the same time that I would like to attend. If only I could time travel.

This is a great event to start off the new year and for everyone who is thinking of moving into or commencing a project in the area. So get asking you manager to see if there is any training budget left for 2012 or get first dibs on the training budget for 2013.

Registration is open and at the moment the early bird discount still seems to be available. You can also book a room in the hotel using the registration page.

To view the full agenda – click here

Tom Kyte in Dublin 21st January 2013

Tom Kyte will be back in Dublin on the 21st January, 2013.  He will be giving a number of presentations covering some of his popular Oracle Open World sessions and will also include a AskTom session

It will be a full day, kicking off at 9am and finishing around 3:30pm.

There is no better way to kick off the new year with a full day of FREE Oracle training and up skilling with Tom Kyte.

To register for the event send an email to marketing-ie_ie@oracle.com

As they say places are limited, so book early,  I have Smile so I’ll see you there.

Monday, November 19, 2012

Review Oracle Magazine- July/August 1998

The headline articles for the July/August1998 edition of Oracle Magazine were on designing, developing and delivering Data Marts using the Oracle Database and related tools. The main article looks at the different phases of developing a data mart in 90 days.

One of the key messages in these articles is to keep focused on the business problem and that the technology part is very minor in this. This message is still vey key to the analytics and big data world, keep focused on the business problem.

image

Other articles included:

  • Oracle ships JDeveloper Suite. It included App Builder for Java, Oracle Application Server 4.0, Oracle 8 Database Server, Symantec’s Visual Page HTML editor, and a one year developer’s membership in the Oracle Technology Network. Yes there used to be a cost to be a member of OTN!!!.
  • Oracle We Developer Suite wins the PC Magazine Editor Choice award. The suite comes with full development licences for Designer/2000 Release 2.1, including object extensions, Developer/2000 Release 2.1, Oracle App Builder for Java, Oracle Application Server 3.0, Oracle Database Server (releases 7 and 8) and the Oracle Web Development Kit
  • Oracle Support announce plans to give read only access, via the web, to its Bug database.
  • There was an advert for TOAD when it was still freeware and provided by ToadSoft.
  • Security management for Oracle 8, has been increasing in importance over the past few years. For all those people who have some security responsibilities, here are some key elements for database security: System security, Data security, User security, Password management and System auditing. Security is more than just providing a Firewall.
  • Building Message-based apps with Oracle 8’s Advanced Queuing, involves 5 main steps, including:
    • Start the server’s AQ background process
    • Create a database user account to manage queues
    • Create a user-defined type for application messages
    • Create a queue table and a corresponding queue of the user defined message type
    • Build the application to enqueue and dequeue messages of the user defined message type
  • For the DBAs there was an article on Fast Full Index Scan, how to enable it and gives a number of examples of the hints including the index_fss.

To view the cover page and the table of contents click on the image at the top of this post or click here.

My Oracle Magazine Collection can be found here. You will find links to my blog posts on previous editions and a PDF for the very first Oracle Magazine from June 1987.

Friday, November 9, 2012

Update on : Adding numbers between

Over the past few days I’ve had a number of emails and comments based on my previous post.  My previous post was called ‘Adding numbers between two values’. I included some PL/SQL code that can be used to add up the numbers between two values. I mentioned that this was a question that my pre-teen son (a few year pre-teen) had asked me.

There are two main solutions to the same problem. One involves just using a SELECT and the other involves using recursion. I will come back the these alternative solutions below.

But let me start off with a bit more detail and background to why I approached the problem the way that I did. The main reason is that my son is a pre-teen. Over the past couple of years he as expressed an interest in what his daddy does. We even have matching ORACLENERD t-shirts Smile

When I was working through the problem with my son I wanted to show him how to take a problem and by breaking it down into its different parts we can work out an overall solution. We can then take each of these parts and translate them into code. In this case some PL/SQL, yes it is a bit nerdy and we do have the t-shirt. The code that I gave illustrates many different parts of the language and hopefully he will use some of these features as we continue on our learning experience.

It is good sometimes to break a problem down into smaller parts. That way we can understand it better, what works and what does not work, if something does not work then we will know what bit and also leads to easier maintenance. At a later point as you develop an in-depth knowledge of certain features of a language you can then rewrite what you have to be more efficient.

All part of the learning experience.

Ok lets take a look at the other ways to answer this problem. The first approach is to just use a single SELECT statement.

SELECT sum(rownum + &&Start_Number - 1)
FROM    dual
CONNECT by level <= &End_Number - &&Start_Number + 1;

An even simpler way is

SELECT sum(level)
FROM    dual
CONNECT BY level between &Start_Number and &End_Number;

These queries create a hierarchical query that produce all the numbers between the Start_Number parameter and the End_Number parameter. The SUM is needed to all all the numbers/rows produced.  This is nice and simple (but not that easy for by son at this point).

Thank you to everyone who contacted me about this. I really appreciated your feedback and please keep your comments coming for all my posts.

Tuesday, November 6, 2012

Adding numbers between two values

My son asked me the other day, what is the total number if you add all the numbers between Zero and 100.
We could have sat down to work it out with some paper and a pen, but instead I decided to introduce him to the world of Oracle, SQL and PL/SQL
The first step we took was to work out how you would do it on paper for some of the numbers. Then we translated this into some PL/SQL code. OK I did a lot this but he did seem to understand and follow what I was doing.
So the following Function is what we ended up with to add all the numbers between two numbers and return the answer.
CREATE or REPLACE function AddNumsBetween
       ( pStartNum IN NUMBER,
         pEndNum IN NUMBER)
   RETURN NUMBER
IS
   vSum   Number := 0;
BEGIN
   FOR i IN pStartNum .. pEndNum LOOP
      vSum := vSum + i;
   END LOOP;
   return vSum;
END;
/

The next step was to write some code to call this function. The code prompts the user to enter the Start number and End number.
set serveroutput on
DECLARE
   vStartNum  NUMBER := 0;
   vEndNum   NUMBER := 100;
   vAnswer    NUMBER := 0;
BEGIN
   vStartNum := &Start_Number;
   vEndNum := &End_Number;
   vAnswer := AddNumsBetween(vStartNum, vEndNum);
   dbms_output.put_line('The sum of numbers between '||vStartNum||' and '||vEndNum||' is '||vAnswer||'.');
END;
/

To answer by son’s original query, we used Zero and 100 as our inputs.
image
The answer to the question is 5,050.

Sunday, November 4, 2012

Events for Oracle Users in Ireland-November 2012

November (2012) is going to be a busy month for Oracle users in Ireland. There is a mixture of Oracle User Group events, with Oracle Day and the OTN Developer Days. To round off the year we have the UKOUG Conference during the first week in December.

Here are the dates and web links for each event.

Oracle User Group

The BI & EPM SIG will be having their next meeting on the Tuesday 20th November. This is almost a full day event, with presentations from End Users, Partners and Oracle product management. The main focus of the day will be on EPM, but will also be of interest to BI people.

As with all SIG meetings, this SIG will be held in the Oracle office in East Point (Block H). Things kick off at 9am and are due to finish around 4pm with plenty of tea/coffee and a free lunch too.

image

Remember to follow OUG Ireland on twitter using  #oug_ire

Oracle Day

Oracle will be having their Oracle Day 2012, on Thursday 15th, in Croke Park. Here is some of the blurb about the event,  “…to learn how Oracle simplifies IT, whether it’s by engineering hardware and software to work together or making new technologies work for the modern enterprise. Sessions and keynotes feature an elite roster of Oracle solutions experts, partners and business associates, as well as fascinating user case studies and live demos.

This is a full day event from 9am to 5pm with 3 parallel streams focusing on Big Data, Enterprise Applications and the Cloud.

Click here to register for this event.

Click here for the full details and agenda.

OTN Developer Days

Oracle run their developer days about 3 times a year in Dublin. These events are run like a Hands-on Lab. So most of the work during the day is by yourself. You are provided with a workbook, a laptop and a virtual machine configured for the hands-on lab. This November we have the following developers days in the Oracle office in East Point, Dublin.

Tuesday 27th November (9:45-15:00) : Real Application Testing

Wednesday 28th November (9:00-14:00) : Partitioning/Advanced Compression

Thursday 29th November (9:15-13:30) : Database Security

Friday 30th November (9:45-16:00) : Business Process Management Using BPM Suite 11g

As you can see we have almost a full week of FREE training from Oracle. So there is no reason not to sign up for these days.

UKOUG Conference – in Birmingham

In December we have the annual UKOUG Conference. This is the largest Oracle User Group conference in Europe and the largest outside of the USA. At this conference you will have some of the main speakers and presentations from Oracle Open World, along with a range of speakers from all over the work.

In keeping with previous years there will be the OakTable Sunday and new this year there will be a Middleware Sunday. You need to register separately for these events. Here are the links

OakTable Sunday

Middleware Sunday

The main conference kicks off on the Monday morning with a very full agenda for Monday, Tuesday and Wednesday. There are a number of social events on the Monday and Tuesday, so come well rested.

On the Monday evening there is the focus pubs. This year it seems to have an Irish Pub theme. At the focus pub event there will be table for each of the user group SIGs. 

Come and join me at the Ireland table on the Monday evening.

The full agenda in now live and you can get all the details here.

I will be giving a presentation on the Tuesday afternoon titled Getting Real Business Value from Predictive Analytics (OBIEE and Oracle Data Mining). This is a joint presentation with Antony Heljula of Peak Indicators.

Thursday, November 1, 2012

ASCII to character conversion in Oracle

Here is code code that will produce formatted output of the characters and their ascii values. The formatting is broken into lower case letters, uppercase letters, characters with an ascii value less than an ‘a’ and characters whose ascii characters are greater than a ‘z.

Code

set serveroutput on FORMAT WRAPPED
DECLARE
    vTab           VARCHAR2(5) := CHR(9);
    vNum          NUMBER := 0;
    vString       VARCHAR2(80) := '';
BEGIN  
   --
   -- Formatted lower case letter to ASCII values
   --
   dbms_output.put_line('Formatted Lower Case Letters to ASCII values');
   dbms_output.put_line('-------------------------------------------------------');
   FOR i IN ASCII('a') .. ASCII('z') LOOP
      IF vNum < 6 THEN
         vString := vString||CHR(i)||' : '||i||vTab;
         vNum := vNum + 1;
      ELSIF vNum = 6 then
         dbms_output.put_line(vString||CHR(i)||' : '||i);
         vNum := 0;
         vString := '';
      ELSE
         dbms_output.put_line('ERROR');
      END IF;
   END LOOP;
   dbms_output.put_line(vString);

   --
   -- Formatted upper case letter to ASCII values
   --
   vString := '';
   vNum := 0;

   dbms_output.new_line;
   dbms_output.new_line;
   dbms_output.put_line('Formatted Upper Case Letters to ASCII values');
   dbms_output.put_line('-------------------------------------------------------');
   FOR i IN ASCII('A') .. ASCII('Z') LOOP
      IF vNum < 6 THEN
         vString := vString||CHR(i)||' : '||i||vTab;
         vNum := vNum + 1;
      ELSIF vNum = 6 then
         dbms_output.put_line(vString||CHR(i)||' : '||i);
         vNum := 0;
         vString := '';
      ELSE
         dbms_output.put_line('ERROR');
      END IF;
   END LOOP;
   dbms_output.put_line(vString);

   --
   -- Formatted chars less than 'a' to ASCII values
   --
   vString := '';
   vNum := 0;

   dbms_output.new_line;
   dbms_output.new_line;
   dbms_output.put_line('Formatted Letters, less than a  to ASCII values');
   dbms_output.put_line('-------------------------------------------------------');
   FOR i in 0 .. ASCII('a')-1 LOOP
      IF vNum < 6 THEN
         vString := vString||CHR(i)||' : '||i||vTab;
         vNum := vNum + 1;
      ELSIF vNum = 6 then
         dbms_output.put_line(vString||CHR(i)||' : '||i);
         vNum := 0;
         vString := '';
      ELSE
         dbms_output.put_line('ERROR');
      END IF;
   END LOOP;
   dbms_output.put_line(vString);

   --
   -- Formatted chars greater than 'Z' to ASCII values
   --
   vNum := 0;
   vString := '';

   dbms_output.new_line;
   dbms_output.new_line;
   dbms_output.put_line('Formatted Letters, greater than z  to ASCII values');
   dbms_output.put_line('-------------------------------------------------------');
   FOR i IN ASCII('z') .. ASCII('z')+133 LOOP
      IF vNum < 6 THEN
         vString := vString||CHR(i)||' : '||i||vTab;
         vNum := vNum + 1;
      ELSIF vNum = 6 then
         dbms_output.put_line(vString||CHR(i)||' : '||i);
         vNum := 0;
         vString := '';
      ELSE
         dbms_output.put_line('ERROR');
      END IF;
   END LOOP;
   dbms_output.put_line(vString);

END;
/

Output

Formatted Lower Case Letters to ASCII values
-------------------------------------------------------
a : 97  b : 98  c : 99  d : 100 e : 101 f : 102 g : 103
h : 104 i : 105 j : 106 k : 107 l : 108 m : 109 n : 110
o : 111 p : 112 q : 113 r : 114 s : 115 t : 116 u : 117
v : 118 w : 119 x : 120 y : 121 z : 122


Formatted Upper Case Letters to ASCII values
-------------------------------------------------------
A : 65  B : 66  C : 67  D : 68  E : 69  F : 70  G : 71
H : 72  I : 73  J : 74  K : 75  L : 76  M : 77  N : 78
O : 79  P : 80  Q : 81  R : 82  S : 83  T : 84  U : 85
V : 86  W : 87  X : 88  Y : 89  Z : 90


Formatted Letters, less than a  to ASCII values
-------------------------------------------------------
  : 0   ☺ : 1   ☻ : 2   ♥ : 3   ♦ : 4   ♣ : 5   ♠ : 6
: 7 : 8                 : 9
: 13   ♂ : 11  ♀ : 12
♫ : 14  ☼ : 15  ► : 16  ◄ : 17  ↕ : 18  ‼ : 19  ¶ : 20
§ : 21  ▬ : 22  ↨ : 23  ↑ : 24  ↓ : 25  → : 26  ← : 27
∟ : 28  ↔ : 29  ▲ : 30  ▼ : 31    : 32  ! : 33  " : 34
# : 35  $ : 36  % : 37  & : 38  ' : 39  ( : 40  ) : 41
* : 42  + : 43  , : 44  - : 45  . : 46  / : 47  0 : 48
1 : 49  2 : 50  3 : 51  4 : 52  5 : 53  6 : 54  7 : 55
8 : 56  9 : 57  : : 58  ; : 59  < : 60  = : 61  > : 62
? : 63  @ : 64  A : 65  B : 66  C : 67  D : 68  E : 69
F : 70  G : 71  H : 72  I : 73  J : 74  K : 75  L : 76
M : 77  N : 78  O : 79  P : 80  Q : 81  R : 82  S : 83
T : 84  U : 85  V : 86  W : 87  X : 88  Y : 89  Z : 90
[ : 91  \ : 92  ] : 93  ^ : 94  _ : 95  ` : 96


Formatted Letters, greater than z  to ASCII values
-------------------------------------------------------
z : 122 { : 123 | : 124 } : 125 ~ : 126 ⌂ : 127 Ç : 128
ü : 129 é : 130 â : 131 ä : 132 à : 133 å : 134 ç : 135
ê : 136 ë : 137 è : 138 ï : 139 î : 140 ì : 141 Ä : 142
Å : 143 É : 144 æ : 145 Æ : 146 ô : 147 ö : 148 ò : 149
û : 150 ù : 151 ÿ : 152 Ö : 153 Ü : 154 ø : 155 £ : 156
Ø : 157 × : 158 ƒ : 159 á : 160 í : 161 ó : 162 ú : 163
ñ : 164 Ñ : 165 ª : 166 º : 167 ¿ : 168 ® : 169 ¬ : 170
½ : 171 ¼ : 172 ¡ : 173 « : 174 » : 175 ░ : 176 ▒ : 177
▓ : 178 │ : 179 ┤ : 180 Á : 181 Â : 182 À : 183 © : 184
╣ : 185 ║ : 186 ╗ : 187 ╝ : 188 ¢ : 189 ¥ : 190 ┐ : 191
└ : 192 ┴ : 193 ┬ : 194 ├ : 195 ─ : 196 ┼ : 197 ã : 198
à : 199 ╚ : 200 ╔ : 201 ╩ : 202 ╦ : 203 ╠ : 204 ═ : 205
╬ : 206 ¤ : 207 ð : 208 Ð : 209 Ê : 210 Ë : 211 È : 212
ı : 213 Í : 214 Î : 215 Ï : 216 ┘ : 217 ┌ : 218 █ : 219
▄ : 220 ¦ : 221 Ì : 222 ▀ : 223 Ó : 224 ß : 225 Ô : 226
Ò : 227 õ : 228 Õ : 229 µ : 230 þ : 231 Þ : 232 Ú : 233
Û : 234 Ù : 235 ý : 236 Ý : 237 ¯ : 238 ´ : 239 ­ : 240
± : 241 ‗ : 242 ¾ : 243 ¶ : 244 § : 245 ÷ : 246 ¸ : 247
° : 248 ¨ : 249 · : 250 ¹ : 251 ³ : 252 ² : 253 ■ : 254
  : 255

PL/SQL procedure successfully completed.

Observations

There are two things that stand out in this. The first is there is sound produced. This is because one of the characters is defined this way. It is ASCII number 7. This can be repeated using the following:

select chr(7) from dual.

The second is the formatting of the lines for ascii codes 8 to 12. We can see that one of the ascii codes does not get displayed and the ordering of this is not as expected. This is due to ascii 10 being a line feed.

Thursday, October 25, 2012

New features for Developers in Oracle 12c & Tools

Continuing on from my previous posts on new features in the Advanced Analytics Option and the 12c Databases, this post will focus on the proposed new features for Developers in 12c and in the new releases of the development tools.

Health Warning: As with all the presentations at OOW that talked about what may be in or may be in the next release, there is no guarantee that these features will actually be in the released version of the database. Here is the slide that gives the Safe Harbor statement.

image

  • APEX 4.2 is out now and has lots of new features in particular features for creating mobile applications including transitions, gestures, changes in orientation and HTML 5 support. Coming in 12c APEX will be able to support the pluggable database environment. You will have the option to install APEX in the Contain database or in the pluggable databases. It will also support the extended VARCHAR2 size
  • SQL Developer will have Data Pump to allow for fast movement of data and for scheduling of the movements. The Database Difference tool has been redesigned to give more options and gives a more reliable comparison. A redesigned Database Copy (more options), improved Migrations and PDF report generation. SQL Developer is not the admin tool to manage the APEX Listener. UI improvements include more/better drag and drop, GRANT statement support in SQL editor and database Doc reporting. A new release of SQL Developer will be made available with the release of 12c that includes all the 12c new features
  • Better Data Compression of data being sent to/from the client/server. So how you use the ORDER BY clause will become more important
  • We will now have BOOLEAN in 12c but only in PL/SQL Sad smile
  • 12c will allow you to grant ROLES to PL/SQL program units. Or we could specify a White List that lists what other code units can call your code. This is a great security enhancement, although it involves more admin work, but it is worth it.
  • 12c will allow you to include PL/SQL in WITH
  • 12c will allow you to create duplicate indexes on the same set of columns. Sometimes you might want two different types of index on the same data, for example a bit map index and a b-tree index.
  • Cursor results sets can now be returned implicitly instead of the existing explicit method
  • The Warning messages when compiling our PL/SQL code can be filtered based on if they are Severe, Performance related or just Informational. This can be set at a System or Session level.

alter session set plsql_warnings='enable:severe';

alter session set plsql_warnings='enable:performance';

alter session set plsql_warnings='enable:informational';

There was a large number of exhibits at OOW. All of them were giving things away. For some of these you had to endure a sales pitch. One of the popular type of give away was a t-shirt. If you really wanted to, you could get enough t-shirts to keep you going for a few years. I popped into the exhibits for JavaOne and the pictures below is my faviourate t-shirt from OOW, by CloudBees.

imageimage

Some of the exhibits were also giving away money. If you would sit through a 10 minute presentation you were given a ticket and if your number was picked your would could win anything from $20 up to $100. Many thanks to Intel Smile

Tuesday, October 23, 2012

Oracle Database next release (12c) new features

At Oracle Open World there was a number of presentation on the new features that we will see in the new release of the database, which is being called 12c, where c is for the cloud.

The 12c Database/Next Release was announce during Larry’s Sunday keynote speech. 

image

Health Warning: As with all the presentations at OOW that talked about what may be in or may be in the next release, there is no guarantee that these features will actually be in the released version of the database. Here is the slide that gives the Safe Harbor statement.

image

In addition to this key note there was a few additional presentations on 12c with the main one, for me, by Tom Kyte on the Thursday morning.

  • The 12c database will be a multi-tenant database. What does this mean? If means that we can have multiple databases running on the same server sharing the same memory and process management. Under the current configuration, when we create a new database on a server we create a separate set of processes and memory allocation.  Oracle is calling this, Pluggable Databases

image

  • MapReduce in the Database - MapReduce can be run from PL/SQL directly in the database.
  • Improved default value management. We will be able to clearly how to allocate a value to or calculate a value as a default for a column. The first of these is that we will be able to assign a sequence to a column. Example x int default s.nextval primary key. We can then insert into a table and not worry about how to calculate a primary key value, insert into t(y) values ('hello world');.  We will also be able to specify a default value when no value is being inserted into a column, z number default on null 42
  • Increased size for VARCHAR2, NVARCHAR2 and RAW data types up to 32K in size. You will need to se the Max_SQL_String_Size in the init.ora to EXTENDED. But this new size limit is not supported in clustered and index organised tables.
  • Some improvements to PARTITIONing, with asynchronous global index maintenance for DROP and TRUNCATE partition. New CASCADE functionality for TRUNCATE and EXCHANGE partition. You will be able to perform multiple partition operations with a single DDL command.
  • There will be better Statistics for query performance including Hybrid Historgrams, Session Private Statistics and statistics will be gathered during data loads automatically.
  • Temporary UNDO for objects will be handled in TEMP
  • Greater insight of data usage i.e .what is being used or not being used and how frequently. This allows policies in table definition (new ILM clause) to compress or archive data after time.

ALTER TABLE orders
ILM ADD CompressionPolicy
COMPRESS Partitions for Query
AFTER 90 days from creation;

This post focused on the core database new features what may be coming in 12c.

In my next blog post I will look at some of the coding/development changes that are coming in 12c and associated Oracle development tools

Friday, October 12, 2012

My Presentations on Oracle Advanced Analytics Option

I’ve recently compiled my list of presentation on the Oracle Analytics Option. All these presentations are for a 45 minute period.

I have two versions of the presentation ‘How to do Data Mining in SQL & PL/SQL’, one is for 45 minutes and the second version is for 2 hour.

I have given most of these presentations at conferences or SIGS.

Let me know if you are interesting in having one of these presentations at your SIG or conference.

  • Oracle Analytics Option - 12c New Features - available 2013
  • Real-time prediction in SQL & Oracle Analytics Option - Using the 12c PREDICTION function - available 2013
  • How to do Data Mining in SQL & PL/SQL
  • From BIG Data to Small Data and Everything in Between
  • Oracle R Enterprise : How to get started
  • Oracle Analytics Option : R vs Oracle Data Mining
  • Building Predictive Analysts into your Forms Applications
  • Getting Real Business Value from OBIEE and Oracle Data Mining  (This is a cut down and merged version of the follow two presentations)
  • Getting Real Business Value from OBIEE and Oracle Data Mining - Part 1 : The Oracle Data Miner part
  • Getting Real Business Value from OBIEE and Oracle Data Mining - Part 2 : The OBIEE part
  • How to Deploying and Using your Oracle Data Miner Models in Production
  • Oracle Analytics Option 101
  • From SQL Programmer to Data Scientist: evolving roles of an Oracle programmer
  • Using an Oracle Oracle Data Mining Model in SQL & PL/SQL
  • Getting Started with Oracle Data Mining
  • You don't need a PhD to do Data Mining

Check out the ‘My Presentations’ page for updates on new presentations.

Tuesday, October 9, 2012

Review of Oracle Magazine-March/April 1998

The headline articles for the March/April 1998 edition of Oracle Magazine were on how the role of the DBA is increasing in importance, managing databases globally, how the DBA is an important strategic partner in an organisation. Oracle is being used by a number of health organisations including Norway’s national hospital system, Regence BlueCross BlueShield of Utah and Neuroclinical Trials Center.

image

Other articles included:

  • Oracle Applications 11was due for release during the first half of 1998 and has a number of key features including, Universal Access, Globalized Finance, Project Manufacturing and Flow Manufacturing.
  • Oracle’s Industry Applications division recently introduced new products including Oracle Public Budgeting, Oracle Sector Grants Management and the Oracle Energy Upstream solution .
  • 5 ways DBA’s can be strategic partners: Proactive systems management, systems design, change management, performance tuning and security.
  • Steve Lemme, DBA/systems manager for Motorola lists the following tasks for DBAs to keep them busy
    • Daily Duties : At a minimum monitor
      • Oracle ALERT file logs
      • Systems resources
      • Backups
      • Archive logs
      • Error logs
    • Weekly Watch : Check free space including:
      • Tablespaces
      • Tables
      • Indexes
      • Clusters
    • Monthly Monitoring : Do audits for fragmentation of :
      • Indexes
      • Clusters
      • Tables
  • Oracle Enterprise Toolkit comprises, Enterprise Manager, Diagnostics Pack, Tuning Pack and Management Pack.
  • Kenny Smith looks at a day in the life of a DBA working from home using Oracle Enterprise Manager that included a Data Load, Change View, Create stored function, Add a new user, Fix a database link, Send a size report to director, Fix a production slowdown, Helped an application developer and Averted a production crisis.
  • Migrating to Oracle 8: Quick Start on New Features:
    • Knowledge Collection and Consolidation
      • Learn about Oracle 8’s new features
      • Get help from someone who has implemented Oracle 8
      • Review the new features with your team
    • Application Analysis for New Features
      • Implement minor changes first
      • Define the table partitioning strategy
      • Define and indexing strategy
      • Identify the tables you can index organise
    • Database Design Analysis for New Features
      • Define the new physical layout
      • Define a partition maintenance strategy
      • Migrate to partitions
    • Backup and Recovery Strategy
      • Review your current backup and recovery strategy
      • Make as many tablespaces as possible read-only
      • Define a multitiered backup strategy using SMR
      • Make sure at least two independent restoration options exist
      • Ensure that you can do the restoration in an adequate time period
      • Define a plan for testing backup and recovery
  • Kevin Loney has an article on the new format for ROWID in Oracle 8, what it is and how to use it

To view the cover page and the table of contents click on the image at the top of this post or click here.

My Oracle Magazine Collection can be found here. You will find links to my blog posts on previous editions and a PDF for the very first Oracle Magazine from June 1987.

Friday, October 5, 2012

Review of Oracle Magazine–January/February 1998

The headline articles for the January/February 1998 edition of Oracle Magazine were on Electronic Commerce and include justification for building EC applications, creating online shops and what products Oracle has to support as aspects of an EC applications.

image

Other articles included:

  • Oracle Product announcements included:
    • Oracle InterOffice 4.1
    • Oracle Lite 3.0 gets a Java facelift
    • Oracle Gateways for MS SQL Server 8 and Sybase 8
    • Oracle Applications Release 11 is coming soon
    • Applications Desktop Integrator
    • Application Server 3.1
    • Oracle 8 on Sun Sets new World Record. TCP-C Benchmark with 51,871.62 tpmC at $134.36 per tpmC runing Oracle 8 on Sun Solaris 2.6 on a two node Sun Microsystems Ultra Enterprise 6000 cluster
  • Marking the Mart Decision, looked at how using a Data Mart approach you can have a project delivered quicker (3 to 6 months) and a cost of $100,000. All this using the Oracle Data Mart Suite for Windows NT
  • Securing transactions in Network Applications using Oracle’s Web Application Server to control security
    • Digital Certificate Authentication
    • Application Authorization
    • Encryption
  • Managing Unstructured data in Oracle 8. There ware some new data types including LOB, CLOB, BLOB  and BFILE
  • Making the most of Java looks at how you can use applets with Designer/2000 WebServer Generator
  • A quick start guide on how to migrate to Oracle 8, included:
    • Determining the Migration Strategy
      • Ensure compatibility
      • Identify invalid objects and lost statistics
      • Eliminate language problems
      • Take care of read-only tablespaces
      • Know the point of no return
      • Avoid large restores
    • Defining Resource Requirements
      • Define Personnel requirements
      • Set the timing of the migration
      • Determine space requirements
      • Create an appropriate testing environment
    • Determining Potential Problem Areas
      • Review ROWIDs
      • Avoid reserved words
      • Eliminate obsolete init.ora parameters
    • Identifying Verification Tests
      • Develop the test strategy
      • Do migration testing
      • Perform minimal testing
      • Do functional testing
      • Do integration testing
      • Do performance testing
      • Do load-stress testing

To view the cover page and the table of contents click on the image at the top of this post or click here.

My Oracle Magazine Collection can be found here. You will find links to my blog posts on previous editions and a PDF for the very first Oracle Magazine from June 1987.

Saturday, September 22, 2012

Oracle Open World Schedule

Oracle Open World is fast approaching. Over the past couple of weeks I have been using the schedule builder tool to work out what sessions I would like to attend.  Unfortunately there are LOTS of sessions I would love to attend but I haven’t worked out a way to be in 10 places at the same time.

When attending a conference I try to achieve a number of things. These are find out about new topics/features, benchmark my knowledge of existing topics, try some of the hands-on labs, try something new and do something completely different. This will be my challenge at Oracle Open World.

image

There are a number of other people from Ireland who will be attending OOW, and there are some plans to have an Ireland social event. Plus there is lots of meetings/catch-ups planned too with people I know from the virtual Oracle world.

There will be some people from AIB who will be presenting at OOW. Their presentation will be on the Tuesday morning 10:15-11:00.  I’ll be there.

Other social things that are on include the Oracle ACE dinner, the Oracle Music festival, with Kings of Leon playing support to Pearl Jam on the Wednesdays night.

It is going to be a busy week, an enjoyable week, a week of learning new things and finding out lots of what the 12c database will be like. 

Will I get time to go to everything ?  The simple answer is NO.  So I will just have to try to get to another Oracle Open World soon.