Windows 7 Ultimate Installation Process for Oracle Database 11gR2
1. What is Oracle Database?#
Oracle Database (Oracle Database, also known as Oracle RDBMS, or simply Oracle). The database system is a set of software products provided by Oracle Corporation (Oracle) that is centered around distributed databases. It is one of the most popular client/server (Client/Server) or B/S architecture databases today. For example, SilverStream is a middleware based on databases. Oracle Database is currently the most widely used database management system in the world. As a general-purpose database system, it has complete data management capabilities; as a relational database, it is a complete relational product; as a distributed database, it implements distributed processing capabilities. However, all of its knowledge can be used on various types of machines as long as ORACLE knowledge is learned on one type of machine.
2. What is the process for installing and using Oracle Database?#
-
Install a physical/virtual machine with a system that meets the installation requirements of Oracle Database and complete pre-installation checks.
-
Download the Oracle Database version that corresponds to the system version.
-
Execute different installation processes according to the system.
-
Verify the installation.
-
Use third-party software to connect to the database.
Let's try it step by step!
3. Actual Installation Process and Common Issues Encountered#
This process description takes Oracle Database 11g Release 2 as an example.
1. Check Installation Requirements#
Before officially installing, we need to do various preliminary preparations, one of which is to confirm whether the installation system supports the corresponding database version. The official “Database Quick Installation Guide” (English Only) lists the software and hardware requirements, so check if your desired operating system is listed.
Ps: What is virtual memory? What is it used for? How to set it?#
Virtual memory is a technology for managing memory in computer systems. It allows applications to believe they have a contiguous block of available memory (a complete contiguous address space), while in reality, it is often divided into multiple physical memory fragments, with some temporarily stored on external disk storage, exchanging data when needed. Currently, most operating systems use virtual memory, such as the "virtual memory" in the Windows family and "swap space" in Linux. Programs running on a computer must be executed through memory, and if the executing program occupies a large amount of memory or many programs are running, it can lead to memory exhaustion. To solve this problem, Windows uses virtual memory technology, which allocates a portion of hard disk space to act as memory. When memory is exhausted, the computer automatically calls the hard disk to act as memory to alleviate memory pressure.
In Windows 7, the official documentation mentions:
-
Click the "Start" button, right-click "Computer," and then click "Properties" to open "System."
-
In the left pane, click "Advanced system settings." If prompted for an administrator password or confirmation, type the password or provide confirmation.
-
On the "Advanced" tab, under "Performance," click "Settings."
-
Click the "Advanced" tab, and then under "Virtual memory," click "Change."
-
Clear the checkbox for "Automatically manage paging file size for all drives."
-
Under "Drive [Label]," click the drive where you want to change the paging file.
-
Click "Custom size," type a new size in the "Initial size (MB)" or "Maximum size (MB)" box (in megabytes), click "Set," and then click "OK."
(Note: Increasing the size usually does not require a restart to take effect, but if you decrease the size, a restart is needed for the changes to take effect. It is recommended not to disable or delete the paging file.)
2. Install the Corresponding System#
After checking the system, we can install the corresponding supported operating system. I chose to install Windows 7 Ultimate on a VMware virtual machine; the installation details will be written in a separate article titled “Installing Windows or Linux Virtual Machine” definitely a pit...
Hehe, {% post_link How-to-install-Virtual-Machine '“How to Install a Virtual Machine”' %} is now online!
3. Download the Oracle Database Installation Package#
After installing the system, we start downloading the installation package. The hardware requirements mention that Oracle Database requires at least 5.39G of space, and it is recommended to reserve at least 6~7G. Download two zip packages from the official download page, which requires agreeing to the terms and registering to log in, which takes some time and effort.
Then the download will start, so keep the network stable!
4. Install Oracle Database#
After the download is complete, we have two compressed packages. Extract these two packages, cut one folder into the other folder, and merge them into the database folder. After merging, open the installer as Administrator.
PS: Note that the database folder must be placed in C drive for installation; otherwise, there may be issues with installation and starting services!!!
Uncheck "I would like to receive security updates through My Oracle Support."
Click "Next" to proceed to the next step. Since this is my first installation on the system, select "Create and configure database," then click the "Next" button.
Since I am installing Oracle Database on a notebook virtual machine, I checked the first option "Desktop Class," then clicked the "Next" button.
This step is to fill in the installation path. If you do not want to use the default path, you can customize it, but it is best not to change the path name. Select the database version according to your requirements; when you select one, there will also be relevant instructions. After entering the database name and password, click "Next."
After that, Oracle will check the software and hardware requirements before installation. If there are any issues, they will be displayed. Fortunately, we checked the software and hardware requirements in the first step, so there should be no problems. Click "Finish" to officially start the installation. Even if there is an error, as long as you carefully check the hardware requirements and confirm there are no issues, you can check the "Ignore All" option in the upper right corner to continue the installation.
After a long wait, the installation is finally complete, but now we need to perform Password Management; do not just click OK!!!
In Password Management, unlock SYS
, SYSTEM
, and SCOTT
and manually set a password. After that, click "OK."
Thus, Oracle Database 11gR2 has been installed, and we will now verify the installation.
5. Verify Installation#
-
Now, theoretically, you should see the Oracle folder in the Start menu:
Click "SQL Plus" or type sqlplus in cmd to enter the Oracle Database interactive interface, prompting for a username and password. Here, enter
sys as sysdba
to log in with database administrator privileges and enter the previously set password. If you can log in successfully, it indicates that the operation is correct and the installation is successful! -
Check if the service is running
Type services.msc in cmd to check.
Manually start any that are not running.
-
Check Oracle port configuration
Look for "Net Configuration Assistant" in the Oracle Database folder in the Start menu.
After the program initializes, select "Listener Configuration" -----> "Reconfigure" -----> "LISTENER | Next" -----> add "TCP | Next" to the selected protocol, and here you can see the Oracle port status, which is generally set to 1521 by default. If it is not the default, it is recommended to modify it.
-
Some operations for the user before use
-
Change username and password
Enter cmd, type
sqlplus/ as sysdba
, press Enter to enter sql>Type
alter user (username) identified by (password);
【This line of code means to change the password of the system user to
(password)
; note that a semicolon “;” must be added at the end of the code, otherwise it cannot be modified successfully.】 -
Create a user
Enter cmd, type
sqlplus/ as sysdba
, press Enter to entersql>
Type
create user (username) identified by (password)
【This code means: create a user with the username (username) and password (password); similarly, the code must end with a semicolon “;”.】
-
Set user permissions
DBA: Has all privileges, the highest authority in the system, only DBA can create database structures.
RESOURCE: Users with Resource privileges can only create entities, not database structures.
CONNECT: Users with Connect privileges can only log in to Oracle, cannot create entities, and cannot create database structures.
For ordinary users: grant connect, resource privileges.
For DBA management users: grant connect, resource, dba privileges.
grant connect,resource,dba to (username);
-
OK! Done, at this point, Oracle Database has completed all the processes before formal use and is ready to use.
4. Connecting to Oracle Database with Third-Party Software#
Here we will use Navicat Premium as an example.
1. What is Navicat Premium?#
Navicat is a series of graphical database management and development software produced by Hong Kong Chuangru Digital Technology Co., Ltd. for MySQL, MariaDB, MongoDB, Oracle, SQLite, PostgreSQL, and Microsoft SQL Server. It has a browser-like graphical user interface and supports multiple connections to local and remote databases. Its design meets the needs of various users, from database administrators and programmers to different businesses or companies that provide customer service and share information with partners.
2. Download Navicat Premium Installation Package#
Download Navicat Premium from the official download page.
After downloading, double-click to open and install it on your computer; this is similar to installing regular software, so there is no need to pay too much attention.
Ps: For cracking, please refer to this project on GitHub (with Chinese documentation): # navicat-keygen
After successful installation, open Navicat Premium. Select 【Connection】----->【Oracle】.
In the pop-up menu, enter the Oracle Database account information created earlier: after entering, click 【Test Connection】 to see if the connection can be established.
If there are no errors at this point, everything is great; Navicat Premium successfully connects to Oracle. However, if you encounter the error 【ORA-28547: connection to server failed, probable Oracle Net admin error】,
please refer to this article.
The reason for the error is that the version of oci.dll in Navicat Premium does not match the version of the Oracle Database files. Navicat connects to the Oracle server through the Oracle client, which comes in two types: standard and instant client. When using Navicat, it often contains multiple versions of OCI in its installation path. If the ORA-28547 error occurs when connecting to the Oracle server using Navicat, it is mostly due to the mismatch between the local OCI version in Navicat and the Oracle server version. Therefore, we need to download the OCI to match the installed Oracle server.
OCI download link, like Oracle Database, requires checking and logging in to download for free.
Place this dll file in Navicat Premium installation path\instantclient_11_2
to replace it.
Then select 【Tools】----->【Options】----->【Environment】, and choose the location of oci.dll in the OCI environment. After that, restart Navicat Premium and reconnect.
Reference articles:
Database Quick Installation Guide