<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mas Rony's Notes &#187; oracle upgrade</title>
	<atom:link href="http://www.masrony.com/tag/oracle-upgrade/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.masrony.com</link>
	<description>Restore your brain... !!</description>
	<lastBuildDate>Wed, 10 Mar 2010 14:45:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Upgrade Oracle 10.2.0.1 ke 10.2.0.4 di Windows</title>
		<link>http://www.masrony.com/2009/04/upgrade-oracle-10201-ke-10204-di-windows/</link>
		<comments>http://www.masrony.com/2009/04/upgrade-oracle-10201-ke-10204-di-windows/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 10:09:27 +0000</pubDate>
		<dc:creator>Mas Rony</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle 10g]]></category>
		<category><![CDATA[oracle patch]]></category>
		<category><![CDATA[oracle update]]></category>
		<category><![CDATA[oracle upgrade]]></category>

		<guid isPermaLink="false">http://www.masrony.com/?p=213</guid>
		<description><![CDATA[Upgrade database oracle sebaiknya dilakukan di mesin testing terlebih dahulu sebelum dilakukan upgrade yang sesungguhnya di mesin production, untuk meminimalisir kesalahan atau error di database production. Untuk list patch set terbaru oracle silahkan anda berkunjung ke website resmi oracle disini. Testing disini menggunakan OS Windows 2003 SP2 dengan oracle versi 10.2.0.1 dalam kondisi fresh install.
Persiapan [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Upgrade database oracle sebaiknya dilakukan di mesin testing terlebih dahulu sebelum dilakukan upgrade yang sesungguhnya di mesin production, untuk meminimalisir kesalahan atau error di database production. Untuk list patch set terbaru oracle silahkan anda berkunjung ke website resmi oracle <a href="http://www.oracle.com/technology/support/patches.htm">disini</a>. Testing disini menggunakan OS Windows 2003 SP2 dengan oracle versi 10.2.0.1 dalam kondisi fresh install.</p>
<p style="text-align: justify;"><strong>Persiapan Sebelum Upgrade</strong></p>
<ul style="text-align: justify;">
<li>Download patch set number 6810189 dari metalink oracle.<br />
tentunya anda juga harus mempunyai account suppot identifier oracle (CSI) yang valid.</li>
<li>Buat instan database<br />
Buat instan database dengan spesifikasi yang sama dengan database production. Dalam contoh ini saya menggunakan SID : ORCL</li>
<li>Import database<br />
Import database dari backup server production, dengan cara yang biasa anda lakukan di environment anda, dan pastikan telah bekerja dengan baik.</li>
<li>Matikan semua service oracle<br />
<span id="more-213"></span>
<ul>C:\&gt; set oracle_sid=ORCL<br />
C:\&gt; isqlplusctl stop</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
Stopping iSQL*Plus ...
iSQL*Plus stopped.</pre>
</div>
<p>C:\&gt; emctl stop dbconsole</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.

https://jtim:1158/em/console/aboutApplication

The OracleDBConsoleORCL service is stopping.............
The OracleDBConsoleORCL service was stopped successfully.</pre>
</div>
<p>C:\&gt; lsnrctl stop</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 05-APR-2009 21:26:17
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=jtim)(PORT=1521))
)
The command completed successfully</pre>
</div>
<p>C:\&gt; sqlplus /nolog</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 5 21:27:38 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
SQL&gt;</pre>
</div>
<p>SQL&gt; conn / as sysdba<br />
Connected.<br />
SQL&gt; shutdown abort</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>Database closed.
Database dismounted.
ORACLE instance shut down.
SQL&gt;</pre>
</div>
</ul>
<p>apabila ingin shutdown semua service menggunakan windows service :</p>
<ul> C:\&gt; net stop OracleOraDB10g_Home1iSQL*Plus<br />
C:\&gt; net stop OracleDBConsoleORCL<br />
C:\&gt; net stop OracleOraDB10g_Home1TNSListener<br />
C:\&gt; net stop OracleServiceORCL</ul>
</li>
<li>Matikan juga service Mirosoft Distributed Transaction Coordinator apabila ada atau berjalan
<ul>C:\&gt; net stop msdtc</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>The Distributed Transaction Coordinator service is stopping.
The Distributed Transaction Coordinator service was stopped successfully.</pre>
</div>
</ul>
</li>
</ul>
<p style="text-align: justify;"><strong>Upgrade database Oracle 10.2.0.4</strong><br />
Sebelum melakukan upgrade, silahkan baca terlebih dahulu dokumentasi yang telah disertakan di patch upgrade tersebut.</p>
<ul style="text-align: justify;">
<li>Jalankan Oracle Universal Installer (oui.exe) dari instalasi oracle 10.2.0.4 di folder install, dan setelah welcome screen muncul, tekan Next :</li>
<p style="text-align: center;"><img class="aligncenter" src="http://i184.photobucket.com/albums/x99/ronevic/Oracle/opatch1.jpg" alt="" width="320" height="250" /></p>
<li>Pilih home Oracle oracle yang akan diupgrade (jangan membuat home directory baru lagi) kemudian tekan Next :</li>
<p style="text-align: center;"><img class="aligncenter" src="http://i184.photobucket.com/albums/x99/ronevic/Oracle/opatch2.jpg" alt="" width="320" height="250" /></p>
<li>Oracle Installer akan melakukan pengecekan system requirement, tekan Next untuk melanjutkan ke screen berikutnya :</li>
<p style="text-align: center;"><img class="aligncenter" src="http://i184.photobucket.com/albums/x99/ronevic/Oracle/opatch3.jpg" alt="" width="320" height="250" /></p>
<li>Masukkan data customer identification number (CSI) anda, kemudian tekan Next :</li>
<p style="text-align: center;"><img class="aligncenter" src="http://i184.photobucket.com/albums/x99/ronevic/Oracle/opatch4.jpg" alt="" width="320" height="250" /></p>
<li>Summary installation, tekan Install untuk melakukan instalasi :</li>
<p style="text-align: center;"><img class="aligncenter" src="http://i184.photobucket.com/albums/x99/ronevic/Oracle/opatch5.jpg" alt="" width="320" height="250" /></p>
<li>Installasi upgrade patch Oracle telah selesai. Tekan Exit :</li>
<p style="text-align: center;"><img class="aligncenter" src="http://i184.photobucket.com/albums/x99/ronevic/Oracle/opatch6.jpg" alt="" width="320" height="250" /></p>
</ul>
<p style="text-align: justify;"><strong>Testing Instalasi Upgrade Oracle</strong></p>
<ul style="text-align: justify;">
<li>Start database dalam mode upgrade (testing upgrade) :
<ul>C:\&gt;sqlplus /nolog</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>SQL*Plus: Release 10.2.0.4.0 - Production on Mon Apr 6 15:39:00 2009
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
SQL&gt; </pre>
</div>
<p>SQL&gt; conn / as sysdba</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>Connected to an idle instance.
SQL&gt;</pre>
</div>
<p>SQL&gt; startup upgrade</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>ORACLE instance started.
Total System Global Area  289406976 bytes
Fixed Size                  1296308 bytes
Variable Size             142608460 bytes
Database Buffers          138412032 bytes
Redo Buffers                7090176 bytes
Database mounted.
Database opened.
SQL&gt;</pre>
</div>
</ul>
</li>
<li>Jalankan script test patch di  $ORACLE_HOME\RDBMS\ADMIN\catupgrd.sql dengan spool diaktifkan terlebih dahulu.
<ul>SQL&gt; spool patch.log<br />
SQL&gt; @D:\oracle\product\10.2.0\RDBMS\ADMIN\catupgrd.sql</p>
<div style="background: #cccccc none repeat scroll 0% 0%; overflow: auto; height: 250px; width: 455px;">
<pre>SQL&gt; @D:\oracle\product\10.2.0\RDBMS\ADMIN\catupgrd.sql
DOC&gt;######################################################################
DOC&gt;######################################################################
DOC&gt;	The following statement will cause an "ORA-01722: invalid number"
DOC&gt;	error if the user running this script is not SYS.  Disconnect
DOC&gt;	and reconnect with AS SYSDBA.
DOC&gt;######################################################################
DOC&gt;######################################################################
DOC&gt;#
no rows selected
DOC&gt;######################################################################
DOC&gt;######################################################################
DOC&gt;	The following statement will cause an "ORA-01722: invalid number"
DOC&gt;	error if the database server version is not correct for this script.
DOC&gt;	Shutdown ABORT and use a different script or a different server.
DOC&gt;######################################################################
DOC&gt;######################################################################
DOC&gt;#
no rows selected
DOC&gt;#######################################################################
DOC&gt;#######################################################################
DOC&gt;   The following statement will cause an "ORA-01722: invalid number"
DOC&gt;   error if the database has not been opened for UPGRADE.
DOC&gt;
DOC&gt;   Perform a "SHUTDOWN ABORT"  and
DOC&gt;   restart using UPGRADE.
DOC&gt;#######################################################################
DOC&gt;#######################################################################
DOC&gt;#
no rows selected
DOC&gt;#######################################################################
DOC&gt;#######################################################################
DOC&gt;	The following statements will cause an "ORA-01722: invalid number"
DOC&gt;	error if the SYSAUX tablespace does not exist or is not
DOC&gt;	ONLINE for READ WRITE, PERMANENT, EXTENT MANAGEMENT LOCAL, and
DOC&gt;	SEGMENT SPACE MANAGEMENT AUTO.
DOC&gt;
DOC&gt;	The SYSAUX tablespace is used in 10.1 to consolidate data from
DOC&gt;	a number of tablespaces that were separate in prior releases.
DOC&gt;	Consult the Oracle Database Upgrade Guide for sizing estimates.
DOC&gt;
DOC&gt;	Create the SYSAUX tablespace, for example,
DOC&gt;
DOC&gt;	 create tablespace SYSAUX datafile 'sysaux01.dbf'
DOC&gt;	     size 70M reuse
DOC&gt;	     extent management local
DOC&gt;	     segment space management auto
DOC&gt;	     online;
DOC&gt;
DOC&gt;	Then rerun the catupgrd.sql script.
DOC&gt;#######################################################################
DOC&gt;#######################################################################
DOC&gt;#
no rows selected
no rows selected
no rows selected
no rows selected
no rows selected
Session altered.
Session altered.
Table created.
2 rows deleted.
1 row created.
Commit complete.
TIMESTAMP
------------------------------------------------------------
COMP_TIMESTAMP UPGRD__BGN 2009-04-06 16:43:38 2454928 60218
- - - - - dipotong sampe disini coz panjang bgt - - - -</pre>
</div>
</ul>
<p>Proses ini akan memakan waktu yang lumayan lama bergantung besar database dan resource hardware anda. Apabila proses test sudah selesai periksa terlebih dahulu hasil test tersebut (patch.log) baik berupa error ataupun komponen yang gagal terupdate. Apabila sudah dilakukan perbaikan silahkan dites ulang menggunakan script diatas.</li>
<li>Restart database ke mode seperti biasa (normal) dan jalankan script $ORACLE_HOME\RDBMS\ADMIN\utlrp.sql untuk mengkompile ulang semua packages yang invalid (optional) :
<ul>SQL&gt; shutdown immediate</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>Database closed.
Database dismounted.
ORACLE instance shut down.</pre>
</div>
<p>SQL&gt; startup</p>
<div style="margin: 10px auto; background: #cccccc none repeat scroll 0% 0%;">
<pre>ORACLE instance started.
Total System Global Area  289406976 bytes
Fixed Size                  1296308 bytes
Variable Size             192940108 bytes
Database Buffers           88080384 bytes
Redo Buffers                7090176 bytes
Database mounted.
Database opened.</pre>
</div>
<p>SQL&gt; @D:\oracle\product\10.2.0\RDBMS\ADMIN\utlrp.sql</p>
<div style="background: #cccccc none repeat scroll 0% 0%; overflow: auto; height: 250px; width: 455px;">
<pre>TIMESTAMP
-------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2009-04-06 17:21:12
DOC&gt;   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC&gt;   objects in the database. Recompilation time is proportional to the
DOC&gt;   number of invalid objects in the database, so this command may take
DOC&gt;   a long time to execute on a database with a large number of invalid
DOC&gt;   objects.
DOC&gt;
DOC&gt;   Use the following queries to track recompilation progress:
DOC&gt;
DOC&gt;   1. Query returning the number of invalid objects remaining. This
DOC&gt;      number should decrease with time.
DOC&gt;         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC&gt;
DOC&gt;   2. Query returning the number of objects compiled so far. This number
DOC&gt;      should increase with time.
DOC&gt;         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC&gt;
DOC&gt;   This script automatically chooses serial or parallel recompilation
DOC&gt;   based on the number of CPUs available (parameter cpu_count) multiplied
DOC&gt;   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC&gt;   On RAC, this number is added across all RAC nodes.
DOC&gt;
DOC&gt;   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC&gt;   recompilation. Jobs are created without instance affinity so that they
DOC&gt;   can migrate across RAC nodes. Use the following queries to verify
DOC&gt;   whether UTL_RECOMP jobs are being created and run correctly:
DOC&gt;
DOC&gt;   1. Query showing jobs created by UTL_RECOMP
DOC&gt;         SELECT job_name FROM dba_scheduler_jobs
DOC&gt;            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC&gt;
DOC&gt;   2. Query showing UTL_RECOMP jobs that are running
DOC&gt;         SELECT job_name FROM dba_scheduler_running_jobs
DOC&gt;            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC&gt;#
TIMESTAMP
-------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END  2009-04-06 17:22:10
DOC&gt; The following query reports the number of objects that have compiled
DOC&gt; with errors (objects that compile with errors have status set to 3 in
DOC&gt; obj$). If the number is higher than expected, please examine the error
DOC&gt; messages reported with each object (using SHOW ERRORS) to see if they
DOC&gt; point to system misconfiguration or resource constraints that must be
DOC&gt; fixed before attempting to recompile these objects.
DOC&gt;#
OBJECTS WITH ERRORS
-------------------
                  0
DOC&gt; The following query reports the number of errors caught during
DOC&gt; recompilation. If this number is non-zero, please query the error
DOC&gt; messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC&gt; are due to misconfiguration or resource constraints that must be
DOC&gt; fixed before objects can compile successfully.
DOC&gt;#
ERRORS DURING RECOMPILATION
---------------------------
                          0
SQL&gt;</pre>
</div>
</ul>
</li>
</ul>
<p style="text-align: justify;">Proses patch upgrade telah selesai dilakukan silahkan restart seluruh service atau reboot komputer anda.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.masrony.com/2009/04/upgrade-oracle-10201-ke-10204-di-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
