Thursday, 5 May 2016

Developer day VM Updated: 4/25/2016 Errata

Download 'Developer Days VM' : including patched

Use case:
Developer - VM on their machine with recent Oracle software, with no non VM install deinstall setup issues..
Testing (i.e. non production) use, no non VM install deinstall setup issues...

Update 25 August: enabled ORDS/Rest enabled table (hrrest.employees) :
    (Thought this was in the readme)

Shipped with second pdb[1] for from scratch ORDS setup if you want.
Bump up cpus/Ram
- absolute minimum/default (but slow)1 cpu 2Gig RAM,
-(fast enough but impacts basic host machine (i5/8Gb))2cpu 3Gig RAM

New in this release small bump in versions of (especially) ORDS and sqlcl.[4]
Better setup of ORDS by default (url for select from an example table enabled)
Reset does not cover initial ORDS.
Drop pdb[2]/create pdb[3] and reset up ORDS from the labs if you want to rebuild ORDS configuration.

Absolutely tiny:
No fancy virtualbox options documented especially for this VM - out of the box: port forward from host to guest.
Built with virtualbox 5.0.0 (and extras 5.0.0)
Last Linux 'yum update' about 1 March (might need proxy in yum.conf) - if you update the kernel you will need to reinstall virtualbox  extras to get a better UI integration guest to host.
~/ called on gnome login to set screen size and pop up terminal.
APEX is too slow the first time - after that it succeeds OK.
To reset firefox (eg to clear history) try:
     __log out/exit from firefox__ then cd ~; rm -rf ~/.mozilla ; unzip takes an argument path/to/the/war - so it knows which one to start/stop/ ps -ef| grep for

[1]pdb -> Oracle Multitenant - big new feature in 12 - few extra resources (besides 1.5Gig disk disk) for pdb which appears to the user (with a few restrictions to DBA operations) a new database. I was thinking the VM might host many PDBs
- pdb per developer in the group?
- pdb per software version/product?
- create pdb automatically on demand?(2 minutes)
- Have one spare PDB available so requester does not have to wait 2 mins? (Have a function that returns service name of pdb to use so prebuilt pdb does not need to be renamed (rather than demanding new pdb by name))
Bump up the [Core database RAM - currently 800meg]i.e. SGA/Add Extra Virtual Disk if you are going over 6 VMs...

[2] To drop PDB named SCRATCHT (initially pdb named ORDS is pretty blank - just 'hr' schema)

[3] To create PDB (THE_NAME if not entered defaults to pdb name "ORDS" - if there is an "ORDS" pdb already it errors out).

createnewpdb THE_NAME
[type y enter to confirm details]
creates pdb (including users tablespace)
creates HR schema, create tnsnames.ora entry,
Ensures pdb is open by default
Ensures passwords do not expire (change this to suit your security requirements)
tests 32k varchar is on (set in seed).

[4]sqlcl is undergoing continuous development/updates - any problems confirm first on latest download from:
(it is less than 20 meg download).

Thursday, 28 January 2016

Oracle VM errata released 27 Jan 2016

Oracle VM errata

Download 7.5Gig from

Get back to me if there are any issues so I can make a better one.

Should have told people:

(I am a developer on (sqlcl/sqldeveloper) user of (Oracle Database/jdbc/java/Oracle Linux/bash) so my biases are in that order) 

Introduction to Oracle Database? Not used them myself but...
(TODO: Need to check links from outside Oracle)
Oracle doc - Oracle Database Concepts - 
high level and useful view of the Oracle Database.

Oracle doc was reorganized to include
2 day dba
2 day developer

Fancy new database stuff in Oracle Database 12c:
multitenant - pluggable databases.
32k varchar2
in memory option

1/(Oracle software: database (i.e. patched as of October/November) (APEX/ORDS/sqldev/sqlcl/modeller/labs) - as of Christmas 2015 (or later) Oracle Linux as of November ).

2/Check the licensing (I am not a lawyer...)

3/Oracle Linux 7.1 - you might be able to (put a proxy in /etc/yum.conf if necessary) and yum update -> Oracle Linux 7.2. I had to remove some old kernels so they would not break the update to 7.2 - I think they are removed in the final VM so you should not have kernel issues.

4/Virtualbox extras - 4.0.30 - you might be able to updated to 5.x (i.e. dependencies - kernel headers installed)
4.0.30 should work - with warnings - in 5.

5/Defaults to 2GigRAM/1CPU - that is the bare minimum - update possible on import or settings after import. 

6/It port forwards from the host so:
sqlplus system/oracle@localhost:1521/orcl12c
sqlplus system/oracle@localhost:1521/orcl
should work on host (if you have sqlplus installed)  or guest - to connect to the guest database

7/Other new new stuff: sqlcl [startup script sql] 11 meg download (requires java) acts sort of like sqlplus 

(Download or run from guest:)
sql system/oracle@localhost:1521/orcl12c
sql system/oracle@localhost:1521/orcl

8/ If you are not familiar with Oracle:
Example sql to confirm connection:
select 1 from dual;
[dual is a fake 1 row table in Oracle].

9/Sqldeveloper home:


10/Other Oracle Database downloads (check the licenses) 
- other VMs
- full Oracle Database
- Oracle database XE 11,2 (Easy install/'Cut down' 'slightly more lenient' license)
- instant client including sqlplus

11/Setup decisions:

TWO_TASK=ORCL is set in .bashrc
wrapper script ~/bin/sql - not used (further down the path)
(Other wrapper scripts are to ensure .bashrc are set for PATH/Java/Database environmental variables when for example called from icon click)
APEX 5 installed on pdb (rather than cdb)
varchar2(32k) is on
Default system connection in sqldeveloper is for pdb (pluggable database).

What can go wrong:
-VM might not start properly - looks like a timing issue on slow machine. (I can eventually ssh in but UI broken) - 'ssh oracle@localhost' in and 'sudo shutdown -r now' might help.
-Overlap of icons occasionally
-Some things missing due to desire to reduce size of VM -  for example the database creation DBCA assistant removed,
-patches applied to seed  (rather than (as seen in the documentation) not patch seed and get dba to patch new pluggable databases on creation).
-ORDS startup shutdown script will be confused with two ORDS running (1 startup ords and 1 labs ords (launched from sqldeveloper) for example).

For fancy stuff (SQLDeveloper) developer/manager blogs see:

For example: javascript and aliases in sqlcl