Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

secretagent004

macrumors newbie
Original poster
Dec 14, 2014
8
1
India
Hello Guys,

I wanted to Practice Oracle Database Administrator Tutorials on my Mac OS (Host OS)

So, went ahead and did the Following:

1.) Recently Installed Oracle Virtual Box Software (.dmg) on My Mac OS Successfully,

2.) Also Downloaded the VM (Virtual Machine) Image of Oracle Linux 6.4 (64bit) which can be Imported into the "Oracle Virtual Box". This so-called "Oracle Linux6.4" will be the (Guest OS) running within the Virtual Machine a.k.a. Oracle Virtual Box which in turn is Installed on my Mac OS (Host OS).


Now,

The confusion lies as follows:

a.) I am able to start the "Oracle Linux OS" Within my Oracle Virtual Box Software successfully !! with the pwd: oracle

b.) How Can I launch the "sqlplus" inmy Guest OS (Oracle Linux 6.4) from the terminal? (Terminal of the Guest OS i.e. Terminal of Oracle Linux 6.4 OS running within my Virtual Machine)

c.) In the Linux Terminal, I type:
................
[oracle@oraclelinux6 ~]$ export ORACLE_SID=oracle
[oracle@oraclelinux6 ~]$ sqlplus / as sysdba
bash: sqlplus: command not found
...............

(I use ORACLE_SID as oracle as I am assuming since the Linux $-DOllar Prompt Terminal shows "oracle@oraclelinux6")

So, Does this VM Image of Oracle-Linux6.4 DOES NOT comes pre-loaded with an Oracle 10g/11g/12c Database?

If so, How Can I install Oracle Database on my Linux OS now ?
 
Did you setup your tnsnames on OSX to point to the VM. I think your VM needs a static IP address.

The VM is just another computer, so you need to define how OS X can find it, which is done via the tnsnames.
 
Did you setup your tnsnames on OSX to point to the VM. I think your VM needs a static IP address.

The VM is just another computer, so you need to define how OS X can find it, which is done via the tnsnames.

Well, I did not do any such thing, But as I said in my 1st Post, I am able to run "Oracle Linux OS" within my VM successfully and can also access the Internet from the Linux OS (on my VM) via Mozilla Firefox Browser.

Should I access the Internet from within my Linux (GuestOS) OS and download the Oracle 11g Database .zip files and Install ?
 
You can access the DB from Linux, because that's where you installed it and it setup a default tnsnames.

I use Oracle databases for work, and if a computer does not have tnsnames.ora file it will not be able to locate the database server or the database.

Type tnsping in linux terminal and see what it states, then do the same in OS X's terminal.

----------

I'm sorry, I reread your OP and I thought you were trying to access the DB from OSX not install it in Linux. I guess I hadn't had my coffee in the morning

