<?xml version="1.0" encoding="utf-8"?> 
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/"
     version="2.0">

    <channel>

        <title>Mark C Allen - Oracle Articles</title>
        <link>http://www.markcallen.com/oracle/oracle-articles</link>
        <description></description>
        <language>en-us</language>
        <generator>Plone 2.0</generator>

        
            
                  <item>
                      <title>RMAN: Use CROSSCHECK command to fix status</title>
                      <link>http://www.markcallen.com/oracle/rman-use-crosscheck-command-to-fix-status</link>
                      <description>What to do when an obsolete rman object can't be found.</description>
                      <author>mallen</author>
                      <pubDate>Tue, 09 Feb 2010 09:58:09 -0800</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h3>Environment</h3>
<p>Make sure ORACLE_HOME, ORACLE_SID and PATH are set correctly</p>
<p> - rman also comes with X11R6 so make sure that ORACLE_HOME/bin is first in your PATH</p>
<p>Log Into RMAN</p>
<p>rman target /</p>
<p>Find the mismatched objects</p>
<p>RMAN&gt; delete noprompt obsolete;<br /></p>
<pre>RMAN retention policy will be applied to the command<br />RMAN retention policy is set to redundancy 2<br />allocated channel: ORA_DISK_1<br />channel ORA_DISK_1: sid=18 devtype=DISK<br />Deleting the following obsolete backups and copies:<br />Type                 Key    Completion Time    Filename/Handle<br />-------------------- ------ ------------------ --------------------<br />Backup Set           1681   01-FEB-10         <br />  Backup Piece       1681   01-FEB-10          /usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp<br /><br />RMAN-06207: WARNING: 1 objects could not be deleted for DISK channel(s) due<br />RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status<br />RMAN-06210: List of Mismatched objects<br />RMAN-06211: ==========================<br />RMAN-06212:   Object Type   Filename/Handle<br />RMAN-06213: --------------- ---------------------------------------------------<br />RMAN-06214: Backup Piece    /usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp</pre>
<p><br /></p>
<p>The /usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp file is missing.</p>
<p>Run CROSSCHECK to set its status</p>
<p>RMAN&gt; crosscheck backuppiece '/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp' ;<br /><br /></p>
<pre>using channel ORA_DISK_1<br />crosschecked backup piece: found to be 'EXPIRED'<br />backup piece handle=/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp recid=1681 stamp=709790549<br />Crosschecked 1 objects</pre>
<p></p>
<p>Now delete the objects</p>
<p>RMAN&gt; delete noprompt obsolete;<br /><br /></p>
<pre>RMAN retention policy will be applied to the command<br />RMAN retention policy is set to redundancy 2<br />using channel ORA_DISK_1<br />Deleting the following obsolete backups and copies:<br />Type                 Key    Completion Time    Filename/Handle<br />-------------------- ------ ------------------ --------------------<br />Backup Set           1681   01-FEB-10         <br />  Backup Piece       1681   01-FEB-10          /usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp<br /><br />deleted backup piece<br />backup piece handle=/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp recid=1681 stamp=709790549<br />Deleted 1 objects</pre>
<p><br /></p>
<p><br /></p>
]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>ORA-01654: unable to extend index</title>
                      <link>http://www.markcallen.com/oracle/ora-01654-unable-to-extend-index</link>
                      <description>Database can't extent an index.</description>
                      <author>mallen</author>
                      <pubDate>Wed, 17 Sep 2008 23:50:50 -0700</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>Problem</h2>
ORA-01654: unable to extend index SYS.I_FILE#_BLOCK# by 128 in tablespace SYSTEM<br /><br />
<h2>Solution</h2>
Check the size and maxsize of the data files in the SYSTEM tablespace<br /><br />select file_name, bytes, autoextensible, maxbytes<br />from dba_data_files<br />where tablespace_name='SYSTEM';<br /><br />Increase the size of the data file;<br /><br />alter database datafile '&lt;Path to data file&gt;' resize &lt;larger size&gt;<br /><br /><br /><br /><br />]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>ORA-19809: limit exceeded for recovery files</title>
                      <link>http://www.markcallen.com/oracle/ora-19809-limit-exceeded-for-recovery-files-1</link>
                      <description>Unable to startup the database due to ORA-19809: limit exceeded for recovery files</description>
                      <author>mallen</author>
                      <pubDate>Thu, 11 Sep 2008 08:26:49 -0700</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>Problem</h2>
