You are on page 1of 20

Page |1

DRA - Upgrade guide to Oracle 11G


General

This guide provides detailed instructions for the upgrade process from Oracle 10G to Oracle 11G on Windows Server 2008 R2 64 bit
operating systems.

This process is mandatory for upgrading DRA to version 6.0.

Prerequisites

Make sure you have at least 60 gigabyte of free disk space on the target installation partition (drive). It is recommended to install
Oracle not on the OS disk drive.

Pre-upgrade tasks:

1. Mount the Oracle installation CD, or download a copy from the oracle website.
2. Before initiating the installation, perform the following procedure:
a. Connect to oracle 10G DB using sqlplus with a user with sys permissions
i. Run "PURGE DBA_RECYCLEBIN;"
b. Run " SELECT * FROM v$log; "
c. If the largest number of the log group is bigger than 15 than:

i. run the script in appendix A


ii. Delete old oracle redo log (by date)
d. Close the connection to the DB by typing exit at the sqlplus window
e. Stop the tomcat services
i. Run "services.msc
ii. Stop Apache Tomcat 6
iii. Stop Apache Tomcat WatchDog
f. Stop the oracle services and change their startup type to manual
i. Run "services.msc
ii. Stop and Disable OracleOraDb 10g_home1iSQL *Plus
iii. Stop and Disable OracleOraDb 10g_home1TNSListener
g. Go to Start->Run->"View advanced system settings"

DRA Upgrade guide to Oracle 11G


Page |2

i. And enter "Environment Variables"


ii. In "System variables" table check if there is an "ORACLE_HOME" variable

iii. If exists, delete it

DRA Upgrade guide to Oracle 11G


Page |3

Now you are ready to start the Oracle upgrade

1. Run the "setup.exe" which can be found at:


<The path of the Oracle install files>\win64_11gR2_database_1of2\database

2. Uncheck the "I wish to receive security update via My Oracle Support"
3. Click "next >"
4. A Pop up window massage will appear click "Yes"

DRA Upgrade guide to Oracle 11G


Page |4

5. Choose "Upgrade an existing database"

6. Click "Next>"
7. Confirm that "English" is the selected language. If not select it manually

8. Click "Next>"

DRA Upgrade guide to Oracle 11G


Page |5

9. Choose the "Standard Edition"

10. Click "Next>"


11. Make sure that Oracle Base and Software Location are configured correctly

**note: you can choose a different location.


12. Click "Next>"

DRA Upgrade guide to Oracle 11G


Page |6

13. The installer is verifying the information

14. Check that the information is correct

15. Click "Finish"

DRA Upgrade guide to Oracle 11G


Page |7

16. The installation will begin (This stage might take a while to complete: 15-20 minutes)

17. When the install rich 100%

DRA Upgrade guide to Oracle 11G


Page |8

The following screen will open:

18. Click "Next>"


19. Set Listener name (default = LISTENER). Change the default only if needed

20. Click "Next>"

DRA Upgrade guide to Oracle 11G


Page |9

21. Make sure the TCP is selected:

22. Click "Next>"


23. Set port number (default = 1521). Change default only if needed

24. Click "Next>"

DRA Upgrade guide to Oracle 11G


P a g e | 10

25. Configure another listener choose No

26. Click "Next>"


27. Listener configuration Complete:

28. Click "Next>"

DRA Upgrade guide to Oracle 11G


P a g e | 11

29. Additional naming methods choose No

30. Click "Next>"

31. All Done


32. Click "Finish"

DRA Upgrade guide to Oracle 11G


P a g e | 12

33. "The Database Upgrade Assistant" open:

34. Click "Next>"


35. In the following screen make sure to check the "RGDB" and fill the password for user "sys"

36. Click "Next>"

DRA Upgrade guide to Oracle 11G


P a g e | 13

37. If you get warnings about time zone and enterprise edition, ignore them choose Yes

38. you get warnings about OLAP, ignore them choose Yes

DRA Upgrade guide to Oracle 11G


P a g e | 14

39. Recompile and Backup options:

40. Click "Next>"


41. Chose the "Move Database Files during Upgrade" and "File System"

42. Click "Next>"

DRA Upgrade guide to Oracle 11G


P a g e | 15

43. Chose the "Use Common Location for All Database Files"

44. Click "Next>"


45. Change the "Flash Recovery Area" to 11G home (e.g. "c:\oracle\product\11.2.0\flash_...") and check that the "Diagnostic
Destination" is correct as well (e.g. "C:\oracle")

46. Click "Next>"

DRA Upgrade guide to Oracle 11G


P a g e | 16

47. Database configuration:

48. Click "Next>"


49. Chose the "Use the Same Password for All Accounts" and fill the database password

50. Click "Next>"


51. Summary:

DRA Upgrade guide to Oracle 11G


P a g e | 17

52. Click "Finish"


53. The update will start This stage might take a some time

54. If the following tasks will fail, ignored them