Sorry for spinning your wheels :(

Type tnsping in the linux termini as I stated and that will show you the connection information if any. its installed when the DB and/or client tools get installed. I believe the DB comes preinstalled with the VM, but read the release notes to be sure.
 
On the OS which has the database software installed, run the following command:

Code:
. oraenv

Note that there is a whitespace between the . and the oraenv. This command asks for the instance name or SID. When you run the command for the first time, it asks for your ORACLE_HOME, too.

After running this command, it sets some environment variables in your shell so you can access your oracle instance.

E.g. if your osuser is the in the group "dba", just type:

Code:
sqlplus / as sysdba


If you want to access your DB from Mac OS X, there are several options.

1. SQL-Developer
It's a java application (free download at oracle). In the connection panel choose:
Hostname: IP-of-your-Linux-VM
Port: 1521
SID: SID of your database (often the default is ORCL)

2. SQL*plus from the Oracle Instantclient.
Download the instant client and sql*plus for instant client. Extract the files to a folder like instantclient_11_2. Open a terminal and type

Code:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/your-user-name/instantclient_11_2/

Change to the folder of your extracted instantclient:
Code:
./sqlplus oracleuser/password@10.0.1.110:1521/ORCL

This assumes, your linux VM has the IP address 10.0.1.110 and the oracle instance is named ORCL. Your setting might be a little bit different.

Good luck.


----
Edit: Perhaps you should try a VM Image which comes with an Oracle instance installed. Like this:

http://www.oracle.com/technetwork/community/developer-vm/vts-hol-2415742.html
 
Last edited:
Oracle Linux is just another Linux distro, but optimized for high-performance enterprise environments. It's probably overkill if you're running it on consumer hardware and in a virtual machine.

You'll need to install an Oracle database & client utilities on it. Go to the Oracle web site, download Oracle 12c, and choose "Linux x64" as your operating system.
 

"Oracle Corporation distributes Oracle Linux with two alternative kernels:

Red Hat Compatible Kernel - identical to the kernel shipped in Red Hat Enterprise Linux (RHEL).

Unbreakable Enterprise Kernel (UEK[8]) - based on newer mainline Linux kernel versions, with Oracle's own enhancements for OLTP, InfiniBand, and SSD disk access, NUMA-optimizations, Reliable Datagram Sockets (RDS), async I/O, OCFS2, and networking.[9][10]"

- https://en.wikipedia.org/wiki/Oracle_Linux
 
"Oracle Corporation distributes Oracle Linux with two alternative kernels:

Red Hat Compatible Kernel - identical to the kernel shipped in Red Hat Enterprise Linux (RHEL).

Unbreakable Enterprise Kernel (UEK[8]) - based on newer mainline Linux kernel versions, with Oracle's own enhancements for OLTP, InfiniBand, and SSD disk access, NUMA-optimizations, Reliable Datagram Sockets (RDS), async I/O, OCFS2, and networking.[9][10]"

- https://en.wikipedia.org/wiki/Oracle_Linux

No, I think you miss my point. Your original statement implies that the RHEL kernels are unsuitable "for high-performance enterprise environments" when this is clearly not the case. 99% of the reason Oracle Linux is suitable for demanding enterprise environments is because of its RHEL roots.

Oracle adding a few kernel patches whilst parasitically ripping off the rest of the Red Hat codebase and giving almost nothing back is not something to be celebrated.
 
Oracle adding a few kernel patches whilst parasitically ripping off the rest of the Red Hat codebase and giving almost nothing back is not something to be celebrated.

You could bring the same argument forward against CentOS, Scientific Linux or whatever flavour of RHEL derived Linux is to your liking. BTW, Oracle does give something back: https://oss.oracle.com/.

And not to forget, Linux copied (and still copies) quite a bit from Unix and other systems. So it's more like taking and giving from all involved parties. And that's nothing new since the beginning of the IT age.
 
You could bring the same argument forward against CentOS, Scientific Linux

CentOS and Scientific Linux are not commercial endeavours undertaken by a multibillion corporation. Both projects had the tacit approval and cooperation of Red Hat and CentOS is now officially affiliated with Red Hat.

BTW, Oracle does give something back: https://oss.oracle.com/.

Only someone with a pro-Oracle agenda or bias or someone who knows very little about FOSS would make a claim like that with a straight face. Pure window dressing. Which category do you fall under?

Oracle is where opensource projects go to die.
 
Only someone with a pro-Oracle agenda or bias or someone who knows very little about FOSS would make a claim like that with a straight face. Pure window dressing. Which category do you fall under?

Well, I would assume that comment 5 showed that I know a bit about Oracle Databases. As you might not know, generally you pick up most experience in the field where you do most (paid) work. While I'm not employed by Oracle, a lot of their technology guarantees that I have a paid job.

What do you want me to do? Cheer at some Linux kid who tries to piss at the way I earn my money?

Maybe Oracle is not the best company regarding FOSS software, but they still pay a lot of developers to write FOSS code. Of course you are free to be a hypocrite and of course you're free to call Oracle a graveyard for FOSS.

But then I wonder what are your credentials?
 
On the OS which has the database software installed, run the following command:

Code:
. oraenv

Note that there is a whitespace between the . and the oraenv. This command asks for the instance name or SID. When you run the command for the first time, it asks for your ORACLE_HOME, too.

After running this command, it sets some environment variables in your shell so you can access your oracle instance.

E.g. if your osuser is the in the group "dba", just type:

Code:
sqlplus / as sysdba


If you want to access your DB from Mac OS X, there are several options.

1. SQL-Developer
It's a java application (free download at oracle). In the connection panel choose:
Hostname: IP-of-your-Linux-VM
Port: 1521
SID: SID of your database (often the default is ORCL)

2. SQL*plus from the Oracle Instantclient.
Download the instant client and sql*plus for instant client. Extract the files to a folder like instantclient_11_2. Open a terminal and type

Code:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/your-user-name/instantclient_11_2/

Change to the folder of your extracted instantclient:
Code:
./sqlplus oracleuser/password@10.0.1.110:1521/ORCL

This assumes, your linux VM has the IP address 10.0.1.110 and the oracle instance is named ORCL. Your setting might be a little bit different.

Good luck.


----
Edit: Perhaps you should try a VM Image which comes with an Oracle instance installed. Like this:

http://www.oracle.com/technetwork/community/developer-vm/vts-hol-2415742.html

ThankYou for your reply and I am sorry for replying so Late here, Was busy with Projects and Stuff at Office,


But here again, I am attaching an Image File for all of you to see and guide me.



OP, I thought you got one go these downloads
Pre-Built Developer VMs (for Oracle VM VirtualBox) which is why I thought you already had Oracle installed and setup.

Oh No No No!! I did not install that, But now I think I should've installed the very 1st option which says: "Oracle Enterprise Data Quality 12.1.3 VM" as it also has Oracle DB 12c Enterprise Edition...


------------------------------------------------------------------------------------------------------



Anyhow, On another note,

1.) How can I share Folders between my Host OS (Mac OS X Yosemite) and my Guest OS (Oracle Linux 6.4 running on Virtual Box version4.3.24, it says something like: VirtualBox Guest Additions Do not appear to be available on this Virtual Machine...etc..etc) Attached the Screenshot as well.

