Installing Oracle databases on virtual machines

Source: Internet
Author: User
Tags oracle database installation sqlplus

Next we install the Oracle database on the virtual machine, first need to copy the installation media (that is, oracle10g) to the virtual machine, but the best way is to share a directory between the native and the virtual machine, through this shared directory, we can copy the file. Download Oracle

To install Oracle databases on our virtual machines, you must first download it. Here i download the oracle10g:
host and virtual machine shared directory select devices → shared folders → shared folders
In the pop-up dialog box, select Add shared Folder
In the pop-up dialog box, enter the directory that the host wants to share, as shown in the following figure. Click "OK"
Click "OK"
virtual machine Access shared directory

How do I access this shared directory after the shared directory is added? At this point we need to map a network driver on this virtual machine, the following is a detailed step: in the virtual machine, double-click My Computer, select "Tools" → "Map Network Drive"

In the pop-up dialog box, follow the image below, select the directory you just shared, and click OK

Click "Finish". This will be one more Z-disk on our virtual machine, and the z-disk will correspond to the shared directory on our computer. Installing Oracle Databases

Before installing the Oracle database on our virtual machine, be sure to pay attention to a problem, that is, do not install Oracle in the shared directory, be sure to copy it to our virtual machine, for our virtual machine, there is only a C disk, so be sure to copy it here. Then the oracle10g installation package, in the unpacked directory will have a setup file, double-click the setup file, there will be a graphical wizard, through this wizard can step by step of the installation of Oracle, Actually installing Oracle on Windows is very simple, basically the next step is over. But it's very strange for beginners, and I'll take the steps in detail here. Unzip the file 10201_database_win32.zip, and double-click the Setup.exe in the Extract directory, the installation interface appears as follows:

Enter the password and Confirm password, such as: password, click Next, the following progress bar appears:


After we have installed the Oracle database, we automatically create a database called ORCL, and then enter the password for the administrator of the ORCL database, where the administrator's account is fixed, sys (the owner of the database) and system (just an administrator), Let's talk about the difference between the two. Check the prerequisites, select the box shown in the Red box, and the following figure:
Click "Next", the "Overview" interface, and click "Install".
The installation progress bar appears, waiting for installation to complete, as shown in the following figure:
After the installation is complete, run the Configuration Wizard automatically, as shown in the following figure, waiting for it to complete:
After the completion, appear the "Password Management" interface, click "Password Management", the following figure:

This step, which means that our entire installation work is over. Before we end the installation, we need to do some work, if we installed the ORCL database, we need to use the database of two users, the first user is Scott, the second user is HR, but by default, these two users can not use, So then I'm going to unlock these two users. Check out Scott and HR users (unlock these two accounts), and then do one more thing, that is, give these two users a separate password, accustomed to Scott user's password is TIGER,HR user's password is HR, as shown in the following figure, click "OK":
Go back to the password management interface and click OK, as shown below:
Installation finished, click "Exit"

Then automatically opens a Web page, the port is 1158, this page is based on the graphical management interface, it is called Oracle Enterprise Manager, abbreviation OEM, using this tool, we can manage this Oracle database, Then how to use this graphical tool, we will introduce later.
Verify that the Oracle database is installed successfully authentication Method A

Now let's try to see if the Oracle database installed can be used in the end. We open a command line on the virtual machine, for Oracle, its default command-line tool is Sqlplus, enter command Sqlplus Scott/tiger, the following interface means that our Oracle database installation was successful.
Authentication Mode Two

And we have just said that the local and virtual machines are capable of communicating, so you can access the database on the virtual machine on this machine. I run the command line window as an administrator on my computer, and then enter the command Sqlplus SCOTT/TIGER@192.168.56.101:1521/ORCL, and I can find that when I execute the above command on my computer, I will report an error, as follows:

To solve this error, you need to use a tool, the tool is:

The tool is divided into 32-bit and 64-bit, because my computer is 64-bit, so I installed 64-bit, the tool below has two compression pack:

Now we need to select these two zip packages at the same time and extract them into a directory , so there will be a lot of files in this directory, and a Sqlplus.exe file can be found. Another thing we need to do is add this to the PATH environment variable on your native system. Plus go, reopen a command line again, enter the command Sqlplus SCOTT/TIGER@192.168.56.101:1521/ORCL, you will see the following figure:

Then there is a problem, if the Chinese display does not come out, we also need to add an environment variable, set Nls_lang for simplified Chinese_china. ZHS16GBK, when set up, the Chinese will be fine, so this concludes our entire Oracle database. Let's say some more questions.

Here are a few questions, the first question is how to shut down the virtual machine. It is important to note that you cannot turn off the virtual machine by turning off the computer in the Start menu, but you must turn off the virtual machine like this, as follows:

If you turn off the virtual machine in a different way, your Oracle may have a problem when you start the virtual machine again.
The second problem is to use the virtual machine the biggest benefit , now our virtual machine has installed Oracle, we can click "Backup [System Snapshot]", the following figure:

Then click the camera-like button to create a backup of our virtual machine, as shown in the following figure:

After you create a backup, Oracle How do you do it, broken, no relationship, very simple, directly restore the backup on it, see the following figure:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.