<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-701495011437148641</id><updated>2011-08-01T08:14:57.299-07:00</updated><category term='Failure at final check of Oracle CRS stack. 10'/><category term='Oracle 11G : root.sh fails'/><title type='text'>Balaji's  Scratchpad on Oracle Administration</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-7512727184104093408</id><published>2010-11-03T00:57:00.000-07:00</published><updated>2010-11-03T00:58:43.287-07:00</updated><title type='text'>ASM mount fails with ORA-15032 + ORA-15063</title><content type='html'>Development DBA's were using a single node Dell BOX for 11gR1 ASM , RDBMS and later decided to move it to two node RAC and hence deinstralled the existing software and had left the DB files as such so that they can use the same DB's after the the RAC setup. After the CRS,ASM and RDBMS were installed, they had 2 new disks to be added for the RAC nodes.&lt;br /&gt;&lt;br /&gt; Using DBCA an asm instance was created and a diskgroup called DG1 was created with the 2 new disks, and one of the ASM instance's alert log started thowing the below error.My help was sought to see if anything was faced like this in production.&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;ERROR: diskgroup DG1 was not mounted&lt;br /&gt;ORA-15032: not all alterations performed&lt;br /&gt;ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DG1"&lt;br /&gt;ORA-15038: disk '' size mismatch with diskgroup [1048576] [4096] [512]&lt;br /&gt;ERROR: ALTER DISKGROUP ALL MOUNT&lt;br /&gt;&lt;br /&gt;First check the disks in both the nodes :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Node - 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,NAME,PATH,TOTAL_MB,FREE_MB from v$asm_disk;&lt;br /&gt;&lt;br /&gt;MOUNT_S HEADER_STA MODE_ST NAME               PATH                                                 TOTAL_MB    FREE_MB&lt;br /&gt;------- ---------- ------- ------------------ -------------------------------------------------- ---------- ----------&lt;br /&gt;CLOSED  MEMBER     ONLINE                     /dev/raw/raw3                                               0          0&lt;br /&gt;CLOSED  FOREIGN    ONLINE                     /dev/raw/raw5                                               0          0&lt;br /&gt;CLOSED  MEMBER     ONLINE                     /dev/raw/raw1                                               0          0&lt;br /&gt;CLOSED  FOREIGN    ONLINE                     /dev/raw/raw2                                               0          0&lt;br /&gt;IGNORED MEMBER     ONLINE                     /dev/raw/raw4                                               0          0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Node - 2 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,NAME,PATH,TOTAL_MB,FREE_MB from v$asm_disk;&lt;br /&gt;&lt;br /&gt;MOUNT_S HEADER_STA MODE_ST NAME               PATH                                                 TOTAL_MB    FREE_MB&lt;br /&gt;------- ---------- ------- ------------------ -------------------------------------------------- ---------- ----------&lt;br /&gt;CLOSED  FOREIGN    ONLINE                     /dev/raw/raw2                                               0          0&lt;br /&gt;CLOSED  FOREIGN    ONLINE                     /dev/raw/raw5                                               0          0&lt;br /&gt;CACHED  MEMBER     ONLINE  DG1_0001           /dev/raw/raw3                                          547419     168410&lt;br /&gt;CACHED  MEMBER     ONLINE  DG1_0000           /dev/raw/raw4                                          547419     168257&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Inference 1:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;From the above details /dev/raw/raw4 was the old disk mounted in the old standalone ASM, which is not made visible in the new node.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Note:&lt;/span&gt; Also I could see all the files from the standalone DB synchronized in the second node DG1, this takes us closer to our issue.&lt;br /&gt;&lt;br /&gt;From this I used kfed to check what the disk headers had to say&lt;br /&gt;&lt;br /&gt;(Contenet shortened for better reading)&lt;br /&gt;&lt;br /&gt;[oracle@wv1devdb03b dev]$ kfed read /dev/raw/raw1&lt;br /&gt;&lt;br /&gt;kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL&lt;br /&gt;kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER&lt;br /&gt;kfdhdb.dskname:                DG1_0000 ; 0x028: length=8&lt;br /&gt;kfdhdb.grpname:                     DG1 ; 0x048: length=3&lt;br /&gt;kfdhdb.fgname:                 DG1_0000 ; 0x068: length=8&lt;br /&gt;kfdhdb.capname:                         ; 0x088: length=0&lt;br /&gt;&lt;br /&gt;[oracle@wv1devdb03b dev]$ kfed read /dev/raw/raw4&lt;br /&gt;&lt;br /&gt;kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL&lt;br /&gt;kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER&lt;br /&gt;kfdhdb.dskname:                DG1_0000 ; 0x028: length=8&lt;br /&gt;kfdhdb.grpname:                     DG1 ; 0x048: length=3&lt;br /&gt;kfdhdb.fgname:                 DG1_0000 ; 0x068: length=8&lt;br /&gt;kfdhdb.capname:                         ; 0x088: length=0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[oracle@wv1devdb03b dev]$ kfed read /dev/raw/raw3&lt;br /&gt;&lt;br /&gt;kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL&lt;br /&gt;kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER&lt;br /&gt;kfdhdb.dskname:                DG1_0001 ; 0x028: length=8&lt;br /&gt;kfdhdb.grpname:                     DG1 ; 0x048: length=3&lt;br /&gt;kfdhdb.fgname:                 DG1_0001 ; 0x068: length=8&lt;br /&gt;kfdhdb.capname:                         ; 0x088: length=0&lt;br /&gt;&lt;br /&gt; Yes now we know the issue, the disk '/dev/raw/raw1' was earlier mounted as diskgroup DG1 (and of course was not cleaned up) , this could have better if the new disks were created with a new diskgroup name viz., DG2. So the end issue is we have mismatching set of disks for DG1 in both the nodes and also we have two disks with the name as "DG1_000".&lt;br /&gt;&lt;br /&gt; So what could be done to resolve this (dev setup gives me more liberty :-)  ), in our case the below :&lt;br /&gt;&lt;br /&gt; 1. Commented the /dev/raw/raw1 and restarted node 1.&lt;br /&gt; 2. ASM now had same disks in both sides and it has come up fine.&lt;br /&gt; 3. We returned the old disk raw1 to the storage team.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt; What could be done to avoid this :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; 1. Mounted the raw1 disk on both the nodes.&lt;br /&gt; 2. Else could have created the diskgroup with a different name, very simple I guess.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-7512727184104093408?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/7512727184104093408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=7512727184104093408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/7512727184104093408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/7512727184104093408'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2010/11/asm-mount-fails-with-ora-15032-ora.html' title='ASM mount fails with ORA-15032 + ORA-15063'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-954324232851347552</id><published>2010-10-29T01:51:00.000-07:00</published><updated>2010-10-29T02:00:09.176-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Failure at final check of Oracle CRS stack. 10'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle 11G : root.sh fails'/><title type='text'>Oracle 11G : root.sh fails with - Failure at final check of Oracle CRS stack. 10</title><content type='html'>I was setting up a Oracle 11G RAC in a two node Linux cluster and got into a issue while running the root.sh in the second node of the cluster as below:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/rdbms/crs/root.sh&lt;br /&gt;Checking to see if Oracle CRS stack is already configured&lt;br /&gt;/etc/oracle does not exist. Creating it now.&lt;br /&gt;&lt;br /&gt;Setting the permissions on OCR backup directory&lt;br /&gt;Setting up Network socket directories&lt;br /&gt;Oracle Cluster Registry configuration upgraded successfully&lt;br /&gt;clscfg: EXISTING configuration version 4 detected.&lt;br /&gt;clscfg: version 4 is 11 Release 1.&lt;br /&gt;Successfully accumulated necessary OCR keys.&lt;br /&gt;Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.&lt;br /&gt;node &lt;nodenumber&gt;: &lt;nodename&gt; &lt;private interconnect name&gt; &lt;hostname&gt;&lt;br /&gt;node 1: devdb03b devdb03b-priv devdb03b&lt;br /&gt;node 2: devdb03a devdb03a-priv devdb03a&lt;br /&gt;clscfg: Arguments check out successfully.&lt;br /&gt;&lt;br /&gt;NO KEYS WERE WRITTEN. Supply -force parameter to override.&lt;br /&gt;-force is destructive and will destroy any previous cluster&lt;br /&gt;configuration.&lt;br /&gt;Oracle Cluster Registry for cluster has already been initialized&lt;br /&gt;Startup will be queued to init within 30 seconds.&lt;br /&gt;Adding daemons to inittab&lt;br /&gt;Expecting the CRS daemons to be up within 600 seconds.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Failure at final check of Oracle CRS stack.&lt;br /&gt;10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   After the error I was manually evaluating the basic setup was right, there were a couple of issues which were trivial and had escaped the clufy verification:&lt;br /&gt;   &lt;br /&gt;   1. The private and virtual host names were commented in the /etc/hosts file in one node.&lt;br /&gt;   2. The time was not synced in both the nodes which could cause node eviction.&lt;br /&gt;&lt;br /&gt;     [oracle@devdb03b cssd]$ date&lt;br /&gt;      Thu Oct 28 10:49:38 GMT 2010&lt;br /&gt;     [oracle@devdb03a ~]$ date&lt;br /&gt;     Thu Oct 28 10:48:39 GMT 2010&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   After the required changes were done the installation was cleaned up following the following note and reinstalled.&lt;br /&gt;&lt;br /&gt;    Note: How to Clean Up After a Failed 10g or 11.1 Oracle Clusterware Installation [ID 239998.1]&lt;br /&gt;&lt;br /&gt;   Which still dint resolve the issue, after some more analysis on the trace dumps from the ocssd , we could see that the network heart beat was not coming through for some other reason like a port block or a firewall issue, checking the /etc/services and iptables confirmed it. &lt;br /&gt;&lt;br /&gt;   [    CSSD]2010-10-28 10:55:58.709 [1098586432] &gt;TRACE:   clssnmReadDskHeartbeat: node 1, devdb03a, has a disk HB, but no network HB, DHB has rcfg 183724820, wrtcnt, 476, LATS 51264, lastSeqNo 476, timestamp 1288262691/387864&lt;br /&gt;&lt;br /&gt;    OL=tcp)(HOST=wv1&lt;br /&gt;    devdb03b-priv)(P&lt;br /&gt;    ORT=49895))&lt;br /&gt;&lt;br /&gt;   iptables was enabled and had many restrictions, so after adding the following in the iptables and restarting the nodes (as in one node the crs restart was hanging forever).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;In node devdb03a&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   ACCEPT     all  --  devdb03b          anywhere&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;In node devdb03b&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   ACCEPT     all  --  devdb03a          anywhere&lt;br /&gt;&lt;br /&gt;After this the crs became healthy, but no resources were there.&lt;br /&gt;&lt;br /&gt;   This was due to the root.sh failure in the second node, to fix this the vipca was run as rot user from the first node and everything fell in place quickly, and all the vip,ons and gsd came up fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-954324232851347552?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/954324232851347552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=954324232851347552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/954324232851347552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/954324232851347552'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2010/10/oracle-11g-rootsh-fails-with-failure-at.html' title='Oracle 11G : root.sh fails with - Failure at final check of Oracle CRS stack. 10'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-2591513690646036377</id><published>2010-10-12T05:37:00.000-07:00</published><updated>2010-10-12T05:49:30.299-07:00</updated><title type='text'>Oracle Netbackup restore to a different user/server</title><content type='html'>  I am working on an environment where we have (Oracle RMAN + Netbackup) for our backup strategy, and today we had one of our APPS DBA seeking help for restoring the production backup to a different server (dev) in a different user.&lt;br /&gt;&lt;br /&gt;For restoring in a different server it was straight forward as I had done it multiple times before, the solution is as below to send the name of the client which took the backup via NB_ORA_CLIENT parameter, which will let the netbackup client browse the backups taken from the production server (prd-bkp).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Note:&lt;/span&gt; the actual client here is prd-bkp&lt;br /&gt;&lt;br /&gt;run&lt;br /&gt;{&lt;br /&gt;host "date";&lt;br /&gt;allocate channel t1  DEVICE TYPE sbt_tape PARMS  'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1' format '%d_dbf_%u_%t' ;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;send 'NB_ORA_CLIENT=prd-bkp';&lt;/span&gt;&lt;br /&gt;restore controlfile to '/upg04/FINDEV/control01.ctl' ;&lt;br /&gt;set until time "to_date('05-10-2010 10:01:00','dd-mm-yyyy hh24:mi:ss')";&lt;br /&gt;release channel t1 ;&lt;br /&gt;debug off;&lt;br /&gt;host "date";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Coming to the second issue, where we have to restore the file to a different user, I had to work to analyze the issue and from the help of the backup admin I pulled out the log files from the netbackup master server and could see the following message&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;07:21:46.888 [6581] &lt;2&gt; db_valid_master_server: dev-bkp is not a valid server&lt;/span&gt;&lt;br /&gt;07:21:46.933 [6581] &lt;2&gt; process_request: command C_BPLIST_4_5 (82) received&lt;br /&gt;07:21:46.933 [6581] &lt;2&gt; process_request: list request = 329199 82 oradev dbadev prd-bkp dev-bkp&lt;br /&gt;dev-bkp NONE 0  3 999 1281405910 1284084310 4 4 1 1 1 0 4 7230 9005 4 0 C C C C C 0 2 0 0 0&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;07:21:46.947 [6581] &lt;2&gt; get_type_of_client_list_restore: list and restore not specified for dev-bkp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;07:21:46.947 [6581] &lt;2&gt; get_type_of_client_free_browse: Free browse allowed for dev-bkp&lt;/span&gt;&lt;br /&gt;07:21:46.948 [6581] &lt;2&gt; db_valid_client: -all clients valid-&lt;br /&gt;07:21:46.949 [6581] &lt;2&gt; fileslist:    sockfd = 9&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;07:21:46.949 [6581] &lt;2&gt; fileslist:    owner = oradev&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;07:21:46.949 [6581] &lt;2&gt; fileslist:    group = dbadev&lt;/span&gt;&lt;br /&gt;07:21:46.949 [6581] &lt;2&gt; fileslist:    client = prd-bkp&lt;br /&gt;07:21:46.949 [6581] &lt;2&gt; fileslist:    sched_type = 12&lt;br /&gt;&lt;br /&gt;The reason being the backup was done from oracle user - dba group, restore was tried from oradev user - dbadev group. Here the user and group has to match for the restore to succeed. Changing the existing setup to a production like user was not possible because we had users like oradev,oratst in the box which are all going to have copies from production.&lt;br /&gt;&lt;br /&gt;Finally we could see that since Netbackup 6.0 MP4 we could read the backup images if the groups of the users were same, voila we were in 6.5. This change was possible for us to do with the help of the sysadmin without compromising on security.By doing so the backup went fine the solution was as below:&lt;br /&gt;&lt;br /&gt;1.Stop the oracle instance runnign in dev.&lt;br /&gt;2.Changed the group of oradev from dbadev to dba.&lt;br /&gt;3.Changed the binaries ownership to oradev:dba.&lt;br /&gt;4.Start the oracle instance with the oradev user.&lt;br /&gt;5.Restart the backup&lt;br /&gt;&lt;br /&gt; Now we had a smooth restore and below was the log from the Netbackup master server.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;07:53:11.923 [9423] &lt;2&gt; db_valid_client: -all clients valid-&lt;br /&gt;07:53:11.924 [9423] &lt;2&gt; fileslist:    sockfd = 9&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;07:53:11.924 [9423] &lt;2&gt; fileslist:    owner = oradev&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;07:53:11.924 [9423] &lt;2&gt; fileslist:    group = dba&lt;/span&gt;&lt;br /&gt;07:53:11.924 [9423] &lt;2&gt; fileslist:    client = prd-bkp&lt;br /&gt;07:53:11.924 [9423] &lt;2&gt; fileslist:    sched_type = 12.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-2591513690646036377?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/2591513690646036377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=2591513690646036377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/2591513690646036377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/2591513690646036377'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2010/10/oracle-netbackup-restore-to-different.html' title='Oracle Netbackup restore to a different user/server'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-7221051688225019904</id><published>2010-09-08T02:31:00.000-07:00</published><updated>2010-09-08T02:33:12.425-07:00</updated><title type='text'>Oracle Virtual Index</title><content type='html'>Oracle has the undocumented feature which helps to test if a specific index creation will be used by a query to improve performance during a tuning exercise. This is a fake index hence its very fast to do the initial test and also does not occupy space, given below is a very simple example on testing the virtual index.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.Create a test table for the activity.&lt;br /&gt;&lt;br /&gt;create table test as select * from dba_objects;&lt;br /&gt;&lt;br /&gt;2.Collect the statistics for the table&lt;br /&gt;&lt;br /&gt;EXEC DBMS_STATS.gather_table_stats(user, 'TEST')&lt;br /&gt;&lt;br /&gt;3.Check the plan nfor the query&lt;br /&gt;&lt;br /&gt;explain plan for &lt;br /&gt;select *  from test where object_id=200;&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());&lt;br /&gt;&lt;br /&gt;PLAN_TABLE_OUTPUT&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;Plan hash value: 1357081020&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;|   0 | SELECT STATEMENT  |      |     1 |    98 |   196   (1)| 00:00:03 |&lt;br /&gt;|*  1 |  TABLE ACCESS FULL| TEST |     1 |    98 |   196   (1)| 00:00:03 |&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;PLAN_TABLE_OUTPUT&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   1 - filter("OBJECT_ID"=200)&lt;br /&gt;&lt;br /&gt;13 rows selected.&lt;br /&gt;&lt;br /&gt;4.Create a virtuala index with nosegment clause.&lt;br /&gt;&lt;br /&gt;create index test_idx1 on test(object_id) nosegment;&lt;br /&gt;&lt;br /&gt;5.Alter session to use the virtual index&lt;br /&gt;&lt;br /&gt;ALTER SESSION SET "_use_nosegment_indexes" = TRUE;&lt;br /&gt;&lt;br /&gt;6.Collect statistics for the table&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Note:&lt;/span&gt; The statistics will not be populated for the index.&lt;br /&gt;&lt;br /&gt;EXEC DBMS_STATS.gather_table_stats(user, 'TEST', cascade =&gt; TRUE);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7.Check the virtual index exists&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Note:&lt;/span&gt; The information is not populated in DBA_INDEXES but in DBA_OBJECTS&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT  o.object_name AS fake_index_name FROM user_objects o&lt;br /&gt;WHERE   o.object_type = 'INDEX' AND  NOT EXISTS&lt;br /&gt;(SELECT null FROM user_indexes i WHERE o.object_name = i.index_name );  &lt;br /&gt;&lt;br /&gt;FAKE_INDEX_NAME&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;TEST_IDX1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.Check the plan to see if the index is used.&lt;br /&gt;&lt;br /&gt;explain plan for &lt;br /&gt;select *  from test where object_id=200;&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());&lt;br /&gt;&lt;br /&gt;PLAN_TABLE_OUTPUT&lt;br /&gt;------------------------------------------------------------------------------------------&lt;br /&gt;Plan hash value: 2624864549&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                   | Name      | Rows  | Bytes | Cost (%CPU)| Time     |&lt;br /&gt;-----------------------------------------------------------------------------------------&lt;br /&gt;|   0 | SELECT STATEMENT            |           |     1 |    98 |     2   (0)| 00:00:01 |&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID| TEST      |     1 |    98 |     2   (0)| 00:00:01 |&lt;br /&gt;|*  2 |   INDEX RANGE SCAN          | TEST_IDX1 |     1 |       |     1   (0)| 00:00:01 |&lt;br /&gt;-----------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;&lt;br /&gt;PLAN_TABLE_OUTPUT&lt;br /&gt;------------------------------------------------------------------------------------------&lt;br /&gt;  2 - access("OBJECT_ID"=200)&lt;br /&gt;&lt;br /&gt;14 rows selected.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9.Drop the virtual index and create a real one if it helps.&lt;br /&gt;&lt;br /&gt;drop index test_idx1;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-7221051688225019904?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/7221051688225019904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=7221051688225019904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/7221051688225019904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/7221051688225019904'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2010/09/oracle-virtual-index.html' title='Oracle Virtual Index'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-1829190559789044388</id><published>2010-02-11T13:52:00.000-08:00</published><updated>2010-08-17T07:59:44.901-07:00</updated><title type='text'>Port/Move Sql Profiles in 10gR1</title><content type='html'>Today I was working on a migration project, where I had to port some sql profiles from 10gR1 to 10gR2 which was really critical to the performance of the application. Metalink has documentation to move the profiles from 10gR2 to 10gR2, but nothing for my requirement 10gR1.&lt;br /&gt;&lt;br /&gt; Wihhout any documented information finally I was able to find some undocumented information.Thanks to Christian Antognini's papers which helped me to workaround my issue.Here is what I did to port the sql profiles:&lt;br /&gt;&lt;br /&gt; SQL Profile consists of auxiliary statistics specific to that statement and are stored as profile attributes in the data dictionary, which can be retrieved from the two tables SQLPROF$ and SQLPROF$ATTR.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;In the source I have a profile called 'SYS_SQLPROF_091112150758738', which can be retrieved as below:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;select sp.sp_name, sa.attr#, sa.attr_val&lt;br /&gt;  from SQLPROF$ sp, SQLPROF$ATTR sa&lt;br /&gt; where sp.signature = sa.signature&lt;br /&gt;   and sp.category = sp.category&lt;br /&gt;   and sp.sp_name = 'SYS_SQLPROF_091112150758738'&lt;br /&gt; order by sp.sp_name, sa.attr#&lt;br /&gt;&lt;br /&gt;       SP_NAME                             ATTR# ATTR_VAL&lt;br /&gt;------------------------------ ---------- ----------------------------------------&lt;br /&gt;SYS_SQLPROF_091112150758738             1 FIRST_ROWS(1)&lt;br /&gt;SYS_SQLPROF_091112150758738             2 OPTIMIZER_FEATURES_ENABLE(default)&lt;br /&gt;&lt;br /&gt;Now I have the attributes from the source, which can be imported as a profile into the destination using the import_sql_profile procedure of the dbms_sqltune package as below:&lt;br /&gt;&lt;br /&gt;exec dbms_sqltune.import_sql_profile(name =&gt; 'SYS_SQLPROF_091112150758738',description =&gt; 'SQL profile created for porting the profile from 10gR1',category =&gt; 'DEFAULT',sql_text =&gt; 'select XXXXXXXXX from XXXXXXX where XXXXXXXXX and  XXXXXXXXXXX',profile =&gt; sqlprof_attr('FIRST_ROWS(1)','OPTIMIZER_FEATURES_ENABLE(default)'),replace =&gt; FALSE,force_match =&gt; FALSE);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;After the import I wanted to make sure of two things :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. The profile is used in the statement.&lt;br /&gt;2. I have the optimal plan as I had in the source DB.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Both can be checked with the explain plan as below:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;explain plan for &lt;br /&gt;select XXXXXXXXX from XXXXXXX where XXXXXXXXX and  XXXXXXXXXXX;&lt;br /&gt;&lt;br /&gt;SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());&lt;br /&gt;&lt;br /&gt;I had a similar plan and also could see the below in the explain plan which says the profile is used.I am not sure if this is supported but did work for me.&lt;br /&gt;&lt;br /&gt;Note&lt;br /&gt;-----&lt;br /&gt;   - SQL profile "SYS_SQLPROF_091112150758738" used for this statement&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; Note:&lt;/strong&gt;&lt;/em&gt; You can follow metalink document ID 457531.1 for 10gR2 : [How To Move SQL Profiles From One Database To Another Database ] for 10gR2&lt;br /&gt;&lt;br /&gt; For people who do not have access to metalink below are the steps for migrating the profiles in 10Gr2:&lt;br /&gt;&lt;br /&gt;In the source database :&lt;br /&gt;&lt;br /&gt;1. Create a staging table for the profiles&lt;br /&gt;&lt;br /&gt;exec DBMS_SQLTUNE.CREATE_STGTAB_SQLPROF (table_name=&gt;'PROF_BR',schema_name=&gt;'SYS'); &lt;br /&gt;&lt;br /&gt;2.Pack the profiles to the staging table&lt;br /&gt;&lt;br /&gt;EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_name =&gt; 'PROF_BR',profile_name=&gt;'SYS_SQLPROF_090806080427252'); &lt;br /&gt;EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_name =&gt; 'PROF_BR',profile_name=&gt;'SYS_SQLPROF_081029060743314'); &lt;br /&gt;EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_name =&gt; 'PROF_BR',profile_name=&gt;'SYS_SQLPROF_090806054340984'); &lt;br /&gt;EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_name =&gt; 'PROF_BR',profile_name=&gt;'SYS_SQLPROF_090812082621064'); &lt;br /&gt;EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_name =&gt; 'PROF_BR',profile_name=&gt;'SYS_SQLPROF_090819052716720'); &lt;br /&gt;EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_name =&gt; 'PROF_BR',profile_name=&gt;'SYS_SQLPROF_091112150758738'); &lt;br /&gt;EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_name =&gt; 'PROF_BR',profile_name=&gt;'SYS_SQLPROF_091206044219682'); &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3.Export the table&lt;br /&gt;&lt;br /&gt;expdp directory=POC1 dumpfile=PROF_BR.dmp logfile=PROF_BR.log JOB_NAME=EXP_PROF_BR tables=SYS.PROF_BR &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the destination database :&lt;br /&gt;&lt;br /&gt;4. Import the staging table&lt;br /&gt;&lt;br /&gt;impdp directory=POC1 dumpfile=PROF_BR.dmp logfile=PROF_BR.imp JOB_NAME=IMP_PROF_BR tables=SYS.PROF_BR &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.Unpack the profiles&lt;br /&gt;&lt;br /&gt;EXEC DBMS_SQLTUNE.UNPACK_STGTAB_SQLPROF(replace =&gt; TRUE,staging_table_name =&gt; 'PROF_BR');&lt;br /&gt;&lt;br /&gt;6. Test the queries plan to see the usage of the sql profile.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-1829190559789044388?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/1829190559789044388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=1829190559789044388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/1829190559789044388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/1829190559789044388'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2010/02/portmove-sql-profiles-in-10gr1.html' title='Port/Move Sql Profiles in 10gR1'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-3403534639158859491</id><published>2010-02-08T17:08:00.000-08:00</published><updated>2010-02-08T17:09:53.000-08:00</updated><title type='text'>Linux high memory utilization</title><content type='html'>Today I was working on a project when the tester said the memory utilization was close to 100% always.First I was surprised as this was a pure DB box (RH 4) and has a single instance using only 50% of the memory for the Db.&lt;br /&gt;&lt;br /&gt;As usual the first thing I did was to check the TOP/vmstat command, but this does not give the correct picture as &lt;strong&gt;Linux uses the spare memory available for caching the disk blocks &lt;/strong&gt;(yes might be useful for a slow storage - extra cache) which is also accounted in the TOP command.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TOP:&lt;br /&gt;&lt;br /&gt;Mem:  49433916k total, 47201932k used,  2231984k free,   903556k buffers&lt;br /&gt;Swap: 70894792k total,        4k used, 70894788k free, 22948700k cached&lt;br /&gt;&lt;br /&gt;VMSTAT:&lt;br /&gt;&lt;br /&gt; vmstat 2 4&lt;br /&gt;procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------&lt;br /&gt; r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st&lt;br /&gt; 1  3      4 2250296 903688 22950204    0    0  1149    38    1    0  1  1 95  3  0&lt;br /&gt; 1  4      4 2249804 903688 22950204    0    0 39225    27 13506 35171  3  2 86 10  0&lt;br /&gt; 1  3      4 2250604 903688 22950204    0    0 42305    61 14293 35447  3  2 85 11  0&lt;br /&gt; 0  3      4 2250836 903688 22950204    0    0 29921    96 10224 25105  3  1 85 11  0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; So in Linux we have to read the cached value carefully to calculate the actual memory used or the easier way is to cuse the free -m command as below.Here 22795 is the actual memory used and 25479 is the free memory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;free -m&lt;br /&gt;             total       used       free     shared    buffers     cached&lt;br /&gt;Mem:         48275      46090       2185          0        882      22412&lt;br /&gt;-/+ buffers/cache:      22795      25479&lt;br /&gt;Swap:        69233          0      69233&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-3403534639158859491?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/3403534639158859491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=3403534639158859491' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/3403534639158859491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/3403534639158859491'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2010/02/linux-high-memory-utilization.html' title='Linux high memory utilization'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-6461501155710444120</id><published>2009-12-10T02:44:00.000-08:00</published><updated>2009-12-10T02:54:27.165-08:00</updated><title type='text'>Linux HugePages for Oracle</title><content type='html'>HugePages is a feature in the Linux kernel with release 2.6. This feature provides the alternative to the 4K page size providing bigger pages, and is a very useful feature when we have a big SGA configured for the Oracle database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To setup HugePages, the following changes must be completed:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Set the vm.nr_hugepages kernel parameter to a required value. &lt;br /&gt;&lt;br /&gt;In this test case we will use a 20GB SGA , we can calculate the vm.nr_hugepages as below &lt;br /&gt;&lt;br /&gt;Assuming we have only one instance running in the box, and also we have a 2MB hugepage for Linux x86_64.&lt;br /&gt;&lt;br /&gt;(20480 MB [SGA] + 260 [buffer+ reserve for other applications to use shared memory] )/2 MB = 10500&lt;br /&gt;&lt;br /&gt;and from the above derivation we set the value as below:&lt;br /&gt;&lt;br /&gt;sysctl -w vm.nr_hugepages=10500&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;/etc/securities/limits.conf must be updated to increase soft and hard memlock values for oracle userid. &lt;br /&gt;&lt;br /&gt;oracle          soft    memlock        20971520&lt;br /&gt;oracle          hard   memlock        20971520&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;After setting this up, we will test to see if SGA is using HugePages. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The value, (HugePages_Total- HugePages_Free)*2MB will be the approximate size of SGA.&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter sga&lt;br /&gt;&lt;br /&gt;NAME                                 TYPE        VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;lock_sga                             boolean     FALSE&lt;br /&gt;pre_page_sga                         boolean     FALSE&lt;br /&gt;sga_max_size                         big integer 1536M&lt;br /&gt;sga_target                           big integer 1536M&lt;br /&gt;&lt;br /&gt;SQL&gt; alter system set sga_max_size=20g scope=spfile sid='*';&lt;br /&gt;&lt;br /&gt;srvctl stop database -d test&lt;br /&gt;srvctl start database -d test&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter sga&lt;br /&gt;&lt;br /&gt;NAME                                 TYPE        VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;lock_sga                             boolean     FALSE&lt;br /&gt;pre_page_sga                         boolean     FALSE&lt;br /&gt;sga_max_size                         big integer 20G&lt;br /&gt;sga_target                           big integer 1536M&lt;br /&gt;&lt;br /&gt;$ cat /proc/meminfo |grep HugePages&lt;br /&gt;HugePages_Total: 10500&lt;br /&gt;HugePages_Free:  10297&lt;br /&gt;HugePages_Rsvd:  10038&lt;br /&gt;&lt;br /&gt;SQL&gt; alter system set sga_target=20g scope=both sid='test2';&lt;br /&gt;&lt;br /&gt;$ cat /proc/meminfo |grep HugePages&lt;br /&gt;HugePages_Total: 10500&lt;br /&gt;HugePages_Free:    818&lt;br /&gt;HugePages_Rsvd:    559&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;strong&gt;Note :&lt;/strong&gt;&lt;/em&gt; When started up using sqlplus the hugepages is not being used, bu twhen started up using srvctl it works.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;[Metalink Reference HugePages on Linux: What It Is... and What It Is Not... [ID 361323.1]]&lt;br /&gt;[Metalink Reference Shell Script to Calculate Values Recommended HugePages / HugeTLB Configuration [ID 401749.1]]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-6461501155710444120?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/6461501155710444120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=6461501155710444120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/6461501155710444120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/6461501155710444120'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2009/12/linux-hugepages-for-oracle.html' title='Linux HugePages for Oracle'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-3274765841758964906</id><published>2009-11-25T08:04:00.000-08:00</published><updated>2009-11-25T08:07:50.707-08:00</updated><title type='text'>Oracle 10132 trace</title><content type='html'>Almost all of the DBA's use the 10046 trace and many use 10053 trace, one of traces not often used is the 10132 trace.This is generally used to generate the execution plan for the hard parses.Which can be enabled at the system level to get/ baseline the plans for the hard parsed statements after the event is set.We can also use it for session level as a shorter version of 10053 trace.&lt;br /&gt;&lt;br /&gt;  And most importantly the trace file is well formatted and easily readable even without using any utility like tkprof.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The event 10132 can be enabled and disabled in the following ways:&lt;/strong&gt;&lt;br /&gt;  &lt;br /&gt;Enable and disable the event for the current session.&lt;br /&gt;&lt;br /&gt;   ALTER SESSION SET events '10132 trace name context forever'&lt;br /&gt;   ALTER SESSION SET events '10132 trace name context off'&lt;br /&gt;&lt;br /&gt;Enable and disable the event for the whole database. &lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note&lt;/em&gt;: this setting does not take effect immediately but only for sessions created after the modification.&lt;br /&gt;      &lt;br /&gt;   ALTER SYSTEM SET events '10132 trace name context forever'&lt;br /&gt;   ALTER SYSTEM SET events '10132 trace name context off'&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sample output:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;*** SERVICE NAME:(SYS$USERS) 2009-11-25 10:23:15.898&lt;br /&gt;*** SESSION ID:(2160.19196) 2009-11-25 10:23:15.898&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Current SQL statement for this session:&lt;br /&gt;SELECT so_status_name&lt;br /&gt;  FROM job_queue jq,&lt;br /&gt;       so_job_queue sjq&lt;br /&gt; WHERE jq.module = :sModule&lt;br /&gt;   AND jq.arg_3  = :sUser&lt;br /&gt;   AND jq.arg_4  = :sFile&lt;br /&gt;   AND jq.arg_5  = :sDate&lt;br /&gt;   AND jq.jobid  = sjq.so_jobid&lt;br /&gt;Plan Table&lt;br /&gt;--------&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;| Operation                      | Name               | Rows  | Bytes | Cost  | Time      |  TQ  |IN-OUT| PQ Distrib |Pstart| Pstop |&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;| SELECT STATEMENT               |                    |       |       |     6 |           |      |      |           |       |       |&lt;br /&gt;|  NESTED LOOPS                  |                    |     1 |    48 |     6 |           |      |      |           |       |       |&lt;br /&gt;|   TABLE ACCESS FULL            | JOB_QUEUE          |     1 |    33 |     5 |           |      |      |           |       |       |&lt;br /&gt;|   TABLE ACCESS BY INDEX ROWID  | SO_JOB_QUEUE       |     1 |    15 |     1 |           |      |      |           |       |       |&lt;br /&gt;|    INDEX UNIQUE SCAN           | SO_JOB_QUEUE_IDX   |     1 |       |       |           |      |      |           |       |       |&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-3274765841758964906?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/3274765841758964906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=3274765841758964906' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/3274765841758964906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/3274765841758964906'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2009/11/oracle-10132-trace.html' title='Oracle 10132 trace'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-8651018937644547828</id><published>2009-06-28T05:08:00.000-07:00</published><updated>2009-06-28T05:11:25.668-07:00</updated><title type='text'>How to upload huge files to Oracle support</title><content type='html'>&lt;strong&gt;Oracle's ftp site can be used to do the job by following the below steps:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Move the file to your local machine and tar/zip them appropriately.&lt;br /&gt;&lt;br /&gt;Open a command window.&lt;br /&gt;&lt;br /&gt;Start ftp:&lt;br /&gt;C:\T&gt; ftp&lt;br /&gt;ftp&gt;&lt;br /&gt;&lt;br /&gt;Connect to the oracle ftp server and connect as user anonymous:&lt;br /&gt;ftp&gt; open ftp.oracle.com&lt;br /&gt;User (bigip-ftp.oracle.com:(none)): anonymous&lt;br /&gt;&lt;br /&gt;Use as a password a valid email address used in metalink: &lt;br /&gt;&lt;br /&gt;331 Please specify the password.&lt;br /&gt;Password:&lt;br /&gt;230 Login successful. &lt;br /&gt;&lt;br /&gt;Move into the directory "support/incoming":&lt;br /&gt;&lt;br /&gt;ftp&gt; pwd&lt;br /&gt;257 "/"&lt;br /&gt;ftp&gt; cd support/incoming&lt;br /&gt;250 Directory successfully changed. &lt;br /&gt;&lt;br /&gt;Create a new directory with the name of your service request number:&lt;br /&gt;ftp&gt; mkdir &lt;xxxxxxx.xxx&gt;&lt;br /&gt;257 "/support/incoming/" created&lt;br /&gt;ftp&gt; cd &lt;br /&gt;250 Directory successfully changed. &lt;br /&gt;&lt;br /&gt;Set the transfer mode to binary:&lt;br /&gt;ftp&gt; bin&lt;br /&gt;200 Switching to Binary mode. &lt;br /&gt;&lt;br /&gt;Put the files on the ftp server:&lt;br /&gt;ftp&gt; put &lt;br /&gt;&lt;br /&gt;Use the command pwd to check the current directory:&lt;br /&gt;ftp&gt; pwd&lt;br /&gt;257 "/support/incoming/" &lt;br /&gt;&lt;br /&gt;REMARK: For security reasons the command ls cannot be executed&lt;br /&gt;&lt;br /&gt;Exit from ftp site:&lt;br /&gt;ftp&gt; quit &lt;br /&gt;&lt;br /&gt;Inform Support that the file has been uploaded in the following location:&lt;br /&gt;ftp://ftp.oracle.com/ftp/anonymous/support/incoming/&lt;xxxxxxx.xxx&gt;/filename&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-8651018937644547828?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/8651018937644547828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=8651018937644547828' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/8651018937644547828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/8651018937644547828'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2009/06/how-to-upload-huge-files-to-oracle.html' title='How to upload huge files to Oracle support'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-3817756074129214722</id><published>2009-06-18T07:15:00.000-07:00</published><updated>2009-06-18T07:16:52.323-07:00</updated><title type='text'>vnetd + Oracle RMAN restore from tape using NetBackup</title><content type='html'>I had a unique issue when working on a retore using rman, the issue was the restore was started with 10 channels and the restore was happening with one channel and the other channels were not reading any data and finally failed with “cannot connect socket” error from netbackup side.&lt;br /&gt;&lt;br /&gt;The rman side failed with a generic MML error as below.&lt;br /&gt;&lt;br /&gt;ORA-19624: operation failed, retry possible&lt;br /&gt;ORA-19507: failed to retrieve sequential file, handle="AAAPRD_dbf_sokhhtgt_689501725", parms=""&lt;br /&gt;ORA-27029: skgfrtrv: sbtrestore returned error&lt;br /&gt;ORA-19511: Error received from media manager layer, error text:&lt;br /&gt;   Failed to process backup file &lt;AAAPRD_dbf_sokhhtgt_689501725&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This issue went for a day or two and finally with the help of a system admin we resolved the issue.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The issue was like below :&lt;br /&gt;&lt;br /&gt;1.The database server failed to establish more vnetd connections from master/media servers of Netbackup.&lt;br /&gt;&lt;br /&gt;1. vnetd is used by default from NBU 6.0 and up. So NetBackup uses the firewalled configuration even if you do not have a firewall.&lt;br /&gt; &lt;br /&gt;2. If vnetd fails NBU failback to normal deamon port connection (bpcd, bpbrm etc).&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;This was finally fixed by changing the &lt;strong&gt;per_source value in /etc/xinetd.conf &lt;/strong&gt;from 10 to UNLIMITED after whcih all the channels running fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-3817756074129214722?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/3817756074129214722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=3817756074129214722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/3817756074129214722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/3817756074129214722'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2009/06/vnetd-oracle-rman-restore-from-tape.html' title='vnetd + Oracle RMAN restore from tape using NetBackup'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-4579263311199250311</id><published>2009-06-10T08:39:00.000-07:00</published><updated>2009-06-10T08:42:48.687-07:00</updated><title type='text'>Oracle 10.1.0.5 database opened with 10.2.0.4 home</title><content type='html'>We had a case where a dba had opened a 10.1.0.5 database with a 10.2.0.4 Home and with the init parameter compatible=10.2.0.4 by mistake.&lt;br /&gt;&lt;br /&gt;After that the dba attempted to start the db using 10.1.0.5, which resulted in the following error as the compatibility information had been written allover &lt;br /&gt;the controlfiles, datafiles etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/rdbms/v10.1/dbs &gt;sqlplus / as sysdba&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.1.0.5.0 - Production on Thu Jun 4 05:37:07 2009&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;Connected to an idle instance.&lt;br /&gt;&lt;br /&gt;SQL&gt; startup nomount;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area  603979776 bytes&lt;br /&gt;Fixed Size                  1323752 bytes&lt;br /&gt;Variable Size             164351256 bytes&lt;br /&gt;Database Buffers          436207616 bytes&lt;br /&gt;Redo Buffers                2097152 bytes&lt;br /&gt;SQL&gt; @ /tmp/ctrl.sql&lt;br /&gt;CREATE CONTROLFILE SET DATABASE "RETRDEV" RESETLOGS  NOARCHIVELOG&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01503: CREATE CONTROLFILE failed&lt;br /&gt;&lt;strong&gt;ORA-01130: database file version 10.2.0.4.0 incompatible with ORACLE version&lt;br /&gt;10.1.0.4.0&lt;/strong&gt;&lt;br /&gt;ORA-01110: data file 1: '+DG8_DEV/retrdev/datafile/system.256.629212191'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  Since compatibility parameter cannot be rolled back in this case, we dint have any backups as this was a developement environment.To workaround this we had &lt;br /&gt;&lt;br /&gt;to do the following:&lt;br /&gt;&lt;br /&gt;1.Upgrade the database to 10.2.0.4 &lt;br /&gt;2.Export the database.&lt;br /&gt;3.Recreate a 10.1.0.5 database and import it.&lt;br /&gt;&lt;br /&gt;So we have to be carefullwhicle settign such parameters.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-4579263311199250311?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/4579263311199250311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=4579263311199250311' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/4579263311199250311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/4579263311199250311'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2009/06/oracle-10105-database-opened-with-10204.html' title='Oracle 10.1.0.5 database opened with 10.2.0.4 home'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-4611988174868233878</id><published>2009-06-04T22:36:00.000-07:00</published><updated>2009-06-04T22:46:10.651-07:00</updated><title type='text'>Oracle 10g RAC check/modify private interconnect information</title><content type='html'>&lt;strong&gt;Query the private interconnect information from the database:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from gv$cluster_interconnects ;&lt;br /&gt;&lt;br /&gt;   INST_ID NAME            IP_ADDRESS       IS_ SOURCE&lt;br /&gt;---------- --------------- ---------------- --- -------------------------------&lt;br /&gt;         1 eth0            192.168.124.186  NO  OS dependent software&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Query the private interconnect information using oifcfg:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;$ oifcfg getif&lt;br /&gt;eth1  192.168.128.0  global  public&lt;br /&gt;eth2  192.168.127.0  global  cluster_interconnect&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Check the interconnect information from the alert log&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;And also the alert log will throw the information during start up just after displaying the non-default init parameters:&lt;br /&gt;&lt;br /&gt;  open_cursors             = 300&lt;br /&gt;  pga_aggregate_target     = 73400320&lt;br /&gt;Cluster communication is configured to use the following interface(s) for this instance&lt;br /&gt;  192.168.124.186&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;You can check the available interfaces using &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;$ oifcfg iflist&lt;br /&gt;eth0  192.168.124.0&lt;br /&gt;eth1  192.168.128.0&lt;br /&gt;eth2  192.168.127.0&lt;br /&gt;ib1  10.192.2.0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To change the setings follow the below steps:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;delete the wrong settings&lt;br /&gt;&lt;br /&gt;oifcfg delif -global eth1/192.168.128.0&lt;br /&gt;oifcfg delif -global eth2/192.168.127.0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;oifcfg setif -global eth0/192.168.124.0:public&lt;br /&gt;oifcfg setif -global ib1/10.192.2.0:cluster_interconnect&lt;br /&gt;&lt;br /&gt;The new settings would take effect after the database bounce.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: The crs picks the interconnect information from the /etc/hosts and the database picks from the configuration of oifcfg.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-4611988174868233878?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/4611988174868233878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=4611988174868233878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/4611988174868233878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/4611988174868233878'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2009/06/oracle-10g-rac-checkmodify-private.html' title='Oracle 10g RAC check/modify private interconnect information'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-4907559596894634892</id><published>2008-12-24T08:47:00.001-08:00</published><updated>2008-12-24T08:49:36.498-08:00</updated><title type='text'>How to recreate a undo tablespace</title><content type='html'>There was an issue in the undo tablespace , where the size of one of the datafiles in the undo tablespace(ASM) did not match the size in the control file and I did the folowing to recreate the undo tablespace:&lt;br /&gt;&lt;br /&gt;1. Make sure the database was last cleanly shut down.&lt;br /&gt;&lt;br /&gt;sqlplus /nolog&lt;br /&gt;SQL&gt;connect sys/change@db as sysdba&lt;br /&gt;SQL&gt; shutdown immediate&lt;br /&gt;&lt;br /&gt;2. mount database in RESTRICT mode, using pfile.&lt;br /&gt;&lt;br /&gt;SQL&gt; STARTUP RESTRICT MOUNT pfile=C:\Oracle\db\initdb.ora&lt;br /&gt;ORACLE instance started. Total System Global Area 1620126452 bytes&lt;br /&gt;Fixed Size 457460 bytes&lt;br /&gt;Variable Size 545259520 bytes&lt;br /&gt;Database Buffers 1073741824 bytes&lt;br /&gt;Redo Buffers 667648 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;&lt;br /&gt;3. Try to offline drop the bad datafile.&lt;br /&gt;&lt;br /&gt;SQL&gt; ALTER DATABASE DATAFILE 'C:\ORADATA\DB\UNDOTBS2_02.DBF' OFFLINE DROP;&lt;br /&gt;&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01548: active rollback segment ‘_SYSSMU11$’ found, terminate dropping&lt;br /&gt;tablespace&lt;br /&gt;&lt;br /&gt;or this SQL:&lt;br /&gt;&lt;br /&gt;DROP TABLESPACE undotbs2 INCLUDING CONTENTS AND DATAFILES ;&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01548: active rollback segment ‘_SYSSMU11$’ found, terminate dropping&lt;br /&gt;tablespace&lt;br /&gt;&lt;br /&gt;4. Use this query to see how many rollback segments were corrupted:&lt;br /&gt;&lt;br /&gt;SQL&gt;select segment_name,status,tablespace_name from dba_rollback_segs where status='NEEDS RECOVERY';&lt;br /&gt;SEGMENT_NAME STATUS TABLESPACE_NAME&lt;br /&gt;—————————— —————- —————–&lt;br /&gt;_SYSSMU11$ NEEDS RECOVERY UNDOTBS2&lt;br /&gt;_SYSSMU12$ NEEDS RECOVERY UNDOTBS2&lt;br /&gt;_SYSSMU13$ NEEDS RECOVERY UNDOTBS2&lt;br /&gt;_SYSSMU14$ NEEDS RECOVERY UNDOTBS2&lt;br /&gt;_SYSSMU15$ NEEDS RECOVERY UNDOTBS2&lt;br /&gt;_SYSSMU16$ NEEDS RECOVERY UNDOTBS2&lt;br /&gt;_SYSSMU17$ NEEDS RECOVERY UNDOTBS2&lt;br /&gt;_SYSSMU18$ NEEDS RECOVERY UNDOTBS2&lt;br /&gt;_SYSSMU19$ NEEDS RECOVERY UNDOTBS2&lt;br /&gt;_SYSSMU20$ NEEDS RECOVERY UNDOTBS2&lt;br /&gt;&lt;br /&gt;5. Add the following line to pfile:&lt;br /&gt;&lt;br /&gt;_corrupted_rollback_segments =('_SYSSMU11$','_SYSSMU12$','_SYSSMU13$','_SYSSMU14$','_SYSSMU15$','_SYSSMU16$','_SYSSMU17$','_SYSSMU18$','_SYSSMU19$','_SYSSMU20$')&lt;br /&gt;&lt;br /&gt;Make sure you uncomment “undo_management=AUTO”, and specify you want to use UNDOTBS1 as undo tablespace.&lt;br /&gt;&lt;br /&gt;#undo_management=AUTO&lt;br /&gt;undo_tablespace=UNDOTBS1&lt;br /&gt;&lt;br /&gt;6. Start the database again:&lt;br /&gt;&lt;br /&gt;SQL&gt; STARTUP RESTRICT MOUNT pfile=C:\Oracle\db\initdb.ora&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. Drop bad rollback segments&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; drop rollback segment "_SYSSMU11$";&lt;br /&gt;Rollback segment dropped.&lt;br /&gt;…&lt;br /&gt;&lt;br /&gt;SQL&gt; drop rollback segment "_SYSSMU20$";&lt;br /&gt;Rollback segment dropped.&lt;br /&gt;&lt;br /&gt;8. Check again&lt;br /&gt;&lt;br /&gt;SQL&gt; select segment_name,status,tablespace_name from dba_rollback_segs;&lt;br /&gt;&lt;br /&gt;SEGMENT_NAME STATUS TABLESPACE_NAME&lt;br /&gt;—————————— —————- —————&lt;br /&gt;SYSTEM ONLINE SYSTEM&lt;br /&gt;_SYSSMU2$ ONLINE UNDOTBS1&lt;br /&gt;_SYSSMU3$ ONLINE UNDOTBS1&lt;br /&gt;_SYSSMU4$ ONLINE UNDOTBS1&lt;br /&gt;_SYSSMU5$ ONLINE UNDOTBS1&lt;br /&gt;_SYSSMU6$ ONLINE UNDOTBS1&lt;br /&gt;_SYSSMU7$ ONLINE UNDOTBS1&lt;br /&gt;_SYSSMU8$ ONLINE UNDOTBS1&lt;br /&gt;_SYSSMU9$ ONLINE UNDOTBS1&lt;br /&gt;_SYSSMU10$ ONLINE UNDOTBS1&lt;br /&gt;_SYSSMU21$ ONLINE UNDOTBS1&lt;br /&gt;&lt;br /&gt;9. Now drop bad undo TABLESPACE UNDOTBS2;&lt;br /&gt;&lt;br /&gt;SQL&gt; drop TABLESPACE UNDOTBS2;&lt;br /&gt;&lt;br /&gt;10. Recreate the undo rollback tablespace with all its rollback segments&lt;br /&gt;&lt;br /&gt;SQL&gt;CREATE UNDO TABLESPACE UNDOTBS1 DATAFILE 'C:\oradata\DB\UNDOTBS01.DBF' SIZE 2000M reuse AUTOEXTEND ON ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11. Change undo tablespace&lt;br /&gt;&lt;br /&gt;ALTER SYSTEM SET undo_tablespace = UNDOTBS1 ;&lt;br /&gt;&lt;br /&gt;12. Remove the following line from pfile&lt;br /&gt;&lt;br /&gt;_corrupted_rollback_segments =('_SYSSMU11$','_SYSSMU12$','_SYSSMU13$','_SYSSMU14$','_SYSSMU15$','_SYSSMU16 $','_SYSSMU17$','_SYSSMU18$','_SYSSMU19$','_SYSSMU20$')&lt;br /&gt;&lt;br /&gt;and uncomment “undo_management=AUTO”&lt;br /&gt;&lt;br /&gt;undo_management=AUTO&lt;br /&gt;undo_retention=10800&lt;br /&gt;undo_tablespace=UNDOTBS1&lt;br /&gt;&lt;br /&gt;13. Shutdown database&lt;br /&gt;&lt;br /&gt;SQL&gt;shutdown immediate;&lt;br /&gt;&lt;br /&gt;14. Edit initCRM_18.ora, make sure you change ‘undo_tablespace=UNDOTBS2″ to “undo_tablespace=UNDOTBS1″, then start oracle database:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;sqlplus /nolog&lt;br /&gt;SQL&gt;connect sys/change@db as sysdba&lt;br /&gt;SQL&gt; STARTUP RESTRICT MOUNT pfile=C:\Oracle\db\initdb.ora&lt;br /&gt;ORACLE instance started.&lt;br /&gt;Total System Global Area 1620126452 bytes&lt;br /&gt;Fixed Size 457460 bytes&lt;br /&gt;Variable Size 545259520 bytes&lt;br /&gt;Database Buffers 1073741824 bytes&lt;br /&gt;Redo Buffers 667648 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;Database opened.&lt;br /&gt;&lt;br /&gt;15. Create Undo tablespace:&lt;br /&gt;&lt;br /&gt;SQL&gt;CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE 'C:\oradata\db\UNDOTBS02.DBF' SIZE 2000M reuse AUTOEXTEND ON ;&lt;br /&gt;SQL&gt;DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES ;&lt;br /&gt;&lt;br /&gt;16. Startup database with spfile&lt;br /&gt;&lt;br /&gt;SQL&gt; startup;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;Total System Global Area 1620126452 bytes&lt;br /&gt;Fixed Size 457460 bytes&lt;br /&gt;Variable Size 545259520 bytes&lt;br /&gt;Database Buffers 1073741824 bytes&lt;br /&gt;Redo Buffers 667648 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;Database opened.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-4907559596894634892?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/4907559596894634892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=4907559596894634892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/4907559596894634892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/4907559596894634892'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2008/12/how-to-recreate-undo-tablespace.html' title='How to recreate a undo tablespace'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-5446268353460133618</id><published>2008-12-12T01:52:00.000-08:00</published><updated>2008-12-12T02:04:19.554-08:00</updated><title type='text'>Oracle 10g CLONE FROM RAC TO NON-RAC (RMAN)</title><content type='html'>&lt;strong&gt;Database&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Target database – PRD10G                         =&gt; This is the source database in RACRecovery Catalog – RMCAT10G (in Machard)         =&gt; This is the catalog database for RMANAuxillary database(New DB) – TST                 =&gt; This is the target database Non-RAC&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;Note:&lt;/span&gt;&lt;/em&gt; Backups are in tape , MML is Netbackup&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Steps&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;1. The first step would be to create a auxillary instance, which will be in no-mount state.To prepare a instance, create a pfile from the spfile of PRD10G.&lt;br /&gt;Eg. Create pfile=’/tmp/initprd.ora’ from spfile;&lt;br /&gt;&lt;br /&gt;2. Then edit this pfile to remove all the parameters denoting the Cluster, in our case I commented it as below;&lt;br /&gt;#tst1.__db_cache_size=260046848#tst2.__db_cache_size=260046848....#*.cluster_database=true#*.remote_listener='LISTENERS_tst'*.background_dump_dest='/rdbms/v10.1/admin/tst/bdump'*.compatible='10.1.0.4.0'*.control_files='+DG4_DEV/tst/controlfile/backup.277.629493875','+DG_DEV/tst/controlfile/backup.264.629493875'*.core_dump_dest='/rdbms/v10.1/admin/tst/cdump'*.user_dump_dest='/rdbms/v10.1/admin/tst/udump'*.db_block_size=8192*.db_create_file_dest='+DG4_DEV'  ===&gt; Modify it accoring to the file system or ASM diskgroup in the destination server....*.sessions=170*.sga_target=471859200*.undo_management='AUTO'undo_tablespace='UNDOTBS1'&lt;br /&gt;3. Create a password file to login remote to the auxillay instance.&lt;br /&gt;&lt;br /&gt;4.  Add entries to the Listener.ora file and also add the prd and rmcat10g entries to the tnsnames.ora if they are not available.&lt;br /&gt;&lt;br /&gt;5. Create any directories specified in the pfile eg.bdump,udump etc.&lt;br /&gt;&lt;br /&gt;6. Use this pfile to startup the new instance in nomount mode&lt;br /&gt;Startup new instance to check if all parameters are correct and for further RMAN operations&lt;br /&gt;SQL&gt; show parameter cluster_database&lt;br /&gt;NAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------cluster_database                     boolean     FALSEcluster_database_instances           integer     1&lt;br /&gt;SQL&gt; show parameter thread&lt;br /&gt;NAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------thread                               integer     0&lt;br /&gt;&lt;br /&gt;7. Check the location of the target database datafiles so that we can specify the new names for them, in our case:&lt;br /&gt;SQL&gt; select name from v$datafile;&lt;br /&gt;NAME--------------------------------------------------------------------------------+DG4/prd/datafile/system.260.629141721+DG4/prd/datafile/undotbs1.276.629141721...+DG4/prd/datafile/usermgr_admin.256.629142617&lt;br /&gt;12 rows selected.&lt;br /&gt;&lt;br /&gt;8. Connect to RMAN with – PRD as target, RMCAT10G as catalog and TST as Auxiliary instances.&lt;br /&gt;&lt;br /&gt;9. From the catalog RC_% Views find the time or SCN that you want to duplicate, In our case it is up to a specific time.&lt;br /&gt;&lt;br /&gt;10. Then run a run block similar to this:&lt;br /&gt;run{allocate auxiliary channel c1 device type sbt  PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';allocate auxiliary channel c2 device type sbt  PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';&lt;br /&gt;duplicate target database to 'tst' db_file_name_convert=('+DG4/prd/datafile/','+DG4_DEV/tst/datafile/')logfilegroup 1('+DG4_DEV/tst/onlinelog/redo01.log') size 100M,group 2 ('+DG4_DEV/tst/onlinelog/redo02.log') size 100MUNTIL TIME "to_date('2007-08-08:07:00:00','YYYY-MM-DD:HH24:MI:SS')" ;&lt;br /&gt;release channel c1;release channel c2;}&lt;br /&gt;&lt;br /&gt;This will clone a database called tst from prd as a non-rac database.&lt;br /&gt;&lt;br /&gt;Happy cloning.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-5446268353460133618?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/5446268353460133618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=5446268353460133618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/5446268353460133618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/5446268353460133618'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2008/12/oracle-10g-clone-from-rac-to-non-rac.html' title='Oracle 10g CLONE FROM RAC TO NON-RAC (RMAN)'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-3429591552470747107</id><published>2008-11-07T10:27:00.000-08:00</published><updated>2008-11-07T10:30:32.267-08:00</updated><title type='text'>Enabling Trace in Oracle</title><content type='html'>Tracing a session is a imporatant phase of a problem analysis for a query,job in Oracle.There are various methods of enabling trace for sessions.Following are a few methods for enabling trace.&lt;br /&gt;To check if any trace is enabled in the current database, the following query can be used:&lt;br /&gt;&lt;em&gt;select * from DBA_ENABLED_TRACES ;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;1. Enable trace at instance level&lt;br /&gt;&lt;/strong&gt;Start trace:&lt;br /&gt;SQLPLUS&gt; ALTER SYSTEM SET sql_trace = TRUE;&lt;br /&gt;Stop trace:&lt;br /&gt;SQLPLUS&gt; ALTER SYSTEM SET sql_trace = FALSE;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Enable trace for the current session&lt;/strong&gt;&lt;br /&gt;Start trace:&lt;br /&gt;ALTER SESSION SET sql_trace = TRUE; (or)EXECUTE dbms_session.set_sql_trace (TRUE); (or)EXECUTE dbms_support.start_trace;Stop trace:&lt;br /&gt;ALTER SESSION SET sql_trace = FALSE; (or)EXECUTE dbms_session.set_sql_trace (FALSE); (or)EXECUTE dbms_support.stop_trace;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Enable trace in another session&lt;br /&gt;&lt;/strong&gt;Find out SID and SERIAL# from v$session. For example:&lt;br /&gt;Start trace:&lt;br /&gt;EXECUTE DBMS_MONITOR..start_trace_in_session (SID, SERIAL#);&lt;br /&gt;&lt;em&gt;With Waits&lt;/em&gt; and Binds&lt;br /&gt;EXECUTE DBMS_MONITOR.SESSION_TRACE_ENABLE(SID, SERIAL#, waits=&gt;TRUE);&lt;br /&gt;&lt;em&gt;With Waits &lt;/em&gt;&lt;br /&gt;EXECUTE DBMS_MONITOR.SESSION_TRACE_ENABLE(SID, SERIAL#, waits=&gt;TRUE, binds=&gt;TRUE);&lt;br /&gt;&lt;br /&gt;Stop trace:&lt;br /&gt;EXECUTE dbms_support.stop_trace_in_session (SID, SERIAL#);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-3429591552470747107?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/3429591552470747107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=3429591552470747107' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/3429591552470747107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/3429591552470747107'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2008/11/enabling-trace-in-oracle.html' title='Enabling Trace in Oracle'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-8090659050723963200</id><published>2008-11-06T06:09:00.000-08:00</published><updated>2008-11-06T06:14:53.676-08:00</updated><title type='text'>Oracle 10g - RMAN Block change tracking</title><content type='html'>There are performance issues associated with incremental backups where most of the times we have issues with the CPU/IO being consumed more. In Oracle 10g it is possible to track changed blocks using a change tracking file.&lt;br /&gt;&lt;br /&gt; Prior to introduction of Oracle 10g block change tracking (BCT), RMAN had to scan the whole datafile to and filter out the blocks that were not changed since base incremental backup and overhead or incremental backup was as high as full backup. Oracle 10g new feature, block change tracking, minimizes number of blocks RMAN needs to read to a strict minimum. With block change tracking enabled RMAN accesses on disk only blocks that were changed since the latest base incremental backup.&lt;br /&gt;&lt;br /&gt;Enabling change tracking does produce a small overhead, but it greatly improves the performance of incremental backups.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;The current change tracking status can be displayed using the following query:&lt;br /&gt;&lt;/em&gt;SELECT status FROM v$block_change_tracking;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Change tracking is enabled using the ALTER DATABASE command:&lt;/em&gt;&lt;br /&gt;ALTER DATABASE ENABLE BLOCK CHANGE TRACKING   USING FILE '/ts1/oradata/block_change_track.dbf';&lt;br /&gt;&lt;br /&gt;The tracking file is created with a minumum size of 10M and grows in 10M increments. It's size is typically 1/30,000 the size of the datablocks to be tracked.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Change tracking can be disabled using the following command:&lt;/em&gt;&lt;br /&gt;ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;&lt;br /&gt;&lt;br /&gt;Renaming or moving a tracking file can be accomplished in the normal way using the ALTER DATABASE RENAME FILE command. If the instance cannot be restarted you can simply disable and re-enable change tracking to create a new file. This method does result in the loss of any current change information.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Background Process &lt;/em&gt;– Change Tracking Writer (CTWR). This process takes care of logging information about changed blocks in block change tracking file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-8090659050723963200?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/8090659050723963200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=8090659050723963200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/8090659050723963200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/8090659050723963200'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2008/11/oracle-10g-rman-block-change-tracking.html' title='Oracle 10g - RMAN Block change tracking'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-1839306988106721021</id><published>2008-10-30T05:22:00.000-07:00</published><updated>2008-10-30T05:25:26.152-07:00</updated><title type='text'>Increasing the Speed of Export</title><content type='html'>Exporting data is a common day to day activity done by most of the DBA's, and when it comes to speeding up the Export jobs these are few tips on it :&lt;br /&gt;&lt;br /&gt;• Use &lt;strong&gt;Direct Path&lt;/strong&gt; – Direct path exports (DIRECT=Y) allow the export utility to skip the SQL evaluation buffer, whereas the conventional path export executes SQL SELECT statements. With direct path, the data is read from disk into the buffer cache, returning rows directly to the export client. This can offer substantial performance gains, depending on the actual data. When using the direct path, the recordlength parameter should also be used to optimize performance.&lt;br /&gt;&lt;br /&gt;• Use Subsets – By subsetting the data using the &lt;strong&gt;QUERY&lt;/strong&gt; option, the export process is only executed against the data that needs to be exported. If tables have old rows that are never updated, the old data should be exported once, and from that point only the newer data subsets should be exported. Subsets cannot be specified with direct path exports since SQL is necessary to create the subset.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note:&lt;/em&gt; Use a par file for the query as it can help reduce a lot of formatting on the command.&lt;br /&gt;&lt;br /&gt;• Use a Larger Buffer – For conventional path exports, a larger buffer will increase the number of rows that are processed between each physical write to the export file. Fewer physical writes equals greater performance. The following formula can be used to determine a proper buffer size:&lt;br /&gt;&lt;strong&gt;buffer size&lt;/strong&gt; = rows in array * max row size&lt;br /&gt;&lt;br /&gt;• Separate Tables – Separate those tables that require consistent=y from those that don’t, in order to expedite the export. This way, the performance penalty will only be incurred for those tables that actually require it.&lt;br /&gt;For the table with one million rows, the following benchmark tests were performed using the different export options.&lt;br /&gt;&lt;br /&gt;• &lt;strong&gt;Indexes=No&lt;/strong&gt; - This will reduce the time taken to export the indexes which is worth creating after the import.&lt;br /&gt;&lt;br /&gt;• Set a higher value for the &lt;strong&gt;recordlength&lt;/strong&gt; parameter - Specifies the length of the file record in bytes.  This parameter affects the amount of data that accumulates before it is written to disk. The highest value is 64KB.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-1839306988106721021?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/1839306988106721021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=1839306988106721021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/1839306988106721021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/1839306988106721021'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2008/10/increasing-speed-of-export.html' title='Increasing the Speed of Export'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-2965916584396383976</id><published>2008-10-24T06:34:00.000-07:00</published><updated>2008-10-24T07:07:37.811-07:00</updated><title type='text'>Backing up OCR and Voting Disk</title><content type='html'>&lt;strong&gt;Backup OCR&lt;/strong&gt;&lt;br /&gt;============&lt;br /&gt;&lt;br /&gt;There are a couple of methods to backup the OCR.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note:&lt;/em&gt; Oracle automatically backs up the OCR every 4 hours.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BAckup can be done using the ocrconfig tool to add a backup location.&lt;br /&gt;&lt;br /&gt;ocrconfig -backuploc &lt;location&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note:&lt;/em&gt;This command has to be run as root&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A logical backup can be taken using the ocrconfig tool.&lt;br /&gt;&lt;br /&gt;ocrconfig -export &lt;filename&gt;&lt;br /&gt;&lt;br /&gt;a logical backup can only be imported using the ocrconfig tool.&lt;br /&gt;&lt;br /&gt;ocrconfig -import &lt;filename&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A OCR mirror location can be specified for Oracle 10GR2 using ocrconfig.&lt;br /&gt;&lt;br /&gt;ocrconfig -replace ocrmirror &lt;filename&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;BAckup Voting disk&lt;/strong&gt;&lt;br /&gt;===================&lt;br /&gt;&lt;br /&gt;When raw devices are used for the voting disks, backup on UNIX platform can be taken by dd command&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;dd if=/dev/rdsk/vot1 of=$ORACLE_HOME/votebackup/&lt;filename&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-2965916584396383976?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/2965916584396383976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=2965916584396383976' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/2965916584396383976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/2965916584396383976'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2008/10/backing-up-ocr-and-voting-disk.html' title='Backing up OCR and Voting Disk'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701495011437148641.post-8682401268318547531</id><published>2008-09-23T23:10:00.000-07:00</published><updated>2008-09-23T23:29:02.643-07:00</updated><title type='text'>ASM - Adding a new diskgroup</title><content type='html'>ASM new disk groups can be created easily and the steps below can be followed to achieve the same:&lt;br /&gt;&lt;br /&gt;1.Check the available disks for adding to the diskgroup with header status candidate&lt;br /&gt;   Log on to the ASM instance and check the header status of the disks to see which are the disks available for ASM.The Candidate disks can be used to create a new diskgroup or for adding it to a existing diskgroup.&lt;br /&gt;&lt;br /&gt;Query: select HEADER_STATUS,MODE_STATUS,NAME,PATH,TOTAL_MB,FREE_MB from v$asm_disk;&lt;br /&gt;&lt;br /&gt;Sample Output:&lt;br /&gt;MOUNT_S HEADER_STATU MODE_ST NAME               PATH                        TOTAL_MB    FREE_MB------- ------------ ------- ------------------ ------------------------- ---------- ----------CLOSED  CANDIDATE    ONLINE                     /dev/raw/raw35                548437          0CLOSED  CANDIDATE    ONLINE                     /dev/raw/raw36                548437          0CLOSED  CANDIDATE    ONLINE                     /dev/raw/raw37                548437          0CLOSED  CANDIDATE    ONLINE                     /dev/raw/raw38                548437          0CLOSED  CANDIDATE    ONLINE                     /dev/raw/raw39                548437          0CLOSED  CANDIDATE    ONLINE                     /dev/raw/raw40                548437         &lt;br /&gt;&lt;br /&gt;2. Find the current diskgroup names&lt;br /&gt;&lt;br /&gt;Query:select name,total_mb from v$asm_dikgroup;&lt;br /&gt;&lt;br /&gt;3. Create a new diskgroup with the new name- (There will be no rebalancing here)&lt;br /&gt;  Creating a new diskgroup will not have rebalancing operation.There is an option for redundancy at the ASM level, in the example I have redundancy at the hardware level hence the diskgroup has a clause for external redundancy.&lt;br /&gt;&lt;br /&gt;Query: CREATE DISKGROUP DG9 EXTERNAL REDUNDANCY disk '/dev/raw/raw35','/dev/raw/raw36','/dev/raw/raw37','/dev/raw/raw38','/dev/raw/raw39','/dev/raw/raw40';&lt;br /&gt;&lt;br /&gt;4. Other instances will not mount the new diskgroup hence add an entry in the spfile , so they will be monted from the next startup and manually mount them for this first time.&lt;br /&gt;&lt;br /&gt;Query : ALTER DISKGROUP DG9 MOUNT;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701495011437148641-8682401268318547531?l=balaji-dba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://balaji-dba.blogspot.com/feeds/8682401268318547531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=701495011437148641&amp;postID=8682401268318547531' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/8682401268318547531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701495011437148641/posts/default/8682401268318547531'/><link rel='alternate' type='text/html' href='http://balaji-dba.blogspot.com/2008/09/asm-adding-new-diskgroup.html' title='ASM - Adding a new diskgroup'/><author><name>Balaji R</name><uri>http://www.blogger.com/profile/02942522596997332393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