As far as I can Understand, I will need to download an .iso image on my Host OS (Mac OS X) for installation of the same, But I cant find any :(


2.) I tried plugging in my Corsair USB3.0 FlashDrive/USB Drive in my USB 3.0 Port on my MBA, and I cant seem to detect it under /media (It has to do something with this so-called GUEST ADDITION thing, I guess).


SO, Help Needed again Experts :(

If I can share a folder from my Host OS into my Guest OS, (I can atleast install Oracle DB for my Oracle-Linux OS) as my Host OS Internet Speed is much higher (+50Mbps) as compared to my Guest OS Internet Speed (mere 1-2Mbps):(



Cheers n e-peace....
 

Attachments

  • Screen Shot 2015-03-09 at 23.02.22.png
    Screen Shot 2015-03-09 at 23.02.22.png
    139.7 KB · Views: 333
  • Screen Shot 2015-03-14 at 23.52.07.png
    Screen Shot 2015-03-14 at 23.52.07.png
    418.3 KB · Views: 693
The Virtual Box Guest additions don't have to be downloaded. I'm using VMWare Fusion on my Mac, so I can only tell you how this is done with virtual box under windows. But the procedure should be rather similar.

In the menu of Virtual Box there should be something like "Devices". In this menu there is the Option "Insert Guest Additions CD image". At least on CentOS 7 the image is mounted to

/run/media/*username*/VBOXADDITIONS_4.3.22_98236

This path will be a little but different on your system. Since you're using Gnome, there's a good chance that the CD-Image will simply appear on your desktop.

From there, simply follow the instructions of the Virtual Box help. See the section "Guest Additions for Linux". If several flavours of linux are listed, follow the advice for Fedora, RedHat or Oracle Enterprise Linux.

Good luck.

P.S.:
Once your Linux is up and running, you only need to download the files
- linuxamd64_12c_database_1of2.zip
- linuxamd64_12c_database_2of2.zip
and extract them to the same folder, to get a complete set of files to install the database software and create and database instance.
 
The Virtual Box Guest additions don't have to be downloaded. I'm using VMWare Fusion on my Mac, so I can only tell you how this is done with virtual box under windows. But the procedure should be rather similar.

In the menu of Virtual Box there should be something like "Devices". In this menu there is the Option "Insert Guest Additions CD image". At least on CentOS 7 the image is mounted to

/run/media/*username*/VBOXADDITIONS_4.3.22_98236

This path will be a little but different on your system. Since you're using Gnome, there's a good chance that the CD-Image will simply appear on your desktop.

From there, simply follow the instructions of the Virtual Box help. See the section "Guest Additions for Linux". If several flavours of linux are listed, follow the advice for Fedora, RedHat or Oracle Enterprise Linux.

Good luck.

P.S.:
Once your Linux is up and running, you only need to download the files
- linuxamd64_12c_database_1of2.zip
- linuxamd64_12c_database_2of2.zip
and extract them to the same folder, to get a complete set of files to install the database software and create and database instance.

Thanks for the Reply, but this is getting rather too complicated, This is how my VirtualBox Looks like on my Mac (See the screenshot),

1.) Now where can I find the so-called "DEVICES" Menu ? :confused:

2.) Coming back to my earlier post (How can I share folder(s) between my Host OS (Mac OS X Yosemite 10.10.2) and Guest OS (Oracle-Linux running under/in the Virtual Box software).




Cheers n e-peace....
 

Attachments

  • Screen Shot 2015-03-15 at 22.46.29.png
    Screen Shot 2015-03-15 at 22.46.29.png
    230.6 KB · Views: 407
Yep, it's said that Oracle has quite a learning curve (at least at the beginning).

Looking at your screenshot I see in the description, that the VM already has the guest additions installed. Which may be true or not. Perhaps you can try this command:

Code:
locate VBoxClient

If it returns something like /usr/bin/VBoxClient then there is a good chance that the Guest Additions are already installed.

The menu item "Devices" should be in the Application menu bar. Compare this to the windows screenshot. On your Mac this menu should be in the usual Application menu bar of Virtual Box.

Oh, and the description in the says 32-bit. You should verify this with the

Code:
arch

command. If it does not say x86_64, then you need to download the 32-bit database software. Which would limit you to Oracle 11.2.0.1 (11gR2) because Oracle never bothered to build the 32-bit release of their 12c software.
 

Attachments

  • CentOS-Windows-Guest-Additions.png
    CentOS-Windows-Guest-Additions.png
    56.6 KB · Views: 271
^^

I guess, I am on the Right Track Now, See the Img.. : D

So, Now I have:

1.) Guest Additions Pre-Installed (check)
2.) The 'arch' cmd returns 'x86_64' (check)

