<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Pankaj Chandiramani&apos;s Blog</title>
      <link>http://blogs.oracle.com/pankaj/</link>
      <description>Application Dba</description>
      <language>en-US</language>
      <copyright>Copyright 2008</copyright>
      <lastBuildDate>Wed, 23 Jul 2008 03:44:30 -0800</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

            <item>
         <title>How to get mail working with Apex packed with 11g ..</title>
         <description><![CDATA[<p>Hi , Recently i installed 11g db on one of my systems ,as it comes with APEX i thought to move my apex app(which were in 10g) to the same .........when i moved my apps , i got everything working but mail .......it gave error :ORA-24247: network access denied by access control list (ACL)</p>

<p>The issue is with ACL as by default, the ability to interact with network services is disabled in Oracle Database 11g. To enable i needed to run a procedure as shown below .</p>

<p>DECLARE<br />
  ACL_PATH  VARCHAR2(4000);<br />
  ACL_ID    RAW(16);<br />
BEGIN<br />
  -- Look for the ACL currently assigned to '*' and give FLOWS_030000<br />
  -- the "connect" privilege if FLOWS_030000 does not have the privilege yet.</p>

<p>  SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS<br />
   WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;</p>

<p>  -- Before checking the privilege, make sure that the ACL is valid<br />
  -- (for example, does not contain stale references to dropped users).<br />
  -- If it does, the following exception will be raised:<br />
  --<br />
  -- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030000'<br />
  -- ORA-06512: at "XDB.DBMS_XDBZ", line ...<br />
  --<br />
  SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID<br />
    FROM XDB.XDB$ACL A, PATH_VIEW P<br />
   WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND<br />
         EQUALS_PATH(P.RES, ACL_PATH) = 1;</p>

<p>  DBMS_XDBZ.ValidateACL(ACL_ID);<br />
   IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030000', <br />
     'connect') IS NULL THEN <br />
      DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH, <br />
     'FLOWS_030000', TRUE, 'connect'); <br />
  END IF;</p>

<p>EXCEPTION<br />
  -- When no ACL has been assigned to '*'.<br />
  WHEN NO_DATA_FOUND THEN<br />
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',<br />
    'ACL that lets power users to connect to everywhere',<br />
    'FLOWS_030000', TRUE, 'connect');<br />
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');<br />
END;<br />
/<br />
COMMIT;</p>