<p>The database will not mount when started</p>
SQL&gt; startup<br />ORACLE instance started.<br /><br />Total System Global Area  608174080 bytes<br />Fixed Size                  1263200 bytes<br />Variable Size             406849952 bytes<br />Database Buffers          192937984 bytes<br />Redo Buffers                7122944 bytes<br />Database mounted.<br />ORA-16038: log 3 sequence# 1933 cannot be archived<br />ORA-19809: limit exceeded for recovery files<br />ORA-00312: online log 3 thread 1:<br />'/home/oracle/oracle/product/10.2.0/oradata/mca10gR2/redo03.log'<br /><br />
<h2>Solution</h2>
Increase the size of the DB_RECOVERY_FILE_DEST_SIZE<br /><br />SQL&gt; show parameter DB_RECOVERY_FILE_DEST_SIZE<br /><br />NAME                                 TYPE        VALUE<br />------------------------------------ ----------- ------------------------------<br />db_recovery_file_dest_size           big integer 8G<br />SQL&gt; alter system set DB_RECOVERY_FILE_DEST_SIZE = 10G;<br /><br />System altered.<br /><br />SQL&gt; shutdown immediate<br />ORA-01109: database not open<br /><br /><br />Database dismounted.<br />ORACLE instance shut down.<br />SQL&gt; startup<br />ORACLE instance started.<br /><br />Total System Global Area  608174080 bytes<br />Fixed Size                  1263200 bytes<br />Variable Size             411044256 bytes<br />Database Buffers          188743680 bytes<br />Redo Buffers                7122944 bytes<br />Database mounted.<br />Database opened.<br />SQL&gt;<br /><br /><br /><br /><br /><br />
<p><br /></p>
<p><br /></p>
]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle Backup and Recovery Scenarios</title>
                      <link>http://www.markcallen.com/oracle/oracle-backup-and-recovery-scenarios</link>
                      <description>Some standard recovery scenarios</description>
                      <author>mallen</author>
                      <pubDate>Mon, 26 May 2008 11:38:28 -0700</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>Deleted or Corrupted Datafile</h2>
