Mario Talavera Writes

- My Development Journal

Browsing H2 Database in Play 2 Application – News To Me

leave a comment »

This one got me for a loop.  It just so happens that both the h2 browser AND the play app should run from the same console.  Otherwise, you end up running app and its database as one instance and new instance of ‘a’ database in another instance.

Do as I say and not as I do!

Image

1. From shell, start play app. Do NOT type ‘play run’, just ‘play’.

2. Type ‘h2-browser’ next, The H2 Console should load up in the browser.

3. Now, type ‘run’ (or ‘~run’ for compile on save) to start your app.

Bingo! You should be able to now see your database.

Written by mariotalavera

March 5, 2014 at 8:38 pm

Posted in Life

Disney Marathon 2014 Report

with 3 comments

image

 

Read the rest of this entry »

Written by mariotalavera

January 20, 2014 at 1:52 pm

Posted in Running

A Brooksville Runaround

leave a comment »

In the spirit of my previous runaround post, I decided to do the same for my latest long run.

This time I ran in Brooksville, FL instead.  The combination of week 7 of training plan (Disney here I come!), the kid’s school camping trip and the opportunity to run in a new place warranted this post. 

Call me weird, planning the run was half the fun.  Between Google Maps and Garmin Connect, I was able to plot a route around our camping site that lined up with planned run.

The only thing I did not plan was the expected humidity. According to NOAA’s site, average humidity was 69.  That is a lot of water in the air.  Thankfully, it was cold enough that it was not a bother.  Accordingly, however, my printed route paper was completely wet 2 minutes after I took it out of pack!

image 

Read the rest of this entry »

Written by mariotalavera

November 16, 2013 at 10:23 pm

Posted in Running

Tagged with ,

VMware Hypervisor Static IP

leave a comment »

One of the few frustrating experiences learning VMware Hypervisor has been loosing my server!  At install time, I must have defaulted to automatically getting an IP Address from DHCP.  Twice now, I’ve attempted to login thru vSphere and my server is nowhere to be found.  The hosted VMs are all accessible.  Its just VMware that goes M.I.A leading me to the suspicion that I did something wrong.

My usual fix is to scan my network for devices.

image

After figuring out which IP Address is my server at now, I proceeded to the servers configuration page on the right and selected networking from the mid-left pane.

Image

Selecting properties from the rightmost panel brings up the networking details for the server.  Here, I can see my new IP Address as well.

Image

Selecting Management Network from the left pane and pressing the edit button brings up the network properties where I can change the IP Address.

Image

Easy enough, I changed my settings to statically set my IP Address.  Done!

Written by mariotalavera

November 4, 2013 at 9:46 pm

Posted in Uncategorized

Tagged with ,

Cloning/Backing up a VM in VMware vSphere Hypervisor

leave a comment »

One missing feature of the wonderful free version of VMware vSphere Hypervisor is the auto-magic way of cloning a VM.  Nothing I could find at least on this.  There are features for managing snapshots of VMs, for taking snapshots and related tasks, however, to backup/clone a VM, you have to take matters into your own hands. 

Before you follow this steps, ensure the VM you’re about to clone is off.

First step, on your VMWare GUI, from Storage section, right click/browse the datastore where your VM image is stored.

Image(16)

On the Datastore Browser, create a new folder.  This directory will shortly become your cloned VM directory.

Image(17)

Having created a directory for the VM (to be cloned), click on the folder of the VM you want to clone now.  From the contents of this directory, select all the files, skip the logs and right-click copy.  Notice screen-grab shows .ldk and .vswp files.  The existence of these is because I grabbed the image from a running VM.  Remember the VM to be cloned should be shutdown.  These files should not be part of copy/paste steps.

Image(18)

Having copied all the files, go back to the newly created directory and right-click paste these previously copied items.

Image(19)

From all the copied files, right-click the file with the vmx extension and select ‘Add to Inventory’.

Image(20)

Select a name for your newly created VM

Image(21)

Finally, select the location of new VM.  Here you can see me place all ‘Base’ VMs in their own ‘Resource Pool’.  I am only doing this to group together copies I make of any VM I configure.  I haven’t even looked up why I want to use a resource pool for its intended purpose.