55. Click "OK"


56. Upgrade completed

DRA Upgrade guide to Oracle 11G


P a g e | 18

57. Click "Close"


58. End of setup

59. Click "Close"

DRA Upgrade guide to Oracle 11G


P a g e | 19

Finalizing steps

1. DB configuration
a. Run "SQL plus"
b. Enter "sys"
c. Run "SELECT name,value,description FROM v$parameter WHERE name='compatible';"
d. If the result is 10.*.*.*.* it is necessary to run the command:
i. "ALTER SYSTEM SET compatible='.....1.1.1' scope=SPFILE;"
e. Run "select log_mode from v$database;"
f. If the database state is not NOARCHIVELOG, run step h.
g. Run "SHUTDOWN IMMEDIATE;"
h. If the database state is not in "NOARCHIVELOG" (step f), run the command:
i. "ALTER DATABASE NOARCHIVELOG;"
i. Run "STARTUP MOUNT;"
j. Run "ALTER DATABASE OPEN;"
k. Run "SELECT name,value,description FROM v$parameter WHERE name='compatible';"
l. And check that the result is '.....1.1.1'
2. Start the tomcat services:
a. Run "services.msc
b. Start Apache Tomcat 6
c. Start Apache Tomcat WatchDog

DRA Upgrade guide to Oracle 11G


P a g e | 20

appendix A

SET serveroutput ON;


DECLARE
TYPE numarray IS VARRAY(100) OF v$log.GROUP#%TYPE;
logfilebasepath VARCHAR2(100); -- path for all log files (1)
oldloggroups numarray := numarray(); -- array of old log groups numbers (2)
numofnewloggroup SMALLINT; -- number of first new old group (3)
--temps
t_logfilepath VARCHAR2(100);
t_noslashes VARCHAR2(100);
t_numberofslashes SMALLINT;
t_curgroup VARCHAR2(100);

BEGIN
-- 1 get 1 logfile path
DBMS_OUTPUT.PUT_LINE('stage 1');
SELECT MEMBER INTO t_logfilepath FROM v$logfile WHERE ROWNUM = 1;
t_noslashes:=REPLACE(t_logfilepath,'\');
t_numberofslashes:=LENGTH(t_logfilepath)-LENGTH(t_noslashes);
logfilebasepath:=SUBSTR(t_logfilepath,1,INSTR(t_logfilepath,'\',1,t_numberofslashes));
-- 2 get N old log groups
DBMS_OUTPUT.PUT_LINE('stage 2');
FOR r_c1 IN (SELECT GROUP# FROM v$log) LOOP
oldloggroups.extend;
oldloggroups(oldloggroups.last):=r_c1.GROUP#;
END LOOP;
-- 3 get number of new groups
DBMS_OUTPUT.PUT_LINE('stage 3');
numofnewloggroup := 1;
-- 4 create 3 new groups
DBMS_OUTPUT.PUT_LINE('stage 4');
EXECUTE IMMEDIATE 'ALTER DATABASE ADD LOGFILE GROUP '||TO_CHAR(numofnewloggroup)||'
('''||logfilebasepath||'log'||TO_CHAR(numofnewloggroup)||'a.rdo'') SIZE 200M';
EXECUTE IMMEDIATE 'ALTER DATABASE ADD LOGFILE GROUP '||TO_CHAR(numofnewloggroup+1)||'
('''||logfilebasepath||'log'||TO_CHAR(numofnewloggroup+1)||'a.rdo'') SIZE 200M';
EXECUTE IMMEDIATE 'ALTER DATABASE ADD LOGFILE GROUP '||TO_CHAR(numofnewloggroup+2)||'
('''||logfilebasepath||'log'||TO_CHAR(numofnewloggroup+2)||'a.rdo'') SIZE 200M';
-- 5 switch logs until new groups are active
DBMS_OUTPUT.PUT_LINE('stage 5');
SELECT GROUP# INTO t_curgroup FROM v$log WHERE status LIKE 'CURRENT';
WHILE t_curgroup<>numofnewloggroup
LOOP
EXECUTE IMMEDIATE 'ALTER SYSTEM SWITCH LOGFILE';
SELECT GROUP# INTO t_curgroup FROM v$log WHERE status LIKE 'CURRENT';
END LOOP;
-- 6 make checkpoint
DBMS_OUTPUT.PUT_LINE('stage 6');
EXECUTE IMMEDIATE 'ALTER SYSTEM CHECKPOINT GLOBAL';
-- 7 drop N old log groups
DBMS_OUTPUT.PUT_LINE('stage 7');
FOR i IN oldloggroups.first..oldloggroups.last LOOP
EXECUTE IMMEDIATE 'ALTER DATABASE DROP LOGFILE GROUP '||oldloggroups(i);
END LOOP;
DBMS_OUTPUT.PUT_LINE('done');
END;
/
QUIT;

DRA Upgrade guide to Oracle 11G

You might also like