If a database datafile in the $ORACLE_HOME/oradata/XE  is deleted then the database will no longer open.  It is not possible to recover just the datafile from a backup since it will be out of sync with the other datafiles and data will have been lost.  If the database has been setup in archivelog mode and backuped as described in <a title="Oracle XE Backup" class="generated" href="oracle-xe-backup">Oracle XE Backup</a> then the database can be recovered to the most recent archive log.<br /><br />
<h3>Backup</h3>
Run a backup on the database as oracle:<br />
<pre>[oracle@localhost ~]$ $ORACLE_HOME/config/scripts/backup.sh <br />Doing online backup of the database.<br />Backup of the database succeeded.<br />Log file is at /usr/lib/oracle/xe/oxe_backup_current.log.<br />Press ENTER key to exit<br />[oracle@localhost ~]$ <br /></pre>
Check the database is running and query the datafiles:<br /><br />
<pre>[oracle@localhost ~]$ sqlplus system<br /><br />SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 26 09:26:04 2008<br /><br />Copyright (c) 1982, 2005, Oracle.  All rights reserved.<br /><br />Enter password: <br /><br />Connected to:<br />Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production<br /><br />SQL&gt; select substr(file_name,1,50) "File", bytes/(1024*1024) "Size (MB)" from dba_data_files;<br /><br />File                                                Size (MB)<br />-------------------------------------------------- ----------<br />/usr/lib/oracle/xe/oradata/XE/users.dbf                   100<br />/usr/lib/oracle/xe/oradata/XE/sysaux.dbf                  220<br />/usr/lib/oracle/xe/oradata/XE/undo.dbf                    210<br />/usr/lib/oracle/xe/oradata/XE/system.dbf                  340<br /><br />SQL&gt; <br /></pre>
<h3>Corrupt</h3>
Delete the users.dbf datafile and create a new empty file:<br /><br />
<pre>[oracle@localhost ~]$ cd oradata/XE<br />[oracle@localhost XE]$ ls -al<br />total 898824<br />drwxr-x--- 2 oracle dba      4096 May 26 11:21 .<br />drwxr-xr-x 3 oracle dba      4096 May 25 21:43 ..<br />-rw-r----- 1 oracle dba   7061504 May 26 11:23 control.dbf<br />-rw-r----- 1 oracle dba 230694912 May 26 11:21 sysaux.dbf<br />-rw-r----- 1 oracle dba 356524032 May 26 11:21 system.dbf<br />-rw-r----- 1 oracle dba  20979712 May 26 11:21 temp.dbf<br />-rw-r----- 1 oracle dba 220209152 May 26 11:21 undo.dbf<br />-rw-r--r-- 1 oracle dba 104865792 May 26 11:21 users.dbf<br />[oracle@localhost XE]$ rm users.dbf<br />[oracle@localhost XE]$ touch users.dbf<br />[oracle@localhost XE]$ ls -al<br />total 796312<br />drwxr-x--- 2 oracle dba      4096 May 26 11:23 .<br />drwxr-xr-x 3 oracle dba      4096 May 25 21:43 ..<br />-rw-r----- 1 oracle dba   7061504 May 26 11:23 control.dbf<br />-rw-r----- 1 oracle dba 230694912 May 26 11:21 sysaux.dbf<br />-rw-r----- 1 oracle dba 356524032 May 26 11:21 system.dbf<br />-rw-r----- 1 oracle dba  20979712 May 26 11:21 temp.dbf<br />-rw-r----- 1 oracle dba 220209152 May 26 11:21 undo.dbf<br />-rw-r--r-- 1 oracle dba         0 May 26 11:23 users.dbf<br />[oracle@localhost XE]$ <br /></pre>
Shutdown the database:<br />
<pre>[oracle@localhost ~]$ sqlplus /nolog<br /><br />SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 26 11:26:37 2008<br /><br />Copyright (c) 1982, 2005, Oracle.  All rights reserved.<br /><br />SQL&gt; connect / as sysdba<br />Connected.<br />SQL&gt; shutdown immediate<br />ORA-01110: data file 4: '/usr/lib/oracle/xe/oradata/XE/users.dbf'<br />ORA-01115: IO error reading block from file 4 (block # 1)<br />ORA-27072: File I/O error<br />Additional information: 4<br />Additional information: 1<br />SQL&gt; <br /></pre>
The database is now corrupted and can not be restarted.<br /><br />
<h3>Restore</h3>
Run the restore.sh script<br />
<pre>[oracle@localhost ~]$ $ORACLE_HOME/config/scripts/restore.sh<br />This operation will shut down and restore the database. Are you sure [Y/N]?Y<br />Restore in progress...<br />Restore of the database succeeded.<br />Log file is at /usr/lib/oracle/xe/oxe_restore.log.<br />Press ENTER key to exit<br />[oracle@localhost ~]$ <br /></pre>
<h3>Verify</h3>
Check that the users.dbf file is restored<br />
<pre>[oracle@localhost ~]$ $ORACLE_HOME/config/scripts/restore.sh<br />This operation will shut down and restore the database. Are you sure [Y/N]?Y<br />Restore in progress...<br />Restore of the database succeeded.<br />Log file is at /usr/lib/oracle/xe/oxe_restore.log.<br />Press ENTER key to exit<br />[oracle@localhost ~]$ cd oradata/XE<br />[oracle@localhost XE]$ ls -al<br />total 898824<br />drwxr-x--- 2 oracle dba      4096 May 26 11:31 .<br />drwxr-xr-x 3 oracle dba      4096 May 25 21:43 ..<br />-rw-r----- 1 oracle dba   7061504 May 26 11:35 control.dbf<br />-rw-r----- 1 oracle dba 230694912 May 26 11:31 sysaux.dbf<br />-rw-r----- 1 oracle dba 356524032 May 26 11:31 system.dbf<br />-rw-r----- 1 oracle dba  20979712 May 26 11:31 temp.dbf<br />-rw-r----- 1 oracle dba 220209152 May 26 11:31 undo.dbf<br />-rw-r--r-- 1 oracle dba 104865792 May 26 11:31 users.dbf<br />[oracle@localhost XE]$</pre>
Verify that the database knows about the users.dbf datafile again:<br /><br />
<pre>[oracle@localhost ~]$ sqlplus system<br /><br />SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 26 09:50:28 2008<br /><br />Copyright (c) 1982, 2005, Oracle.  All rights reserved.<br /><br />Enter password: <br /><br />Connected to:<br />Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production<br /> <br />SQL&gt; select substr(file_name,1,50) "File", bytes/(1024*1024) "Size (MB)" from dba_data_files;<br /><br /><br />File                                                Size (MB)<br />-------------------------------------------------- ----------<br />/usr/lib/oracle/xe/oradata/XE/users.dbf                   100<br />/usr/lib/oracle/xe/oradata/XE/sysaux.dbf                  220<br />/usr/lib/oracle/xe/oradata/XE/undo.dbf                    210<br />/usr/lib/oracle/xe/oradata/XE/system.dbf                  340<br /><br />SQL&gt;<br /></pre>
Restart the database just to make sure:<br />
<pre>[oracle@localhost ~]$ sqlplus /nolog<br /><br />SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 26 11:37:12 2008<br /><br />Copyright (c) 1982, 2005, Oracle.  All rights reserved.<br /><br />SQL&gt; connect / as sysdba<br />Connected.<br />SQL&gt; shutdown immediate<br />Database closed.<br />Database dismounted.<br />ORACLE instance shut down.<br />SQL&gt; startup<br />ORACLE instance started.<br /><br />Total System Global Area  289406976 bytes<br />Fixed Size                  1258488 bytes<br />Variable Size              92277768 bytes<br />Database Buffers          192937984 bytes<br />Redo Buffers                2932736 bytes<br />Database mounted.<br />Database opened.<br />SQL&gt; <br /></pre>
<br />
<h2>Lost Database Server</h2>
This is a more sever loss of data when the database server goes down and can not be restarted.  The best solution is to create a new database server and restore the backups to the new database.  This solution assumes that the database was in archivelog mode, see <a title="Oracle XE Backup" class="generated" href="oracle-xe-backup">Oracle XE Backup</a>, and being backed up to an external system on a daily basis.<br /><br />
<h3>Install Oracle XE</h3>
Install Oracle XE on the new database server as root:<br />
<pre>[root@localhost oracle]# rpm -ivh oracle-xe-10.2.0.1-1.0.i386.rpm <br />Preparing...                ########################################### [100%]<br />   1:oracle-xe              ########################################### [100%]<br />Executing Post-install steps...<br /><br />You must run '/etc/init.d/oracle-xe configure' as the root user to <br />configure the database.<br /><br />[root@localhost oracle]# <br /></pre>
Configure the database, accept all the defaults and set the system password:<br /><br />
<pre>[root@localhost oracle]# /etc/init.d/oracle-xe configure<br /><br />Oracle Database 10g Express Edition Configuration<br />-------------------------------------------------<br />This will configure on-boot properties of Oracle Database 10g Express <br />Edition.  The following questions will determine whether the database should <br />be starting upon system boot, the ports it will use, and the passwords that <br />will be used for database accounts.  Press &lt;Enter&gt; to accept the defaults. <br />Ctrl-C will abort.<br /><br />Specify the HTTP port that will be used for Oracle Application Express [8080]:<br /><br />Specify a port that will be used for the database listener [1521]:<br /><br />Specify a password to be used for database accounts.  Note that the same<br />password will be used for SYS and SYSTEM.  Oracle recommends the use of <br />different passwords for each database account.  This can be done after <br />initial configuration:<br />Confirm the password:<br /><br />Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:<br /><br />Starting Oracle Net Listener...Done<br />Configuring Database...Done<br />Starting Oracle Database 10g Express Edition Instance...Done<br />Installation Completed Successfully.<br />To access the Database Home Page go to "http://127.0.0.1:8080/apex"<br />[root@localhost oracle]# <br /></pre>
<br />
<h3>Configure the Database</h3>
As oracle set the database to be archivelog mode<br /><br />
<pre>[oracle@localhost ~]$ sqlplus /nolog<br /><br />SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 26 12:06:31 2008<br /><br />Copyright (c) 1982, 2005, Oracle.  All rights reserved.<br /><br />SQL&gt; connect / as sysdba<br />Connected.<br />SQL&gt; shutdown<br />Database closed.<br />Database dismounted.<br />ORACLE instance shut down.<br />SQL&gt; startup mount<br />ORACLE instance started.<br /><br />Total System Global Area  289406976 bytes<br />Fixed Size                  1258488 bytes<br />Variable Size              92277768 bytes<br />Database Buffers          192937984 bytes<br />Redo Buffers                2932736 bytes<br />Database mounted.<br />SQL&gt; alter database archivelog;<br /><br />Database altered.<br /><br />SQL&gt; alter database open;<br /><br />Database altered.<br /><br />SQL&gt; <br /></pre>
Shutdown the database<br /><br />
<pre>[oracle@localhost ~]$ sqlplus /nolog<br /><br />SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 26 14:21:43 2008<br /><br />Copyright (c) 1982, 2005, Oracle.  All rights reserved.<br /><br />SQL&gt; connect / as sysdba<br />Connected.<br />SQL&gt; shutdown immediate<br />Database closed.<br />Database dismounted.<br />ORACLE instance shut down.<br />SQL&gt;<br /></pre>
<br /><br />
<h3>Restore Files from Backup</h3>
Restore the:<br />
<ul><li>app/oracle/flash_recovery_area/XE/archivelog/ <br />
  </li><li>app/oracle/flash_recovery_area/XE/autobackup/ <br />
  </li><li>app/oracle/flash_recovery_area/XE/backupset/</li><li>app/oracle/flash_recovery_area/XE/onlinelog/ 
  </li></ul>
directories from backups.  Make sure that the
oracle user owns all the restored files.<br />
<h3><br /></h3>
<h3>Restore the Database<br /></h3>
Restore the database using the restore.sh script and enter the location of the restored files (/usr/lib/oracle/xe/app/oracle/flash_recovery_area/).<br /><br />
<pre>[oracle@localhost ~]$ $ORACLE_HOME/config/scripts/restore.sh<br />This operation will shut down and restore the database. Are you sure [Y/N]?Y<br />Restore in progress...<br />Enter the flash recovery area location:/usr/lib/oracle/xe/app/oracle/flash_recovery_area<br />Restore of the database succeeded.<br />Log file is at /usr/lib/oracle/xe/oxe_restore.log.<br />Press ENTER key to exit<br />[oracle@localhost ~]$ <br /></pre>
<h3>Verify</h3>
Log into the database as a user:<br /><br />
<pre>[oracle@localhost ~]$ sqlplus em<br /><br />SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 26 14:34:58 2008<br /><br />Copyright (c) 1982, 2005, Oracle.  All rights reserved.<br /><br />Enter password: <br /><br />Connected to:<br />Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production<br /><br />SQL&gt;<br /></pre>
<br /><br />]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle XE Recovery</title>
                      <link>http://www.markcallen.com/oracle/oracle-xe-recovery</link>
                      <description>How to recover an Oracle XE Backup</description>
                      <author>mallen</author>
                      <pubDate>Sun, 25 May 2008 10:29:04 -0700</pubDate>
                      
   <content:encoded>
       <![CDATA[
<p>First make sure the database is in archive log mode and running backups on a daily basis.  See <a title="Oracle XE Backup" class="generated" href="oracle-xe-backup">Oracle XE Backup</a> for instructions on how to do this.<br /></p>
<h2>Reverting to a Previous Backup</h2>
If something has gone wrong with the database, such as deleting or corrupting a database file, and you want to restore it to the last backup run:<br /><br /># su - oracle<br /><br /># $ORACLE_HOME/config/scripts/recover.sh<br /><br />If the database is in archivelog mode then it will restore from the last backup and a complete recovery of all the archive log files is attempted.<br />]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle XE Backup</title>
                      <link>http://www.markcallen.com/oracle/oracle-xe-backup</link>
                      <description>After installing Oracle XE you should setup backups.</description>
                      <author>mallen</author>
                      <pubDate>Sat, 16 Feb 2008 20:50:09 -0800</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>Backups for XE</h2>
<p>For Oracle XE there is ready a backup script that uses Oracle's RMAN.</p>
<p></p>
<h3>Setup Archive Log Mode</h3>
<p>After installing the database change it to archivelog mode:</p>
<pre>[oracle@localhost ~]$ sqlplus /nolog<br /><br />SQL*Plus: Release 10.2.0.1.0 - Production on Sun May 25 01:28:00 2008<br /><br />Copyright (c) 1982, 2005, Oracle.  All rights reserved.<br /><br />SQL&gt; connect / as sysdba<br />Connected.<br />SQL&gt; shutdown immediate<br />Database closed.<br />Database dismounted.<br />ORACLE instance shut down.<br />SQL&gt; startup mount<br />ORACLE instance started.<br /><br />Total System Global Area  289406976 bytes<br />Fixed Size                  1258488 bytes<br />Variable Size              92277768 bytes<br />Database Buffers          192937984 bytes<br />Redo Buffers                2932736 bytes<br />Database mounted.<br />SQL&gt; alter database archivelog;<br /><br />Database altered.<br /><br />SQL&gt; alter database open;<br /><br />Database altered.<br /><br />SQL&gt;</pre>
<p>To make sure the database is really in archive log mode run the following sql statement:</p>
<pre>SQL&gt; SELECT LOG_MODE FROM SYS.V$DATABASE;<br /><br />LOG_MODE<br />------------<br />ARCHIVELOG<br /><br />SQL&gt; <br /><br /></pre>
<h3><br /></h3>
<h3>Run the Initial Backup</h3>
<p>Windows run $ORACLE_HOME/bin/Backup.bat</p>
<p>Linux run $ORACLE_HOME/config/scripts/backup.sh</p>
<pre>[oracle@localhost ~]$ $ORACLE_HOME/config/scripts/backup.sh <br />Doing online backup of the database.<br />Backup of the database succeeded.<br />Log file is at /usr/lib/oracle/xe/oxe_backup_current.log.<br />Press ENTER key to exit<br />[oracle@localhost ~]$ <br /></pre>
<p></p>
<h3>Run the Backups Daily</h3>
<p>Windows add the $ORACLE_HOME/bin/Backup.bat to a job scheduler.</p>
<ul><li>Make sure the user running the job is the same user who installed Oracle.</li></ul>
<p><br /></p>
<p>Linux add the $ORACLE_HOME/config/scripts/backup.sh to cron.daily</p>
<ul><li>Remove the user notification line from the end of the script</li></ul>
<p><br /></p>
<h3>Backing up files<br /></h3>
<p>Make sure that your backup script backups up the $ORACLE_HOME directory.  On windows make sure the oradata directory is excluded since this might cause file locking issues.<br /></p>
]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle Enterprise Linux Virtual Machine Setup</title>
                      <link>http://www.markcallen.com/oracle/oracle-enterprise-linux-virtual-machine-setup</link>
                      <description>How to create a VMware virtual machine to run Oracle Enterprise Linux using VMware Workstation 6.</description>
                      <author>mallen</author>
                      <pubDate>Tue, 08 May 2007 16:18:39 -0700</pubDate>
                      
   <content:encoded>
       <![CDATA[Startup VMware Workstation 6.<br /><br />Go to File -&gt; New -&gt; Virtual Machine<br /><br />Click Next<br /><br />Select Custom<br /><br />Select Workstation 5<br /> - this is required if you are going to run the VM under VMware Server 1.x<br /><br />Select Linux and Red Hat Enterprise Linux 4<br /><br />Virtual Machine Name: Oracle Enterprise Linux<br /><br />Number of Processors - 1<br /><br />Memory - 1024 MB<br /><br />Network connection - Bridged<br /><br />SCSI - LSI Logic<br /><br />Create a new Virtual Disk<br /><br />SCSI<br /><br />Size - 20 GB<br />Split into 2GB files<br /><br />Disk file - root.vmdk<br /><br />Click Finish<br /><br /><br /><br /><br /><br />]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Setup Oracle XE Account on Linux</title>
                      <link>http://www.markcallen.com/oracle/setup-oracle-xe-account-on-linux</link>
                      <description>The oracle account that is created by the Oracle XE installer isn't very helpful.</description>
                      <author>mallen</author>
                      <pubDate>Sun, 25 May 2008 01:31:52 -0700</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>Setup Bash</h2>
<p>Log into the system as root and su to oracle</p>
<p>#su - oracle</p>
<p>Copy over the bash files from the /etc/skel directory</p>
<p>cp /etc/skel/.bash* .</p>
<p>Edit .bash_profile and add ORACLE_HOME, ORACLE_SID and add $ORACLE_HOME/bin to PATH</p>
vi .bash_profile<br /><br />
<pre>export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server<br />export ORACLE_SID=XE<br /><br />PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin</pre>
<br />
<p>Log out and back in again and the environment will be setup with bash.  Now its easy to access sqlplus</p>
<pre>[oracle@localhost ~]$ sqlplus /nolog<br /><br />SQL*Plus: Release 10.2.0.1.0 - Production on Sun May 25 01:23:43 2008<br /><br />Copyright (c) 1982, 2005, Oracle.  All rights reserved.<br /><br />SQL&gt; connect / as sysdba<br />Connected.<br />SQL&gt; show sga<br /><br />Total System Global Area  289406976 bytes<br />Fixed Size                  1258488 bytes<br />Variable Size              92277768 bytes<br />Database Buffers          192937984 bytes<br />Redo Buffers                2932736 bytes<br />SQL&gt;</pre>
<br />
<p><br /></p>
]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>OID Query to get Portal Password</title>
                      <link>http://www.markcallen.com/oracle/oid-query-to-get-portal-password</link>
                      <description></description>
                      <author>mallen</author>
                      <pubDate>Tue, 15 Apr 2008 23:47:11 -0700</pubDate>
                      
   <content:encoded>
       <![CDATA[
<p>To query OID you can use ldapsearch that comes with oracle.</p>
<br />
<p>If you want to get the Portal password for you Oracle Portal installation you can issues the following from the command line:</p>
<br />
<p>ldapsearch -v -D "cn=orcladmin" -w "<i>orcladminpassword</i>" -h <i>host</i> -p 389 -s sub -b "cn=IAS Infrastructure Databases, cn=IAS, cn=Products, cn=OracleContext" "orclresourcename=PORTAL" orclpasswordattribute<br /></p>
<p><br /></p>
]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>OCS Content Services - ORA-12705: invalid or unknown NLS parameter value specified</title>
                      <link>http://www.markcallen.com/oracle/ocs-content-services-ora-12705-invalid-or-unknown-nls-parameter-value-specified</link>
                      <description>Unable to access Oracle Collaboration Suite Content Services due to a ORA-12705: invalid or unknown NLS parameter value specified</description>
                      <author>mallen</author>
                      <pubDate>Tue, 15 Apr 2008 23:46:55 -0700</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>Problem</h2>
<p>When going to http://servername:port/content/app you get a http 503 error.</p>
<p>The log file &lt;mid-tier&gt;/j2ee/OC4J_Content/application-deployments/content/OC4J_Content_default_island_1 has the following error message:<br /></p>
<p>java.sql.SQLException: ORA-12705: invalid or unknown NLS parameter value specified</p>
<br />
<h2>Solution</h2>
<p>Change the IFS.SERVICE.JDBC.DriveType to thin for the Service Configuration you are using (default is SmallServiceConfiguration).</p>
<p>To do this log into EM for the mid-tier and go to Content, select Service Configurations at the bottom of the page and then select your service configuration.  Search for JDBC and change the value of IFS.SERVICE.JDBC.DriveType to thin.</p>
<p>Restart Content and try the website again.</p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle XE Client Connection String</title>
                      <link>http://www.markcallen.com/oracle/copy_of_oracle-xe-client-connection-string</link>
                      <description>Oracle XE Client does not come with sqlnet therefore you need to connect to the database using a connection string.</description>
                      <author>mallen</author>
                      <pubDate>Sat, 16 Feb 2008 20:52:00 -0800</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>Oracle XE Connection String</h2>
<br />username/password@[//]host[:port][/service_name]<br /><br />
<ul><li>port is required if the port number is not 1521.</li><li>service_name defaults to XE.</li></ul>
<br /><br />]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>ORA-20603: Updating timezone region of a target is not supported.</title>
                      <link>http://www.markcallen.com/oracle/ora-20603-updating-timezone-region-of-a-target-is-not-supported</link>
                      <description>Enterprise manager does not start after updating the database.  The emdb.nohup has an ORA-20603: Updating timezone region of a target is not supported error message in it.</description>
                      <author>mallen</author>
                      <pubDate>Sat, 16 Feb 2008 20:52:11 -0800</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>The problem</h2>
<p>The timezones have been updated within the database.<br /></p>
<br />
<h2>Solution</h2>
<p>As Oracle run:</p>
<p>$ORACLE_HOME/bin/emctl resetTZ agent</p>
<p>and follow the instructions.  You'll need the sysman or sys password to make the changes.</p>
<br />
<p><br /></p>
<p><br /></p>
]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Viewing Oracle Application Server JMS Queues</title>
                      <link>http://www.markcallen.com/oracle/viewing-oracle-application-server-jms-queues</link>
                      <description>When developing BPEL and ESB applications it is necessary to see if the message you sent actually made it on the queue.  Using Hermes is an excellent way to view an application server queues and topics. </description>
                      <author>mallen</author>
                      <pubDate>Sat, 16 Feb 2008 20:50:46 -0800</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>Problem</h2>
<p>Need to view messages on a JMS Queue or Topic that you have published a message to.</p>
<p><br /></p>
<h2>Solution</h2>
<p>Hermes is an opensouce solution to view JMS queues.  But it doesn't come out of the box to work with Oracle Application server and OC4J.  Thankfully Mike Lehmann has created some information on how to do this <a class="generated" href="http://mike-lehmann.blogspot.com/2006/09/i-was-working-with-oracleas-jms-over.html">http://mike-lehmann.blogspot.com/2006/09/i-was-working-with-oracleas-jms-over.html</a></p>
<br />
<p>Also helpful is the provider configuration information on the hermes website <a class="generated" href="http://www.hermesjms.com/confluence/display/HJMS/Oracle">http://www.hermesjms.com/confluence/display/HJMS/Oracle</a>provided by Demed L'Her.  The viewlet is especially helpful for first time users.</p>
]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle ESB Web Service Returns a java.security.PrivilegedActionException</title>
                      <link>http://www.markcallen.com/oracle/oracle-esb-web-service-returns-a-java-security-privilegedactionexception</link>
                      <description>When sending information to a ESB Web Service a java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused is returned.</description>
                      <author>mallen</author>
                      <pubDate>Sat, 16 Feb 2008 20:51:50 -0800</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>Problem</h2>