Now, Please guide me on:

"How to Get Oracle DB Installed" (if it is missing)

-AND-

Which Oracle DB to install ? TO practice my DBA (DataBase Administration) Course/Tutorials.
 

Attachments

  • Screen Shot 2015-03-15 at 23.41.24.png
    Screen Shot 2015-03-15 at 23.41.24.png
    260.4 KB · Views: 419
OK,

download from

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

the two files for "Linux x86-64". There are two links named "File 1" and "File 2". Since you are just using the Database for testing and learning, simply use the links for the Enterprise Edition. You need an account at oracle, but a free account is sufficient.

Once you have downloaded the two files, simply extract both files. This should result in a folder name "database". If you end up with two folders, e.g. a folder "database" and a folder "database (2)", then simply move the content of the "database (2)" folder into the "database folder. If questioned, choose merge contents.

Within the "database" folder you find the installer named "runInstaller". Start it with

Code:
./runInstaller

This should launch the java based installer. If you're unlucky, it might complain about some missing requirements. At this point I advise to take a look at the oracle documentation.

http://docs.oracle.com/database/121/index.htm

It's huge, but then, it answers most questions you'll ever have about oracle. You might want to start with this:

http://docs.oracle.com/database/121/LTDQI/toc.htm

And there are some good tutorials from other DBAs. Most likely some else has already stumbled during the installation of Oracle. So googling for the error message has a good chance of finding a solution.


One last word of advise. You might want to deselect the "Create as Container database" option in step 5 of 9 of the installer. It's one of the new 12c features and it's a nice feature. But lot's of information about Oracle was written before 12c, so you might want to learn about container DB at a later time.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.