Professional Documents
Culture Documents
This guide provides detailed instructions for the upgrade process from Oracle 10G to Oracle 11G on Windows Server 2008 R2 64 bit
operating systems.
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:
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"
6. Click "Next>"
7. Confirm that "English" is the selected language. If not select it manually
8. Click "Next>"
16. The installation will begin (This stage might take a while to complete: 15-20 minutes)
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
43. Chose the "Use Common Location for All Database Files"
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
appendix A
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;