<p>If you try and access a ESB webservice on a webserver other than localhost and port 8888 the following error message is returned and the ESB flow is not run:</p>
<p>java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused</p>
<p><br /></p>
<h2>Resolution</h2>
The ESB System that the Web Service is running under has not been configured to use the correct host and port.<br /><br />In ESB Control click on the System that is running the Web Service (ie DefaultSystem).<br /><br />Change:<br />Virtual Host = &lt;hostname of the application server&gt;<br />Port = Port number OC4J is running on<br /><br /><br /><br />]]>
   </content:encoded>
 
                  </item>

            
	   	
        
        
            
                  <item>
                      <title>ORA-19809: limit exceeded for recovery files</title>
                      <link>http://www.markcallen.com/oracle/ora-19809-limit-exceeded-for-recovery-files</link>
                      <description>How to increase the amount of space for backups and archive log files.</description>
                      <author>mallen</author>
                      <pubDate>Sat, 16 Feb 2008 20:51:40 -0800</pubDate>
                      
   <content:encoded>
       <![CDATA[
<h2>Problem</h2>
If you get the following error and the database can not be opened:<br /><br />ORA-16038: log 2 sequence# 27216 cannot be archived<br />ORA-19809: limit exceeded for recovery files<br />ORA-00312: online log 2 thread 1: '/opt/oracle/product/10.1.2/ocs/oradata/OCSDB/onlinelog/o1_mf_2_2qdyzv3q_.log'<br />ORA-00312: online log 2 thread 1: '/opt/oracle/product/10.1.2/ocs/infra/flash_recovery_area/OCSDB/onlinelog/o1_mf_2_2qdyzvcd_.log'<br /><br />
<h2>Solution</h2>
Increase the side of the db_recovery_file_dest_size.<br /><br />Log into the database as sysdba<br /><br />sqlplus /nolog<br />SQL&gt; connect / as sysdba<br />SQL&gt; show parameter db_recovery_file_dest_size<br /><br />NAME                                 TYPE        VALUE<br />------------------------------------ ----------- ------------------------------<br />db_recovery_file_dest_size           big integer 20G<br />SQL&gt; alter system set db_recovery_file_dest_size = 25G scope=both;<br /><br />System altered.<br /><br />SQL&gt; <br /><br />Restart the database.<br />]]>
   </content:encoded>
 
                  </item>

            
	   	
        


    </channel>

</rss>

