Introducing the OTN Developer Day Database 12c VirtualBox Image

thatjeffsmith SQL Developer 67 Comments

Tell Others About This Story:

If you’re looking for an already configured Oracle Database 12c environment with a database already setup and all the software you need to learn database programming, design, and administration concepts, then look no further:

Everything you need to get your 12c on! #FREE

Everything you need to get your 12c on! #FREE

This Stuff is all FREE

The virtualization software is VirtualBox – that’s free. And it runs on any OS, including Windows, Macs, and *NIX. You’ll need to go download and install that first.

Are you ready to get started? Awesome. Then start up VirtualBox. You’ll get the Oracle VM VirtualBox Manager up and running. You’ll want to IMPORT an appliance.

We’ve already built the appliance for you. And by ‘we’ I mean @krisrice – so go thank him.

It’s going to take you awhile to download – it’s about 5GB in size.

Once you have downloaded the file as referenced on this page – you’ll need to agree to the license/terms, and use your Oracle Single-Sign On account (also free!), then do the import and point to the .OVA.

You'll point to the .OVA file you've just downloaded...

You’ll point to the .OVA file you’ve just downloaded…

Next you’ll be prompted to approve of the VM settings. There are two that I want you to take a look at before just saying ‘Yes’ to everything:

Have lots of memory? It's OK to be greedy...

Have lots of memory? It’s OK to be greedy…

The image requires at least 1 GB of RAM to run. Remember, we’re running Oracle Database 12c, on a Linux image, plus you’ll be running a browser, and probably SQL Developer, or the Modeler, or APEX, or all of those. If you have it, bump the memory up to 2GB.

Also, the OS ‘disks’ are by default going to be sitting on your C: drive. Make sure that drive is ‘fast’, has contiguous blocks available (defrag first if necessary), and enough space. I’ve switched mine over to my D: partition.

Then click ‘Ok.’

Say ‘Yes’ to the License Agreement.

Read it!

Read it!

This will take a few minutes – or however fast you can write out those 2 huge files, ~= 12GB.

Windows lies, but it will take awhile.

Windows lies, but it will take awhile.

Start the VM!

Select the vm in the manager and hit the ‘Start’ button. You’ll know you’re good if you see this screen.

Oracle Enterprise Linux 6 is booting up!

Oracle Enterprise Linux 6 is booting up!

If you see this error…

“This kernel requires an x86-64 CPU, but only detected an i686 CPU.”

Your BIOS is going to need to be updated. You’ll want to enable the virtualization technology. There’s a good tutorial on how to do that here.

Now, back to the image…

Logon as oracle/oracle – this is the user that owns the install, the labs, and software.

Your desktop should come up, and will look a little something like this – without the annoying arrows and blocky words I added 🙂

The DevDay 12c Developer Database Image Desktop for the oracle user

The DevDay 12c Developer Database Image Desktop for the oracle user

Where to get started?

Well, you could click on the big penguin circle and launch the labs, pick one and follow the instructions. Or, you could fire up SQL Developer and start mucking around.

In either case, you MIGHT want to create a snapshot for the VM first – this will give you a backup of your image you can go back to in case you ever screw it up beyond repair. This would be faster probably than re-downloading the OVA file, importing it, etc.

For SQL Developer, you can create a connection to the CDB or the PDB. Yes, this is a Multitenant installation.

The CDB instance is ‘ORCL’ and the PDB instance is ‘PDB1’. To connect to the database with all the sample data, you’ll want to go in as HR or SYS to the PDB1 ‘service.’ PDBs are accessible via the service, not the SID.

Oh HR, how I have missed thee...

Oh HR, how I have missed thee…

If you want to clone a PDB, then you’ll need to create a SYS-level connection to the CDB and access the DBA – Container Database node.

The container is ORCL, the pluggable is accessed via service 'PDB1'

The container is ORCL, the pluggable is accessed via service ‘PDB1’

Bonus Tips

If you have networking setup correctly, you’ll be able to connect to your database from your host machine – just figure out what your IP is first. You’ll want to confirm your machine can ‘see’ the VM on it’s network.

This can get…complicated…on Windows. Thankfully many people have written up nice dedicated blog posts on the subject. Eddie Awad has this one that seems pretty thorough.

