<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7776443178362771894</atom:id><lastBuildDate>Thu, 24 Oct 2024 09:20:36 +0000</lastBuildDate><title>Oracle Nexus</title><description>Welcome to Nexus of Oracle</description><link>http://oracle-nexus.blogspot.com/</link><managingEditor>noreply@blogger.com (Nexus)</managingEditor><generator>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-9046448197764225919</guid><pubDate>Fri, 27 Mar 2009 14:10:00 +0000</pubDate><atom:updated>2009-03-27T19:42:20.082+05:30</atom:updated><title>How can one see who is using a temporary segment?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;For every user using temporary space, there is an entry in SYS.V$_LOCK with type &#39;TS&#39;.&lt;br /&gt;All temporary segments are named &#39;ffff.bbbb&#39; where &#39;ffff&#39; is the file it is in and &#39;bbbb&#39; is first block of the segment.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;If your temporary tablespace is set to TEMPORARY, all sorts are done in one large temporary segment. For usage stats, see SYS.V_$SORT_SEGMENT&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;From Oracle 8.0, one can just query SYS.v$sort_usage. Look at these examples:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;select s.username, u.&quot;USER&quot;, u.tablespace, u.contents, u.extents, u.blocks&lt;br /&gt;from sys.v_$session s, sys.v_$sort_usage u&lt;br /&gt;where s.saddr = u.session_addr&lt;br /&gt;/&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;select s.osuser, s.process, s.username, s.serial#,&lt;br /&gt;sum(u.blocks)*vp.value/1024 sort_size&lt;br /&gt;from sys.v_$session s, sys.v_$sort_usage u, sys.v_$parameter vp&lt;br /&gt;where s.saddr = u.session_addr&lt;br /&gt;and vp.name = &#39;db_block_size&#39;&lt;br /&gt;and s.osuser like &#39;&amp;amp;1&#39;&lt;br /&gt;group by s.osuser, s.process, s.username, s.serial#, vp.value&lt;br /&gt;/&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-can-one-see-who-is-using-temporary.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-8667602608568558962</guid><pubDate>Fri, 27 Mar 2009 14:07:00 +0000</pubDate><atom:updated>2009-03-27T19:39:38.139+05:30</atom:updated><title>How do I find used/free space in a TEMPORARY tablespace?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Unlike normal tablespaces, true temporary tablespace information is not listed in DBA_FREE_SPACE. Instead use the V$TEMP_SPACE_HEADER view:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;SELECT tablespace_name, SUM(bytes_used), SUM(bytes_free)&lt;br /&gt;FROM V$temp_space_header&lt;br /&gt;GROUP BY tablespace_name;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-do-i-find-usedfree-space-in.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-7866870226567057738</guid><pubDate>Fri, 27 Mar 2009 14:04:00 +0000</pubDate><atom:updated>2009-03-27T19:36:51.915+05:30</atom:updated><title>How does one see the uptime for a database?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;Look at the following SQL query:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;SELECT to_char(startup_time,&#39;DD-MON-YYYY HH24:MI:SS&#39;) &quot;DB Startup Time&quot;&lt;br /&gt;FROM sys.v_$instance;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;or&lt;br /&gt;SELECT to_char(logon_time,&#39;Dy dd Mon HH24:MI:SS&#39;) &quot;DB Startup Time&quot;&lt;br /&gt;FROM sys.v_$session&lt;br /&gt;WHERE sid=1 /* this is pmon */&lt;br /&gt;/&lt;br /&gt;or&lt;br /&gt;Check on operating system level when the PMON process was stated (UNIX/ LINUX only): &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;ps -ef  grep pmon &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;Users still running on Oracle 7 can try one of the following queries:&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;column STARTED format a18 head &#39;STARTUP TIME&#39;&lt;br /&gt;select C.INSTANCE,&lt;br /&gt;to_date(JUL.VALUE, &#39;J&#39;)&lt;br /&gt; to_char(floor(SEC.VALUE/3600), &#39;09&#39; )&lt;br /&gt; &#39;:&#39;&lt;br /&gt;--  substr (to_char(mod(SEC.VALUE/60, 60), &#39;09&#39;), 2, 2)&lt;br /&gt; substr (to_char(floor(mod(SEC.VALUE/60, 60)), &#39;09&#39;), 2, 2)&lt;br /&gt; &#39;.&#39;&lt;br /&gt; substr (to_char(mod(SEC.VALUE, 60), &#39;09&#39;), 2, 2) STARTED&lt;br /&gt;from SYS.V_$INSTANCE JUL,&lt;br /&gt;SYS.V_$INSTANCE SEC,&lt;br /&gt;SYS.V_$THREAD C&lt;br /&gt;where JUL.KEY like &#39;%JULIAN%&#39;&lt;br /&gt;and SEC.KEY like &#39;%SECOND%&#39;;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;select to_date(JUL.VALUE, &#39;J&#39;)&lt;br /&gt; to_char(to_date(SEC.VALUE, &#39;SSSSS&#39;), &#39; HH24:MI:SS&#39;) STARTED&lt;br /&gt;from SYS.V_$INSTANCE JUL,&lt;br /&gt;SYS.V_$INSTANCE SEC&lt;br /&gt;where JUL.KEY like &#39;%JULIAN%&#39;&lt;br /&gt;and SEC.KEY like &#39;%SECOND%&#39;;&lt;br /&gt;select to_char(to_date(JUL.VALUE, &#39;J&#39;) + (SEC.VALUE/86400), -- Return a DATE&lt;br /&gt;&#39;DD-MON-YY HH24:MI:SS&#39;) STARTED&lt;br /&gt;from V$INSTANCE JUL,&lt;br /&gt;V$INSTANCE SEC&lt;br /&gt;where JUL.KEY like &#39;%JULIAN%&#39;&lt;br /&gt;and SEC.KEY like &#39;%SECOND%&#39;;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-see-uptime-for-database.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-6905567990666362582</guid><pubDate>Fri, 27 Mar 2009 13:41:00 +0000</pubDate><atom:updated>2009-03-27T19:34:35.596+05:30</atom:updated><title>How does one give developers access to trace files (required as input to tkprof)?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;The &quot;alter session set sql_trace=true&quot; command generates trace files in USER_DUMP_DEST that can be used by developers as input to tkprof. On Unix the default file mask for these files are &quot;rwx r-- ---&quot;.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;There is an undocumented INIT.ORA parameter that will allow everyone to read (rwx r-- r--) these trace files:&lt;br /&gt;_trace_files_public = true&lt;br /&gt;&lt;br /&gt;Include this in your INIT.ORA file and bounce your database for it to take effect.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-give-developers-access-to.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-2605152101180791672</guid><pubDate>Fri, 27 Mar 2009 13:01:00 +0000</pubDate><atom:updated>2009-03-27T19:10:18.355+05:30</atom:updated><title>Can one resize tablespaces and data files?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;Add more files to tablespaces&lt;/strong&gt;&lt;br /&gt;To add more space to a tablespace, one can simply add another file to it.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;Example:&lt;br /&gt;&lt;/strong&gt;ALTER TABLESPACE USERS ADD DATAFILE &#39;/oradata/orcl/users1.dbf&#39; SIZE 100M;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;Resize datafiles&lt;/strong&gt;&lt;br /&gt;One can manually increase or decrease the size of a datafile from Oracle 7.2 using the following command:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;ALTER DATABASE DATAFILE &#39;filename2&#39; RESIZE 100M;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Because you can change the sizes of datafiles, you can add more space to your database without adding more datafiles. This is beneficial if you are concerned about reaching the maximum number of datafiles allowed in your database.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;Manually reducing the sizes of datafiles allows you to reclaim unused space in the database. This is useful for correcting errors in estimations of space requirements.&lt;br /&gt;Extend datafiles&lt;br /&gt;&lt;br /&gt;Also, datafiles can be allowed to automatically extend if more space is required. Look at the following commands:&lt;br /&gt;&lt;br /&gt;CREATE TABLESPACE pcs_data_ts DATAFILE &#39;c:ora_appspcspcsdata1.dbf&#39; SIZE 3M&lt;br /&gt;AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED&lt;br /&gt;DEFAULT STORAGE ( INITIAL 10240&lt;br /&gt;NEXT 10240&lt;br /&gt;MINEXTENTS 1&lt;br /&gt;MAXEXTENTS UNLIMITED&lt;br /&gt;PCTINCREASE 0)&lt;br /&gt;ONLINE&lt;br /&gt;PERMANENT;&lt;br /&gt;&lt;br /&gt;ALTER DATABASE DATAFILE 1 AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/can-one-resize-tablespaces-and-data.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-528108688680928499</guid><pubDate>Fri, 27 Mar 2009 12:58:00 +0000</pubDate><atom:updated>2009-03-27T18:31:09.559+05:30</atom:updated><title>Can one rename a tablespace?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;From Oracle 10g Release 1, users can rename tablespaces. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;Example:&lt;br /&gt;&lt;/strong&gt;ALTER TABLESPACE ts1 RENAME TO ts2;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;However, you must adhere to the following restrictions:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;COMPATIBILITY must be set to at least 10.0.1&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Cannot rename SYSTEM or SYSAUX&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Cannot rename an offline tablespace&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Cannot rename a tablespace that contains offline datafiles &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;For older releases, use the following workaround:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Export all of the objects from the tablespace&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Drop the tablespace including contents&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Recreate the tablespace&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Import the objects&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/can-one-rename-tablespace.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-4942037906515822899</guid><pubDate>Fri, 27 Mar 2009 12:48:00 +0000</pubDate><atom:updated>2009-03-27T18:27:34.099+05:30</atom:updated><title>How are extents allocated to a segment?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Oracle8 and above rounds off extents to a multiple of 5 blocks when more than 5 blocks are requested. If one requests 16K or 2 blocks (assuming a 8K block size), Oracle doesn&#39;t round it up to 5 blocks, but it allocates 2 blocks or 16K as requested. If one asks for 8 blocks, Oracle will round it up to 10 blocks.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;Space allocation also depends upon the size of contiguous free space available. If one asks for 8 blocks and Oracle finds a contiguous free space that is exactly 8 blocks, it would give it you. If it is 9 blocks, Oracle would also give it to you. Clearly Oracle doesn&#39;t always round extents to a multiple of 5 blocks.&lt;br /&gt;&lt;br /&gt;The exception to this rule is locally managed tablespaces. If a tablespace is created with local extent management and the extent size is 64K, then Oracle allocates 64K or 8 blocks assuming 8K block size. Oracle doesn&#39;t round it up to the multiple of 5 when a tablespace is locally managed.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-are-extents-allocated-to-segment.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-387596303564273580</guid><pubDate>Fri, 27 Mar 2009 11:16:00 +0000</pubDate><atom:updated>2009-03-27T16:49:49.002+05:30</atom:updated><title>ORA-01652: unable to extend temp segment by 640 in tablespace TEMP</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;First check Alert.log file of database;  Error was related to RMAN backup.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Run below command on problem target database if SQL statement is hang or come out with Temporary tablespace error then Check the Temporaray tablespace usage.&lt;br /&gt;&lt;br /&gt;SQL&gt; select count(*) from v$rman_status ;select count(*) from v$rman_status;&lt;br /&gt;ERROR at line 1:ORA-01652: unable to extend temp segment by 640 in tablespace TEMP&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2&lt;/strong&gt;:  Find out which User/Users are taking the space on temporaray tablespace and which is the SQL satement.&lt;br /&gt;&lt;br /&gt;SELECT a.username, a.sid, a.serial#, a.osuser, b.tablespace, (b.blocks*8*1024/(1024*1024)) as MB, c.sql_textFROM v$session a, v$tempseg_usage b, v$sqlarea cWHERE a.saddr = b.session_addrAND c.address= a.sql_addressAND c.hash_value = a.sql_hash_valueORDER BY b.tablespace, b.blocks&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;select tablespace, username, segtype, sum(blocks*8*1024/(1024*1024)) as mb, count(*) as count from v$tempseg_usage group by  tablespace, username, segtype&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step3&lt;/strong&gt;: If it is SYS user account taking too much of temporaray tablespace space then. Please follow the follwing Metalink notes:&lt;br /&gt;&lt;br /&gt;To implement the solution on Target database., please execute the following steps:&lt;br /&gt;&lt;br /&gt;SQL&gt; exec dbms_stats.gather_fixed_objects_stats;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Oracle Document;&lt;br /&gt;&lt;/strong&gt;Uses a lot Of Temporary Segments ORA-1652: Unable To Extend Temp Segment  &lt;br /&gt;Doc ID: Note:357765.1&lt;br /&gt;Type:  PROBLEM  &lt;br /&gt;Last Revision Date:  02-APR-2007&lt;br /&gt;Status:  MODERATED&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/ora-01652-unable-to-extend-temp-segment.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-1259097976908524688</guid><pubDate>Thu, 26 Mar 2009 14:58:00 +0000</pubDate><atom:updated>2009-03-26T20:31:39.040+05:30</atom:updated><title>Where can one find the high water mark for a table?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;There is no single system table which contains the high water mark (HWM) for a table. A table&#39;s HWM can be calculated using the results from the following SQL statements:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;SELECT BLOCKS &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;FROM DBA_SEGMENTS&lt;br /&gt;WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table);&lt;br /&gt;ANALYZE TABLE owner.table ESTIMATE STATISTICS;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;SELECT EMPTY_BLOCKS&lt;br /&gt;FROM DBA_TABLES&lt;br /&gt;WHERE OWNER=UPPER(owner) AND TABLE_NAME = UPPER(table);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Thus, the tables&#39; &lt;strong&gt;HWM = (query result 1) - (query result 2) - 1&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: You can also use the DBMS_SPACE package and calculate the &lt;strong&gt;HWM = TOTAL_BLOCKS - UNUSED_BLOCKS - 1&lt;/strong&gt;.&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/where-can-one-find-high-water-mark-for.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-3308108152998170446</guid><pubDate>Thu, 26 Mar 2009 14:56:00 +0000</pubDate><atom:updated>2009-03-26T20:28:24.500+05:30</atom:updated><title>How does one prevent tablespace fragmentation?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Always set PCTINCREASE to 0 or 100. Bizarre values for PCTINCREASE will contribute to fragmentation. For example if you set PCTINCREASE to 1 you will see that your extents are going to have weird and wacky sizes:&lt;/span&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;100K, 100K, 101K, 102K, etc. Such extents of bizarre size are rarely re-used in their entirety. PCTINCREASE of 0 or 100 gives you nice round extent sizes that can easily be reused. Eg. 100K, 100K, 200K, 400K, etc.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;As per my Openion :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Use the same extent size for all the segments in a given tablespace. Locally Managed tablespaces (available from 8i onwards) with uniform extent sizes virtually eliminates any tablespace fragmentation. Note that the number of extents per segment does not cause any performance issue anymore, unless they run into thousands and thousands where additional I/O may be required to fetch the additional blocks where extent maps of the segment are stored.&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-prevent-tablespace.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-8247675780625711664</guid><pubDate>Thu, 26 Mar 2009 14:54:00 +0000</pubDate><atom:updated>2009-03-26T20:25:53.117+05:30</atom:updated><title>How does one coalesce free space?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;SMON coalesces free space (extents) into larger, contiguous extents every 2 hours and even then, only for a short period of time.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;SMON will not coalesce free space if a tablespace&#39;s default storage parameter &quot;pctincrease&quot; is set to 0. With Oracle 7.3 one can manually coalesce a tablespace using the command:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;ALTER TABLESPACE ... COALESCE;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;For releases older than 7.3, use:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;SQL&gt; alter session set events &#39;immediate trace name coalesce level n&#39;;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;where &#39;n&#39; is the tablespace number you get from SELECT TS#, NAME FROM SYS.TS$;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;You can get status information about this process by selecting from the &lt;strong&gt;SYS.DBA_FREE_SPACE_COALESCED&lt;/strong&gt; dictionary view.&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-coalesce-free-space_26.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-3279089632145730510</guid><pubDate>Thu, 26 Mar 2009 14:54:00 +0000</pubDate><atom:updated>2009-03-26T20:25:52.884+05:30</atom:updated><title>How does one coalesce free space?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;SMON coalesces free space (extents) into larger, contiguous extents every 2 hours and even then, only for a short period of time.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;SMON will not coalesce free space if a tablespace&#39;s default storage parameter &quot;pctincrease&quot; is set to 0. With Oracle 7.3 one can manually coalesce a tablespace using the command:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;ALTER TABLESPACE ... COALESCE;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;For releases older than 7.3, use:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;SQL&gt; alter session set events &#39;immediate trace name coalesce level n&#39;;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;where &#39;n&#39; is the tablespace number you get from SELECT TS#, NAME FROM SYS.TS$;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;You can get status information about this process by selecting from the &lt;strong&gt;SYS.DBA_FREE_SPACE_COALESCED&lt;/strong&gt; dictionary view.&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-coalesce-free-space.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-9182294894360227822</guid><pubDate>Thu, 26 Mar 2009 14:51:00 +0000</pubDate><atom:updated>2009-03-26T20:24:19.139+05:30</atom:updated><title>What database block size should I use?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Oracle recommends that your database block size match, or be multiples of your operating system block size. One can use smaller block sizes, but the performance cost is significant. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Your choice should depend on the type of application you are running. If you have many small transactions as with &lt;strong&gt;OLTP&lt;/strong&gt;, use a &lt;strong&gt;smaller block size&lt;/strong&gt;. With fewer but larger transactions, as with a &lt;strong&gt;DSS application&lt;/strong&gt;,use a &lt;strong&gt;larger block size&lt;/strong&gt;.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;If you are using a volume manager, consider your &quot;operating system block size&quot; to be 8K&lt;/strong&gt;. This is because volume manager products use 8K blocks (and this is not configurable).&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/what-database-block-size-should-i-use.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-3134791681305876638</guid><pubDate>Thu, 26 Mar 2009 14:48:00 +0000</pubDate><atom:updated>2009-03-26T20:20:53.640+05:30</atom:updated><title>How does one rename a database?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Follow these steps to rename a database:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Start by making a full database backup of your database (in case you need to restore if this procedure is not working).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Execute this command from sqlplus while connected to &#39;SYS AS SYSDBA&#39;:&lt;br /&gt;ALTER DATABASE BACKUP CONTROLFILE TO TRACE RESETLOGS;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Locate the latest dump file in your USER_DUMP_DEST directory (show parameter USER_DUMP_DEST) - rename it to something like dbrename.sql.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Edit dbrename.sql, remove all headers and comments, and change the database&#39;s name. Also change&lt;br /&gt;&quot;CREATE CONTROLFILE REUSE ...&quot; to &quot;CREATE CONTROLFILE SET ...&quot;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Shutdown the database (use SHUTDOWN NORMAL or IMMEDIATE, don&#39;t ABORT!) and run&lt;br /&gt;dbrename.sql.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Rename the database&#39;s global name:&lt;br /&gt;ALTER DATABASE RENAME GLOBAL_NAME TO new_db_name;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-rename-database.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-5375348341935887533</guid><pubDate>Thu, 26 Mar 2009 14:47:00 +0000</pubDate><atom:updated>2009-03-26T20:18:38.379+05:30</atom:updated><title>How does one create a new database?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;One can create and modify Oracle databases using the Oracle &quot;dbca&quot; (Database Configuration Assistant) utility. The dbca utility is located in the $ORACLE_HOME/bin directory. The Oracle Universal Installer (oui) normally starts it after installing the database server software to create the starter database.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;One can also create databases manually using scripts. This option, however, is falling out of fashion as it is quite involved and error prone. Look at this example for creating and Oracle 9i or higer database:&lt;br /&gt;&lt;br /&gt;CONNECT SYS AS SYSDBA&lt;br /&gt;ALTER SYSTEM SET DB_CREATE_FILE_DEST=&#39;/u01/oradata/&#39;;&lt;br /&gt;ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_1=&#39;/u02/oradata/&#39;;&lt;br /&gt;ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_2=&#39;/u03/oradata/&#39;;&lt;br /&gt;CREATE DATABASE;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-create-new-database.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-3734468436765104632</guid><pubDate>Thu, 26 Mar 2009 14:45:00 +0000</pubDate><atom:updated>2009-03-26T20:17:42.505+05:30</atom:updated><title>My database is down and I cannot restore. What now ?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;This is probably not the appropriate time to be sarcastic, but, recovery without backups are not supported. You know that you should have tested your recovery strategy, and that you should always backup a corrupted database before attempting to restore/recover it.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Nevertheless, Oracle Consulting can sometimes extract data from an offline database using a utility called &lt;strong&gt;DUL&lt;/strong&gt; (Disk UnLoad - Life is DUL without it!). This utility reads data in the data files and unloads it into SQL*Loader or export dump files. Hopefully you&#39;ll then be able to load the data into a working database.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;Note that &lt;strong&gt;DUL&lt;/strong&gt; does not care about rollback segments, corrupted blocks, etc, and can thus not guarantee that the data is not logically corrupt. It is intended as an absolute last resort and will most likely cost your company a lot of money!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;DUDE&lt;/strong&gt; (Database Unloading by Data Extraction) is another non-Oracle utility that can be used to extract data from a dead database. More info about DUDE is available at http://www.ora600.nl/.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/my-database-is-down-and-i-cannot.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-4351596956825834024</guid><pubDate>Thu, 26 Mar 2009 14:42:00 +0000</pubDate><atom:updated>2009-03-26T20:15:40.375+05:30</atom:updated><title>I&#39;ve lost an archived/online REDO LOG file, can I get my DB back?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;The following INIT.ORA/SPFILE parameter can be used if your current redologs are corrupted or blown away. It is also handy if you do database recovery and one of the archived log files are missing and cannot be restored.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;_allow_resetlogs_corruption = true&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;STEPS:&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Do a &quot;SHUTDOWN NORMAL&quot; of the database&lt;/li&gt;&lt;li&gt;Set the above parameter&lt;/li&gt;&lt;li&gt;Do a &quot;STARTUP MOUNT&quot; and &quot;ALTER DATATBASE OPEN RESETLOGS;&quot;&lt;/li&gt;&lt;li&gt;If the database asks for recovery, use a UNTIL CANCEL type recovery and apply all available archive and online redo logs, then issue CANCEL and reissue the &quot;ALTER DATATBASE OPEN RESETLOGS;&quot; command.&lt;/li&gt;&lt;li&gt;Wait a couple of minutes for Oracle to sort itself out&lt;/li&gt;&lt;li&gt;Do a &quot;SHUTDOWN NORMAL&quot;&lt;/li&gt;&lt;li&gt;Remove the above parameter!&lt;/li&gt;&lt;li&gt;Do a database &quot;STARTUP&quot; and check your ALERT.LOG file for errors.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Caution is advised when enabling this parameter as you might end-up losing your entire database. Please contact Oracle Support before using it.&lt;/span&gt;&lt;/p&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/ive-lost-archivedonline-redo-log-file.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-6532035323218265688</guid><pubDate>Thu, 26 Mar 2009 14:40:00 +0000</pubDate><atom:updated>2009-03-26T20:12:49.199+05:30</atom:updated><title>How does one put a database into ARCHIVELOG mode?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;The main reason for running in archivelog mode is that one can provide 24-hour availability and guarantee complete data recoverability. It is also necessary to enable ARCHIVELOG mode before one can start to use on-line database backups.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;Issue the following commands to put a database into ARCHVELOG mode:&lt;br /&gt;SQL&gt; CONNECT sys AS SYSDBA&lt;br /&gt;SQL&gt; STARTUP MOUNT EXCLUSEVE;&lt;br /&gt;SQL&gt; ALTER DATABASE ARCHIVELOG;&lt;br /&gt;SQL&gt; ARCHIVE LOG START;&lt;br /&gt;SQL&gt; ALTER DATABASE OPEN;&lt;br /&gt;&lt;br /&gt;Alternatively, add the above commands into your database&#39;s startup command script, and bounce the database. The following parameters needs to be set for databases in ARCHIVELOG mode:&lt;br /&gt;log_archive_start = TRUE&lt;br /&gt;log_archive_dest_1 = &#39;LOCATION=/arch_dir_name&#39;&lt;br /&gt;log_archive_dest_state_1 = ENABLE&lt;br /&gt;log_archive_format = %d_%t_%s.arc&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE 1&lt;/strong&gt;: Remember to take a baseline database backup right after enabling archivelog mode. Without it one would not be able to recover. Also, implement an archivelog backup to prevent the archive log directory from filling-up.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE 2&lt;/strong&gt;: ARCHIVELOG mode was introduced with Oracle V6, and is essential for database point-in-time recovery.Archiving can be used in combination with on-line and off-line database backups.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE 3&lt;/strong&gt;: You may want to set the following INIT.ORA parameters when enabling ARCHIVELOG mode:&lt;br /&gt;log_archive_start=TRUE, log_archive_dest=..., and log_archive_format=...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE 4&lt;/strong&gt;: You can change the archive log destination of a database on-line with the ARCHIVE LOG START TO &#39;directory&#39;; statement. This statement is often used to switch archiving between a set of directories.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE 5&lt;/strong&gt;: When running Oracle Real Application Server (RAC), you need to shut down all nodes before changing the database to ARCHIVELOG mode.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-put-database-into.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-2113652863542719401</guid><pubDate>Thu, 26 Mar 2009 14:38:00 +0000</pubDate><atom:updated>2009-03-26T20:10:05.580+05:30</atom:updated><title>How does one backup a database using the export utility?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Oracle exports are &quot;logical&quot; database backups (not physical) as they extract data and logical definitions from the database into a file. Other backup strategies normally back-up the physical data files.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;One of the advantages of exports is that one can selectively re-import tables, however [/b]one cannot roll-forward from an restored export file. To completely restore a database from an export file one practically needs to recreate the entire database.&lt;br /&gt;&lt;br /&gt;Always do full system level exports (FULL=YES). Full exports include more information about the database in the export file than user level exports.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-backup-database-using.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-1017835074230758890</guid><pubDate>Thu, 26 Mar 2009 10:32:00 +0000</pubDate><atom:updated>2009-03-26T16:06:38.440+05:30</atom:updated><title>My database was terminated while in BACKUP MODE, do I need to recover?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;If a database was terminated while one of its tablespaces was in BACKUP MODE (ALTER TABLESPACE xyz BEGIN BACKUP;), it will tell you that media recovery is required when you try to restart the database. The DBA is then required to recover the database and apply all archived logs to the database. However, from Oracle 7.2, one can simply take the individual datafiles out of backup mode and restart the database.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;ALTER DATABASE DATAFILE &#39;/path/filename&#39; END BACKUP;&lt;br /&gt;&lt;br /&gt;One can select from V$BACKUP to see which datafiles are in backup mode. This normally saves a significant amount of database down time.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;See script end_backup2.sql in the script section of Blog.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;From Oracle9i onwards, the following command can be used to take all of the datafiles out of hotbackup mode:&lt;br /&gt;&lt;br /&gt;ALTER DATABASE END BACKUP;&lt;br /&gt;&lt;br /&gt;This command must be issued when the database is mounted, but not yet opened.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/my-database-was-terminated-while-in.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-4909781691403684035</guid><pubDate>Thu, 26 Mar 2009 10:30:00 +0000</pubDate><atom:updated>2009-03-26T16:01:41.402+05:30</atom:updated><title>How does one do on-line database backups?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Each tablespace that needs to be backed-up must be switched into backup mode before copying the files out to secondary storage (tapes). &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;Look at this simple example.&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;ALTER TABLESPACE xyz BEGIN BACKUP;&lt;br /&gt;! cp xyfFile1 /backupDir/&lt;br /&gt;ALTER TABLESPACE xyz END BACKUP;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;It is better to backup tablespace for tablespace than to put all tablespaces in backup mode. Backing them up separately incurs less overhead. When done, remember to backup your control files. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;Look at this example:&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;ALTER SYSTEM SWITCH LOGFILE; -- Force log switch to update control file headers&lt;br /&gt;ALTER DATABASE BACKUP CONTROLFILE TO &#39;/backupDir/control.dbf&#39;;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;NOTE: Do not run on-line backups during peak processing periods. Oracle will write complete database blocks instead of the normal deltas to redo log files while in backup mode. This will lead to excessive database archiving and even database freezes.&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-do-on-line-database.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-7034538292597037777</guid><pubDate>Thu, 26 Mar 2009 10:28:00 +0000</pubDate><atom:updated>2009-03-26T15:59:37.423+05:30</atom:updated><title>How does one do off-line database backups?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Shut down the database from sqlplus or server manager. Backup all files to secondary storage (eg. tapes). Ensure that you backup all data files, all control files and all log files. When completed, restart your database.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;Do the following queries to get a list of all files that needs to be backed up:&lt;br /&gt;&lt;br /&gt;select name from sys.v_$datafile;&lt;br /&gt;select member from sys.v_$logfile;&lt;br /&gt;select name from sys.v_$controlfile;&lt;br /&gt;&lt;br /&gt;Sometimes Oracle takes forever to shutdown with the &quot;immediate&quot; option. As workaround to this problem, shutdown using these commands:&lt;br /&gt;&lt;br /&gt;alter system checkpoint;&lt;br /&gt;shutdown abort&lt;br /&gt;startup restrict&lt;br /&gt;shutdown immediate&lt;br /&gt;&lt;br /&gt;Note that if you database is in ARCHIVELOG mode, one can still use archived log files to roll forward from an offline backup. If you cannot take your database down for a cold (off-line) backup at a convenient time, switch your database into ARCHIVELOG mode and perform hot (on-line) backups.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-do-off-line-database.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-9187083695483156259</guid><pubDate>Thu, 26 Mar 2009 10:26:00 +0000</pubDate><atom:updated>2009-03-26T15:57:33.762+05:30</atom:updated><title>Does Oracle write to data files in begin/hot backup mode?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Oracle will stop updating file headers, but will continue to write data to the database files even if a tablespace is in backup mode.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;br /&gt;In backup mode, Oracle will write out complete changed blocks to the redo log files. Normally only deltas (changes) are logged to the redo logs. This is done to enable reconstruction of a block if only half of it was backed up (split blocks). Because of this, one should notice increased log activity and archiving during on-line backups.&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/does-oracle-write-to-data-files-in.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-7847744194940558205</guid><pubDate>Thu, 26 Mar 2009 10:16:00 +0000</pubDate><atom:updated>2009-03-26T15:55:28.040+05:30</atom:updated><title>Can one restore RMAN backups without a CONTROLFILE and RECOVERY CATALOG?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Details of RMAN backups are stored in the database control files and optionally a Recovery Catalog. If both these are gone, RMAN cannot restore the database. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;In such a situation one must extract a control file (or other files) from the backup pieces written out when the last backup was taken. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Let&#39;s look at an example:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;Let&#39;s take a backup (partial in our case for ilustrative purposes):&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;$ rman target / nocatalog&lt;br /&gt;Recovery Manager: Release 10.1.0.2.0 - 64bit Production&lt;br /&gt;Copyright (c) 1995, 2004, Oracle. All rights reserved.&lt;br /&gt;connected to target database: ORCL (DBID=1046662649)&lt;br /&gt;using target database controlfile instead of recovery catalog&lt;br /&gt;&lt;br /&gt;RMAN&gt; backup datafile 1;&lt;br /&gt;Starting backup at 20-AUG-04&lt;br /&gt;allocated channel: ORA_DISK_1&lt;br /&gt;channel ORA_DISK_1: sid=146 devtype=DISK&lt;br /&gt;channel ORA_DISK_1: starting full datafile backupset&lt;br /&gt;channel ORA_DISK_1: specifying datafile(s) in backupset&lt;br /&gt;input datafile fno=00001 name=/oradata/orcl/system01.dbf&lt;br /&gt;channel ORA_DISK_1: starting piece 1 at 20-AUG-04&lt;br /&gt;channel ORA_DISK_1: finished piece 1 at 20-AUG-04&lt;br /&gt;piece handle= /flash_recovery_area/ORCL/backupset/2004_08_20/o1_mf_nnndf_TAG20040820T153256_0lczd9tf_.bkp&lt;br /&gt;comment=NONE&lt;br /&gt;channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45&lt;br /&gt;channel ORA_DISK_1: starting full datafile backupset&lt;br /&gt;channel ORA_DISK_1: specifying datafile(s) in backupset&lt;br /&gt;including current controlfile in backupset&lt;br /&gt;including current SPFILE in backupset&lt;br /&gt;channel ORA_DISK_1: starting piece 1 at 20-AUG-04&lt;br /&gt;channel ORA_DISK_1: finished piece 1 at 20-AUG-04&lt;br /&gt;piece handle=/flash_recovery_area/ORCL/backupset/2004_08_20/o1_mf_ncsnf_TAG20040820T153256_0lczfrx8_.bkp&lt;br /&gt;comment=NONE&lt;br /&gt;channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04&lt;br /&gt;Finished backup at 20-AUG-04&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Now, let&#39;s destroy one of the control files:&lt;br /&gt;&lt;/strong&gt;SQL&gt; show parameters CONTROL_FILES&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;control_files string /oradata/orcl/control01.ctl,&lt;br /&gt;/oradata/orcl/control02.ctl,&lt;br /&gt;/oradata/orcl/control03.ctl&lt;br /&gt;SQL&gt; shutdown abort;&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;SQL&gt; ! mv /oradata/orcl/control01.ctl /tmp/control01.ctl&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Now, let&#39;s see if we can restore it. First we need to start the databaase in NOMOUNT mode:&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;SQL&gt; startup NOMOUNT&lt;br /&gt;ORACLE instance started.&lt;br /&gt;Total System Global Area 289406976 bytes&lt;br /&gt;Fixed Size 1301536 bytes&lt;br /&gt;Variable Size 262677472 bytes&lt;br /&gt;Database Buffers 25165824 bytes&lt;br /&gt;Redo Buffers 262144 bytes&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Now, from SQL*Plus, run the following PL/SQL block to restore the file:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;v_devtype VARCHAR2(100);&lt;br /&gt;v_done BOOLEAN;&lt;br /&gt;v_maxPieces NUMBER;&lt;br /&gt;TYPE t_pieceName IS TABLE OF varchar2(255) INDEX BY binary_integer;&lt;br /&gt;v_pieceName t_pieceName;&lt;br /&gt;BEGIN&lt;br /&gt;-- Define the backup pieces... (names from the RMAN Log file)&lt;br /&gt;v_pieceName(1) :=&lt;br /&gt;&#39;/flash_recovery_area/ORCL/backupset/2004_08_20/o1_mf_ncsnf_TAG20040820T153256_0lczfrx8_.bkp&#39;;&lt;br /&gt;v_pieceName(2) :=&lt;br /&gt;&#39;/flash_recovery_area/ORCL/backupset/2004_08_20/o1_mf_nnndf_TAG20040820T153256_0lczd9tf_.bkp&#39;;&lt;br /&gt;v_maxPieces := 2;&lt;br /&gt;-- Allocate a channel... (Use type=&gt;null for DISK, type=&gt;&#39;sbt_tape&#39; for TAPE)&lt;br /&gt;v_devtype := DBMS_BACKUP_RESTORE.deviceAllocate(type=&gt;NULL, ident=&gt;&#39;d1&#39;);&lt;br /&gt;-- Restore the first Control File...&lt;br /&gt;DBMS_BACKUP_RESTORE.restoreSetDataFile;&lt;br /&gt;-- CFNAME mist be the exact path and filename of a controlfile taht was backed-up&lt;br /&gt;DBMS_BACKUP_RESTORE.restoreControlFileTo(cfname=&gt;&#39;/app/oracle/oradata/orcl/control01.ctl&#39;);&lt;br /&gt;dbms_output.put_line(&#39;Start restoring &#39;v_maxPieces&#39; pieces.&#39;);&lt;br /&gt;FOR i IN 1..v_maxPieces LOOP&lt;br /&gt;dbms_output.put_line(&#39;Restoring from piece &#39;v_pieceName(i));&lt;br /&gt;DBMS_BACKUP_RESTORE.restoreBackupPiece(handle=&gt;v_pieceName(i), done=&gt;v_done,&lt;br /&gt;params=&gt;null);&lt;br /&gt;exit when v_done;&lt;br /&gt;END LOOP;&lt;br /&gt;-- Deallocate the channel...&lt;br /&gt;DBMS_BACKUP_RESTORE.deviceDeAllocate(&#39;d1&#39;);&lt;br /&gt;EXCEPTION&lt;br /&gt;WHEN OTHERS THEN&lt;br /&gt;DBMS_BACKUP_RESTORE.deviceDeAllocate;&lt;br /&gt;RAISE;&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Let&#39;s see if the controlfile was restored:&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;SQL&gt; ! ls -l /oradata/orcl/control01.ctl&lt;br /&gt;-rw-r----- 1 oracle dba 3096576 Aug 20 16:45 /oradata/orcl/control01.ctl&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;We should now be able to MOUNT the database and continue recovery...&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;SQL&gt; ! cp /oradata/orcl/control01.ctl /oradata/orcl/control02.ctl&lt;br /&gt;SQL&gt; ! cp /oradata/orcl/control01.ctl /oradata/orcl/control03.ctl&lt;br /&gt;SQL&gt; alter database mount;&lt;br /&gt;SQL&gt; recover database using backup controlfile;&lt;br /&gt;ORA-00279: change 7917452 generated at 08/20/2004 16:40:59 needed for thread 1&lt;br /&gt;ORA-00289: suggestion :&lt;br /&gt;/flash_recovery_area/ORCL/archivelog/2004_08_20/o1_mf_1_671_%u_.arc&lt;br /&gt;ORA-00280: change 7917452 for thread 1 is in sequence #671&lt;br /&gt;Specify log: {&lt;ret&gt;=suggested filename AUTO CANCEL}&lt;br /&gt;/oradata/orcl/redo02.log&lt;br /&gt;Log applied.&lt;br /&gt;Media recovery complete.&lt;br /&gt;Database altered.&lt;br /&gt;SQL&gt; alter database open resetlogs;&lt;br /&gt;Database altered.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/can-one-restore-rman-backups-without.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7776443178362771894.post-7571036484030361899</guid><pubDate>Thu, 26 Mar 2009 10:12:00 +0000</pubDate><atom:updated>2009-03-26T15:46:19.035+05:30</atom:updated><title>How does one integrate RMAN with third-party Media Managers?</title><description>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;The following Media Management Software Vendors have integrated their media management software with RMAN(Oracle Recovery Manager):&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt; Veritas NetBackup - &lt;a href=&quot;http://www.veritas.com/&quot;&gt;http://www.veritas.com/&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;EMC Data Manager (EDM) - &lt;a href=&quot;http://www.emc.com/&quot;&gt;http://www.emc.com/&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;HP OMNIBack/ DataProtector - &lt;a href=&quot;http://www.hp.com/&quot;&gt;http://www.hp.com/&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;IBM&#39;s Tivoli Storage Manager (formerly ADSM) - &lt;a href=&quot;http://www.tivoli.com/storage/&quot;&gt;http://www.tivoli.com/storage/&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Legato Networker - &lt;a href=&quot;http://www.legato.com/&quot;&gt;http://www.legato.com/&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;ManageIT Backup and Recovery - &lt;a href=&quot;http://www.ca.com/manageit/&quot;&gt;http://www.ca.com/manageit/&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Sterling Software&#39;s SAMS:Alexandria (formerly from Spectralogic) - &lt;a href=&quot;http://www.sterling.com/sams/&quot;&gt;http://www.sterling.com/sams/&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;SUN&#39;s Solstice Backup - &lt;a href=&quot;http://www.sun.com/storage/software/backup.html&quot;&gt;http://www.sun.com/storage/software/backup.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;CommVault Galaxy - http://www.commvault.com/&lt;br /&gt;etc...&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;The above Media Management Vendors will provide first line technical support (and installation guides) for their respective products.&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;font-family:Trebuchet MS;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&lt;p&gt;&lt;br /&gt;A complete list of supported Media Management Vendors can be found at: &lt;a href=&quot;http://www.oracle.com/technology/deploy/availability/htdocs/bsp.htm&quot;&gt;http://www.oracle.com/technology/deploy/availability/htdocs/bsp.htm&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;When allocating channels one can specify Media Management spesific parameters. Here are some examples:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Netbackup on Solaris:&lt;br /&gt;&lt;/strong&gt;allocate channel t1 type &#39;SBT_TAPE&#39; PARMS=&#39;SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so.1&#39;;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Netbackup on Windows:&lt;/strong&gt;&lt;br /&gt;allocate channel t1 type &#39;SBT_TAPE&#39; send &quot;NB_ORA_CLIENT=client_machine_name&quot;;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Omniback DataProtector on HP-UX:&lt;br /&gt;&lt;/strong&gt;allocate channel t1 type &#39;SBT_TAPE&#39; PARMS=&#39;SBT_LIBRARY= /opt/omni/lib/libob2oracle8_64bit.sl&#39;;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Omniback DataProtector on HP-UX:&lt;/strong&gt;&lt;br /&gt;allocate channel &#39;dev_1&#39; type &#39;sbt_tape&#39;&lt;br /&gt;parms &#39;ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=orcl,OB2BARLIST=machinename_orcl_archlogs)&#39;;&lt;/span&gt;&lt;/p&gt;</description><link>http://oracle-nexus.blogspot.com/2009/03/how-does-one-integrate-rman-with-third.html</link><author>noreply@blogger.com (Nexus)</author><thr:total>0</thr:total></item></channel></rss>