Image(22)

You’re done!

Image(23)

As mentioned at the beginning of this post, there may be an official way of creating/cloning VMs in VMware vSphere Hypervisor but I do not yet know how.  This, however, works like a charm, enjoy.  Thanks for reading.

Written by mariotalavera

October 16, 2013 at 7:13 pm

Posted in Uncategorized

Tagged with

Oracle 12c Primer – Up And Running

with 2 comments

UPDATE – Post has been revised since posted for accuracy.  Thanks Matt.

Alright.  Having recently installed Oracle DB 12c, I was disoriented for four days before things started to click.  No joke, this latest release of Oracle latest database server is the biggest release-to-release departure of old to new I have witnessed so far… I’ll like to think I have a long way to go.

I’ll go over the items that most baffled me and attempt to explain what these changes mean and how to catch up to Oracle 12c.  By the end of this post, maybe I can convince you there quite a few niceties that come from free for all our trouble.  Hope it saves you some time as well.

Enjoy!

Disclaimer - This post made sense a week into Oracle 12c… I am certain there are better explanations around.

The usual Oracle Installer rears its head again and does (did for me) provide a streamlined, uneventful installation.  I think the later portion, where it sets up / installs main database (more later) is even better than before.  It allows greater freedom to go into the server, after installation, and doing this later portion again.  Neat.

image

Above is our reference layout for Oracle 12c’s ‘arrangement’.  Get ready; this is a mouthful.  For an Oracle 12c DB Deployment, we have the following:

  • A 12c deployment can have one or more common databases as shown by CDB1, CDB2, CDB3 in illustration.
  • A 12c deployment has one common database as shown by CDB1.
  • This CDB can have one or more pluggable databases.  PDB2’s ‘content’ is being shown above.
  • The CDB has one pluggable database seed (PDB$SEED).
Notice the one-to-many relationship defined above.  A server has one common database which can have one or many pluggable databases with one or many user schemas each.  Got it? Good. Multiple things factor into how many PDBs to have such as team responsibilities, nature of data or, just as important, licensing!  Lets roll with the layout shown for now.
Common Database (CDB) – As part of the installation process, you would install one CDB.
  • Think of this as a System-wide operational databases of the instance it is in.
  • The CDB will have our Common Users such as SYS and SYSTEM we are already familiar with.
  • The installer will add an entry to the server’s tnsnames.ora as well.  This entry will define the SID/Service name for your CDB.  This is the SID entry we commonly end up naming ORCL.
  • Connecting with the CDB users will use this default SID as usual.
image

 

Pluggable Database (PDB) -  Likewise, the installer will create at least one of these.
  • The server will use the SEED schema to create our PDBs.
  • PDBs can also be created by cloning another PDB.  This can be done both from SQLPlus and from SQL Developer.
  • PDBs can be moved from one CDB to another one as a whole.
  • Moving PDBs can be done within the same server or from one server to another.
  • PDBs will host our user schemas.
  • In the image above, you can see some of the Oracle Sample Schemas such as HR , OR etc.  You can also see some of my own schemas; eBay and Movielens.
  • An additional service entry needs to be added to the server’ tnsnames.ora file in order to connect to a schema inside a PDB.  This is NOT done by default.  Neither the installer nor the Database Configuration Assistant Tool will do this at PDB creation time.
image
  • A PDB can be in an open (writable) or a closed state.  It needs to be open in order to connect to it.
image
  • Similarly, you would close a PDB as follows.  More on why you do this later.
image
  • Connecting to a user schema inside our PDB will require us to use this Service Name, INSTEAD OF, the CDB’s entry.
 Image(15)
Notice the prompt changes from our CDB to the PDB when we connect to the later.  It even shows our SID (for CDB at least).  This is not default behavior but immensely helpful.  Go to this post for all the information on this.  Very neat.
Common Users and Regular Users - Contrasting previous Oracle DB releases, 12c has two types of users.  A database user can be either a common user or a local user.
  • Common Users belong to the CDB.
  • Common Users can connect to both the CDB and PDBs as seen above.
  • Users SYS, SYSTEM, etc. (DB Users) exist in the CDB.
  • Users OE, HR, etc (Sample Schemas) & application databases (Movielens, EZPrints) exist inside a PDB.