If you’re lazy, can you can setup port forwarding such that talking to port 1521 on your host auto goes to port 1521 on the Linux image.

Related Posts Plugin for WordPress, Blogger...
Tell Others About This Story:

Comments 67

  1. Hi Jeff,

    I can’t use dbca after I installed this Virtualbox image. Would you please tell me how to fix this?

    Thanks,
    William

    1. thatjeffsmith Post
      Author
        1. thatjeffsmith Post
          Author

          we blow away the inventory stuff that dbca needs to make the VM smaller – sorry, you’re going to have to build one from scratch or pull down another image from OTN if you want to do that

          1. http://totierne.blogspot.co.uk/2016/05/developer-day-vm-updated-4252016-errata.html

            includes: (for creating pdbs)
            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).

            FYI ‘cost’ is about 1.5GB of disk per empty pdb – should fit about 6 before filling the virtual disk.

  2. Hi Jeff,

    I downloaded and imported to VirtualBox the last Developer day virtual machine.

    I’m not able to connect to the db via terminal or SQL developer
    I always get the same message, ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

    In the terminal I see [oracle@vbgeneric ~]$ and I’m using
    Sqlplus and then sys with password oracle. I tried with system or HR.

    I’m not very experienced in Oracle and I thought this was working out of the box.

    Any help would be great,

    Art

    1. thatjeffsmith Post
      Author
      1. Thanks Jeff,

        Basically I just run the virtual machine and opened SQL developer.
        There is a user created, system, and I tried to connect with that one with the password Oracle, so then I got the error message ORA-12514, that I put in my previous reply.

        I tried the same with the terminal and using sqlplus command and with different users, system, sys and hr, and I get the same message.

        I didn´t try more things really. I checked listener.ora and tsnames.ora files but I didn´t see anything wrong but I´m not an expert.
        So not sure what to try next.

        Maybe something to with virtual machine settings? I just imported the appliance and didnt change the default settings. I´m using the last version of VirtualBox

        Thanks,
        Art

      2. Hi Jeff

        I’m having a similar problem to what Art was/is having.

        I have a brand new instance of the VM running – image file name is DeveloperDaysVM2016-06-02_13.ova

        I then try your suggestion in terminal:
        [oracle@vbgeneric ~]$ sql hr/oracle

        SQLcl: Release 4.2.0.16.153.2014 RC on Wed Oct 26 09:37:33 2016

        Copyright (c) 1982, 2016, Oracle. All rights reserved.

        USER = hr
        URL = jdbc:oracle:oci8:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
        Error Message = ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
        USER = hr
        URL = jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
        Error Message = Listener refused the connection with the following error:
        ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
        Username? (RETRYING) (‘hr/*********’?)

        I’m not familiar with configuring Oracle. What should I do next please?

        1. thatjeffsmith Post
          Author

          sounds like the database isn’t started yet, it might take a minute or two once you start the image for the database to be open and available

          if you go into the image itself and go to a command line, can you open sqlplus?

          cmd> sqlplus sys as sysdba

          1. Thanks Jeff

            [oracle@vbgeneric ~]$ sqlplus sys as sysdba

            SQL*Plus: Release 12.1.0.2.0 Production on Wed Oct 26 10:33:14 2016

            Copyright (c) 1982, 2014, Oracle. All rights reserved.

            Enter password:
            ERROR:
            ORA-12514: TNS:listener does not currently know of service requested in connect
            descriptor

            Enter user-name:

          2. To be clear, this is all from the image.

            All I have done is fired up the VM, and updated Guest Additions. Nothing else has been run except these and the commands I mentioned.

        2. thatjeffsmith Post
          Author
          1. That is the version I have. Sorry, it would have been clearer to have given the vm name rather than the filename.

          2. I tried this last night on a Mac and it works fine.

            The problem I am having happens when running on Windows. I’m running latest Version 5.1.8 r111374 (Qt5.5.1).

            Is there any difference in the VM image between platforms, and could this account for the problem?

            thanks

            Sean

          3. Ok. I think I’ve worked this out. I don’t have much available RAM on the Windows PC, which in turn means that the VM doesn’t have much RAM.
            The Oracle database wasn’t starting up by itself. When I tried to start it manually, I got an error saying ‘MEMORY_TARGET not supported on this system’. On investigation, it was limited to around 770Mb. I doubled this to 1.5G and the database would then start. However, the VM is so slow now that it is currently unusable.
            I’m running Windows 7 with 8Gb RAM and it leaves very little spare.
            I’m guessing that my best option is make more RAM available, or is there something else that I could configure so that I get the ability to start the database and still get reasonable performance?

            thanks

            Sean

          4. thatjeffsmith Post
            Author
          5. http://totierne.blogspot.co.uk/2016/05/developer-day-vm-updated-4252016-errata.html

            If you are doing very little else on an 8GB i5 – use 3072MB Ram 2 CPU – the default is 2048MB RAM 1 CPU. You could reduce the SGA (Core ‘shared memory attach’ ram used by core server processes) so it could startup in less RAM (you might get total ram required down to 1500MB from the current 2048) SGA is set at around 800MB – you could try setting it to 500MB in the sp file before startup – though RAM is fairly cheap nowdays.

    1. thatjeffsmith Post
      Author
  3. hi jeff, I was able to install the oracle 12c database developer day virtual image on my VMware player and it seemed to work. But somehow the armored penguin icon didn’t show up, and I only saw the text START in the red circle. And my host computer name is vbgeneric, not localhost. Do you have any suggestions on how to fix these issues? Thanks!

    1. thatjeffsmith Post
      Author
      1. yes – the database came up and the software is working fine. But I have no clue how to fix it without using the VirtualBox.

        1. thatjeffsmith Post
          Author

          sorry i don’t know either

          virtualbox is free, so why not grab and use it?

          unless you want to run the hands on labs, there’s no need to even use the image, i just use it to host my database, apex, and ORDS

      2. Hi Jeff,

        I am having the same problem (oracle@vbgeneric instead of oracle@localhost), however, I AM running it on VirtualBox, just like it says in the guide (?!)

        Another issue I have is that the ORACLE_SID and ORACLE_HOME are not ORACLE_HOME=/home/oracle/app/oracle/product/12.1.0/dbhome_1 and ORACLE_SID=cdb1
        but
        /u01/app/oracle/product/12.1.0.2/db_1 and orcl12c respectively.

        I hope you can help me and hundreds of other students struggling with these issues at a MOOC course.

        Thanks in advance!

        1. thatjeffsmith Post
          Author

          The new VM indeed has a large red start icon. Double-click it to start your labs. Double-click SQLDev to open SQL Dev.

          Create a connection to service ‘orcl’ to connect to the pluggable database.

          You shouldn’t care what your $ORACLE_HOME is.

          Hundreds of students are struggling? Where/What is MOOC? Can you put me in touch with your professor? Thanks.

          1. Jeff, thank you so much for your quick reply. I am connected now!

            A MOOC is a Massive Open Online Course, in this case, Coursera’s “Database Essentials” course by the University of Colorado System. Professor Michael Mannino is in charge, but i am afraid I don’t have a way to get in touch with him outside Coursera.

          2. thatjeffsmith Post
            Author

            You know how to find me, not sure what the mix-up is between our VM and his course. If you see something ‘wrong’ with our VM setup/instructions, I can try to fix it at least.

          3. Hi Jeff,

            I am also in that course and we have been given instructions to use Pentaho Data Integration to connect with an Oracle DB but many of us on Mac machines are really struggling to either run Pentaho DI and SQl developer simultaneously on this virtual box or connecting from our Mac machine to the Virtual Box so that we can use Pentaho DI outside of the Viertual Box. I keep getting errors when I try to modify the firewall too.

            Thanks for responding to these since the professors at Coursera are not!

            Thanks!

  4. Hi Jeff,
    I’ve download the latest Oracle DeveloperDay and install it on mac.
    I’m able to access the DB from host OS Sqldeveloper. But couldn’t able to access it via any application.
    Also, I’m not able to get the ‘System’ (‘Application’ & ‘Places’ are coming) menu inside the VM OS.

    Regards
    Vijay

    1. thatjeffsmith Post
      Author
  5. Hi Jeff,

    Quick question. I am trying to connect to the HR as shown above using the connection name:HR, user name : HR and the password as “oracle”. I am using the Service name as PDB1. However when I test the connection out, I get the error message, “The network adapter could not establish the connection”. What am I doing wrong?

    The second question I have is, is there a SQL Plus equivalent in the virtual box? If yes, how do I invoke it?

    I would really appreciate your help.

    Thanks
    Narayan

    1. thatjeffsmith Post
      Author
    1. thatjeffsmith Post
      Author
  6. I know this is an “as-is” download, but is there any way to get the sysdba password to make this a functional/usable download? sqlplus / as sysdba doesn’t work, and the connection from SQL Developer says it’s expired. At the linux level, it says that passwords are “oracle”, but apparently that doesn’t apply within the cdb1 instance, the sole instance auto-created with this appliance. Thanks for any feedback (especially with the sysdba password on this stand-alone appliance.)

    1. thatjeffsmith Post
      Author
      1. I had to use:
        User: system
        Password: oracle
        Hostname: localhost
        Port:152
        Service: orcl

        And I can connect from my Mac direct to the DB hosted on the VirtualBox VM, using the port forwarding suggestions.

        Now to figure out creating a DB and tables (Im a front end developer, not a DBA, just need this for testing/dev purposes).

  7. Thanks Jeff! That was it. The connection was set with the SID orcl and no service name.
    I changed to service name PDB1, and was then able to create a user

  8. I’m new to SQL and am attempting to learn using SQL Developer using the VM instance. I’m unable to create a user.

    I use this..

    –Create User
    CREATE USER testuser IDENTIFIED BY dummypassword;

    –Grant privileges
    GRANT CONNECT, RESOURCE TO testuser;

    and get these errors…

    Error starting at line : 2 in command –

    CREATE USER testuser IDENTIFIED BY dummypassword

    Error at Command Line : 2 Column : 13

    Error report –

    SQL Error: ORA-65096: invalid common user or role name

    Error starting at line : 5 in command –

    GRANT CONNECT, RESOURCE TO testuser

    Error report –

    SQL Error: ORA-01917: user or role ‘TESTUSER’ does not exist

    01917. 00000 – “user or role ‘%s’ does not exist”

    *Cause: There is not a user or role by that name.

    *Action: Re-specify the name.

    1. thatjeffsmith Post
      Author

      This is a bit complicated, but I think you’re connected to the Container database (CDB), not the Pluggable (PDB). For the connection that you are issuing those commands on, what is the SERVICE name – you’ll see that on the connection properties dialog.

  9. SQL *Plus Release 12.1.0.2.0
    $ sqlplus

    Enter user-name : oracle
    Enter password : oracle

    invalid username / password; logon denied

    and

    Enter user-name : HR
    Enter password : oracle

    invalid username / password; logon denied

    How to know default id and pw?

  10. Hi Jeff,
    I am unable to connect to the container database. I tried “sqlplus / as sysdba” with no success. I am able to connect to the PDB1 though using “sqlplus sys/oracle as sysdba. Can you tell me how to go about this?
    Thanks

    1. thatjeffsmith Post
      Author
        1. thatjeffsmith Post
          Author
  11. Hi Jeff,

    Thanks. I’m a newbie in Oracle SQL and Linux system. This is very informative and after I followed your instructions, now I am good to go.

    Cheers,
    PuRoy

  12. Hi Jeff,
    Is it possible to create a new database with this VM bundle? I cloned and edited a init.ora file, from the provided init.ora file under $ORACLE_HOME/dbs. I also create a orclpw file with the sys and oracle users. Then I exported the ORACLE_SID as my new sid but trying to connect with sqlplus fails: “sqlplus / as sysdba”. I eventually connected with “sqlplus /nolog” and tried to “start nomount” to issue the create database command, however sqlplus says that the instance is already mounted and I think it is the default ‘ocrl@pdb1’. Is there a way to create my own database? Thanks.

    1. thatjeffsmith Post
      Author

      Sure, but this is 12c Multitenant – just clone the existing pdb to your new database and you’re good to go.

      If you want to create your own db from scratch, then you’re on your own – but there’s no reason why you shouldn’t be able to. I’d probably also just use the dbca utility to create the new database for me.

      1. Thanks. Sounds like I need to read up on this multitenant feature of 12c. I tried dbca also but it had a similar issue right at the end of database creation with a ORA-01034 Oracle not available error and dbca exited. I would really like to set up my own database from scratch the hard way, as I want to learn how to do it like all the DBAs do 🙂
        Out of interest is there a VM package for 11g? – I did not see one on the site. Thanks again.

  13. Hi Jeff,

    I have Win 7 64 bit.
    I have downloaded Windows (32-bit/64-bit) using your ‘image’ link.
    I can’t see any setting for 64 bit in the Virtual box, and keep getting the following error
    “This kernel requires an x86-64 CPU, but only detected an i686 CPU. Unable to boot – please use a kernel appropriate for your CPU”

    Any help would be greatly appreciated.
    Thanks,
    Tim.

    1. Hi Jeff,

      Problem solved!
      – I had to go enable ‘Virtulization Technolgy’ in the BIOS, now i can see 64 bit in the VM.

      Could not have done it, with out your website pointing me in the right direction initially!

      Kind regards,
      Tim.

  14. I’m only using it for APEX! This is what I wanted with the VM in the first place so I assumed once an Oracle VM, with Oracle 12c and Application Express was configured I could continue to do Oracle type stuff on it, including APEX dev/demo work and a minor patch to take it to the terminal release.
    It does all work fine but the trigger won’t work and so I have to issue the grant restricted session to APEX_PUBLIC_USER. I’m aware it is unsupported and am v grateful someone has made it available. Maybe a 11g or 12c version with 4.2.5 will come along in the next few months…

  15. Yes, the DB is available but 4.2.5 seems to have had an effect leaving it in restricted mode whenever it starts up.
    I can:
    ALTER PLUGGABLE DATABASE OPEN read write force
    which will work but not in a trigger.
    grant restricted session to apex_public_user also works but ideally, I’d like to get to the bottom of the problem rather than use workaround.
    Thanks for the help!

    1. thatjeffsmith Post
      Author
  16. This is a real pain!
    There is a workaround

    The folllowing should work but following the creation, looking at the trigger it appears empty:

    CREATE OR REPLACE TRIGGER sys.open_pdbs
    AFTER STARTUP ON DATABASE
    BEGIN
    EXECUTE IMMEDIATE ‘ALTER PLUGGABLE DATABASE OPEN read write force’;
    END open_pdbs;

    So either do this *every time* the DB starts up:
    ALTER PLUGGABLE DATABASE OPEN read write force;

    Or issue this:
    grant restricted session to apex_public_user;

    I would like to know a more satisfactory approach if possible

    1. thatjeffsmith Post
      Author
      1. Well this is a case of not knowing much about 12c and pdb’s. My trigger was in the pluggable and not the ‘main’ DB. Moving it should have done the trick but that too, has not worked. It is an extra step after starting the VM but I’d love to be able to start the VM and have APEX without any fixing being applied!

        1. thatjeffsmith Post
          Author
  17. Hi,
    seems the latest Apex patch killed the 12c…

    after installation of the latest patch p17966818_425_Generic in OTN Developer Day VM.ova (12c) Apex no longer works.
    Somehow the PDB1 has been set into restricted session mode and when I try to change this I get:
    ORA-65144 alter system disable restricted session is not permitted

    An attempt to install DATABASE PATCH SET UPDATE 12.1.0.1.2 failt with various error messages. Not even my DBA were able to make it work…

    Any help would be fine.

    Andre

    1. thatjeffsmith Post
      Author
      1. Well, I did – 3 times…

        I take this as: it is not possible…
        1. to patch OTN Developer Day Database 12c VirtualBox Image
        2. as a result from 1. it is not possible to update Apex 4.2.4 to 4.2.5 OTN Developer Day Database 12c VirtualBox Image
        Am I right when I’m assuming this is expected behavior?
        That’s a pitty.

        1. thatjeffsmith Post
          Author
  18. Hi Jeff,

    Does the new 12c Virtualbox image use Logical Volume Management? The 11g image did not – which made it just a tad trickier to add space to the image. It would be nice to have LVM to easily add space…

    Thanks!

    Phil

    1. thatjeffsmith Post
      Author

Leave a Reply

Your email address will not be published. Required fields are marked *