Showing posts from 2015

Creating a DB user without using a CREATE statement

I was teaching an Oracle Database 12c New Features class recently when I stumbled upon something I found quite interesting. While preparing for the class, I had to correct some of the exercises that had been provided since there were some typos due to OCR conversion. For one of the exercise, I had to create a new user and while I was entering the commands, I realized that I typed a GRANT statement before issuing the CREATE user statement. This must've been a typo I thought, but proceeded anyway. To my surprise Oracle didn't throw any errors at me!

Well I must have done something wrong so let's try this again.

First let's connect to the database - in this example I'm using Oracle but I've tested and confirmed it works in Oracle 11.2 as well and should also work in Oracle 10.2 but I haven't tested it.

Session altered. Check if the user exists
PDB1@ORCL> SELECT username,account_status,created
2 FROM …

Downloading EMCLI via Curl

The Enterprise Manager Command Line Interface or EMCLI enables ease of use and automation for administrators. However, in order to install EMCLI you need to access the EM Console to download the jar file.

A question on twitter about downloading EMCLI via command-line. There may be a couple of ways to accomplish it but the one that came to mind used the same technique as method 2 posted on this blog post by Pythian.

curl --header 'Host:' --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 'Accept-Language: en-US,en;q=0.5' --header 'DNT: 1' --header 'Referer:' --header 'Cookie: ORA_SMP_EM_AUTH_68934127863622066490=JtCfT0nY2Dq3LMzT2S1V0YLwx8…

Getting Started with VMware vSphere 5.5: Part I

Much of my research to date has involved the use of virtualization technology especially Oracle VM VirtualBox. Lately however, I've found that my aging 5 year old iMac has been struggling to keep up with my testing and research even despite attempts at increasing performance by adding physical memory (16GB) and SSD disks. I could also try using other desktop virtualization software such as VMware Fusion or Parallels for OS X (I have both) since other users have had better experience with them. However, I find the alternatives lacking in some feature that I currently use in VirtualBox (such as shared disks for clustering). Also Oracle publishes several Virtual appliances for VirtualBox which makes it easy to learn a plethora of Oracle products and features. For more on Oracle with VirtualBox you can read my paper and presentations on Slideshare.

With that said I've been wanting to build a dedicated lab machine for doing database research for a while now. I've been using VMw…

PRVF:002 Could Not Retrieve Local Node Name During Oracle Database 12c Install

Simple troubleshooting note during Oracle Database installation on Oracle Linux 6.6

If you get the message above after running OUI (runInstaller) the message simply indicates that OUI is unable to retrieve the name of the local node. To determine why this happens you can validate using hostname command.  For example: [oracle@matthew database]$ hostname --long
hostname: Unknown host To get additional information use the --verbose flag. [oracle@matthew database]$ hostname --long --verbose
Resolving `matthew' ...
hostname: Unknown host It now becomes obvious that the resolution using gethostname() is failing. Hostnames in Linux can be resolved using the /etc/hosts or a name server .e.g DNS. If a name server is not in use a quick check of /etc/hosts will reveal that an entry for the hostname (matthew) is not present. [oracle@matthew database]$ cat /etc/hosts
::1localhost6.localdomain6localhost6 Create an en…