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

<channel>
	<title>Kamran Agayev&#039;s Oracle Blog</title>
	<atom:link href="http://kamranagayev.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kamranagayev.com</link>
	<description>Kamran Agayev&#039;s Oracle Blog</description>
	<lastBuildDate>Thu, 13 Jun 2013 05:10:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Moving RAC redolog files to the new ASM diskgroup</title>
		<link>http://kamranagayev.com/2013/05/17/moving-rac-redolog-files-to-the-new-asm-diskgroup/</link>
		<comments>http://kamranagayev.com/2013/05/17/moving-rac-redolog-files-to-the-new-asm-diskgroup/#comments</comments>
		<pubDate>Fri, 17 May 2013 12:38:35 +0000</pubDate>
		<dc:creator>Kamran Agayev A.</dc:creator>
				<category><![CDATA[Administration]]></category>

		<guid isPermaLink="false">http://kamranagayev.com/?p=1880</guid>
		<description><![CDATA[Here&#8217;re the steps you need to perform in order to move redo log files to the different ASM diskgroup in a RAC environment First of all, make sure you&#8217;ve been provided shared disks by system administrators. If you&#8217;re using asmlib, create disks using oracleasm as follows: [oracle@node1 ~] sudo /etc/init.d/oracleasm createdisk RLOGS /dev/mapper/mpath6 Then run [...]]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;re the steps you need to perform in order to move redo log files to the different ASM diskgroup in a RAC environment </p>
<p>First of all, make sure you&#8217;ve been provided shared disks by system administrators. If you&#8217;re using asmlib, create disks using oracleasm as follows: </p>
<p>[oracle@node1 ~] sudo /etc/init.d/oracleasm createdisk RLOGS /dev/mapper/mpath6</p>
<p>Then run scan and query new disks from other nodes: </p>
<p>[oracle@node2 ~]$ sudo /etc/init.d/oracleasm scandisks<br />
[oracle@node2 ~]$ sudo /etc/init.d/oracleasm listdisks</p>
<p>After having your disk added to the list, query it from /dev/oracleasm/disks folder:<br />
[oracle@node1 ~]$ ls -ltr /dev/oracleasm/disks/</p>
<p>If you got the disk, then everything is ok. Now you can connect to the ASM instance and create a diskgroup. For this, get the name of the ASM instance from OS and connect to it:<br />
ps -ef | grep ASM<br />
export ORACLE_SID=+ASM1<br />
sqlplus / as sysdba</p>
<p>SQL> create diskgroup RLOGS external redundancy<br />
  2  DISK &#8216;/dev/oracleasm/disks/RLOGS&#8217;;</p>
<p>Diskgroup created.</p>
<p>SQL> </p>
<p>If it&#8217;s not mounted on the rest nodes, connect to those nodes and mount it manually:<br />
SQL>alter diskgroup RLOGS mount;</p>
<p>And also make sure the name of the disk group is added to asm_diskstrings parameter at ASM instance</p>
<p>After having your disk group created, create new redo log group per thread, and remove on redo log group from the same thread which has INACTIVE status<br />
You can check the status of any group based on thread using V$LOG view: </p>
<p>  SELECT   group#, thread#, status<br />
    FROM   v$log<br />
   WHERE   thread# = 2<br />
ORDER BY   2, 1</p>
<p>    GROUP#    THREAD# STATUS<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;-<br />
        20          2 CURRENT<br />
        21          2 INACTIVE</p>
<p>Now add new group to the same thread (thread#=2) and check v$logfile view: </p>
<p>SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 22 (&#8216;+RLOGS&#8217;) SIZE 50M</p>
<p>SELECT   lf.group#, lf.MEMBER<br />
  FROM   v$logfile lf, v$log l<br />
 WHERE   lf.group# = l.group# AND l.thread# = 2</p>
<p>    GROUP# MEMBER<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
        20 +OLD_LOG/PROD/onlinelog/group_20.259.815656575<br />
        21 +OLD_LOG/PROD/onlinelog/group_21.260.815656475<br />
        22 +RLOGS/PROD/onlinelog/group_22.260.815656475</p>
<p>Now you can safely delete INACTIVE redo log group from the same thread: </p>
<p>SQL> ALTER DATABASE DROP LOGFILE GROUP 21;</p>
<p>Perform above mentioned steps one by one for each thread. </p>
<p>Each time switch log file and make sure the new redo log member is used. Moreover, try to query both sql commands that are written above after each time you add and drop redo log group to see if it&#8217;s added/deleted successfully. </p>
]]></content:encoded>
			<wfw:commentRss>http://kamranagayev.com/2013/05/17/moving-rac-redolog-files-to-the-new-asm-diskgroup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TT0802: Database permanent space exhausted (TimesTen db)</title>
		<link>http://kamranagayev.com/2013/04/18/tt0802-database-permanent-space-exhausted-timesten-db/</link>
		<comments>http://kamranagayev.com/2013/04/18/tt0802-database-permanent-space-exhausted-timesten-db/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 11:21:18 +0000</pubDate>
		<dc:creator>Kamran Agayev A.</dc:creator>
				<category><![CDATA[TimesTen]]></category>

		<guid isPermaLink="false">http://kamranagayev.com/?p=1871</guid>
		<description><![CDATA[During TimesTen stress test, we&#8217;ve encountered the following error while trying to perform bulk insert : TT0802: Database permanent space exhausted &#8212; file &#8220;blk.c&#8221;, lineno 3477, procedure &#8220;sbBlkAlloc&#8221;" The reason is because of the PERM_ALLOCATED_SIZE parameter defined in sys.odbc.ini file. The default value is 64MB which is small for performing bulk-insert and stress-test. You can get [...]]]></description>
				<content:encoded><![CDATA[<p>During TimesTen stress test, we&#8217;ve encountered the following error while trying to perform bulk insert :</p>
<p><strong>TT0802: Database permanent space exhausted &#8212; file &#8220;blk.c&#8221;, lineno 3477, procedure &#8220;sbBlkAlloc&#8221;"</strong></p>
<p>The reason is because of the <strong>PERM_ALLOCATED_SIZE </strong>parameter defined in sys.odbc.ini file. The default value is 64MB which is small for performing bulk-insert and stress-test. You can get this value either from sys.odbc.ini file, or using dssize command from ttIsql</p>
<p><strong>Command&gt; dssize</strong></p>
<p><strong>PERM_ALLOCATED_SIZE: 65536</strong><br />
PERM_IN_USE_SIZE: 64973<br />
PERM_IN_USE_HIGH_WATER: 65408<br />
TEMP_ALLOCATED_SIZE: 49152<br />
TEMP_IN_USE_SIZE: 11242<br />
TEMP_IN_USE_HIGH_WATER: 12445</p>
<p>Command&gt; exit</p>
<p>&nbsp;</p>
<p>In order to increase this paramter, switch to $TIMESTEN_HOME/info folder and change PERM_ALLOCATED_SIZE parameter inside the required cache group:</p>
<p>[prod_db]<br />
DataStore=/home/oracle/OracleCache/datastore1<br />
<strong>PermSize=10000</strong><br />
OracleNetServiceName=PROD_DB<br />
DatabaseCharacterSet=WE8ISO8859P1</p>
<p>&nbsp;</p>
<p>Here, we changed the parameter to 10GB.  Now restart the TimesTen deamon and check the value again:</p>
<p>[oracle@timesten info]$ ttDaemonAdmin -stop<br />
TimesTen Daemon stopped.<br />
[oracle@timesten info]$ ttDaemonAdmin -start<br />
TimesTen Daemon startup OK.</p>
<p>&nbsp;</p>
<p>Command&gt; dssize</p>
<p><strong>PERM_ALLOCATED_SIZE: 10240000</strong><br />
PERM_IN_USE_SIZE: 64593<br />
PERM_IN_USE_HIGH_WATER: 64593<br />
TEMP_ALLOCATED_SIZE: 49152<br />
TEMP_IN_USE_SIZE: 8711<br />
TEMP_IN_USE_HIGH_WATER: 8775</p>
<p>Command&gt;</p>
<p>&nbsp;</p>
<p>Now, run the bulk insert again and you&#8217;ll not get the error, instead you&#8217;ll get PERM_IN_USE_SIZE value increased</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kamranagayev.com/2013/04/18/tt0802-database-permanent-space-exhausted-timesten-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Step by Step Oracle 10g RAC installation ebook</title>
		<link>http://kamranagayev.com/2013/03/15/step-by-step-oracle-10g-rac-installation-ebook/</link>
		<comments>http://kamranagayev.com/2013/03/15/step-by-step-oracle-10g-rac-installation-ebook/#comments</comments>
		<pubDate>Fri, 15 Mar 2013 07:36:47 +0000</pubDate>
		<dc:creator>Kamran Agayev A.</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kamranagayev.com/?p=1855</guid>
		<description><![CDATA[From the following link you can download my Step by Step Oracle 10g RAC installation on VMware ebook]]></description>
				<content:encoded><![CDATA[<p>From the following link you can download my Step by Step Oracle 10g RAC installation on VMware ebook</p>
<p style="text-align: center;"><a href="http://kamranagayev.com/wp-content/plugins/download-monitor/download.php?id=4"><img class="wp-image-1857 aligncenter" title="Step by Step RAC installation" src="http://kamranagayev.com/wp-content/uploads/2013/03/Step-by-Step-RAC.png" alt="" width="384" height="403" /></a></p>
<p style="text-align: center;">Downloaded 717 times</p>
]]></content:encoded>
			<wfw:commentRss>http://kamranagayev.com/2013/03/15/step-by-step-oracle-10g-rac-installation-ebook/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Debugging Data Pump session</title>
		<link>http://kamranagayev.com/2013/03/11/debugging-data-pump-session/</link>
		<comments>http://kamranagayev.com/2013/03/11/debugging-data-pump-session/#comments</comments>
		<pubDate>Mon, 11 Mar 2013 10:30:07 +0000</pubDate>
		<dc:creator>Kamran Agayev A.</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kamranagayev.com/?p=1838</guid>
		<description><![CDATA[While importing a dump file, sometimes it takes too long and seems to be “hanging” and processing something unknown in the background, or queuing for something. As a DBA, you HAVE NOT wait “until it finishes”. You have to try to find out the solution. Yesterday, while importing a metadata of a big database, the [...]]]></description>
				<content:encoded><![CDATA[<p>While importing a dump file, sometimes it takes too long and seems to be “hanging” and processing something unknown in the background, or queuing for something. As a DBA, you HAVE NOT wait “until it finishes”. You have to try to find out the solution.</p>
<p>Yesterday, while importing a metadata of a big database, the session hold and took hours to finish.</p>
<p>This is the command I run to import the dump file into the new database:</p>
<p><strong>impdp system/oracle directory=mydir dumpfile=dump01.dmp exclude=tablespace, statistics parfile=param.ini METRICS=y </strong></p>
<p>The session was hold in the following section:</p>
<p><em>Processing object type DATABASE_EXPORT/SCHEMA/CLUSTER/CLUSTER</em></p>
<p><em>     Completed 1 CLUSTER objects in 0 seconds</em></p>
<p><em>Processing object type DATABASE_EXPORT/SCHEMA/CLUSTER/INDEX</em></p>
<p><em>     Completed 1 INDEX objects in 0 seconds</em></p>
<p><em>Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE</em></p>
<p>Note: I suggest that we use undocumented <strong>METRICS=Y</strong> parameter to get information about the number of objects and the time it takes to process them into the log file</p>
<p>I waited shortly and was curious about the activities in the background, so decided to debug the Data Pump session and run the following query to get the SID and SERIAL number of the running data pump sessions. These values will be used to trace the session in the next step:</p>
<p><strong>col username format a10</strong><br />
<strong>set linesize 150</strong><br />
<strong>col job_name format a20</strong><br />
<strong>col program format a25</strong><br />
<strong>SELECT TO_CHAR (SYSDATE, &#8216;YYYY-MM-DD HH24:MI:SS&#8217;) &#8220;DATE&#8221;,</strong><br />
<strong>     s.program,</strong><br />
<strong>      s.sid,</strong><br />
<strong>      s.status,</strong><br />
<strong>      s.username,</strong><br />
<strong>      d.job_name,</strong><br />
<strong>      p.spid,</strong><br />
<strong>      s.serial#,</strong><br />
<strong>      p.pid</strong><br />
<strong> FROM V$SESSION s, V$PROCESS p, DBA_DATAPUMP_SESSIONS d</strong><br />
<strong> WHERE p.addr = s.paddr AND s.saddr = d.saddr;</strong></p>
<p><strong>DATE                PROGRAM                          SID STATUS   USERNAME   JOB_NAME             SPID            SERIAL#        PID</strong></p>
<p><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</strong></p>
<p><strong>2013-03-07 14:52:04 udi@TestDB02 (TNS V1-V3)         152 ACTIVE   SYSTEM     SYS_IMPORT_FULL_01   12143                36         17</strong></p>
<p><strong>2013-03-07 14:52:04 oracle@TestDB02 (DM00)           148 ACTIVE   SYSTEM     SYS_IMPORT_FULL_01   12147                 3         19</strong></p>
<p><strong>2013-03-07 14:52:04 oracle@TestDB02 (DW01)           142 ACTIVE   SYSTEM     SYS_IMPORT_FULL_01   12149                15         20</strong></p>
<p style="text-align: center;"><a href="http://kamranagayev.com/2013/03/11/debugging-data-pump-session/pic1-2/" rel="attachment wp-att-1839"><img class="wp-image-1839 alignleft" title="Pic1" src="http://kamranagayev.com/wp-content/uploads/2013/03/Pic1.png" alt="" width="836" height="96" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Then I queried V$SESSION_WAIT view to get the waiting event:</p>
<p><strong>SELECT   w.sid, w.event, w.seconds_in_wait</strong></p>
<p><strong>  FROM   V$SESSION s, DBA_DATAPUMP_SESSIONS d, V$SESSION_WAIT w</strong></p>
<p><strong> WHERE   s.saddr = d.saddr AND s.sid = w.sid;</strong></p>
<p><strong>     SID EVENT                                                            SECONDS_IN_WAIT</strong></p>
<p><strong>&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;</strong></p>
<p><strong>       142 control file sequential read                                                                  1</strong></p>
<p><strong>       148 wait for unread message on broadcast channel                                  43</strong></p>
<p><strong>       152 wait for unread message on broadcast channel                                 306</strong></p>
<p>If you run the same query a number of times, you’ll see how the wait event changes:<br />
<a href="http://kamranagayev.com/2013/03/11/debugging-data-pump-session/pic2/" rel="attachment wp-att-1842"><img title="Pic2" src="http://kamranagayev.com/wp-content/uploads/2013/03/Pic2.png" alt="" width="735" height="235" /></a></p>
<p>To get detailed information I decided to debug the first session (SID = 142) and provided values of SID and SERIAL# columns to DBMS_SYSTEM.SET_EV procedure and started the trace:</p>
<p><strong>SQL&gt;  EXECUTE SYS.DBMS_SYSTEM.SET_EV (142,15,10046,8,&#8221;);</strong></p>
<p>Then I switched to <em>udump</em> folder and checked the file labeled “dbname_ora_PID” – “testdb_ora_12149”</p>
<p><em>-bash-4.2$ tail -f testdb_ora_12149.trc</em></p>
<p><em>WAIT #4: nam=&#8217;Data file init write&#8217; ela= 3 count=4294967295 intr=32 timeout=2147483647 obj#=51780 tim=13410366772411</em></p>
<p><em>WAIT #4: nam=&#8217;control file sequential read&#8217; ela= 21 file#=0 block#=1 blocks=1 obj#=51780 tim=13410366772623</em></p>
<p><em>WAIT #4: nam=&#8217;control file sequential read&#8217; ela= 15 file#=1 block#=1 blocks=1 obj#=51780 tim=13410366772660</em></p>
<p><em>WAIT #4: nam=&#8217;control file sequential read&#8217; ela= 15 file#=2 block#=1 blocks=1 obj#=51780 tim=13410366772695</em></p>
<p><em>WAIT #4: nam=&#8217;control file sequential read&#8217; ela= 13 file#=0 block#=16 blocks=1 obj#=51780 tim=13410366772728</em></p>
<p><em>WAIT #4: nam=&#8217;control file sequential read&#8217; ela= 13 file#=0 block#=18 blocks=1 obj#=51780 tim=13410366772760</em></p>
<p><em>WAIT #4: nam=&#8217;control file sequential read&#8217; ela= 13 file#=0 block#=24 blocks=1 obj#=51780 tim=13410366772802</em></p>
<p><em>WAIT #4: nam=&#8217;db file sequential read&#8217; ela= 12 file#=4 block#=1 blocks=1 obj#=51780 tim=13410366772834</em></p>
<p><em>WAIT #4: nam=&#8217;db file single write&#8217; ela= 11313 file#=4 block#=1 blocks=1 obj#=51780 tim=13410366784170</em></p>
<p><em>WAIT #4: nam=&#8217;control file parallel write&#8217; ela= 38910 files=3 block#=17 requests=3 obj#=51780 tim=13410366823104</em></p>
<p><em>WAIT #4: nam=&#8217;control file parallel write&#8217; ela= 46532 files=3 block#=15 requests=3 obj#=51780 tim=13410366869661</em></p>
<p><em>WAIT #4: nam=&#8217;control file parallel write&#8217; ela= 40258 files=3 block#=1 requests=3 obj#=51780 tim=13410366909955</em></p>
<p><em>WAIT #4: nam=&#8217;control file sequential read&#8217; ela= 12 file#=0 block#=1 blocks=1 obj#=51780 tim=13410366909986</em></p>
<p><em>WAIT #4: nam=&#8217;rdbms ipc reply&#8217; ela= 7016 from_process=5 timeout=21474836 p3=0 obj#=51780 tim=13410366917049</em></p>
<p><em>=====================</em></p>
<p><em>PARSING IN CURSOR #15 len=296 dep=3 uid=0 oct=6 lid=0 tim=13410366917452 hv=2379717279 ad=&#8217;de799c58&#8242;</em></p>
<p><em>update seg$ set type#=:4,blocks=:5,extents=:6,minexts=:7,maxexts=:8,extsize=:9,extpct=:10,user#=:11,iniexts=:12,lists=decode(:13, 65535, NULL, :13),groups=decode(:14, 65535, NULL, :14), cachehint=:15, hwmincr=:16, spare1=DECODE(:17,0,NULL,:17),scanhint=:18 where ts#=:1 and file#=:2 and block#=:3</em></p>
<p><em>END OF STMT</em></p>
<p><em>PARSE #15:c=0,e=37,p=0,cr=0,cu=0,mis=0,r=0,dep=3,og=3,tim=13410366917447</em></p>
<p><em>EXEC #15:c=0,e=337,p=0,cr=5,cu=1,mis=0,r=1,dep=3,og=3,tim=13410366918000</em></p>
<p><em>STAT #15 id=1 cnt=0 pid=0 pos=1 obj=0 op=&#8217;UPDATE  SEG$ (cr=5 pr=0 pw=0 time=277 us)&#8217;</em></p>
<p><em>STAT #15 id=2 cnt=1 pid=1 pos=1 obj=14 op=&#8217;TABLE ACCESS CLUSTER SEG$ (cr=5 pr=0 pw=0 time=166 us)&#8217;</em></p>
<p><em>STAT #15 id=3 cnt=1 pid=2 pos=1 obj=9 op=&#8217;INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=2 pr=0 pw=0 time=31 us)&#8217;</em></p>
<p>By using tkprof I formatted content of the trace file into a readable output:</p>
<p><strong>tkprof testdb_ora_12149.trc impdp_output.dat</strong></p>
<p>And read the file:</p>
<p><em>insert into seg$ (file#,block#,type#,ts#,blocks,extents,minexts,maxexts,</em></p>
<p><em>extsize,extpct,user#,iniexts,lists,groups,cachehint,bitmapranges,hwmincr,</em></p>
<p><em>spare1, scanhint)</em></p>
<p><em>values</em></p>
<p><em>(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,0,:16,DECODE(:17,0,NULL,</em></p>
<p><em>:17),:18)</em></p>
<p><em>call     count       cpu    elapsed       disk      query    current        rows</em></p>
<p><em>&#8212;&#8212;- &#8212;&#8212;  &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-  &#8212;&#8212;&#8212;-</em></p>
<p><em>Parse      905      0.04       0.01          0          0          0           0</em></p>
<p><em>Execute    905      0.26       0.32          0       2756       6420         905</em></p>
<p><em>Fetch        0      0.00       0.00          0          0          0           0</em></p>
<p><em>&#8212;&#8212;- &#8212;&#8212;  &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-  &#8212;&#8212;&#8212;-</em></p>
<p><em>total     1810      0.30       0.34          0       2756       6420         905</em></p>
<p>Everything is fine. It’s importing the metadata into the database by inserting data to the seg$ (segments) table. I used tail command to get the output of the trace file and run the first query.</p>
<p>After a delay, I got “statement suspended, wait error to be cleared” message, checked alert.log file and found that the USERS tablespace is FULL</p>
<p>SQL&gt; /</p>
<p><em>SID EVENT                                                            SECONDS_IN_WAIT</em></p>
<p><em>&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;</em></p>
<p><em><strong>142 statement suspended, wait error to be cleared                       20</strong></em></p>
<p><em>148 wait for unread message on broadcast channel                                 905</em></p>
<p><em>152 wait for unread message on broadcast channel                                 246</em></p>
<p><em>SQL&gt;</em></p>
<p>tail –f Alert.log file</p>
<p><em>statement in resumable session &#8216;SYSTEM.SYS_IMPORT_FULL_01.1&#8242; was suspended due to</em></p>
<p><em>    ORA-01658: unable to create INITIAL extent for segment in tablespace USERS</em></p>
<p>After adding some space to the USERS tablespace the message disappeared.</p>
<p>Then suddenly I begin receiving “<strong>data file init write</strong>” wait event. That was the main reasons why the import took much time.</p>
<p><a style="text-align: center;" href="http://kamranagayev.com/2013/03/11/debugging-data-pump-session/pic3/" rel="attachment wp-att-1843"><img class="wp-image-1843" title="Pic3" src="http://kamranagayev.com/wp-content/uploads/2013/03/Pic3.png" alt="" width="766" height="102" /></a></p>
<p style="text-align: left;">The reason was that the AUTOEXTEND value of the datafile was set very low and Oracle was making too many calls to OS in order to add new extents</p>
<p>The output from the trace file was as follows:</p>
<p><strong>WAIT #4: nam=&#8217;Data file init write&#8217; ela= 3 count=4294967295 intr=32 timeout=2147483647 obj#=51780 tim=13410366772411</strong></p>
<p>In order to define the tablespace which is the cause of this event, I got the object id from the trace file (obj#=51780) and checked <strong>obj$ </strong>table.</p>
<p><strong>SELECT   name</strong></p>
<p><strong>  FROM   OBJ$</strong></p>
<p><strong> WHERE   obj# = 51780</strong></p>
<p>Then using DBMS_METADATA.GET_DLL function I got the tablespace name of the object that couldn’t be imported</p>
<p><strong>SELECT   DBMS_METADATA.get_ddl (&#8216;TABLE&#8217;, &#8216;TAB_TEST&#8217;, &#8216;USR01&#8242;) FROM DUAL</strong></p>
<p>As the ‘Data file init write’ event directly relates to AUTOEXTEND and occurs while adding extents to the datafile, I checked AUTOEXTEND value of the datafiles. Their values were too small. I increased the AUTOEXTEND values and the event disappeared from the trace log and import job finished successfully.</p>
<p>Reference: <strong>Export/Import DataPump Parameter TRACE &#8211; How to Diagnose Oracle Data Pump [ID 286496.1]</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://kamranagayev.com/2013/03/11/debugging-data-pump-session/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Waiting at &#8220;Performing remote operations&#8221; during RAC installation</title>
		<link>http://kamranagayev.com/2013/01/30/waiting-at-performing-remote-operations-during-rac-installation/</link>
		<comments>http://kamranagayev.com/2013/01/30/waiting-at-performing-remote-operations-during-rac-installation/#comments</comments>
		<pubDate>Wed, 30 Jan 2013 14:37:07 +0000</pubDate>
		<dc:creator>Kamran Agayev A.</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[RAC issues]]></category>

		<guid isPermaLink="false">http://kamranagayev.com/?p=1829</guid>
		<description><![CDATA[Today, while installing RAC, the installation began to wait at &#8220;Performing remote operations&#8221; step. I&#8217;ve tried to check log files, but there was no information written Then I tried to trace the currently running process, but didn&#8217;t get enough information about the wait. At last, I checked both servers and found firewall running. After stopping [...]]]></description>
				<content:encoded><![CDATA[<p>Today, while installing RAC, the installation began to wait at &#8220;Performing remote operations&#8221; step. I&#8217;ve tried to check log files, but there was no information written</p>
<p>Then I tried to trace the currently running process, but didn&#8217;t get enough information about the wait. At last, I checked both servers and found firewall running. After stopping firewall, (stopping, deinstalling and starting the installation again) the setup was able to pass that step and copied the Grid home files to the remote server</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kamranagayev.com/2013/01/30/waiting-at-performing-remote-operations-during-rac-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some processes are missing from V$SESSION view</title>
		<link>http://kamranagayev.com/2013/01/22/some-processes-are-missing-from-vsession-view/</link>
		<comments>http://kamranagayev.com/2013/01/22/some-processes-are-missing-from-vsession-view/#comments</comments>
		<pubDate>Tue, 22 Jan 2013 15:09:05 +0000</pubDate>
		<dc:creator>Kamran Agayev A.</dc:creator>
				<category><![CDATA[Administration]]></category>

		<guid isPermaLink="false">http://kamranagayev.com/?p=1825</guid>
		<description><![CDATA[Today, while checking both V$PROCESS and V$SESSION view, I realized that there&#8217;re some processes that are missing from V$SESSION view: SQL&#62; select count(*) from v$process where addr not in (select paddr from v$session);  COUNT(*) &#8212;&#8212;&#8212;- 120 &#160; How can a process be created without having any corresponding entry in V$SESSION view? I started to check [...]]]></description>
				<content:encoded><![CDATA[<p>Today, while checking both V$PROCESS and V$SESSION view, I realized that there&#8217;re some processes that are missing from V$SESSION view:</p>
<p><strong>SQL&gt; select count(*) from v$process where addr not in (select paddr from v$session);</strong></p>
<p><strong> COUNT(*)</strong></p>
<p><strong>&#8212;&#8212;&#8212;-</strong><br />
<strong>120</strong></p>
<p>&nbsp;</p>
<p>How can a process be created without having any corresponding entry in V$SESSION view?</p>
<p>I started to check those processes on OS level. I got SPID of one of those processes and firstly tried to debug it using ORADEBUG from sqlplus:</p>
<p><strong>sqlplus / as sysdba</strong></p>
<p><strong>ORADEBUG SETOSPID 3422</strong><br />
<strong>ORADEBUG TRACEFILE_NAME;</strong></p>
<p>By getting the trace file name, I&#8217;ve checked the file but didn&#8217;t find any helpful message inside.</p>
<p>Then I decided to debug it on OS level. As the OS was HP-UX, I used <strong>truss</strong> executable to trace the unix system calls:</p>
<p><strong>/usr/local/bin/truss -o truss.out -vall -laefdD -p <strong>3422</strong></strong></p>
<p>And checked the output again:</p>
<p><em>tail -f truss.out </em><br />
<em>( Attached to process 18997 (&#8220;oraclePRODDB (LOCAL=NO)&#8221;) [64-bit] )</em><br />
<em>18997/9934051: 18446744073.7095 read(16, 0x600000000021a616, 2064) [sleeping]</em></p>
<p>This output wasn&#8217;t helpful (however,<a href="http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/"> Tanel uses <strong>pfiles</strong></a> executable to get all opened files in the process by getting the first parameter of the <strong>read</strong> function &#8211; which is 16) , so I decided to use the next executable &#8211; <strong>lsof</strong> &#8211; which lists the opened files by the process:</p>
<p><strong>/usr/local/bin/lsof -p 3422</strong></p>
<p><em>COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME</em><br />
<em>oracle 20472 oracle cwd DIR 64,0&#215;4 2048 3660 /home/oracle/product/10g/dbs</em><br />
<em>oracle 20472 oracle txt REG 64,0&#215;4 284477360 101589 /home/oracle/product/10g/bin/oracle</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;4 5337208 25311 /home/oracle/product/10g/lib/libnnz10.so</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 21281 27339 /usr/lib/tztab</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;5 312440 54074 /opt/star-ncf-prod/ep_patch/usr/lib/hpux64/libxti.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 4371800 14392 /usr/lib/hpux64/libc.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 1649152 91060 /usr/lib/hpux64/libnsl.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 67664 91056 /usr/lib/hpux64/libnss_compat.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;4 20041776 8569 /home/oracle/product/10g/lib/libjox10.so</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 1046480 11645 /usr/lib/hpux64/libpthread.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 55088 491 /usr/lib/hpux64/libuca.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 706832 91078 /usr/lib/hpux64/libunwind.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 6444800 91068 /usr/lib/hpux64/libm.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 78168 90961 /usr/lib/hpux64/libdl.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 89208 91053 /usr/lib/hpux64/libnss_dns.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 44832 3881 /usr/lib/hpux64/librt.so.1</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;4 199296 8277 /home/oracle/product/10g/lib/libdbcfg10.so</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;4 134552 13143 /home/oracle/product/10g/lib/libocrutl10.so</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;4 533792 13142 /home/oracle/product/10g/lib/libocrb10.so</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;4 731352 25330 /home/oracle/product/10g/lib/libocr10.so</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;4 1296848 25478 /home/oracle/product/10g/lib/libhasgen10.so</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;4 315008 13264 /home/oracle/product/10g/lib/libskgxp10.so</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 1163152 90960 /usr/lib/hpux64/dld.so</em><br />
<em>oracle 20472 oracle mem REG 64,0&#215;7 184592 90962 /usr/lib/hpux64/uld.so</em><br />
<em>oracle 20472 oracle 0u CHR 3,0&#215;2 0t0 74 /dev/null</em><br />
<em>oracle 20472 oracle 1u CHR 3,0&#215;2 0t0 74 /dev/null</em><br />
<em>oracle 20472 oracle 2u CHR 3,0&#215;2 0t0 74 /dev/null</em><br />
<em>oracle 20472 oracle 3u CHR 3,0&#215;2 0t0 74 /dev/null</em><br />
<em>oracle 20472 oracle 4u CHR 3,0&#215;2 0t0 74 /dev/null</em><br />
<em>oracle 20472 oracle 5u CHR 3,0&#215;2 0t0 74 /dev/null</em><br />
<em>oracle 20472 oracle 6u CHR 3,0&#215;2 0t0 74 /dev/null</em><br />
<em>oracle 20472 oracle 7u IPv4 0xe0000001cbfe0900 0t0 TCP *:* (IDLE)</em><br />
<em>oracle 20472 oracle 8u REG 64,0&#215;4 849408 13244 /home/oracle/product/10g/rdbms/mesg/oraus.msb</em><br />
<em>oracle 20472 oracle 14u REG 64,0&#215;4 268644352 79279 /home/oracle/product/10g/cdata/localhost/local.ocr</em><br />
<em>oracle 20472 oracle 27u IPv4 0xe0000001c34f0740 0t3603 TCP<strong> ***.***.***.***:1521-&gt;name.ofthehost.com</strong>:4934 (ESTABLISHED)</em><br />
<em>oracle 20472 oracle 28w FIFO 0xe00000017b3ba748 0t0 184090157 </em><br />
<em>oracle 20472 oracle 29r FIFO 0xe0000001f99d3e48 0t0 184090158</em></p>
<p>&nbsp;</p>
<p>At the end of the output, I saw an IP address and the host name where the process were connecting. After checking that server, I saw that it was opening a connection to the database and created a process on OS. Then it wasn&#8217;t able to create a session and didn&#8217;t detect the dead process and kill it. So it remained in the V$PROCESS view and on the OS as a process and was missing in the V$SESSION view.</p>
<p>I killed all missing sessions from OS level and rebooted the server which was opening connections to the database. It seems it has memory or network issues, so I asked sysadmins to check it</p>
<p>&nbsp;</p>
<p>You can also check the following metalink note and learn how you can enable Dead Connection Detection (DCD)</p>
<p><strong>A discussion of Dead Connection Detection, Resource Limits, V$SESSION, V$PROCESS and OS processes [ID 601605.1]</strong></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kamranagayev.com/2013/01/22/some-processes-are-missing-from-vsession-view/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
