How install oracle 11g on Windows 2012 R2? (Enable archive log and Supplemental log)?
Recently, I need to learn the oracle to migrate data from on-prem to aws. In fact, I am not the DBA, therefore, I can not handle deep dive. I hope the I can help someone like me who is the first time about oracle.
1. Pre-requsite.
I have Windows 2012 R2 which supports oracle database 11g. For successful installation, I need the ".Netframe 3.5" installed. In server manager. Click "Add Roles and Features" at first.
In Features, choose the ".NET Framework 3.5 Feature" and Install this.
After then, I am ready to install oracle database.
2. Install oracle database.
The reason why I select Windows is simple to consist rather than Linux. I will follow two instructions mainly. https://www.youtube.com/watch?v=YgFfjLHY-wE is helpful for me. At the beginning, I need installation file. I can download from oralce site.
In my case, I will download "Microsoft Windows (X64)". There are two files. After extract both of files, I need to merge and make together in same directory. I copied and pasted whole directory from secondary to first.
After merge, I can see the directory inside. There is the "setup" icon. Click it.
Click Run and Start Installation for oracle database.
Depends on the system environments, Installer make warnning messages like this. However, I can ignore this, Click "yes"
Uncheck "I wish to receive security updates via My Oracle support", because I do not need this feature. It does not matter for next step. In email field, I can leave with empty. Just click "Next"
After Next, the warning message come. However it is also not matter for next step. Just click "yes".
Choose "Create and configure as a database". Because this is first installtion on this server. Click "Next".
In my case, my operating system is windows 2012 R2 server. Therefore, I will choose "Sever class".
I will install with standalone mode. Choose "single instance database installation" and click "Next".
Choose "Advanced Install" and Next.
This step is more important rather than before. In this insturction, there are some explain about the fields. I overview about below.
Select "Langurage"
I will select "Standard Edition One" (Please note I can select what I want as the oracle database engine).
I select my custom home directory like below.
Select configuration type. In my case, I will choose genera purpose.
"Global database name" is not SID. However, I choosed single instance mode. Becuase of this, the SID can be same as Global database name. However, I can make different in Advanced mode.
I will adjust some paramters for memory, characters set, security and sample schema.
I will UTF-8 for character sets.
I will not make sample schema. Un-check "Create database with sample schema"
During this installation, Oracle Enterprise Manager will be installed, even if I do not want. Just click Next
Select File system. Usually it is better to seperate from root disk.
This is the back up configuration. I don't want this at this time.
When I select "Typical Installation". There are Administrative password which is default password for schema (=users).
However, In Advanced mode, I can set password individually like below.
If you use simple password, the warnning message happen like below. In my case, this is test oracle database. I will ignore this. Click yes.
This is summary, Click Finish to installation.
During installation, I can see the configuration assistant process like below.
During the installation, warnning message like below can be occure. In this case, I need to set variable in windows.
I will handle this later. At this time, just click next. I registered the "Administrative password" before. I have told it will be used as default password. However, I have another change to set the password for each schema (=user).
Click Password Management. I will set individual password for "SYS" and "SYSTEM". If you want more, you can set the password more. In oracle database, there are serveral sample test schema such as "HR" and "SCOTT".
Continue with Yes.
3. Access database
Now, I can access database. At this time, I can use sqlplus which is installed with.
I can access with SYSTEM schema account like below
4. Verify the oracle environment for enterprise manager.
During the installation, I see warning message below. Because of this, I need to check environment variables.
In this page, I need to check the status with "emctl status dbconsole".
In this case, I need to set environment value. Properties > Advanced system settings.
In Advanced tap, there are environment value button.
I will add some values in User vriables for Administrator.
For the first issue, I will add "ORACLE_UNQNAME".
I will reference the value from db_unique_name. In fact, there is value when environment is not set. run "select name,db_unique_name from v$database;".
I will try again "emctl status dbconsole". At this time, there is "Not found" error.
Go into the directory. Thre is no localhost. Instead, 11.0.0.131 is existed.
To resolve this, I will add "ORACLE_HOSTNAME" like below.
After then, It will be like below. This is normal. However, It look like not perfect. "EM Daemon is not running" is happen.
I followed this video. To make success, I have to start service manually. At this time, I can not start after right button.
Find the file below. In emd properites file, "agentTZRegion=+06:00" should be adjusted with OS time.
I adjust the time
Now, I can use this.
5. Oralce database stop, start and restart
In this instruction, there are several way to stop and start. In this part, I will overview sqlplus to stop and start.
6. Enable/Disable Archive log Mode
Sometime, it is necessary to enable this feature. It is utilized to synchronize databases with log-miner. For this, I will follow this instruction. run "archive log list". The result is displaied. It is not enabled default.
I need to shutdown with "shutdown immediate". My status is changed to "nolog".
I have to change the status to "mount", which I can change configuration on. Run "startup mount".
Run "alter database archivelog;" to enable
After then, I open the database "alter database open;"
If you want to disable, I use "alter database noarchivelog;"
7. Enable/Disable supplemental logging
This action should be done in database. To check the status, run "select supplemental_log_data_min from v$database;"
To enable and disable, run query like below.
This is the basic configuration for the installation.
Reference
[ 1 ] https://www.youtube.com/watch?v=YgFfjLHY-wE
[ 2 ] https://medium.com/@Dracontis/how-to-install-oracle-11g-database-on-windows-server-2012-a4d30d4dc727
[ 3 ] https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
[ 4 ] https://docs.oracle.com/cd/E25178_01/server.1111/e10897/install.htm
[ 5 ] http://www.dba-oracle.com/t_oracle_unqname.htm
[ 6 ] http://blog.mclaughlinsoftware.com/2012/08/23/whats-oracle_unqname/
[ 7 ] https://www.youtube.com/watch?v=Y8i41J7aLwo
[ 8 ] https://docs.oracle.com/cd/B14117_01/win.101/b10113/admin.htm#CDCEJADC
'System Basic Engineering > System Inventory' 카테고리의 다른 글
How to user the Oracle View and Joins (Inner and outer) (0) | 2019.04.09 |
---|---|
How to use the Oracle database basically? (1) | 2019.03.19 |