<p>Finally got it working :)</p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2008/07/how_to_get_mail_working_with_a.html</link>
         <guid>http://blogs.oracle.com/pankaj/2008/07/how_to_get_mail_working_with_a.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Oracle DB - General</category>
        
        
         <pubDate>Wed, 23 Jul 2008 03:44:30 -0800</pubDate>
      </item>
            <item>
         <title><![CDATA[&quot;Demo It To Oracle&quot; (DITO) - CamStudio Help]]></title>
         <description><![CDATA[<p>Now you can record &amp; share the issues you are facing to Oracle Support .<br><br>https://metalink.oracle.com/metalink/plsql/f?p=130:14:7679480494464650902::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,11.1,1,1,0,helvetica<br><br>Its a nice way to share the error &amp; show the support guys on how that error occurred &amp; faster reproducibility.<br></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2008/05/demo_it_to_oracle_dito_camstud.html</link>
         <guid>http://blogs.oracle.com/pankaj/2008/05/demo_it_to_oracle_dito_camstud.html</guid>
        
        
         <pubDate>Mon, 26 May 2008 03:03:54 -0800</pubDate>
      </item>
            <item>
         <title>upcoming posts</title>
         <description><![CDATA[<p>Been long time since i posted something&nbsp; the reason being have started in new directions&nbsp; ......working with OIM , OID &amp; stuff these days . <br><br>So will be writing a post to install/config OIM in next couple of days &amp; will keep on posting regularly on the topic.<br><br><br><br>&nbsp;<br></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2008/05/upcoming_posts.html</link>
         <guid>http://blogs.oracle.com/pankaj/2008/05/upcoming_posts.html</guid>
        
        
         <pubDate>Fri, 23 May 2008 01:37:03 -0800</pubDate>
      </item>
            <item>
         <title>Applying CPU Patch on RAC using EM -A White paper</title>
         <description><![CDATA[<p>I wrote this paper to describes the process &amp; benefits of applying patches using the EM. <br><span style="font-weight: bold;">Case :</span> RAC - 3 node 10.2.0.3<br><span style="font-weight: bold;">Patch :</span> CPU July 2007<br><span style="font-weight: bold;">Method :</span> Rolling patch , zero downtime , using Deployment procedures in EM.<br><br>You can access the paper here on <a href="http://www.oracle.com/technology/products/oem/pdf/saving%20time%20and%20labor%20on%20oracle%20patching%20with%20em%20provisioning%20pack%20-%20a%20case%20study%20with%20oracle%20internal%20it.pdf">OTN.</a><br>or by copying the below url : <br>http://www.oracle.com/technology/products/oem/pdf/saving%20time%20and%20labor%20on%20oracle%20patching%20with%20em%20provisioning%20pack%20-%20a%20case%20study%20with%20oracle%20internal%20it.pdf<br><br>Other interesting white papers on EM are also listed <a href="http://www.oracle.com/technology/products/oem/mgmt_solutions/provisioning.html">here .</a><br><br></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2008/02/applying_cpu_patch_on_rac_usin.html</link>
         <guid>http://blogs.oracle.com/pankaj/2008/02/applying_cpu_patch_on_rac_usin.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Oracle DB - General</category>
        
        
         <pubDate>Thu, 28 Feb 2008 05:59:15 -0800</pubDate>
      </item>
            <item>
         <title>Configure SSO(single sign-on) with Apex</title>
         <description><![CDATA[<p>I am loving the experience with Apex , we plan to have couple of new application using APEX , for that i neeed to configure SSO with apex .<br><br>It can be done in 3 steps :<br><ol><li>Creating partner app</li><li>Installing sdk (You need to get sso sdk from midtier)<br></li><li>Configuring apex for sso(You need to login a zip file from <a href="http://www.oracle.com/technology/products/database/application_express/code/wwv_flow_custom_auth_sso.zip">here</a>)</li></ol><span style="font-weight: bold;">For step 1 </span>, you need below : <br><span style="font-style: italic;">HOME URL : http: // apex_server_name/pls/apex</span><br style="font-style: italic;"><span style="font-style: italic;">Success URL : http: // apex_server_name/pls/apex/wwv_flow_custom_auth_sso.process_success</span><br style="font-style: italic;"><span style="font-style: italic;">Log Out URL : http: // apex_server_name/pls/apex/apex</span><br><br><span style="font-style: italic;">Note : not covering the actual creation process , pls look at "Creating Partner App in AS admin guide"</span><br style="font-style: italic;"><br><span style="font-weight: bold;">For Step 2:</span><br>First unlock the flows schema according to the apex version you have .<br><strong>SQL&gt; alter user flows_030100 account unlock; </strong>(If your Apex version is 2.0.0.0.0 change acccordingly)<br><br>Now you need to copy sso sdk from the midtier , Login to Middle tier $ORACLE_HOME/sso/lib<br>copy ssosdk902.zip , unzip it . It creates some sql scripts &amp; packages .<br><br>Login to db as <strong>user flows_030100 &amp; run </strong><strong>loadsdk.sql<br></strong><strong>SQL&gt;@loadsdk.sql</strong> (Make sure you are executing under flows_XXXX) <br><br>Above will load the sso schema into flows account.<br><br><span style="font-weight: bold;">For Step 3:<br></span>Now we need to wire sso &amp; apex schema(flows_xx)<br><br><span style="font-weight: bold;">SQL&gt; @regapp.sql</span><br>It will prompt you for<br>Enter value for listener_token: HTML_DB:Hostname:7777 <br>Enter value for site_id: enter_value_returned_while_registering_sso<br>Enter value for site_token: enter_value_returned_while_registering_sso<br>Enter value for login_url: http: // apex_url_here/pls/orasso/orasso.wwsso_app_admin.ls_login<br>Enter value for encryption_key: enter_value_returned_while_registering_sso<br>Enter value for ip_check: N<br><br><span style="font-weight: bold;">These above value you will get from Registring as partner app in step 1</span><br><br>Now configure authentication packages under flows_XXX schema<br>You need to login a zip file from <a href="http://www.oracle.com/technology/products/database/application_express/code/wwv_flow_custom_auth_sso.zip">here</a>: <br>Unzip &amp; get 2 files , execute as below<br><br>SQL&gt; @custom_auth_sso.sql<br>SQL&gt; @custom_auth_sso.plb<br><br>Finally you should lock flows_XXXX schema &amp; grant execute permission to public user<br>SQL&gt; alter user flows_020200 account unlock;<br>SQL&gt; grant execute on wwv_flow_custom_auth_sso to APEX_PUBLIC_USER;<br><br>All set , once you use the authentication schema as sso , you can see the login page .<br><br><span style="font-weight: bold;"></span></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/08/configure_ssosingle_signon_wit.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/08/configure_ssosingle_signon_wit.html</guid>
        
        
         <pubDate>Fri, 31 Aug 2007 06:25:44 -0800</pubDate>
      </item>
            <item>
         <title>Installing Apex 3.0.1</title>
         <description><![CDATA[<p>I have been using Apex extensively now , have created 3-4 application for production usage & i can finally say that its easy to use for us non developers also ;)<br><br>I will be covering the installation of Apex 3.0.1 in this post & will cover the SSO part in next .<br><br><span style="font-weight: bold;">Software Req:<br></span><ol><li>Download Apex 3.0.1 from <a href="http://www.oracle.com/technology/products/database/application_express/download.html">here</a> <br></li><li>10g Db <br></li><li>Http server</li></ol>In short , the process of Installing & configuring apex goes like this :<br>Install 10g Db --> Install Http server (i used 10g AS) -->Install Apex <br><br><span style="font-weight: bold;">Starting the Apex Installation</span><br>I assume you have 10g Db installed , else read <a href="http://blogs.oracle.com/pankaj/newsItems/viewFullItem$58">this post</a> for details .<br><br>You need to create 2 table space , i created&nbsp; <span style="font-weight: bold;">apex1 & apex2</span> to seed the apex data :<br><br><span style="font-style: italic;">create tablespace apex1 datafile '/apexdb/apex1.dbf' size 50M autoextend on next 10M maxsize 300M;</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">create tablespace apex2 datafile '/apexdb/apex2.dbf' size 50M autoextend on next 10M maxsize 300M;</span><br style="font-style: italic;"><br>Now we will seed the db with Apex configs .<br>Download Apex 3.0.1 from <a href="http://www.oracle.com/technology/products/database/application_express/download.html">here</a> & unzip it .<br><br>This will craete a subdirectory with name apex , cd into it & start sqlplus as sysdba & run apexins.sql as shown below. <strong><em><br>cd apex</em></strong><br><em><strong>sqlplus </strong></em><a href="mailto:system@tns_alias"><em><strong>system@tns_alias</strong></em></a><em><strong> as sysdba </strong><strong></strong></em><br><strong>@apexins.sql &#123;pass&#125; &#123;ts for user&#125; &#123;ts for files&#125; &#123;ts for temp&#125; /i/ </strong><br><br>Where<br><p><strong>pass</strong> - Password for Apex Super User<br><strong>ts for user</strong> - Tablespace for User data (Created above)<br><strong>ts for files</strong> - Tablespace for Apex files (Created above)<br><strong>ts for temp</strong> - temporary tablespace (Usually Temp)<br><strong>i</strong> - is the alias for image directory configuration in Application Server (Apache httpd.conf)<strong></strong></p><p><strong>According to our config above , i used : <br></strong></p><p><strong><span style="font-style: italic; font-weight: normal;">Sqlplus > @apexins.sql welcome apex1 apex2 temp /i/</span><br></strong> </p>It Takes ard 1 hr to get the seed data .<br><br>After this is complete , we go to the HTTP server location to configure Apex with it . AS we have the Oracle 10g AS installed we go to $ORACLE_HOME/Apache/modplsql/conf directory .<br><br>There in <span style="font-weight: bold;">dads.conf</span> we add the below lines : <br><br>#######<br>Alias /i/ "/apex/images/"&nbsp; (replace with your image location)<br><br>AddType text/xml xbl<br>AddType text/x-component htc<br>&amp;lt;Location /pls/apex><br>Order deny,allow<br>PlsqlDocumentPath docs<br>AllowOverride None<br>PlsqlDocumentProcedure wwv_flow_file_mgr.process_download<br><span style="font-style: italic;">PlsqlDatabaseConnectString host:port:service_name ServiceNameFormat </span><br>PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8<br>PlsqlAuthenticationMode Basic<br>SetHandler pls_handler<br>PlsqlDocumentTablename wwv_flow_file_objects$<br>PlsqlDatabaseUsername APEX_PUBLIC_USER<br>PlsqlDefaultPage apex<br><span style="font-style: italic;">PlsqlDatabasePassword apex_public_user_password</span><br>Allow from all<br>&amp;lt;/Location><br>###################<br><br>For above replace according to your server & install locations , we did below : <br>PlsqlDatabaseConnectString xyz.com:1521:apexdb apexdb<br><br><span style="font-weight: bold;">Post Install</span><br>After this you need to restart the Appache server as shown below :<br><strong></strong><br>dcmctl updateconfig -ct ohs<br>opmnctl restartproc ias-component=HTTP_Server (Restart HTTP Server to check it)<br>ou are all set to use the Apex , try <em><a href="http://hostname.domainname:port/pls/apex"><em>http://hostname.domainname:port/pls/apex</em></a><br><br></em><em>I will be writing on how to configure sso in next post <br></em><br></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/08/installing_apex_301.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/08/installing_apex_301.html</guid>
        
        
         <pubDate>Tue, 21 Aug 2007 01:33:48 -0800</pubDate>
      </item>
            <item>
         <title>11g , get -set - go !!!!</title>
         <description><![CDATA[<p>11g for linux is available for download @OTN <a href="http://www.oracle.com/technology/software/products/database/index.html">from here.</a><br>Read all abt the new features for HA , Db Replay&nbsp;&nbsp; etc from <a href="http://www.oracle.com/technology/products/database/oracle11g/index.html">http://www.oracle.com/technology/products/database/oracle11g/index.html</a><br><br><br></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/08/11g_get_set_go.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/08/11g_get_set_go.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Oracle DB - General</category>
        
        
         <pubDate>Fri, 10 Aug 2007 06:55:15 -0800</pubDate>
      </item>
            <item>
         <title>11g whitepapers @ OTN</title>
         <description><![CDATA[<p>I have seen couple of good technical whitepapers at otn , below is the link to the same .<br>These cover the complete series for new features , security , HA etc <br><br><a href="http://www.oracle.com/technology/products/database/oracle11g/index.html">http://www.oracle.com/technology/products/database/oracle11g/index.html</a></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/07/11g_whitepapers_otn.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/07/11g_whitepapers_otn.html</guid>
        
        
         <pubDate>Mon, 23 Jul 2007 07:09:34 -0800</pubDate>
      </item>
            <item>
         <title>Backing Up and Recovering Voting Disks</title>
         <description><![CDATA[<p><span style="font-weight: bold;">Backing Up and Recovering Voting Disks<br><br>What is a voting disk &amp; why its needed ?<br></span>The voting disk records node membership information. A node must be<br />
able to access more than half of the voting disks at any time. <br><br>For example, if you have seven voting disks configured, then a node must<br />
be able to access at least four of the voting disks at any time. If a<br />
node cannot access the minimum required number of voting disks it is <span class="italic">evicted</span>, or removed, from the cluster.<br><br><span style="font-weight: bold;">Backing Up Voting Disks</span><br><br>When to backup voting disk ?<br><br><ol><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; After installation</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; After adding nodes to or deleting nodes from the cluster</li><li>&nbsp;&nbsp;&nbsp; &nbsp; After performing voting disk add or delete operations</li></ol><br>To make a backup copy of the voting disk, use the Linux dd command. Perform this operation on every voting disk as needed where voting_disk_name is the name of the active voting disk and backup_file_name is the name of the file to which you want to back up the voting disk contents:<br><span style="font-weight: bold; font-style: italic;">dd if=voting_disk_name of=backup_file_name</span><br><br>If your voting disk is stored on a raw device, use the device name in place of voting_disk_name. For example:<br><span style="font-weight: bold; font-style: italic;">dd if=/dev/sdd1 of=/tmp/voting.dmp</span><br><br>Note : When you use the dd command for making backups of the voting disk, the backup can be performed while the Cluster Ready Services (CRS) process is active; you do not need to stop the crsd.bin process before taking a backup of the voting disk.<br><br><span style="font-weight: bold;">Recovering Voting Disks</span><br><br>If a voting disk is damaged, and no longer usable by Oracle Clusterware, you can recover the voting disk if you have a backup file. <br><br><span style="font-weight: bold; font-style: italic;">dd if=backup_file_name of=voting_disk_name</span><br style="font-weight: bold; font-style: italic;"><br></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/07/backing_up_and_recovering_voti.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/07/backing_up_and_recovering_voti.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">ASM</category>
                  <category domain="http://www.sixapart.com/ns/types#category">Backup &amp; recovery</category>
                  <category domain="http://www.sixapart.com/ns/types#category">Oracle DB - General</category>
        
        
         <pubDate>Wed, 11 Jul 2007 02:31:35 -0800</pubDate>
      </item>
            <item>
         <title>Administring OCR</title>
         <description><![CDATA[<p><span style="font-weight: bold;">Administring OCR </span><br>We will see how OCR(Oracle cluster Registry) backup &amp; recovery is done .<br><br><span style="font-weight: bold;">Backup </span><br>Oracle clusterware automatically creastes a OCR backup every 4 hrs &amp; retains the last 3 backups . Actually the CRSD process creates &amp; manages the backup for each full day &amp; a weekly backup at nd of the week .<br>Default backup Location : <span style="font-style: italic;">$CRS_HOME/cdata/$clustername</span><br><br>Other than the automated backup , you can export the content any time you want to a file .<br>eg : <span style="font-style: italic;">$ ocrconfig -export emergency_export.ocr</span><br><br>You can see the list of ocrbackup by using : <br><span style="font-style: italic;">$ ocrconfig -showbackup</span><br><br>As the backup directory is default , you can change the dir by using below command <br><span style="font-style: italic;">$&nbsp; ocrconfig -backuploc &amp;lt;directory&gt;</span><br><br><span style="font-weight: bold;">Restore</span><br>OCR can be restored (if you have a backup ) be below command<br><br><span style="font-weight: bold;">NOTE:</span> Should you need to restore, make sure all CRS daemons on all nodes are stopped. <br><br>To perform a restore, execute the command:<br><br><span style="font-style: italic;">$ cd CRS_Home/cdata/crscluster</span><br style="font-style: italic;"><span style="font-style: italic;">$ ocrconfig -restore&nbsp; week.ocr</span><br><br>If you had exported using the above command &amp; want to resore , then you can use import <br><span style="font-weight: bold;">IMPORTANT</span>: Importing a backup when CRS daemons are running will only corrupt OCR. &nbsp;<br><br><span style="font-style: italic;">$ ocrconfig -import emergency_export.ocr</span><br><br>If anything is wrong than you can use the OCRDUMP comand to dump all info to a file &amp; check <br><span style="font-style: italic;">$ ocrdump OCR_DUMP<br><br></span>Also you can use : <br><pre style="font-style: italic;" xml:space="preserve" class="oac_no_warn">$ ocrcheck <br>to check for the stats of OCR <br></pre></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/07/administring_ocr.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/07/administring_ocr.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">ASM</category>
                  <category domain="http://www.sixapart.com/ns/types#category">Oracle DB - General</category>
        
        
         <pubDate>Tue, 10 Jul 2007 01:52:01 -0800</pubDate>
      </item>
            <item>
         <title>Get Ready for Oracle Database 11g -July 11th 2007</title>
         <description><![CDATA[<p>The Countdown Has Begun to July 11, 2007, when 11g DB will be here :)<BR>Its much awaited release as it has some new <SPAN class=artText>feature improvements in high availability, performance, scalability, manageability and diagnosability.<BR></SPAN><BR><SPAN class=artText>http://www.oracle.com/webapps/events/EventsDetail.jsp?p_eventId=66665<BR><BR></SPAN><BR></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/06/get_ready_for_oracle_database.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/06/get_ready_for_oracle_database.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Oracle DB - General</category>
        
        
         <pubDate>Tue, 19 Jun 2007 02:21:45 -0800</pubDate>
      </item>
            <item>
         <title>Recovery Scenarios Part-2</title>
         <description><![CDATA[<p><span style="font-weight: bold;">Part 2 for the recovery scenarios <br><br></span><span style="font-weight: bold;">B) Lost control File or Media Failure: </span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Disk lost with all the files w/o SYSTEM tablespace)<br><br>SVRMGRL&gt; shutdown abort;<br>SVRMGRL&gt; STARTUP NOMOUNT;<br><br>RMAN&gt; <br>run {<br>allocate channel c1 type disk; <br>restore controlfile to '/usr1/ora817/test/dbs/control01.ctl'; <br>replicate controlfile from '/usr1/ora817/test/dbs/control01.ctl'; <br>restore database; <br>sql "alter database mount"; <br>recover database; <br>sql "alter database open resetlogs"; <br>release channel c1; <br>} <br>RMAN&gt; Reset database<br><br><span style="font-weight: bold;">(C) Table recovery: (Incomplete recovery)</span><br><br>This<br />
happens when some one drops table by mistake, and by the time he/she<br />
informs the DBA, other people are still working on the database. So the<br />
DBA has to recover the database until time when the table was dropped.<br />
That causes other people to re-work from that point onwards, and hence<br />
it is an "Incomplete recovery"<br><br>When something like this happens, try to find out the exact time of accident.<br><br>SVRMGRL&gt; shutdown immediate;<br>SVRMGRL&gt; STARTUP MOUNT;<br><br>RMAN&gt; <br>run {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>allocate channel c1 type disk;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>set until time "to_date('2004-01-16:13:17:00','YYYY-MM-DD:HH24:MI:SS')"; &nbsp;<br>restore database;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>recover database;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>sql "alter database open resetlogs";&nbsp;&nbsp;&nbsp; &nbsp;<br>} &nbsp;<br>RMAN&gt; Reset database<br>&nbsp; <br>&nbsp;<br><br><span style="font-weight: bold;">(D) If both the ACTIVE redolog files are gone:</span><br><br>SVRMGRL&gt; startup nomount;<br><br>RMAN&gt;<br>run {<br>allocate channel c1 type disk; <br>set until logseq=7 thread=1;<br>restore controlfile to '/usr1/ora817/test/dbs/control01.ctl'; <br>replicate controlfile from '/usr1/ora817/test/dbs/control01.ctl'; <br>restore database; <br>sql "alter database mount"; <br>recover database; <br>sql "alter database open resetlogs"; <br>release channel c1; <br>}<br><br>If for some reason this attempt fails,<br><br>SVRMGRL&gt; alter database mount;&nbsp; (equivalent of startup mount;)<br>SVRMGRL&gt; alter database drop logfile group 2;&nbsp; (optional) <br>SVRMGRL&gt; recover database using backup controlfile until cancel; &nbsp;<br><br>(Recover to the point till you have good archivelogs, and then Type CANCEL at the prompt)<br>&nbsp;<br>SVRMGRL&gt; alter database open resetlogs;<br><br>RMAN&gt; Reset database<br><br>Run the following script to find out the status of backup process:<br><br>alter session set NLS_DATE_FORMAT = 'MM/DD/YY (HH:MIAM)';<br><br>col start_time format a20 heading "Backup of this|Database started at"<br>col a format 999.99 heading "% Complete|so far"<br>col b format a20 heading "Time taken so far|for this backup"<br><br>select start_time,round(sofar/totalwork*100,2) a ,<br>mod(floor((sysdate-start_time)*24),24)||'<br />
Hrs and<br />
'||floor(((mod(round((sysdate-start_time)*24,2),24))-(mod(floor((sysdate-start_time)*24),24)))*60)||'<br />
Mins' as b<br>from v$session_longops<br>&nbsp;where substr(opname,1,4)='RMAN'<br>&nbsp;and (round(sofar/totalwork*100,2))&amp;lt;100<br>&nbsp;and (round(sofar/totalwork*100,2))&gt;0<br>&nbsp;and totalwork !=0;<br>-- -----------------------------------------</p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/06/recovery_scenarios_part2.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/06/recovery_scenarios_part2.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Backup &amp; recovery</category>
        
        
         <pubDate>Mon, 11 Jun 2007 01:42:45 -0800</pubDate>
      </item>
            <item>
         <title>Recovery Scenarios Part -1</title>
         <description><![CDATA[<p>I am covering some of the basic recovery recovery scenarios via RMAN in below , this will be a 2 part series&nbsp; :<br><br><span style="font-weight: bold;">Part 1:Database open, datafile deleted</span><br><span style="font-weight: bold;">Recovery Scenarios:</span><br style="font-weight: bold;"><br>Note: If the database is opened with resetlogs, it is necessary to register the new incarnation of the database in the Recovery Catalog with the RESET DATABASE command.<br><br><span style="font-weight: bold;">(A) Database open, datafile deleted:</span><br><br><span style="font-weight: bold;">(a) Datafile recovery:</span><br><br>Find the datafile # and tablespace name by querying v$datafile table.<br><br>RMAN&gt;<br>run { <br>allocate channel dev1 type disk; <br>sql "alter tablespace users offline immediate"; <br>restore datafile 4; <br>recover datafile 4; <br>sql "alter tablespace users online"; <br>release channel dev1; <br>}<br><br>&nbsp;<span style="font-weight: bold;">(b) Tablespace recovery:</span><br><br>RMAN&gt;<br>run {<br>allocate channel dev1 type disk; <br>sql "alter tablespace users offline immediate"; <br>restore tablespace users; <br>recover tablespace users; <br>sql "alter tablespace users online"; <br>release channel dev1; <br>} <br><span style="font-weight: bold;">(c) SYSTEM Tablespace recovery:<br><br></span>Note: If it is the system tablespace datafiles to be restored, the database must be closed. It is not possible to offline the system tablespace. <br>SVRMGRL&gt; shutdown immediate;<br>SVRMGRL&gt; STARTUP MOUNT;<br><br>RMAN&gt;<br>run {<br>allocate channel c1 type disk; <br>restore tablespace SYSTEM;<br>recover database;<br>sql "alter database open resetlogs";<br>release channel c1; <br>}<br>RMAN&gt; Reset database; <br>(This command NOT allowed if you are NOT using Recovery Catalog)<br><br>Will post some more .............stay tunned ........<br></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/05/recovery_scenarios_part_1.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/05/recovery_scenarios_part_1.html</guid>
        
        
         <pubDate>Fri, 18 May 2007 04:07:10 -0800</pubDate>
      </item>
            <item>
         <title>Rman Backup scripts</title>
         <description><![CDATA[<p><span style="font-weight: bold;">Backup a complete database: </span><br><br />
(If the target database is in archive mode, this can be done while the database is open)<br><br />
<br><br />
<br><span style="font-style: italic;"><br />
RMAN&gt; </span><br><br />
run {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
# backup complete database to disk&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
allocate channel c1 type disk;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
backup full&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
tag full_db&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
format '/usr1/ora817/test/rman/db_d.dmp'<br><br />
(database);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
release channel c1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
<br><br />
You can create a script and use it multiple times, so each time you<br />
don't need to type the above script. Just make sure to drop the old<br />
backup files.<br><br />
<br><br />
RMAN&gt; <br><br />
create script full_db_backup {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
allocate channel c1 type disk;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
backup full database&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
format '/usr1/ora817/test/rman/db_%d.dmp';<br><br />
release channel c1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
<br><br />
<span style="font-weight: bold;">This is how you run the script:</span><br><br />
<br><br />
RMAN&gt; <br><br />
run { execute script full_backup ;}&nbsp;&nbsp; &nbsp;<br><br />
<br><br />
<br><br />
<span style="font-weight: bold;">Archive logs too can be backed up along with the database in one script:</span><br><br />
<br><br />
RMAN&gt; <br><br />
create script full_db_arc_backup {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
allocate channel c1 type disk;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
backup full database&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
format '/usr1/ora817/test/rman/db_%d.dmp';&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
release channel c1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
allocate channel c2 type disk format '/usr1/ora817/test/rman/arc_%d.dmp'; <br><br />
backup (archivelog all delete input);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
release channel c2;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br />
<br><br />
- '%d' puts database name in the backup file name.<br><br />
- 'all delete input' in above script deletes all the archive logs once the backup is&nbsp; &nbsp;<br><br />
&nbsp;&nbsp; complete, thus frees up the space.<br><br />
<br><br />
RMAN&gt; <br><br />
run { execute script full_db_arc_backup ;}&nbsp;&nbsp; &nbsp;<br><br />
<br></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/05/rman_backup_scripts.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/05/rman_backup_scripts.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Backup &amp; recovery</category>
        
        
         <pubDate>Fri, 18 May 2007 02:23:32 -0800</pubDate>
      </item>
            <item>
         <title>Simulating ASM Disks</title>
         <description><![CDATA[<p>Most of the Oracle 10g databases are using ASM for storage as its very&nbsp; simple to maintain the&nbsp; storage&nbsp;  wrt to Disks , Datafiles etc <br><br>You can get most of the ASM details &amp; implementation details from OTN here : <a href="http://www.oracle.com/technology/asm/index.html">http://www.oracle.com/technology/asm/index.html</a><br><br>When i started to learn ASM , the real difficult part was to get a test hardware to play with , i looked are to find ways to simulate the asm env &amp; have documented the procedure as below : <br><p class="MsoNormal"><span style="background: red none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">Caution: This<br />
method is for Testing &amp; Learning purposes only.</span> </p><h1><font size="3">Simulating Asm by faking hardware</font> </h1>--&gt;Faking Hardware<br>--&gt;Instaling ASM Lib<br>--&gt;Configuring the disks<br>--&gt;Install DB &amp; ASM instance <br><br><span style="font-weight: bold; background-color: rgb(255, 255, 153);">Faking Hardware:</span><br style="font-weight: bold; background-color: rgb(255, 255, 153);"><br>Step 1) Here we create 4 zero-filed files using the DD comand<br><br>As Root run the following commands, this will create 4 files of 2Gb each <br><br>mkdir /asmdisk<br>dd if=/dev/zero of=/asmdisk/disk1 bs=1024k count=2000<br>dd if=/dev/zero of=/asmdisk/disk2 bs=1024k count=2000<br>dd if=/dev/zero of=/asmdisk/disk3 bs=1024k count=2000<br>dd if=/dev/zero of=/asmdisk/disk4 bs=1024k count=2000<br><br>Step 2) Use the loopback device to assign these disks<br><br>/sbin/losetup /dev/loop1 /asmdisk/disk1<br>/sbin/losetup /dev/loop2 /asmdisk/disk2<br>/sbin/losetup /dev/loop3 /asmdisk/disk3<br>/sbin/losetup /dev/loop4 /asmdisk/disk4<br><br>Now we need to configure entries to the file "/etc/rc.local" so that these divices are reinitialised on reboot also.<br><br>Add the following entries to the file "/etc/rc.local"<br>/sbin/losetup /dev/loop1 /asmdisk/disk1<br>/sbin/losetup /dev/loop2 /asmdisk/disk2<br>/sbin/losetup /dev/loop3 /asmdisk/disk3<br>/sbin/losetup /dev/loop4 /asmdisk/disk4<br>/etc/init.d/oracleasm createdisk ASM1 /dev/loop1<br>/etc/init.d/oracleasm createdisk ASM2 /dev/loop2<br>/etc/init.d/oracleasm createdisk ASM3 /dev/loop3<br>/etc/init.d/oracleasm createdisk ASM4 /dev/loop4<br><br><span style="font-weight: bold; background-color: rgb(255, 255, 153);">Instaling ASM Lib<br><br></span>ASMLib is a support library for the Automatic Storage Management feature of Oracle Database 10g. ASMLib allows an Oracle Database using ASM more efficient and capable access to the disk groups it is using. ASMlib are provided by Oracle from below link : <a href="http://www.oracle.com/technology/tech/linux/asmlib/index.html">http://www.oracle.com/technology/tech/linux/asmlib/index.html</a><br><br>Pls download the Lib files accoring to your OS &amp; kernel version.<br><br>[root@csstage root]# uname -r<br>2.4.21-27.EL<br><br>It gives 3 rpms for download as per the version , pls install then using below command<br><br>[root@csstage asm]# rpm -ivh *.rpm<br><br>After this completes we go to next step of configuring the disks.<br><br>Configuring the ASM Lib &amp; disks<br>Now we need to use the ASM Lib , configure it &amp; configure the disks accordingly <br><br><br>[root@csstage root]# /etc/init.d/oracleasm configure <br><br><br><span style="background-color: rgb(255, 255, 153); font-weight: bold;">Configuring the Oracle ASM library driver.</span><br><br>This will configure the on-boot properties of the Oracle ASM library<br>driver.&nbsp; The following questions will determine whether the driver is<br>loaded on boot and what permissions it will have.&nbsp; The current values<br>will be shown in brackets ('[]').&nbsp; Hitting &amp;lt;ENTER&gt; without typing an<br>answer will keep that current value.&nbsp; Ctrl-C will abort.<br><br><br>Default user to own the driver interface []: oracle<br>Default group to own the driver interface []: oinstall<br>Start Oracle ASM library driver on boot (y/n) [n]: y<br>Fix permissions of Oracle ASM disks on boot (y/n) [y]: y<br>Writing Oracle ASM library driver configuration:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp; OK&nbsp; ]<br>Creating /dev/oracleasm mount point:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp; OK&nbsp; ]<br>Loading module "oracleasm":&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp; OK&nbsp; ]<br>Mounting ASMlib driver filesystem:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp; OK&nbsp; ]<br>Scanning system for ASM disks:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp; OK&nbsp; ]<br><br>Now as the ASM Lib are configured, we will configure the disks <br>[root@csstage root]# /etc/init.d/oracleasm createdisk ASM1 /dev/loop1<br>Marking disk "/dev/loop1" as an ASM disk:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp; OK&nbsp; ]<br><br>[root@csstage root]# /etc/init.d/oracleasm createdisk ASM2 /dev/loop2<br>Marking disk "/dev/loop2" as an ASM disk:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp; OK&nbsp; ]<br><br>[root@csstage root]# /etc/init.d/oracleasm createdisk ASM3 /dev/loop3<br>Marking disk "/dev/loop3" as an ASM disk:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp; OK&nbsp; ]<br><br>[root@csstage root]# /etc/init.d/oracleasm createdisk ASM4 /dev/loop4<br>Marking disk "/dev/loop4" as an ASM disk:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp; OK&nbsp; ]<br><br>So now our hardware is all set to go &amp; we need to install 10g database on the server using the above disks.<br><br><span style="font-weight: bold; background-color: rgb(255, 255, 153);">Install DB &amp; ASM instance </span><br><br>Now we install the Database with ASM option <br>Create the ASM Instance<br>ASM runs as a separate Oracle instance, which can be created and configured using OUI.&nbsp; Now that ASMLib is installed and the disks are marked for use, you can create an ASM instance. <br>Log in as oracle and start runInstaller: <br>$ ./runInstaller<br>1.&nbsp;&nbsp;&nbsp; Select Installation Method<br><ul><li>&nbsp;&nbsp;&nbsp; Select Advanced Installation</li><li>&nbsp;&nbsp;&nbsp; Click on Next</li></ul>2.&nbsp;&nbsp;&nbsp; Specify Inventory Directory and Credentials <br><ul><li>&nbsp;&nbsp;&nbsp; Inventory Directory: /u01/app/oracle/oraInventory</li><li>&nbsp;&nbsp;&nbsp; Operating System group name:&nbsp; oinstall</li><li>&nbsp;&nbsp;&nbsp; Click on Next</li></ul>3.&nbsp;&nbsp;&nbsp; Select Installation Type<br><ul><li>&nbsp;&nbsp;&nbsp; Select Enterprise Edition</li><li>&nbsp;&nbsp;&nbsp; Click on Next</li></ul>4.&nbsp;&nbsp;&nbsp; Specify Home Details<br><ul><li>&nbsp;&nbsp;&nbsp; Name:&nbsp;&nbsp; Ora10gAsm</li><li>&nbsp;&nbsp;&nbsp; Path:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /u01/app/oracle/product/10.2.0/asm</li></ul>Note:Oracle recommends using a different ORACLE_HOME for ASM than the ORACLE_HOME used for the database for ease of administration.<br><ul><li>&nbsp;&nbsp;&nbsp; Click on Next</li></ul>5.&nbsp;&nbsp;&nbsp; Product-specific Prerequisite Checks <br>&nbsp;&nbsp;&nbsp; If you've been following the steps in this guide, all the checks should&nbsp;&nbsp; pass without difficulty. If one or more checks fail, correct the problem before proceeding. <br><ul><li>&nbsp;&nbsp;&nbsp; Click on Next</li></ul>6.&nbsp;&nbsp;&nbsp; Select Configuration Option<br><ul><li>&nbsp;&nbsp;&nbsp; Select Configure Automatic Storage Management (ASM)</li><li>&nbsp;&nbsp;&nbsp; Enter the ASM SYS password and confirm</li><li>&nbsp;&nbsp;&nbsp; Click on Next</li></ul>7.&nbsp;&nbsp;&nbsp; Configure Automatic Storage Management<br><ul><li>&nbsp;&nbsp;&nbsp; Disk Group Name:&nbsp; DATA</li><li>&nbsp;&nbsp;&nbsp; Redundancy</li></ul>- High mirrors data twice.<br>- Normal mirrors data once.&nbsp; This is the default.<br>- External does not mirror data within ASM. This is typically used if an external RAID array is providing redundancy.<br><ul><li>&nbsp;&nbsp;&nbsp; Add Disks</li></ul>The disks you configured for use with ASMLib are listed as Candidate Disks.&nbsp; Select each disk you wish to include in the disk group.<br><ul><li>&nbsp;&nbsp;&nbsp; Click on Next</li></ul>8.&nbsp;&nbsp;&nbsp; Summary <br><ul><li>&nbsp;&nbsp;&nbsp; A summary of the products being installed is presented.</li></ul><ul><li>&nbsp;&nbsp;&nbsp; Click on Install.</li></ul>9.&nbsp;&nbsp;&nbsp; Execute Configuration Scripts<br><ul><li>&nbsp;&nbsp;&nbsp; At the end of the installation, a pop up window will appear indicating scripts that need to be run as root.&nbsp; Login as root and run the indicated scripts.</li></ul><ul><li>&nbsp;&nbsp;&nbsp; Click on OK when finished.</li></ul>10.&nbsp;&nbsp;&nbsp; Configuration Assistants<br><ul><li>&nbsp;&nbsp;&nbsp; The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically</li></ul>11.&nbsp;&nbsp;&nbsp; End of Installation <br><ul><li>&nbsp;&nbsp;&nbsp; Make note of the URLs presented in the summary, and click on Exit when ready.</li></ul>12.&nbsp;&nbsp;&nbsp; Congratulations! Your new Oracle ASM Instance is up and ready for use.<br>&nbsp; <br><span style="font-weight: bold; background-color: rgb(255, 255, 153);">Create the Database</span><br>Once the ASM instance has been created, create a database that uses ASM for storage:<br>Log in as oracle and start runInstaller: <br>$ ./runInstaller<br>1.&nbsp;&nbsp;&nbsp; Select Installation Method<br>o&nbsp;&nbsp;&nbsp; Select Advanced Installation<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>2.&nbsp;&nbsp;&nbsp; Select Installation Type<br>o&nbsp;&nbsp;&nbsp; Select Enterprise Edition<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>3.&nbsp;&nbsp;&nbsp; Specify Home Details<br>o&nbsp;&nbsp;&nbsp; Name:&nbsp;&nbsp; OraDb10g<br>o&nbsp;&nbsp;&nbsp; Path:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /u01/app/oracle/product/10.2.0/db<br>Note:Oracle recommends using a different ORACLE_HOME for the database than the ORACLE_HOME used for ASM.<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>4.&nbsp;&nbsp;&nbsp; Product-specific Prerequisite Checks <br>o&nbsp;&nbsp;&nbsp; If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding. <br>o&nbsp;&nbsp;&nbsp; Click on Next<br>5.&nbsp;&nbsp;&nbsp; Select Configuration Option<br>o&nbsp;&nbsp;&nbsp; Select Create a Database<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>6.&nbsp;&nbsp;&nbsp; Select Database Configuration<br>o&nbsp;&nbsp;&nbsp; Select General Purpose<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>7.&nbsp;&nbsp;&nbsp; Specify Database Configuration Options<br>o&nbsp;&nbsp;&nbsp; Database Naming:&nbsp; Enter the Global Database Name and SID<br>o&nbsp;&nbsp;&nbsp; Database Character Set:&nbsp; Accept the default<br>o&nbsp;&nbsp;&nbsp; Database Examples:&nbsp; Select Create database with sample schemas<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>8.&nbsp;&nbsp;&nbsp; Select Database Management Option<br>o&nbsp;&nbsp;&nbsp; Select Use Database Control for Database Management<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>9.&nbsp;&nbsp;&nbsp; Specify Database Storage Option<br>o&nbsp;&nbsp;&nbsp; Select Automatic Storage Management (ASM)<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>10.&nbsp;&nbsp;&nbsp; Specify Backup and Recovery Options<br>o&nbsp;&nbsp;&nbsp; Select Do not enable Automated backups<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>11.&nbsp;&nbsp;&nbsp; Select ASM Disk Group<br>o&nbsp;&nbsp;&nbsp; Select the DATA disk group created in the previous section<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>12.&nbsp;&nbsp;&nbsp; Specify Database Schema Passwords<br>o&nbsp;&nbsp;&nbsp; Select Use the same password for all the accounts<br>o&nbsp;&nbsp;&nbsp; Enter the password and confirm<br>o&nbsp;&nbsp;&nbsp; Click on Next<br>13.&nbsp;&nbsp;&nbsp; Summary <br>o&nbsp;&nbsp;&nbsp; A summary of the products being installed is presented.<br>o&nbsp;&nbsp;&nbsp; Click on Install.<br>14.&nbsp;&nbsp;&nbsp; Configuration Assistants<br>o&nbsp;&nbsp;&nbsp; The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically<br>15.&nbsp;&nbsp;&nbsp; Execute Configuration Scripts<br>o&nbsp;&nbsp;&nbsp; At the end of the installation, a pop up window will appear indicating scripts that need to be run as root.&nbsp; Login as root and run the indicated scripts.<br>o&nbsp;&nbsp;&nbsp; Click on OK when finished.<br>16.&nbsp;&nbsp;&nbsp; End of Installation <br>o&nbsp;&nbsp;&nbsp; Make note of the URLs presented in the summary, and click on Exit when ready.<br>17.&nbsp;&nbsp;&nbsp; Congratulations! Your new Oracle Database is up and ready for use.<br><br>Note : In between the installation , You might be asked to start CSS Deamon , if you havent already done<br>To start the CSS daemon and configure the host to always start the daemon upon reboot, do the following:<br><br>&nbsp;&nbsp; 1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Log in to the host as root.<br>&nbsp;&nbsp; 2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ensure that $ORACLE_HOME/bin is in your PATH environment variable.<br>3.&nbsp;&nbsp;&nbsp; Enter the following command:&nbsp; localconfig add<br><br><span style="font-weight: bold;">Start the ASM instance: </span><br>$ export ORACLE_SID=+ASM<br>$ sqlplus "/ as sysdba"<br><br>SQL*Plus: Release 10.2.0.1.0 - Production on Sun Sep 3 00:28:09 2006<br>Copyright (c) 1982, 2005, Oracle.&nbsp; All rights reserved.<br>Connected to an idle instance.<br>SQL&gt; startup<br>ASM instance started<br>Total System Global Area&nbsp;&nbsp; 83886080 bytes<br>Fixed Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1217836 bytes<br>Variable Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 57502420 bytes<br>ASM Cache&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25165824 bytes<br>ASM diskgroups mounted<br><br><span style="font-style: italic; font-weight: bold;">SQL&gt; select group_number,disk_number,name,state,mode_status,mount_status,total_mb, from v$asm_disk;</span><br style="font-style: italic; font-weight: bold;"><br>G# D# NAME&nbsp; STATE&nbsp;&nbsp;&nbsp; MODE_ST MOUNT_S&nbsp;&nbsp; TOTAL_MB&nbsp;&nbsp;&nbsp; <br>---- ---------- ----------<br>&nbsp;1&nbsp; 0 ASM1 NORMAL&nbsp;&nbsp; ONLINE&nbsp; CACHED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;1&nbsp; 1 ASM2 NORMAL&nbsp;&nbsp; ONLINE&nbsp; CACHED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;1&nbsp; 2 ASM3 NORMAL&nbsp;&nbsp; ONLINE&nbsp; CACHED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;1&nbsp; 3 ASM4 NORMAL&nbsp;&nbsp; ONLINE&nbsp; CACHED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;1&nbsp; 4 ASM5 NORMAL&nbsp;&nbsp; ONLINE&nbsp; CACHED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;2&nbsp; 0 ASM6 NORMAL&nbsp;&nbsp; ONLINE&nbsp; CACHED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;2&nbsp; 1 ASM7 NORMAL&nbsp;&nbsp; ONLINE&nbsp; CACHED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br><span style="font-weight: bold; background-color: rgb(255, 255, 153);">You can get most of the ASM details &amp; implementation details from OTN here : </span><a style="font-weight: bold; background-color: rgb(255, 255, 153);" href="http://www.oracle.com/technology/asm/index.html">http://www.oracle.com/technology/asm/index.html</a><br><br><br></p>]]></description>
         <link>http://blogs.oracle.com/pankaj/2007/05/simulating_asm_disks.html</link>
         <guid>http://blogs.oracle.com/pankaj/2007/05/simulating_asm_disks.html</guid>
        
        
         <pubDate>Tue, 15 May 2007 01:53:42 -0800</pubDate>
      </item>
      
   </channel>
</rss>