Enterprise Manager - Is no more!!  At least, EM of old is gone.
  • Old EM has been replaced by what seems to be a much simplified version properly titled EM Database Express 12c.
  • Features seemingly dropped from EM make it to Cloud Control.  This is a separate product.
  • Its ALL Flash!  Haven’t accessed from Chromebook yet but expectations are low.
  • By default, connecting to EM as SYSDBA opens GUI for CDB.
  • URL has changed! My EM is not at https://localhost:5500/em
  • Much like having to activate a PDB before being able to connect to it, EM GUI per PDB has to activated independently.  I found all the information I needed in this great post.
Few Gotchas - This is where it hurt for me as I looked at 12c for the first time.
  • Connecting as SYS to a CDB will not lists all my databases.  Now I need to connect, as SYS, to the PDB where my schemas are.
  • EM has been trimmed of features I now need to either setup an EM per PDB (please see last link) or, worse still, install a separate tool (Cloud Control).
  • It seems we have to keep track of more things before we can get to ‘work’.  Is my PDB open?  Did I add TNSNAMES Entry for new PDB?  Workflows have clearly changed for us.
Neat things - After a few days of tinkering, I admit 12c’s new ways bring in some amazing features to the table.
  • Grouping user schemas in a PDB enables us to manage these as a whole.
  • A PDB can be plugged/unplugged in a few steps to transfer/restore on a different CDB.  This could save a lot of time if you are rebuilding a failed server. for example.
  • A lot of the features (like plugging a PDB) can be done from SQLDeveloper (Version 4.x Beta).  This kind of makes up for moving features out of EM.
  • Instead of keeping several semi-idle instances around for development, this load can be better managed from one 12c instance and multiple PDBs.

Written by mariotalavera

September 20, 2013 at 10:49 am

Posted in SQL

Tagged with

Dave Ramsey’s Entreleadership One Day Event

leave a comment »

Dave Ramsey’s mission is to get people out of debt.  He hosts a popular radio show, offers classes nationwide and sticks to biblically backed lessons in every endeavor that his organization does.  Classy setup all around.  If you tried to boil down his ‘philosophy’ it would succinctly be ‘No Debt’.  Simple enough and we all know this but clearly its not what we know but what we do that matters.

He ‘made’ me sell my custom ordered fancy sporty car back in 2006 and I have been a, sometimes reluctant, fan ever since.  Upside is that my family is debt free minus the house and we can clearly see the day when we are not even encumbered by that.  I’ll like to rephrase that: Not a care in the world!

Thanks Dave; if you ever setup shop in Orlando, let me know!

Anyways,  just google Dave Ramsey if the above sounds appealing; he is 10x more eloquent that me.  One of the events Dave goes on tour for is Entreleadership.  This event’s focus is guiding the entrepreneurs among us motivating them to stand up and be good leaders at their venture.

Having seen Dave a few times, I think this is one delivers one of his strongest messages to his audience.  I was fortunate enough to volunteer for his Orlando visit this time, got to sell some books and talk to people all day.  I also witnessed a little bit of behind the scenes action for his organization.  Happy to say that Dave’s Team is running a class act and doing the right thing at every chance. Way to go!  I had a great time with the other volunteers who were all great and committed and shared Dave’s mission.

For the two that have read all the way here, I highly recommend assisting this, or any other of his events as a volunteer or audience member.  As a volunteer, I got the chance to see Dave a bit but not enough to write down notes as I would’ve had I sat thru the whole thing BUT… I remembered I should have my notes from when I did assist the event.

As a note to self, and my two readers (hey there!), here is a brain-dump from November, 2010.  These are notes to self so it’s a-ok if they do not make sense to you.  Got it? Good.

Read the rest of this entry »

Written by mariotalavera

September 18, 2013 at 6:31 am

Posted in Life

Tagged with

Follow

Get every new post delivered to your Inbox.

Join 54 other followers

%d bloggers like this: