<?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:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6973196410674229965</id><updated>2024-10-05T05:11:38.889+02:00</updated><category term="Oracle"/><category term="Programming"/><category term="Ubuntu"/><category term="Android"/><category term="PHP"/><category term="CSS"/><category term="HTML"/><category term="XML"/><title type='text'>Lucy&#39;s thoughts ...</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>36</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-834467912537464715</id><published>2022-10-27T10:25:00.001+02:00</published><updated>2022-10-27T10:26:49.195+02:00</updated><title type='text'>ADG_REDIRECT_DML in Oracle Active Data Guard 19c</title><content type='html'>Happy to know that my request for enhancement will be implemented in new coming release Oracle 23.1 :)


&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin-2OHcaegYW1vTGp9mqWMvJ2JSGd3jPC54Ny3iSHgJsBzXj790YZ32JR5qChKpx2biJR9k4mF0pS3ts01FMfH3LnCiHdrXQVFNHRQQQwOPSEkmhu9zVSGGwUEfsC-zMT4FZxCMyy9A2y_sCaoSPWktnh0qKj4Ca-8iZ0_c_Y476YMcI_UTHyoiRwFhg/s1175/ADG_REDIRECT_DML.jpeg&quot; style=&quot;display: block; padding: 1em 0; text-align: center; &quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; width=&quot;320&quot; data-original-height=&quot;446&quot; data-original-width=&quot;1175&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin-2OHcaegYW1vTGp9mqWMvJ2JSGd3jPC54Ny3iSHgJsBzXj790YZ32JR5qChKpx2biJR9k4mF0pS3ts01FMfH3LnCiHdrXQVFNHRQQQwOPSEkmhu9zVSGGwUEfsC-zMT4FZxCMyy9A2y_sCaoSPWktnh0qKj4Ca-8iZ0_c_Y476YMcI_UTHyoiRwFhg/s320/ADG_REDIRECT_DML.jpeg&quot;/&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;
I have requested to have an option to completely disable ADG_REDIRECT_DML on the session level for regular database user from the standby site (in Oracle Active Data Guard).
&lt;/p&gt;

&lt;p&gt;
On one site good feature ADG_REDIRECT_DML in ADG in 19c environment (if you want to use it), but on the other site it 
can be also &quot;dangerous&quot;. 
&lt;/p&gt;

&lt;p&gt;
Even if the default value of the ADG_REDIRECT_DML is FALSE, regular user without any special privileges is able to enable this feature on the session level and perform changes on the primary database through standby database.
&lt;/p&gt;

&lt;p&gt;
As this is not possible to completely disable for regular users on the session level and protect primary site, I asked Oracle for enhancement, 
which was already confirmed by development team in the version 23.1.
&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;As 23c wasn&#39;t yet released I had to prepare workaround. If somebody wants to know how to do it, just let me know, I can write an article about this.&lt;/i&gt;
&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/834467912537464715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2022/10/adgredirectdml-in-oracle-active-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/834467912537464715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/834467912537464715'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2022/10/adgredirectdml-in-oracle-active-data.html' title='ADG_REDIRECT_DML in Oracle Active Data Guard 19c'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin-2OHcaegYW1vTGp9mqWMvJ2JSGd3jPC54Ny3iSHgJsBzXj790YZ32JR5qChKpx2biJR9k4mF0pS3ts01FMfH3LnCiHdrXQVFNHRQQQwOPSEkmhu9zVSGGwUEfsC-zMT4FZxCMyy9A2y_sCaoSPWktnh0qKj4Ca-8iZ0_c_Y476YMcI_UTHyoiRwFhg/s72-c/ADG_REDIRECT_DML.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-5771659849582501191</id><published>2021-04-23T15:17:00.000+02:00</published><updated>2021-04-23T15:17:02.361+02:00</updated><title type='text'>ORA-15032 ORA-59303 ORA-15221: ASM operation requires compatible.asm of ...</title><content type='html'>During upgrading GI (already visible in 11g/12c/19c) and during execution of rootupgrade.sh following errors was visible:

&lt;pre class=&quot;code&quot;&gt;
CRS-6705: Oracle Clusterware Release Version (&#39;19.0.0.0.0&#39;) does not match Software Version (&#39;12.1.0.2.0&#39;). Oracle Clusterware cannot be started.

CRS-4000: Command Start failed, or completed with errors.

2021/04/20 09:42:30 CLSRSC-318: Failed to start Oracle OHASD service
Died at /u01/app/oracle/product/19.0.0.0_gi/crs/install/crsupgrade.pm line 6269.

root@oralin1:/u01/app/oracle/product/19.0.0.0_gi
&lt;/pre&gt;

Result was that some disk groups were not mounted:
&lt;pre class=&quot;code&quot;&gt;
SQL&gt; select NAME, STATE, COMPATIBILITY from v$asm_diskgroup;

NAME  STATE 		COMPATIBILITY
----- ------------ ---------------
REDO  MOUNTED     	19.0.0.0.0
DATA  DISMOUNTED  	0.0.0.0.0
FRA   DISMOUNTED  	0.0.0.0.0
&lt;/pre&gt;

&lt;br /&gt;
When trying to mount it:
&lt;pre class=&quot;code&quot;&gt;
SQL&gt; alter diskgroup FRA mount;
alter diskgroup FRA mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-59303: The attribute compatible.asm (10.1.0.0.0) of the 
           diskgroup being mounted should be 11.2.0.2.0 or higher.
ORA-15221: ASM operation requires compatible.asm of 11.1.0.0.0 
           or higher
&lt;/pre&gt;
&lt;br /&gt;

Solution:
&lt;pre class=&quot;code&quot;&gt;
SQL&gt; alter diskgroup FRA mount restricted;

Diskgroup altered.

SQL&gt; alter diskgroup FRA set attribute &#39;compatible.asm&#39;=&#39;19.0.0.0.0&#39;;

Diskgroup altered.

SQL&gt; alter diskgroup FRA dismount;

Diskgroup altered.

SQL&gt; alter diskgroup DATA mount restricted;

Diskgroup altered.

SQL&gt; alter diskgroup DATA set attribute &#39;compatible.asm&#39;=&#39;19.0.0.0.0&#39;;

Diskgroup altered.

SQL&gt; alter diskgroup DATA dismount;

Diskgroup altered.

SQL&gt; alter diskgroup FRA mount;

Diskgroup altered.



SQL&gt;   select NAME, STATE, COMPATIBILITY  from  v$asm_diskgroup;

NAME                           STATE       COMPATIBILITY
------------------------------ ----------- -------------------
REDO                           MOUNTED     19.0.0.0.0
DATA                           MOUNTED     19.0.0.0.0
FRA                            MOUNTED     19.0.0.0.0
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/5771659849582501191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2021/04/ora-15032-ora-59303-ora-15221-asm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/5771659849582501191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/5771659849582501191'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2021/04/ora-15032-ora-59303-ora-15221-asm.html' title='ORA-15032 ORA-59303 ORA-15221: ASM operation requires compatible.asm of ...'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-7010042423250261888</id><published>2021-04-23T14:59:00.000+02:00</published><updated>2021-04-23T14:59:52.243+02:00</updated><title type='text'>Installation of new PDB</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_K6Cu_fhWmPF8suLPqwMs9avqXmwXJtUxFFlrjeBw_XhqzigNoEgWT1nUGSQUcCS0F4i-noWgOhVq6tGN4Mq7avExLgkwBvcYZN9s3jz9zZJCvxB4j6kPPOwrxVswrFOU-W1uLdeROXS3/s0/PDB_creation_overview.png&quot; style=&quot;display: block; padding: 1em 0; text-align: center; &quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;2304&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_K6Cu_fhWmPF8suLPqwMs9avqXmwXJtUxFFlrjeBw_XhqzigNoEgWT1nUGSQUcCS0F4i-noWgOhVq6tGN4Mq7avExLgkwBvcYZN9s3jz9zZJCvxB4j6kPPOwrxVswrFOU-W1uLdeROXS3/s0/PDB_creation_overview.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;

&lt;table id=&quot;mytable&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Type&lt;/th&gt;
      &lt;th&gt;Note&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;a href=&quot;#create_pdb_using_seed&quot;&gt;Create a PDB by using the seed&lt;/a&gt;&lt;/td&gt;
      &lt;td&gt;Use the &lt;i&gt;create_pdb_from_seed&lt;/i&gt; clause to create a PDB by using the seed in the multitenant container database (CDB) as a template. The files associated with the seed are copied to a new location and the copied files are then associated with the new PDB.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;a href=&quot;#create_pdb_by_cloning&quot;&gt;Create a PDB by cloning an existing PDB or non-CDB (local or remote databases via DBLink)&lt;/a&gt;&lt;/td&gt;
      &lt;td&gt;Use the &lt;i&gt;create_pdb_clone&lt;/i&gt; clause to create a PDB by copying an existing PDB or non-CDB and then plugging the copy into the CDB. The files associated with the existing PDB or non-CDB are copied to a new location and the copied files are associated with the new PDB.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;a href=&quot;#create_pdb_by_plugging&quot;&gt;Create a PDB by plugging an unplugged PDB into a CDB&lt;/a&gt;/td&gt;
      &lt;td&gt;Use the &lt;i&gt;create_pdb_from_xml&lt;/i&gt; clause to plug an unplugged PDB or a non-CDB into a CDB, using an XML metadata file.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;


&lt;h3 id=&quot;create_pdb_using_seed&quot;&gt;Create a PDB by using the seed as a template&lt;/h3&gt;


&lt;pre class=&quot;code&quot;&gt;
CREATE PLUGGABLE DATABASE PDB
ADMIN USER Admin IDENTIFIED BY oracle
FILE_NAME_CONVERT = (&#39;/u01/app/oracle/oradata/pdbseed/&#39;,&#39;/u01/app/oracle/oradata/PDB/&#39;) STORAGE (MAXSIZE 2G)
PATH_PREFIX = &#39;/u01/app/oracle/oradata/PDB/&#39;;
&lt;/pre&gt;

&lt;pre class=&quot;code&quot;&gt;
SQL&gt; !mkdir /u01/app/oracle/oradata/cdb/pdb1

SQL&gt; create pluggable database pdb1 admin user pdb1_admin identified by oracle roles=(CONNECT)
create_file_dest=&#39;/u01/app/oracle/oradata/cdb/pdb1&#39;;

Pluggable database created.

SQL&gt; select con_id, name, open_mode from v$pdbs;

	CON_ID NAME                           OPEN_MODE
---------- ------------------------------ ----------
		 2 PDB$SEED                       READ ONLY
		 3 PDB                            READ WRITE
		 4 PDB1                           MOUNTED

SQL&gt; alter pluggable database pdb1 open;

Pluggable database altered.

SQL&gt; select con_id, name, open_mode from v$pdbs;

	CON_ID NAME                           OPEN_MODE
---------- ------------------------------ ----------
		 2 PDB$SEED                       READ ONLY
		 3 PDB                            READ WRITE
		 4 PDB1                           READ WRITE


&lt;/pre&gt;

&lt;pre class=&quot;code&quot;&gt;
SQL&gt; CREATE PLUGGABLE DATABASE pdb1 ADMIN USER pdb1_adm IDENTIFIED BY oracle
  ROLES=(DBA)
  DEFAULT TABLESPACE test
	DATAFILE &#39;/u01/app/oracle/oradata/cdb/pdb1/test01.dbf&#39; SIZE 5M AUTOEXTEND ON
  file_name_convert=(&#39;/u01/app/oracle/oradata/cdb/pdbseed/&#39;,&#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;);  

Pluggable database created.

SQL&gt; col pdb_name for a10
SQL&gt; select pdb_name, status from dba_pdbs;

PDB_NAME   STATUS
---------- ---------
PDB        NORMAL
PDB$SEED   NORMAL
PDB1       NEW

SQL&gt; select con_id, name, open_mode from v$pdbs;

	CON_ID NAME                           OPEN_MODE
---------- ------------------------------ ----------
		 2 PDB$SEED                       READ ONLY
		 3 PDB                            READ ONLY
		 4 PDB1                           MOUNTED

SQL&gt; alter pluggable database pdb1 open;

Pluggable database altered.

SQL&gt; select pdb_name, status from dba_pdbs;

PDB_NAME   STATUS
---------- ---------
PDB        NORMAL
PDB$SEED   NORMAL
PDB1       NORMAL

SQL&gt;  select con_id, name, open_mode from v$pdbs;

	CON_ID NAME                           OPEN_MODE
---------- ------------------------------ ----------
		 2 PDB$SEED                       READ ONLY
		 3 PDB                            READ ONLY
		 4 PDB1                           READ WRITE

SQL&gt; alter session set container=pdb1;

Session altered.

SQL&gt; select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/cdb/pdb1/system01.dbf
/u01/app/oracle/oradata/cdb/pdb1/sysaux01.dbf
/u01/app/oracle/oradata/cdb/pdb1/test01.dbf

&lt;/pre&gt;

&lt;br /&gt;
&lt;b&gt;Cloning a Local PDB With the FILE_NAME_CONVERT:&lt;/b&gt;
&lt;pre class=&quot;code&quot;&gt;
	CREATE PLUGGABLE DATABASE pdb1 FROM pdb
	  FILE_NAME_CONVERT = (&#39;/u01/app/oracle/oradata/cdb/pdb/&#39;, &#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;)
	  NOLOGGING;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;code&quot;&gt;
	SQL&gt; select con_id, name, open_mode from v$pdbs;

		CON_ID NAME                           OPEN_MODE
	---------- ------------------------------ ----------
			 2 PDB$SEED                       READ ONLY
			 3 PDB                            MOUNTED

	SQL&gt; alter pluggable database pdb open;

	Pluggable database altered.

	SQL&gt; select con_id, name, open_mode from v$pdbs;

		CON_ID NAME                           OPEN_MODE
	---------- ------------------------------ ----------
			 2 PDB$SEED                       READ ONLY
			 3 PDB                            READ WRITE

	SQL&gt; CREATE PLUGGABLE DATABASE pdb1 FROM pdb
	  FILE_NAME_CONVERT = (&#39;/u01/app/oracle/oradata/cdb/pdb/&#39;, &#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;)
	  NOLOGGING;
	  2    3

	Pluggable database created.

	SQL&gt; SQL&gt; select con_id, name, open_mode from v$pdbs;

		CON_ID NAME                           OPEN_MODE
	---------- ------------------------------ ----------
			 2 PDB$SEED                       READ ONLY
			 3 PDB                            READ WRITE
			 4 PDB1                           MOUNTED

	SQL&gt;  alter pluggable database pdb1 open;

	Pluggable database altered.

	SQL&gt; select con_id, name, open_mode from v$pdbs;

		CON_ID NAME                           OPEN_MODE
	---------- ------------------------------ ----------
			 2 PDB$SEED                       READ ONLY
			 3 PDB                            READ WRITE
			 4 PDB1                           READ WRITE
&lt;/pre&gt;

&lt;br /&gt;
&lt;b&gt;Cloning a Local PDB Without Cloning Its Data:&lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;i&gt;Restrictions:&lt;/i&gt;&lt;br&gt;
 The NO DATA clause is only valid is the the source PDB doesn&#39;t contain any of the following.
 &lt;ul&gt;
	 &lt;li&gt;Index-organized tables&lt;/li&gt;
	 &lt;li&gt;Advanced Queue (AQ) tables&lt;/li&gt;
	 &lt;li&gt;Clustered tables&lt;/li&gt;
	 &lt;li&gt;Table clusters&lt;/li&gt;
 &lt;/ul&gt;

&lt;pre class=&quot;code&quot;&gt;
	SQL&gt; ALTER PLUGGABLE DATABASE pdb OPEN READ ONLY;

	Pluggable database altered.

	SQL&gt; select con_id, name, open_mode from v$pdbs;

		CON_ID NAME                           OPEN_MODE
	---------- ------------------------------ ----------
			 2 PDB$SEED                       READ ONLY
			 3 PDB                            READ ONLY
	SQL&gt; CREATE PLUGGABLE DATABASE pdb1 FROM pdb FILE_NAME_CONVERT=(&#39;/u01/app/oracle/oradata/cdb/pdb/&#39;,&#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;) NO DATA;
	CREATE PLUGGABLE DATABASE pdb1 FROM pdb FILE_NAME_CONVERT=(&#39;/u01/app/oracle/oradata/cdb/pdb/&#39;,&#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;) NO DATA
	*
	ERROR at line 1:
	ORA-65161: Unable to create pluggable database with no data


	SQL&gt; !oerr ora 65161
	65161, 00000, &quot;Unable to create pluggable database with no data&quot;
	// *Cause:   An attempt was made to clone a pluggable database which contains
	//           some clustered tables or index organized tables or advanced
	//           queue tables.
	// *Action:  Retry the clone operation after dropping all such objects from the
	//           source pluggable database.

&lt;/pre&gt;

&lt;br /&gt;
&lt;b&gt;Cloning a Remote PDB or Non-CDB&lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;i&gt;Prerequisites:&lt;/i&gt;&lt;br&gt;
&lt;ul&gt;
	&lt;li&gt;The current user must have the CREATE PLUGGABLE DATABASE system privilege in the root of the CDB that will contain the target PDB.&lt;/li&gt;
	&lt;li&gt;The source PDB or source non-CDB must be in open read-only mode.&lt;/li&gt;
	&lt;li&gt;A database link must enable a connection from the CDB that will contain the target PDB to the remote source. If the source is a remote PDB, then the database link can connect to either the root of the remote CDB or to the remote source PDB.&lt;/li&gt;
	&lt;li&gt;The user that the database link connects with at the remote source must have the CREATE PLUGGABLE DATABASE system privilege in the source PDB or in the non-CDB.&lt;/li&gt;
	&lt;li&gt;If the database link connects to the root in a remote CDB, then the user that the database link connects with must be a common user.&lt;/li&gt;
	&lt;li&gt;The source and target platforms must meet these requirements:
		&lt;ul&gt;
			&lt;li&gt;They must have the same endianness.&lt;/li&gt;
			&lt;li&gt;The database options installed on the source platform must be the same as, or a subset of, the database options installed on the target platform.&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;If you are creating a PDB by cloning a non-CDB, then both the CDB and the non-CDB must be running Oracle Database 12c Release 1 (12.1.0.2) or later.&lt;/li&gt;
&lt;/ul&gt;

&lt;i&gt;Remote CDB database:&lt;/i&gt;&lt;br&gt;&lt;br&gt;
&lt;pre class=&quot;code&quot;&gt;
	CREATE PLUGGABLE DATABASE pdb1 FROM cdb1_pdb@cdb1_pdb_link
	file_name_convert=(&#39;/u01/app/oracle/oradata/cdb1/cdb1_pdb/&#39;,&#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;);
&lt;/pre&gt;

&lt;i&gt;Example with setup for cloning Remove CDB database: &lt;/i&gt;&lt;br&gt;
&lt;pre class=&quot;code&quot;&gt;
	SQL&gt; create database link cdb1_pdb_link connect to test identified by oracle using &#39;CDB1_PDB_SRV&#39;;

	Database link created.

	SQL&gt;  select sysdate from dual@cdb1_pdb_link;

	SYSDATE
	---------
	13-MAR-18


	CREATE PLUGGABLE DATABASE pdb1 FROM cdb1_pdb@cdb1_pdb_link
	file_name_convert=(&#39;/u01/app/oracle/oradata/cdb1/cdb1_pdb/&#39;,&#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;);


	cdb1:
	SQL&gt; create tablespace test_tbs datafile &#39;/u01/app/oracle/oradata/cdb1/cdb1_pdb/test_tbs_01.dbf&#39; size 5m;

	Tablespace created.

	SQL&gt; alter user test default tablespace test_tbs;

	User altered.

	SQL&gt; create table test.test_table (name varchar2(20));

	Table created.

	SQL&gt; alter user test quota unlimited on test_tbs;

	User altered.

	SQL&gt; insert into test.test_table (name) values (&#39;test entry&#39;);

	1 row created.

	SQL&gt; commit;

	Commit complete.



	cdb:
	SQL&gt; CREATE PLUGGABLE DATABASE pdb1 FROM cdb1_pdb@cdb1_pdb_link
	file_name_convert=(&#39;/u01/app/oracle/oradata/cdb1/cdb1_pdb/&#39;,&#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;);
	  2

	Pluggable database created.

	SQL&gt; SQL&gt; select con_id, name, open_mode from v$pdbs;

		CON_ID NAME                           OPEN_MODE
	---------- ------------------------------ ----------
			 2 PDB$SEED                       READ ONLY
			 3 PDB                            READ ONLY
			 4 PDB1                           MOUNTED

	SQL&gt; col name for a20
	SQL&gt; desc dba_pdbs
	 Name                                      Null?    Type
	 ----------------------------------------- -------- ----------------------------
	 PDB_ID                                    NOT NULL NUMBER
	 PDB_NAME                                  NOT NULL VARCHAR2(128)
	 DBID                                      NOT NULL NUMBER
	 CON_UID                                   NOT NULL NUMBER
	 GUID                                               RAW(16)
	 STATUS                                             VARCHAR2(9)
	 CREATION_SCN                                       NUMBER
	 VSN                                                NUMBER
	 LOGGING                                            VARCHAR2(9)
	 FORCE_LOGGING                                      VARCHAR2(3)
	 FORCE_NOLOGGING                                    VARCHAR2(3)
	 CON_ID                                    NOT NULL NUMBER

	SQL&gt; col pdb_name for a20
	SQL&gt; select pdb_name, status from dba_pdbs;

	PDB_NAME             STATUS
	-------------------- ---------
	PDB                  NORMAL
	PDB$SEED             NORMAL
	PDB1                 NEW

	SQL&gt; alter pluggable database pdb1 open;

	Pluggable database altered.

	SQL&gt;  select pdb_name, status from dba_pdbs;

	PDB_NAME             STATUS
	-------------------- ---------
	PDB                  NORMAL
	PDB$SEED             NORMAL
	PDB1                 NORMAL


	SQL&gt; alter session set container=pdb1;

	Session altered.

	SQL&gt; select * from test.test_table;

	NAME
	--------------------
	test entry

&lt;/pre&gt;

&lt;i&gt;Remote non-CDB database:&lt;/i&gt;&lt;br&gt;&lt;br&gt;
&lt;pre class=&quot;code&quot;&gt;
	CREATE PLUGGABLE DATABASE pdb1 FROM orcl@orcl_link
	file_name_convert=(&#39;/u01/app/oracle/oradata/orcl/&#39;,&#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;);
&lt;/pre&gt;

&lt;i&gt;Example with setup for cloning Remove non-CDB database: &lt;/i&gt;&lt;br&gt;&lt;br&gt;
&lt;pre class=&quot;code&quot;&gt;
	SQL&gt; create database link orcl_link connect to test identified by oracle using &#39;ORCL_SRV&#39;;

	Database link created.

	SQL&gt; select sysdate from dual@orcl_link;

	SYSDATE
	---------
	13-MAR-18

	SQL&gt; CREATE PLUGGABLE DATABASE pdb1 FROM orcl@orcl_link
	file_name_convert=(&#39;/u01/app/oracle/oradata/orcl/&#39;,&#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;);

	Pluggable database created.

	@$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql

	SQL&gt; select name, open_mode from v$pdbs;

	NAME                           OPEN_MODE
	------------------------------ ----------
	PDB1                           MOUNTED

	1 row selected.

	SQL&gt; alter pluggable database pdb1 open;

	Pluggable database altered.

	SQL&gt; select * from test.test_table;

	NAME
	--------------------
	test entry orcl

	1 row selected.



&lt;/pre&gt;

&lt;h3 id=&quot;create_pdb_by_plugging&quot;&gt;Create a PDB by plugging an unplugged PDB into a CDB&lt;/h3&gt;
&lt;i&gt;Requirements:&lt;/i&gt;
&lt;ul&gt;
	&lt;li&gt;The XML file that describes the PDB must exist in a location that is accessible to the CDB. The USING clause must specify the XML file.&lt;/li&gt;
	&lt;li&gt;The files associated with the PDB (such as the data files and wallet file) must exist in a location that is accessible to the CDB.&lt;/li&gt;
	&lt;li&gt;The source and target CDB platforms must meet the following requirements:&lt;/li&gt;
	&lt;ul&gt;
		&lt;li&gt;They must have the same endianness.&lt;/li&gt;
		&lt;li&gt;The database options installed on the source platform must be the same as, or a subset of, the database options installed on the target platform.&lt;/li&gt;
		&lt;li&gt;The CDB that contained the unplugged PDB and the target CDB must have compatible character sets and national character sets. &lt;/li&gt;
	&lt;/ul&gt;
&lt;/ul&gt;

You can use the &lt;i&gt;DBMS_PDB.CHECK_PLUG_COMPATIBILITY&lt;/i&gt; function to determine whether these requirements are met. Step 2 in the following procedure describes using this function.

&lt;i&gt;On the source pluggable database, if it&#39;s opened: &lt;/i&gt;&lt;br&gt;&lt;br&gt;
&lt;pre class=&quot;code&quot;&gt;
	SQL&gt; BEGIN
	  DBMS_PDB.DESCRIBE(
		pdb_descr_file =&gt; &#39;/tmp/cdb1_pdb.xml&#39;,
		pdb_name       =&gt; &#39;CDB1_PDB&#39;);
	END;
	/  2    3    4    5    6

	PL/SQL procedure successfully completed.
&lt;/pre&gt;

&lt;i&gt;On the target CDB database:&lt;/i&gt;&lt;br&gt;&lt;br&gt;
- If the output is YES, then the PDB is compatible, and you can continue with the next step.
- If the output is NO, then the PDB is not compatible, and you can check the PDB_PLUG_IN_VIOLATIONS view to see why it is not compatible.
&lt;pre class=&quot;code&quot;&gt;
	SQL&gt; SET SERVEROUTPUT ON
	DECLARE
	  compatible CONSTANT VARCHAR2(3) :=
		CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY(
			   pdb_descr_file =&gt; &#39;/tmp/cdb1_pdb.xml&#39;,
			   pdb_name       =&gt; &#39;CDB1_PDB&#39;)
		WHEN TRUE THEN &#39;YES&#39;
		ELSE &#39;NO&#39;
	END;
	BEGIN
	  DBMS_OUTPUT.PUT_LINE(compatible);
	END;
	/SQL&gt;   
	YES

	PL/SQL procedure successfully completed.
&lt;/pre&gt;

&lt;i&gt;Unplugging PDB:&lt;/i&gt;&lt;br&gt;&lt;br&gt;
&lt;pre class=&quot;code&quot;&gt;
	SQL&gt; ALTER PLUGGABLE DATABASE cdb1_pdb UNPLUG INTO &#39;/tmp/cdb1_pdb.xml&#39;;
	ALTER PLUGGABLE DATABASE cdb1_pdb UNPLUG INTO &#39;/tmp/cdb1_pdb.xml&#39;
	*
	ERROR at line 1:
	ORA-65025: Pluggable database CDB1_PDB is not closed on all instances.


	SQL&gt; alter pluggable database cdb1_pdb close;

	Pluggable database altered.

	SQL&gt; select con_id, name, open_mode from v$pdbs;

		CON_ID NAME                           OPEN_MODE
	---------- ------------------------------ ----------
			 2 PDB$SEED                       READ ONLY
			 3 CDB1_PDB                       MOUNTED

	SQL&gt; ALTER PLUGGABLE DATABASE cdb1_pdb UNPLUG INTO &#39;/tmp/cdb1_pdb.xml&#39;;

	Pluggable database altered.

&lt;/pre&gt;

&lt;i&gt;Plugging In a Unplugged PDB:&lt;/i&gt;&lt;br&gt;&lt;br&gt;
&lt;pre class=&quot;code&quot;&gt;
	SQL&gt; CREATE PLUGGABLE DATABASE pdb1 USING &#39;/tmp/cdb1_pdb.xml&#39;
	  SOURCE_FILE_DIRECTORY = &#39;/u01/app/oracle/oradata/cdb1/cdb1_pdb/&#39;
	  COPY
	  FILE_NAME_CONVERT = (&#39;/u01/app/oracle/oradata/cdb1/cdb1_pdb/&#39;, &#39;/u01/app/oracle/oradata/cdb/pdb1/&#39;)
	  TEMPFILE REUSE;  2    3    4    5

	Pluggable database created.
&lt;/pre&gt;

&lt;pre class=&quot;code&quot;&gt;
	SQL&gt; select con_id, name, open_mode from v$pdbs;

		CON_ID NAME                           OPEN_MODE
	---------- ------------------------------ ----------
			 2 PDB$SEED                       READ ONLY
			 3 PDB                            READ ONLY
			 4 PDB1                           MOUNTED

	SQL&gt; col pdb_name for a10
	SQL&gt; select pdb_name, status from dba_pdbs;

	PDB_NAME   STATUS
	---------- ---------
	PDB        NORMAL
	PDB$SEED   NORMAL
	PDB1       NEW

	SQL&gt; alter pluggable database pdb1 open;

	Pluggable database altered.

	SQL&gt; alter session set container=pdb1;

	Session altered.

	SQL&gt; select file_name from dba_data_files;

	FILE_NAME
	--------------------------------------------------------------------------------
	/u01/app/oracle/oradata/cdb/pdb1/system01.dbf
	/u01/app/oracle/oradata/cdb/pdb1/sysaux01.dbf
	/u01/app/oracle/oradata/cdb/pdb1/SAMPLE_SCHEMA_users01.dbf
	/u01/app/oracle/oradata/cdb/pdb1/example01.dbf
	/u01/app/oracle/oradata/cdb/pdb1/test_tbs_01.dbf

&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/7010042423250261888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2021/04/installation-of-new-pdb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/7010042423250261888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/7010042423250261888'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2021/04/installation-of-new-pdb.html' title='Installation of new PDB'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_K6Cu_fhWmPF8suLPqwMs9avqXmwXJtUxFFlrjeBw_XhqzigNoEgWT1nUGSQUcCS0F4i-noWgOhVq6tGN4Mq7avExLgkwBvcYZN9s3jz9zZJCvxB4j6kPPOwrxVswrFOU-W1uLdeROXS3/s72-c/PDB_creation_overview.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-723500033705571531</id><published>2017-10-18T09:08:00.002+02:00</published><updated>2017-10-18T09:08:57.393+02:00</updated><title type='text'>Oracle Release Schedule</title><content type='html'>Release Schedule of Current Database Releases (Doc ID 742060.1)

&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Mp3UsM7CnwkHqL2eY46p0ehS1ODMhJFlWhSvD4sph0tXFGav3iIOgpGl9DXkWeEf4-PtoSSbUZRvltYhnJCQlcpRoBvCqCKLODJMuikdjqK7oyQvUzLGiJCSFt7V11Fw8Sy_aImcebW9/s1600/DB_Roadmap_Aug_2017_v3.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Mp3UsM7CnwkHqL2eY46p0ehS1ODMhJFlWhSvD4sph0tXFGav3iIOgpGl9DXkWeEf4-PtoSSbUZRvltYhnJCQlcpRoBvCqCKLODJMuikdjqK7oyQvUzLGiJCSFt7V11Fw8Sy_aImcebW9/s400/DB_Roadmap_Aug_2017_v3.png&quot; width=&quot;400&quot; height=&quot;206&quot; data-original-width=&quot;1448&quot; data-original-height=&quot;745&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/723500033705571531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2017/10/oracle-release-schedule.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/723500033705571531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/723500033705571531'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2017/10/oracle-release-schedule.html' title='Oracle Release Schedule'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Mp3UsM7CnwkHqL2eY46p0ehS1ODMhJFlWhSvD4sph0tXFGav3iIOgpGl9DXkWeEf4-PtoSSbUZRvltYhnJCQlcpRoBvCqCKLODJMuikdjqK7oyQvUzLGiJCSFt7V11Fw8Sy_aImcebW9/s72-c/DB_Roadmap_Aug_2017_v3.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-5932163802065315461</id><published>2017-10-11T11:11:00.002+02:00</published><updated>2017-10-11T11:11:52.808+02:00</updated><title type='text'>How to clone Oracle database from the active database</title><content type='html'>In this example I&#39;ll describe steps for cloning &lt;i&gt;orcl&lt;/i&gt; database to new database &lt;i&gt;orcl2&lt;/i&gt;.

1. Create pfile from spfile from the database &lt;i&gt;orcl&lt;/i&gt;:

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SQL&gt; create pfile from spfile;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

2. copy created init file for the new orcl2 database:

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
cp initorcl.ora initorcl2.ora
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

3. edit pfile of the database orcl2:

&lt;ul&gt;
&lt;li&gt; remove all hidden parameters &lt;/li&gt;
&lt;li&gt; change orcl to orcl2 except db_name &lt;/li&gt;
&lt;li&gt; add new line with: &lt;/li&gt;
*.db_name=&#39;orcl&#39; &lt;br&gt;
*.db_unique_name=&#39;orcl2&#39;
&lt;/ul&gt;

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@localhost dbs]$ cat initorcl2.ora
*.audit_file_dest=&#39;/u01/app/oracle/admin/orcl2/adump&#39;
*.audit_trail=&#39;db&#39;
*.compatible=&#39;12.1.0.2.0&#39;
*.control_files=&#39;/u01/app/oracle/oradata/orcl2/control01.ctl&#39;,&#39;/u01/app/oracle/oradata/orcl2/control02.ctl&#39;
*.db_block_size=8192
*.db_domain=&#39;&#39;
*.db_name=&#39;orcl&#39;
*.db_unique_name=&#39;orcl2&#39;
*.diagnostic_dest=&#39;/u01/app/oracle&#39;
*.dispatchers=&#39;(PROTOCOL=TCP) (SERVICE=orclXDB)&#39;
*.local_listener=&#39;LISTENER_ORCL&#39;
*.memory_target=1200m
*.open_cursors=300
*.processes=300
*.remote_login_passwordfile=&#39;EXCLUSIVE&#39;
*.undo_tablespace=&#39;UNDOTBS1&#39;

&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;


4. Create directory structure:

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@localhost dbs]$ mkdir -p /u01/app/oracle/admin/orcl2/adump
[oracle@localhost dbs]$ mkdir /u01/app/oracle/oradata/orcl2
[oracle@localhost dbs]$ mkdir /u01/app/oracle/fast_recovery_area/orcl2
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

5. Edit /etc/oratab:

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@localhost dbs]$ cat /etc/oratab
orcl:/u01/app/oracle/product/12.1.0/dbhome_1:N
orcl2:/u01/app/oracle/product/12.1.0/dbhome_1:N
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

6. setup new environment for the database &lt;i&gt;orcl2&lt;/i&gt;

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@localhost dbs]$ cat /etc/oratab
[oracle@localhost dbs]$ . oraenv
ORACLE_SID = [orcl] ? orcl2
The Oracle base remains unchanged with value /u01/app/oracle
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;


7. startup nomount database &lt;i&gt;orcl2&lt;/i&gt;

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SQL&gt; startup nomount
ORACLE instance started.

Total System Global Area  524288000 bytes
Fixed Size      2926320 bytes
Variable Size    444598544 bytes
Database Buffers    71303168 bytes
Redo Buffers      5459968 bytes
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;


8. copy password file from database &lt;i&gt;orcl&lt;/i&gt; to &lt;i&gt;orcl2&lt;/i&gt; ($ORACLE_HOME/dbs)

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@localhost dbs]$ ls -la orapworcl*
-rw-r----- 1 oracle oinstall 7680 Oct 10 12:42 orapworcl
[oracle@localhost dbs]$ cp orapworcl orapworcl2
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;


9. update information in tnsnames.ora ($ORACLE_HOME/network/admin)

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

ORCL2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl2)
    )
  )
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;


10. update information in listener.ora ($ORACLE_HOME/network/admin)


&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=orcl)
      (ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1)
      (SID_NAME=orcl))
    (SID_DESC=
      (GLOBAL_DBNAME=orcl2)
      (ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1)
      (SID_NAME=orcl2))
  )
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;



11. connect to the rman

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@localhost admin]$ rman target sys/oracle@orcl auxiliary sys/oracle@orcl2

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Oct 10 15:47:43 2017

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1484792494)
connected to auxiliary database: ORCL (not mounted)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;



12. run duplicate command:
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
run {
        allocate channel prmy1 type disk;
        allocate channel prmy2 type disk;
        allocate channel prmy3 type disk;
        allocate channel prmy4 type disk;
        allocate auxiliary channel stby type disk;
        duplicate target database to orcl2 from active database
        SPFILE PARAMETER_VALUE_CONVERT &#39;/u01/app/oracle/oradata/orcl&#39;,&#39;/u01/app/oracle/oradata/orcl2&#39;
                set DB_FILE_NAME_CONVERT &#39;orcl&#39;,&#39;orcl2&#39;
                set log_file_name_convert &#39;/u01/app/oracle/oradata/orcl&#39;,&#39;/u01/app/oracle/oradata/orcl2&#39;
                set DB_UNIQUE_NAME &#39;orcl2&#39;
                set control_files=&#39;/u01/app/oracle/oradata/orcl2/control01.ctl&#39;,
&#39;/u01/app/oracle/fast_recovery_area/orcl2/control02.ctl&#39;;
}
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/5932163802065315461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2017/10/how-to-clone-oracle-database-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/5932163802065315461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/5932163802065315461'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2017/10/how-to-clone-oracle-database-from.html' title='How to clone Oracle database from the active database'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-7601618011050305303</id><published>2017-08-25T11:24:00.002+02:00</published><updated>2017-08-25T11:24:23.534+02:00</updated><title type='text'>&quot;psdgbt: bind csid (1) does not match session csid (873)&quot; and &quot;psdgbt: session charset is AL32UTF8&quot;</title><content type='html'>After restart of the server and starting the database you can notice a lot of generated trace files:

&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre&gt;
Fri Aug 25 10:18:48 2017
Errors in file /oracle/orcldb/base/diag/rdbms/orcldb_dc1/orcldb/trace/orcldb_ora_2131.trc:
Errors in file /oracle/orcldb/base/diag/rdbms/orcldb_dc1/orcldb/trace/orcldb_ora_2131.trc:
Fri Aug 25 10:18:59 2017
Errors in file /oracle/orcldb/base/diag/rdbms/orcldb_dc1/orcldb/trace/orcldb_ora_2131.trc:
Errors in file /oracle/orcldb/base/diag/rdbms/orcldb_dc1/orcldb/trace/orcldb_ora_2131.trc:
Fri Aug 25 10:19:10 2017
Errors in file /oracle/orcldb/base/diag/rdbms/orcldb_dc1/orcldb/trace/orcldb_ora_2131.trc:
Errors in file /oracle/orcldb/base/diag/rdbms/orcldb_dc1/orcldb/trace/orcldb_ora_2131.trc:
Fri Aug 25 10:19:23 2017
Errors in file /oracle/orcldb/base/diag/rdbms/orcldb_dc1/orcldb/trace/orcldb_ora_2131.trc:
Errors in file /oracle/orcldb/base/diag/rdbms/orcldb_dc1/orcldb/trace/orcldb_ora_2131.trc:
Fri Aug 25 10:19:50 2017
Errors in file /oracle/orcldb/base/diag/rdbms/orcldb_dc1/orcldb/trace/orcldb_ora_2131.trc:
&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

Each trace file contains information with error:
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre&gt;
psdgbt: bind csid (1) does not match session csid (873)
psdgbt: session charset is AL32UTF8
&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;b&gt;Reason:&lt;/b&gt;
The base problem is that there is a session that connected too early (before the the database was fully open) and is now stuck with AL32UTF8.
There is no problem with the database.
&lt;br&gt;
&lt;i&gt;Related bugs:&lt;/i&gt;
&lt;ul&gt;
&lt;li&gt; Bug 9329749 - TB: FAN: PSDGBT: BIND CSID (1) DOES NOT MATCH SESSION CSID (178)&lt;/li&gt;
&lt;li&gt; Bug 13010721 : &quot;PSDGBT: BIND CSID (1) DOES NOT MATCH SESSION CSID (873)&quot; FROM OMS&lt;/li&gt;
&lt;/ul&gt;
&lt;br&gt;
&lt;b&gt;Solution:&lt;/b&gt;&lt;br&gt;
&lt;i&gt;Restart OMS agent:&lt;/i&gt;
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre&gt;
/oracle/product/12.1/agent12c/agent_inst/bin/emctl stop agent

/oracle/product/12.1/agent12c/agent_inst/bin/emctl start agent
&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;
In case that problem still persists:&lt;br&gt;
&lt;ol&gt;
&lt;li&gt; stop the listener for this database instance.&lt;/li&gt;
&lt;li&gt; then restart the database instance.&lt;/li&gt;
&lt;li&gt; then restart the listener.&lt;/li&gt;
&lt;/ol&gt;



</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/7601618011050305303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2017/08/psdgbt-bind-csid-1-does-not-match.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/7601618011050305303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/7601618011050305303'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2017/08/psdgbt-bind-csid-1-does-not-match.html' title='&quot;psdgbt: bind csid (1) does not match session csid (873)&quot; and &quot;psdgbt: session charset is AL32UTF8&quot;'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-4149741701804247829</id><published>2012-10-09T22:57:00.002+02:00</published><updated>2012-10-09T22:57:41.922+02:00</updated><title type='text'>Oracle &amp; PHP: Table with two CLOBs - inserting clobs via formular</title><content type='html'>&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
if (!empty($_POST[&#39;name&#39;])) {
$sql=$db-&gt;executeLob(&quot;
insert into table_test 
(
name,
col_clob_1,
col_clob_2
) 
values 
( 
&#39;&quot; . $_POST[&#39;name&#39;] . &quot;&#39;,
EMPTY(CLOB),
EMPTY(CLOB)
) 
RETURNING 
comment_1, comment_2 INTO :mylob_loc_1, :mylob_loc_2 &quot;,$_POST[&#39;comment_1&#39;],$_POST[&#39;comment_2&#39;]);
}
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
public function executeLob($sql,$lob1, $lob2) {
 
  if ($this-&gt;connection) {
   // Prepare the statement
   $stid = oci_parse($this-&gt;connection, $sql);
 
   if (!$stid) {
    $e = oci_error($this-&gt;connection);
    var_dump($e);
   }
   
   // Perform the logic of the query   
      
   // Creates an &quot;empty&quot; OCI-Lob object to bind to the locator
   $myLOB1 = oci_new_descriptor($this-&gt;connection, OCI_D_LOB);
   $myLOB2 = oci_new_descriptor($this-&gt;connection, OCI_D_LOB);
   
   // Bind the returned Oracle LOB locator to the PHP LOB object
   $a = oci_bind_by_name($stid, &quot;:mylob_loc_1&quot;, $myLOB1, -1, OCI_B_CLOB);
   $b = oci_bind_by_name($stid, &quot;:mylob_loc_2&quot;, $myLOB2, -1, OCI_B_CLOB);
   
   $r = oci_execute($stid,OCI_NO_AUTO_COMMIT);
   if (!$r) {
    $e = oci_error($stid);
    var_dump($e);
   }
      
   // Now save a value to the LOB
   if ((!$myLOB1-&gt;save($lob1)) || (!$myLOB2-&gt;save($lob2))) {
    // On error, rollback the transaction
    oci_rollback($this-&gt;connection);
   } else {
    // On success, commit the transaction
    oci_commit($this-&gt;connection);
   }
   
   // Free resources
   oci_free_statement($stid);
   $myLOB1-&gt;free();
   $myLOB2-&gt;free();
 
   return $r;
  }
 }
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/4149741701804247829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/10/oracle-php-table-with-two-clobs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4149741701804247829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4149741701804247829'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/10/oracle-php-table-with-two-clobs.html' title='Oracle &amp; PHP: Table with two CLOBs - inserting clobs via formular'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-1271812482649557704</id><published>2012-10-06T11:22:00.003+02:00</published><updated>2012-10-06T11:22:47.257+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>Oracle: How to change datatype VARCHAR2 to CLOB</title><content type='html'>&lt;p&gt;
At the beginning of creation database structure you decided to use datatype VARCHAR2 and that time you thought 4000B should be enough. But later you want to insert more than 4000B, it&#39;s time to change this datatype to CLOB.
&lt;/p&gt;
&lt;p&gt;
If you don&#39;t have data in the table, it&#39;s ideal situation and the solution is very easy:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SQL&gt; &lt;b&gt;create table test (
  2  id number,
  3  name varchar2(50),
  4  comments varchar2(4000)
  5  );&lt;/b&gt;

Table created.

SQL&gt; &lt;b&gt;desc test&lt;/b&gt;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID                                                 NUMBER
 NAME                                               VARCHAR2(50)
 COMMENTS                                           VARCHAR2(4000)

Because there is not direct way, how to modify column from VARCHAR2 to CLOB, we need to modify column in two steps. 
Steps:
 - VARCHAR2 --&gt; LONG
 - LONG --&gt; CLOB

SQL&gt; &lt;b&gt;alter table test modify comments LONG;&lt;/b&gt;

Table altered.

SQL&gt; &lt;b&gt;desc test&lt;/b&gt;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID                                                 NUMBER
 NAME                                               VARCHAR2(50)
 COMMENTS                                           LONG

SQL&gt; &lt;b&gt;alter table test modify comments CLOB;&lt;/b&gt;

Table altered.

SQL&gt; &lt;b&gt;desc test&lt;/b&gt;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID                                                 NUMBER
 NAME                                               VARCHAR2(50)
 COMMENTS                                           CLOB

SQL&gt; &lt;b&gt;insert into test (id, name, comments) values (1,&#39;name_1&#39;,&#39;comment_1&#39;);&lt;/b&gt;

1 row created.

SQL&gt; &lt;b&gt;commit;&lt;/b&gt;

Commit complete.

SQL&gt; &lt;b&gt;select * from test;&lt;/b&gt;

        ID NAME            COMMENTS
---------- --------------- ------------------------------
         1 name_1          comment_1

&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/p&gt;

&lt;p&gt;
Not very ideal situation is, if you don&#39;t have empty table, in this case is not possible to modify column from VARCHAR2 to CLOB so easy:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SQL&gt; &lt;b&gt;desc test&lt;/b&gt;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID                                                 NUMBER
 NAME                                               VARCHAR2(50)
 COMMENTS                                           VARCHAR2(4000)                                                    

SQL&gt; &lt;b&gt;begin
        for i in 1 .. 100 loop
                insert into test 
                (
                        id,
                        name,
                        comments
                )
                values 
                (
                        i,
                        &#39;name_&#39;||i,
                        &#39;comments_&#39;||i
                );
        end loop;
        commit;
end;
/ &lt;/b&gt;

PL/SQL procedure successfully completed.

SQL&gt; &lt;b&gt;select count(*) from test;&lt;/b&gt;

  COUNT(*)
----------
       100

As before, there isn&#39;t possible to modify directly from VARCHAR2 to CLOB:

SQL&gt; &lt;b&gt;alter table test modify comments CLOB;&lt;/b&gt;
alter table test modify comments CLOB
                        *
ERROR at line 1:
ORA-22858: invalid alteration of datatype


And even more, there isn&#39;t possible to change VARCHAR2 to LONG:

SQL&gt; &lt;b&gt;alter table test modify comments LONG;&lt;/b&gt;
alter table test modify comments LONG
                        *
ERROR at line 1:
ORA-01439: column to be modified must be empty to change datatype

The whole process will be:
 - create new column with datatype CLOB
 - update this column
 - drop old column with database VARCHAR2
 - rename created column to the original column name

SQL&gt; &lt;b&gt;alter table test add (comments_tmp clob);&lt;/b&gt;

Table altered.

SQL&gt; &lt;b&gt;desc test&lt;/b&gt;
Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID                                                 NUMBER
 NAME                                               VARCHAR2(50)
 COMMENTS                                           VARCHAR2(4000)
 COMMENTS_TMP                                       CLOB

SQL&gt; &lt;b&gt;update test set comments_tmp=comments;&lt;/b&gt;

100 rows updated.

SQL&gt; &lt;b&gt;commit;&lt;/b&gt;

Commit complete.

SQL&gt; &lt;b&gt;select * from test where rownum&lt;5;&lt;/b&gt;

        ID NAME            COMMENTS                       COMMENTS_TMP
---------- --------------- ------------------------------ ---------------------------
         1 name_1          comments_1                     comments_1
         2 name_2          comments_2                     comments_2
         3 name_3          comments_3                     comments_3
         4 name_4          comments_4                     comments_4

SQL&gt; &lt;b&gt;alter table test drop column comments;&lt;/b&gt;

Table altered.

SQL&gt; &lt;b&gt;desc test&lt;/b&gt;
Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID                                                 NUMBER
 NAME                                               VARCHAR2(50)
 COMMENTS_TMP                                       CLOB

SQL&gt; &lt;b&gt;select * from test where rownum&lt;5;&lt;/b&gt;

        ID NAME            COMMENTS_TMP
---------- --------------- ------------------------------
        90 name_90         comments_90
        92 name_92         comments_92
        93 name_93         comments_93
        94 name_94         comments_94

SQL&gt; &lt;b&gt;alter table test rename column comments_tmp to comments;&lt;/b&gt;

Table altered.

SQL&gt; desc test
 Name                                                  Null?    Type
 ---------------------------------- -------- ------------------------------------
 ID                                                             NUMBER
 NAME                                                           VARCHAR2(50)
 COMMENTS                                                       CLOB

SQL&gt; &lt;b&gt;select * from test where rownum&lt;5;&lt;/b&gt;

        ID NAME            COMMENTS
---------- --------------- ------------------------------
        90 name_90         comments_90
        92 name_92         comments_92
        93 name_93         comments_93
        94 name_94         comments_94

&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/1271812482649557704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/10/oracle-how-to-change-datatype-varchar2.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/1271812482649557704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/1271812482649557704'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/10/oracle-how-to-change-datatype-varchar2.html' title='Oracle: How to change datatype VARCHAR2 to CLOB'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-2394409388196128632</id><published>2012-10-02T22:35:00.000+02:00</published><updated>2012-10-03T20:13:04.953+02:00</updated><title type='text'>Oracle: Working with LOBs</title><content type='html'>&lt;p&gt;Large Objects (LOBs) are a set of datatypes that are designed to hold large amounts of data. A LOB can hold up to a maximum size ranging from 8 terabytes to 128 terabytes depending on how your database is configured. Storing data in LOBs enables you to access and manipulate the data efficiently in your application.&lt;/p&gt;

&lt;span class=&#39;name2&#39;&gt;Load lobs to the database&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;Create table:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SYS@ORCL&gt; &lt;b&gt;create table orders
(order_id number(12),
order_name varchar2(80),
file_size number,
order_file blob)
tablespace users
lob (order_file) STORE AS
(
tablespace users
enable storage in row
chunk 4096
pctversion 20
nocache
nologging);  &lt;/b&gt;

Table created.
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Create database directory:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SYS@ORCL&gt; &lt;b&gt;create directory lobdir as &#39;/u01/app/oracle/scripts/lobs&#39;;&lt;/b&gt;

Directory created.

SYS@ORCL&gt; &lt;b&gt;!mkdir /u01/app/oracle/scripts/lobs&lt;/b&gt;

&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Prepare file for loading to the database:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@oralin1 lobs]$ ll
total 40
drwxr-xr-x 2 oracle oinstall 4096 Aug  1 20:49 .
drwxr-xr-x 3 oracle oinstall 4096 Aug  1 20:39 ..
-rw-r--r-- 1 oracle oinstall 9216 Aug  1 20:45 order_1.pdf     
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Load LOB file to the database:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SYS@ORCL&gt; &lt;b&gt;declare
 l_size number;
 l_file bfile;
 l_blob blob;
begin
 l_file := bfilename(&#39;LOBDIR&#39;,&#39;order_1.pdf&#39;);
 dbms_lob.fileopen(l_file);
 l_size := dbms_lob.getlength(l_file);
 insert into orders 
 (
  order_id,
  order_name,
  file_size,
  order_file
 )
 values
 (
  1,
  &#39;order-1&#39;,
  l_size,
  empty_blob()
 )
 returning order_file into l_blob;
 dbms_lob.loadfromfile(l_blob,l_file,l_size);
 commit;
end;
/&lt;/b&gt;  

PL/SQL procedure successfully completed.
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Check loaded file:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SYS@ORCL&gt; &lt;b&gt;select
 order_id,
 order_name,
 file_size,
 dbms_lob.getlength(order_file)
from 
 orders
;  &lt;/b&gt;

ORDER_ID  ORDER_NAME   ORDER_SIZE   DBMS_LOB.GETLENGTH(ORDER_FILE)
-------- ------------ ------------ -------------------------------
  1       Contract 1 115250          115250



&lt;/pre&gt;&lt;/td&gt;&lt;/td&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/2394409388196128632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/10/working-with-lobs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/2394409388196128632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/2394409388196128632'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/10/working-with-lobs.html' title='Oracle: Working with LOBs'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-4403018094480782557</id><published>2012-10-02T21:54:00.000+02:00</published><updated>2012-10-03T20:13:19.593+02:00</updated><title type='text'>Oracle: Configure the database instance to support shared server connections </title><content type='html'>&lt;p&gt;
The shared server architecture enables a database server to allow many user processes to share very few server processes, so the number of users that can be supported is increased. With shared server, many user processes connect to a dispatcher. The dispatcher directs multiple incoming network session requests to a common queue. An idle shared server process from a shared pool of server processes picks up a request from the queue. This means a small pool of server processes can serve a large number of clients.
&lt;/p&gt;

&lt;p&gt;Shared memory resources are preconfigured to allow the enabling of shared server at run time. There is just needed to set one parameter if you are using TCP/IP as your communication protocol, and the rest of the settings are now managed internally.&lt;/p&gt;

&lt;p&gt;
Parameter connected to managing shared servers:
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;shared_servers&lt;/b&gt; - specifies the number of server processes that you want to create when an instance is started. This is the only required parameter for using shared servers. Setting this to a non-zero value automatically specifies shared server.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;max_shared_servers&lt;/b&gt; - specifies the maximum number of shared server processes allowed to be running simultaneously. Setting this parameter enables you to reserve process slots for other processes, such as dedicated servers.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;shared_server_sessions&lt;/b&gt; - specifies the total number of shared server sessions to allow.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;dispatchers&lt;/b&gt; - configures dispatcher processes in the shared server architecture. One dispatcher is always configured by default for the TCP/IP protocol, even if the parameter is not explicitly specified.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;max_dispatchers&lt;/b&gt; - specifies the maximum number of dispatcher processes allowed to be running simultaneously&lt;/li&gt;
&lt;li&gt;&lt;b&gt;circuits&lt;/b&gt; - specifies the total number of virtual circuits that are available for inbound and outbound network sessions&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;span class=&#39;name2&#39;&gt;Configuring Dispatchers&lt;/span&gt;
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SQL&gt; &lt;b&gt;alter system set shared_servers = 2 scope=both;&lt;/b&gt;

System altered.

SQL&gt; &lt;b&gt;alter system set dispatchers=&#39;(PROTOCOL=tcp)(DISPATCHERS=2)&#39; scope=both;&lt;/b&gt;

System altered.

SQL&gt; &lt;b&gt;show parameter shared_servers&lt;/b&gt;

NAME                   TYPE       VALUE
-------------------- ----------- ---------
max_shared_servers    integer
shared_servers        integer      2


SQL&gt; &lt;b&gt;show parameter dispatcher&lt;/b&gt;

NAME                   TYPE       VALUE
-------------------- ----------- ------------------------------
dispatchers            string     (PROTOCOL=tcp)(DISPATCHERS=2)
&lt;/td&gt;&lt;/tr&gt;&lt;/pre&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;tnsnames.ora&lt;/b&gt;&lt;/p&gt;
PROD database will listen on the port 51521 and the database PROD2 will listen on the port 1521.
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
PROD=
 (DESCRIPTION=
   (ADDRESS=(PROTOCOL=tcp)(HOST=oralin1.oracle.com)(PORT=51521))
   (CONNECT_DATA=
     (SERVICE_NAME=PROD)))
PROD2=
 (DESCRIPTION=
   (ADDRESS=(PROTOCOL=tcp)(HOST=oralin1.oracle.com)(PORT=1521))
   (CONNECT_DATA=
     (SERVICE_NAME=PROD)(SERVER=&lt;b&gt;SHARED&lt;/b&gt;)))
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;span class=&#39;name2&#39;&gt;Check configuration&lt;/span&gt;
&lt;p&gt;&lt;b&gt;Shared connection:&lt;/b&gt;&lt;/p&gt;
Open two consoles:&lt;br /&gt;
 - connect to sqlplus via listener with account SYSTEM&lt;br /&gt;
 - check the connection of the account SYSTEM&lt;br /&gt;
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
&lt;u&gt;&lt;b&gt;First console:&lt;/b&gt;&lt;/u&gt;
[oracle@oralin1 admin]$ &lt;b&gt;sqlplus system/oracle@PROD2&lt;/b&gt;

SQL*Plus: Release 11.1.0.7.0 - Production on Wed Apr 11 16:02:20 2012

Copyright (c) 1982, 2008, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL&gt; 

&lt;u&gt;&lt;b&gt;Second console:&lt;/b&gt;&lt;/u&gt;
SQL&gt; &lt;b&gt;select username, server from v$session where username=&#39;SYSTEM&#39;;&lt;/b&gt;

USERNAME SERVER
------------------------------ ---------
SYSTEM NONE
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;b&gt;Dedicated connection:&lt;/b&gt;&lt;/p&gt;
Again, open two consols, one for connection and second for checking of the connection
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
&lt;u&gt;&lt;b&gt;First console:&lt;/b&gt;&lt;/u&gt;
oracle@oralin1 admin]$ &lt;b&gt;sqlplus system/oracle@PROD&lt;/b&gt;

SQL*Plus: Release 11.1.0.7.0 - Production on Wed Apr 11 16:22:39 2012

Copyright (c) 1982, 2008, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL&gt;


&lt;u&gt;&lt;b&gt;Second console:&lt;/b&gt;&lt;/u&gt;
SQL&gt; &lt;b&gt;select username, server from v$session where username=&#39;SYSTEM&#39;;&lt;/b&gt;

USERNAME SERVER
------------------------------ ---------
SYSTEM DEDICATED
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;span class=&#39;name2&#39;&gt;Non default port&lt;/span&gt;
&lt;p&gt;
In the case, that shared servers are configured on the another port as is default port (1521), it&#39;s neccessary to set the parameter local_listener:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SYS@ORCL&gt; &lt;b&gt;show parameter local&lt;/b&gt;

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
local_listener        string
log_archive_local_first       boolean  TRUE
SYS@ORCL&gt; &lt;b&gt;alter system set local_listener=&#39;(ADDRESS = (PROTOCOL=TCP)(HOST=oralin1.oracle.com)(PORT=1526))&#39; scope=both;&lt;/b&gt;

System altered.

SYS@ORCL&gt; &lt;b&gt;show parameter local&lt;/b&gt;

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
local_listener        string  (ADDRESS = (PROTOCOL=TCP)(HOST
       =oralin1.oracle.com)(PORT=1526
       ))
log_archive_local_first       boolean  TRUE
SYS@ORCL&gt; &lt;b&gt;exit&lt;/b&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/4403018094480782557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/10/configure-database-instance-to-support.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4403018094480782557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4403018094480782557'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/10/configure-database-instance-to-support.html' title='Oracle: Configure the database instance to support shared server connections '/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-2942735185942147704</id><published>2012-10-01T19:57:00.000+02:00</published><updated>2012-10-01T19:57:17.719+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>Virtualization of NFS storage: Create and Manage a tablespace that uses NFS mounted file system file</title><content type='html'>&lt;p&gt;
Direct NFS is a new feature introduced with Oracle 11g and  is an optimized NFS (Network File System) client that provides faster and more scalable access to NFS storage located on NAS storage devices (accessible over TCP/IP). Direct NFS is built directly into the database kernel - just like ASM which is mainly used when using DAS or SAN storage. Direct NFS provides faster performance that what can be provided by the operating system&#39;s NFS driver as Oracle bypasses the operating system and generates exactly the requests it needs (no user configuration or tuning required). Data is cached just once in user space, which saves memory (no second copy in kernel space). Performance is further improved by load balancing across multiple network interfaces (if available).
Direct NFS is provided as part of the database kernel, and is thus available on all supported database platforms.
&lt;/p&gt;
&lt;p&gt;
In this post I plan to practice to set up a data file on NFS.
&lt;/p&gt;
&lt;span class=&#39;name2&#39;&gt;Create NFS Volume and Share&lt;/span&gt;
&lt;p&gt;
For this practice I chosen Open Source Storage - FreeNAS (&lt;a href=&#39;http://www.freenas.org/&#39;&gt;http://www.freenas.org&lt;/a&gt;) 
&lt;/p&gt;

&lt;span class=&#39;name2&#39;&gt;Install and setup FreeNAS on the Linux platform&lt;/span&gt;
&lt;p&gt;For this virtual simulation I have chosen VirtualBox (&lt;a href=&#39;https://www.virtualbox.org&#39;&gt;https://www.virtualbox.org&lt;/a&gt;) where I have created two Hard Disks:
&lt;ul&gt;
&lt;li&gt;FreeNAS.vdi - 4GB&lt;/li&gt;
&lt;li&gt;NFSDATA.vdi - 4GB&lt;/li&gt;
&lt;/ul&gt;
I have created new Virtual Machine with following options:
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Name:&lt;/b&gt; FreeNAS&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Operating system:&lt;/b&gt; BSD&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Version:&lt;/b&gt; FreeBSD or FreeBSD (64 bit)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Memory: &lt;/b&gt;1024MB&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Virtual Hard Disk: &lt;/b&gt;Create new hard disk&lt;/li&gt;
&lt;li&gt;&lt;b&gt;File type: &lt;/b&gt;I have chosen VDI&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Virtual disk storage details: &lt;/b&gt;Dynamically allocated&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Location: &lt;/b&gt;it&#39;s up to you&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Size: &lt;/b&gt;again it&#39;s up to you&lt;/li&gt;
&lt;/ul&gt;

&lt;br /&gt;

Additionally is necessary to create new disk, which will be shared for other virtual machines. In settings for new created virtual machine (FreeNAS):
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Storage tab: &lt;/b&gt;add new IDE controller - Create new disk (the same steps as was in the previous step for creating new disk. Be aware to have this disk with the size 4GB or bigger. I have chosen the name NFSDATA.vdi)&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;span class=&#39;name3&#39;&gt;Installation&lt;/span&gt;&lt;br /&gt;
Start new created virtual machine FreeNAS with two hard disks (FreeNAS.vdi and NFSDATA.vdi) and boot downloaded installation of FreeNAS:
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGM9cs9lk16PvqYErEgVmgxJjJEH6bZIN5vUBCDZcnj7X4sJ-tBwU489UWIiExpQKrNDT2GuGLtz7SC5Q8ykdD9TDUKRUpRbquW7PGe8y6pgxeXIetgWtexHnnKO9-cSYx_OGrUvk3pQhV/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGM9cs9lk16PvqYErEgVmgxJjJEH6bZIN5vUBCDZcnj7X4sJ-tBwU489UWIiExpQKrNDT2GuGLtz7SC5Q8ykdD9TDUKRUpRbquW7PGe8y6pgxeXIetgWtexHnnKO9-cSYx_OGrUvk3pQhV/s320/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuqB5H0dkcDwBjZWOxYjBn5rEYqdY3WoRsQ9DNw5voPdhBo3YUAERUFuCuegRLtLoen1g4BhiKuYFvGXiG7qfMh7BZYdQd8SKzkwCcC4grZFwzGjzeqiIr7B-jzdIMtqU7-QBUw68LNWsj/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuqB5H0dkcDwBjZWOxYjBn5rEYqdY3WoRsQ9DNw5voPdhBo3YUAERUFuCuegRLtLoen1g4BhiKuYFvGXiG7qfMh7BZYdQd8SKzkwCcC4grZFwzGjzeqiIr7B-jzdIMtqU7-QBUw68LNWsj/s320/2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9uDR_SFr2fZrm822KIuE5zOqBmSKppVz9rlJc58gfwFvp-n608_UY8B0UPUCUW4fFW9ehhm2ZI-KvmISAbCBvO9WhwhTY_MXHotFGCog3CvpvuHTbpXalmdA8kmhkgdr4ObymUVPap3Wo/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9uDR_SFr2fZrm822KIuE5zOqBmSKppVz9rlJc58gfwFvp-n608_UY8B0UPUCUW4fFW9ehhm2ZI-KvmISAbCBvO9WhwhTY_MXHotFGCog3CvpvuHTbpXalmdA8kmhkgdr4ObymUVPap3Wo/s320/3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjifhQDPFU84s2qbY1SbrZcpIZuGDWIopuKNMon3vGnRUsukeaSxArsQOzYNC3_IrtaBsB0tXRzCnQS5qG0XTWTDGtegFHye7Ay1JheDpysEJSi_rXp7l2-LVzk1Q6Pc6F0g-0hDLjwrcrv/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;178&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjifhQDPFU84s2qbY1SbrZcpIZuGDWIopuKNMon3vGnRUsukeaSxArsQOzYNC3_IrtaBsB0tXRzCnQS5qG0XTWTDGtegFHye7Ay1JheDpysEJSi_rXp7l2-LVzk1Q6Pc6F0g-0hDLjwrcrv/s320/4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9vPQoFJ0pJvl9S44utjJevi-zQ6GlNQPkStpuo0fTGoQ7cE_HqC6n8Me-wkdRtkfLD1jrcNu-6GYFyRF9R6OUGWFuCAiaNq_8gPcD97tggLBHnAfcIay-fDZewQvXBxUa6APGi-BnojB7/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;175&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9vPQoFJ0pJvl9S44utjJevi-zQ6GlNQPkStpuo0fTGoQ7cE_HqC6n8Me-wkdRtkfLD1jrcNu-6GYFyRF9R6OUGWFuCAiaNq_8gPcD97tggLBHnAfcIay-fDZewQvXBxUa6APGi-BnojB7/s320/5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Reboot and unmount the installation disk.
&lt;/p&gt;
&lt;span class=&#39;name3&#39;&gt;Configure network interface&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt; Select first option: 1) Configure Network Interfaces
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-saZ7XhBA-43pAYW3KqN140qmuKraXdpL8a1WdAn5gym6FnLiUPrRN4tVPxuK_nwb9kCLYcEf1nU5k0rsQyC85yF4I7q8cMjxGJkksRk4mIEb0SoLrBm37EH55Lx5h_80PIavIzg73phO/s1600/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;175&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-saZ7XhBA-43pAYW3KqN140qmuKraXdpL8a1WdAn5gym6FnLiUPrRN4tVPxuK_nwb9kCLYcEf1nU5k0rsQyC85yF4I7q8cMjxGJkksRk4mIEb0SoLrBm37EH55Lx5h_80PIavIzg73phO/s320/6.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt; Select an interface: 1)em0
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEime35sPceIe0yVBTaCgp7tp0bCeJj-srTtDeNFH13qzZLTDaeGBtasWHqikuSR5W74BjgC7YbLKrcJcNClMg9hfnP2LdEmo0sC3FhHG5bjQ4s_dG_NqYPoGMrnlcY7j0LkaYFu5QFC4HYW/s1600/7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;176&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEime35sPceIe0yVBTaCgp7tp0bCeJj-srTtDeNFH13qzZLTDaeGBtasWHqikuSR5W74BjgC7YbLKrcJcNClMg9hfnP2LdEmo0sC3FhHG5bjQ4s_dG_NqYPoGMrnlcY7j0LkaYFu5QFC4HYW/s320/7.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Delete existing config?&lt;/b&gt; n&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Configure interface for DHCP?&lt;/b&gt; n&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Configure IPv4?&lt;/b&gt; y&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Interface name: &lt;/b&gt;lan1&lt;/li&gt;
&lt;li&gt;&lt;b&gt;IPv4 Address: &lt;/b&gt;192.168.12.101/24&lt;/li&gt;
&lt;li&gt;&lt;b&gt;configure IPv6?&lt;/b&gt; n&lt;/li&gt;
&lt;li&gt; GUI interface for configuration of FreeNAS is on the following IP: 192.168.12.101.
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3kvnbkWSGWAnZDW51TAmnrskyYFx5Z2ZxsYJ8uD4dXTIEFm7xnnAboVkSJ8DYjYzcnhCP8tX_RKYnR4my-z-MWDMtf1vdIe391brXBv49sxskZPzGZaHq6hyphenhyphenD0_TZkJLWcDLZWapyUNKE/s1600/8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;177&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3kvnbkWSGWAnZDW51TAmnrskyYFx5Z2ZxsYJ8uD4dXTIEFm7xnnAboVkSJ8DYjYzcnhCP8tX_RKYnR4my-z-MWDMtf1vdIe391brXBv49sxskZPzGZaHq6hyphenhyphenD0_TZkJLWcDLZWapyUNKE/s320/8.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
&lt;span class=&#39;name3&#39;&gt;Create disc volumes&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Open the GUI interface. IP address is in the previous picture - last two lines - 192.168.12.101.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHGu6Bf9ggZfoCrpwbQzCpIYrpRgf5ZNlEdW7P64G11nOGWKaERN_Cu082r7WAXQ4EVRQ7l8sNcONs5LTVdaS725AM6qUkiTe7OUbV1ni4pN3ln11SDLpGS8iT5kYNSuq8xTSJYcUqHsuX/s1600/9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHGu6Bf9ggZfoCrpwbQzCpIYrpRgf5ZNlEdW7P64G11nOGWKaERN_Cu082r7WAXQ4EVRQ7l8sNcONs5LTVdaS725AM6qUkiTe7OUbV1ni4pN3ln11SDLpGS8iT5kYNSuq8xTSJYcUqHsuX/s320/9.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;In the top right you see that red &quot;Alert&quot; light blinking. Click it now.
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM_LfCAMhyY_b571-wSenDH91EpUvDyCAnRCoY7FHOU0aSeLBGKZ5IEN4P2_lYnxkCiwOQ7dqIcol4uGFv82K6o9IpSIUe7j6t4En04XqxPfsv77VEmMnJmFkKxdCldcgKDbK-TuJwRzVC/s1600/10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;82&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM_LfCAMhyY_b571-wSenDH91EpUvDyCAnRCoY7FHOU0aSeLBGKZ5IEN4P2_lYnxkCiwOQ7dqIcol4uGFv82K6o9IpSIUe7j6t4En04XqxPfsv77VEmMnJmFkKxdCldcgKDbK-TuJwRzVC/s320/10.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
It means that you should change the password for the admin user.
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Create group:&lt;/b&gt;&lt;br /&gt;
In the left menu expand the &lt;i&gt;&quot;Groups&quot;&lt;/i&gt; and click on the &lt;i&gt;&quot;Add Group&quot;&lt;/i&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZa38Qv8g_wGQWIRUSoW1gKHSS6h5mbX4XVEecQ28TBlVj-Udph-jC7UAaAKeqNzo311ZrnVx5erLTF_SbF4V4yAmBVo76vma1sFd-GhAgDG3iOEf8PBZn0Vl6IKaZ5Yxp527M7SgXvIiz/s1600/11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;184&quot; width=&quot;314&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZa38Qv8g_wGQWIRUSoW1gKHSS6h5mbX4XVEecQ28TBlVj-Udph-jC7UAaAKeqNzo311ZrnVx5erLTF_SbF4V4yAmBVo76vma1sFd-GhAgDG3iOEf8PBZn0Vl6IKaZ5Yxp527M7SgXvIiz/s320/11.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

In the case, that you want to simulate NFS mounted filesystem with the Oracle database in the other Virtual machine, the best solution is to choose the same &lt;i&gt;uid/gid&lt;/i&gt; as you have for the user/group &lt;i&gt;oracle/dba or oinstall&lt;/i&gt; (user and group under who you have installed the Oracle software).
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Create user:&lt;/b&gt;&lt;br /&gt;
In the left menu expand the &lt;i&gt;&quot;Users&quot;&lt;/i&gt; and click on the &lt;i&gt;&quot;Add User&quot;&lt;/i&gt;.
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHWjM4-jEZSeMzA9tR4LFtejtY5pejmxVSkKq6_WqYlioxuWdW51yU9B-JckE-VvQs1_kMa4-LrPq2OdZVxPGip75TxN3CDVR_lU3b4qAfmWM8rBIh6oLH45tkCXgYu10gB3mc5zwGJnqg/s1600/12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; width=&quot;308&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHWjM4-jEZSeMzA9tR4LFtejtY5pejmxVSkKq6_WqYlioxuWdW51yU9B-JckE-VvQs1_kMa4-LrPq2OdZVxPGip75TxN3CDVR_lU3b4qAfmWM8rBIh6oLH45tkCXgYu10gB3mc5zwGJnqg/s320/12.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Set up disks and file sharing:&lt;/b&gt;&lt;br /&gt;
FreeNAS supports two types of file systems and three sharing protocols:
&lt;ul&gt;
&lt;li&gt;UFS - An old stand-by, the Unix File System. Don&#39;t get us wrong, it&#39;s a solid system; we just don&#39;t want to use it here. For one thing, it lacks the volume management, RAID and pooling options we can get with our second option, ZFS.&lt;/li&gt;
&lt;li&gt;ZFS - The hot new kid on the block. This is the file system we want to use, mostly because of ZFS&#39; data integrity, which promises safer, more resilient storage. Not an insignificant factor if you&#39;re trying to preserve a lifetime&#39;s worth of photos, or hundreds of tracks that cost you $0.99 apiece. We could spend a great deal of time talking about ZFS, but that&#39;s a topic for another day. For now, let&#39;s get on with it and talk about FreeNAS&#39; sharing protocols.&lt;/li&gt;
&lt;/ul&gt;
FreeNAS supports three sharing methods: 
&lt;ul&gt;
&lt;li&gt;CIFS/SAMBA - Open-source implementation of Microsoft&#39;s SMB (Now mainly referred to as CIFS)&lt;/li&gt;
&lt;li&gt;AFP - Apple Filing Protocol&lt;/li&gt;
&lt;li&gt;NFS - Network File System&lt;/li&gt;
&lt;/ul&gt;

Now set up our disk volumes: in the left menu expand &lt;i&gt;&quot;Storage&quot;&lt;/i&gt; -&amp;gt; &lt;i&gt;&quot;Volumes&quot;&lt;/i&gt; and click on the &lt;i&gt;&quot;Create Volume&quot;&lt;/i&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUeJ4oTwTZkTQrsNvY8un6F8Z-Qgw0LBC1-RyMugUy16AW2BHRxpbZpEQZ4_0Wy0Ft8Oad8oNSTE9XoeTsxwcP8b6K1_4DvRlOjQyjfzrsafuwKwJtLcXh64maVk53SPMr8Sk2vxM8xxpM/s1600/13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUeJ4oTwTZkTQrsNvY8un6F8Z-Qgw0LBC1-RyMugUy16AW2BHRxpbZpEQZ4_0Wy0Ft8Oad8oNSTE9XoeTsxwcP8b6K1_4DvRlOjQyjfzrsafuwKwJtLcXh64maVk53SPMr8Sk2vxM8xxpM/s320/13.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

After creating new volume, you should see:
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxRJSqtsdNkW159Ugup1Xty62mfS-nQodiBY0n3frHH2AX6mtfMP7lnJ7CBWw4luO18msOTlv6HiVYL7TqOaP6gEhl-rB0i11r15jvVDpLLqnW-hnE-QDTZRZotxYMW5fEKKexxzGnYTxV/s1600/14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxRJSqtsdNkW159Ugup1Xty62mfS-nQodiBY0n3frHH2AX6mtfMP7lnJ7CBWw4luO18msOTlv6HiVYL7TqOaP6gEhl-rB0i11r15jvVDpLLqnW-hnE-QDTZRZotxYMW5fEKKexxzGnYTxV/s320/14.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Change permission:&lt;/b&gt;&lt;br /&gt;
In the left menu expand &lt;i&gt;&quot;Storage&quot;&lt;/i&gt; -&amp;gt; &lt;i&gt;&quot;Volumes&quot;&lt;/i&gt; -&amp;gt;&lt;i&gt;&quot;/mnt/nfs_share_1&quot;&lt;/i&gt; and click on the &lt;i&gt;&quot;Change permission&quot;&lt;/i&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicpQCja0whPG-0yujfY7I3sXCBzng6-kp7OIvOO7cleB4h5Q2oHemrCmZ1iyRjF_LFUsS75eHqFeMJNzl7PsrZ0ResfKO1_mx5XIC7nmAyqIhIOal9uxJM6T2El9lzFa-QdrS6py1iq5S5/s1600/15.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicpQCja0whPG-0yujfY7I3sXCBzng6-kp7OIvOO7cleB4h5Q2oHemrCmZ1iyRjF_LFUsS75eHqFeMJNzl7PsrZ0ResfKO1_mx5XIC7nmAyqIhIOal9uxJM6T2El9lzFa-QdrS6py1iq5S5/s320/15.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Here you can specify the owner of the volume with the read-write permissions.
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Enable services:&lt;/b&gt;&lt;br /&gt;
In the left menu expand the &lt;i&gt;&quot;Services&quot;&lt;/i&gt; and click on the &lt;i&gt;&quot;Control Services&quot;&lt;/i&gt;. Here you can enable NFS and SSH.
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiezvdQ8g5UBD8yQYrusf85VtARlBgEkmXAJVYIHdtOWewGnrtaTDxHXdxhHOo1uARAC39RKvLx3p0hqPGzu6K0zP7koethXtpYvkIm5RuvX0i6u9RJF3D3meDOKjm8OIwlyTfQmn4U-Mgb/s1600/16.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiezvdQ8g5UBD8yQYrusf85VtARlBgEkmXAJVYIHdtOWewGnrtaTDxHXdxhHOo1uARAC39RKvLx3p0hqPGzu6K0zP7koethXtpYvkIm5RuvX0i6u9RJF3D3meDOKjm8OIwlyTfQmn4U-Mgb/s320/16.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Make Sharing:&lt;/b&gt;
In the left menu expand &lt;i&gt;&quot;Sharing&quot;&lt;/i&gt; -&amp;gt; &lt;i&gt;&quot;NFS Shares&quot;&lt;/i&gt; click on the &lt;i&gt;&quot;Add NFS Share&quot;&lt;/i&gt;.
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh19AxmyBoogOyzjbKRQZH57ucO7w0LGyZEGAjpqu6Jnk8B3mGRJAG0KZlBG-UbCSh0qK8lZzrBKL0g8CQ1y9t2eFBTK6zFQw45dFBZEVwbOiDrK2qizWvBbk3vEYxO6Ny5HzSpU_IhKd38/s1600/17.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;278&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh19AxmyBoogOyzjbKRQZH57ucO7w0LGyZEGAjpqu6Jnk8B3mGRJAG0KZlBG-UbCSh0qK8lZzrBKL0g8CQ1y9t2eFBTK6zFQw45dFBZEVwbOiDrK2qizWvBbk3vEYxO6Ny5HzSpU_IhKd38/s320/17.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
Now we have prepared the NFS file system. To verify it we can try with &quot;exportfs -v&quot;
&lt;/p&gt;

&lt;p&gt;&lt;span class=&#39;name2&#39;&gt;Mounting NFS on the client node&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To be able to mount the NFS export, as the root user create an empty directory on each cluster node named /u01/app/nfs_share&lt;/li&gt;
&lt;li&gt;Add the hostname of the shared storage to the /etc/hosts:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[root@oralin1 ~]# cat /etc/hosts
192.168.12.101 freenas-nas
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Make sure the NFS export is mounted on the cluster nodes during boot time by adding the following line to the &quot;/etc/fstab&quot; file on each cluster node&lt;br /&gt;
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;freenas-nas:/mnt/nfs_share_1 /u01/app/nfs_share nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 0 0&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Mount the NFS export by executing the mount /u01/app/nfs_share command on each server&lt;/li&gt;
&lt;li&gt;Check if the NFS export is correctly mounted with the &quot;mount&quot; command&lt;br /&gt;
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;freenas-nas:/mnt/nfs_share_1 on /u01/app/nfs_share type nfs (rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,nfsvers=3,timeo=600,addr=192.168.12.101)&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class=&#39;name2&#39;&gt;Configure Direct NFS Client (DNFS)&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Configure oranfstab file&lt;/b&gt;&lt;br /&gt;
For reference, Direct NFS searches for mount entries in the following order: 
&lt;ol&gt;
&lt;li&gt;$ORACLE_HOME/dbs/oranfstab&lt;/li&gt;
&lt;li&gt;/etc/oranfstab&lt;/li&gt;
&lt;li&gt;/etc/mtab&lt;/li&gt;
&lt;/ol&gt;
Configure the oranfstab as like below: 
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@oralin1 ~]$ cat /u01/app/oracle/product/11.1.0/db_1/dbs/oranfstab 
server:  freenas-nas
path:    192.168.12.101
local:   192.168.12.11
export:  /mnt/nfs_share_1
mount:   /u01/app/nfs_share
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Enable the Direct NFS Client ODM Library&lt;/b&gt;
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
cd $ORACLE_HOME/lib
mv libodm11.so libodm11.so_bak
ln -s libnfsodm11.so libodm11.so
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Re-start the Database instance&lt;/b&gt;&lt;br /&gt;
alert log shows Direct NFS client is enabled by checking the below message 
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
Oracle instance running with ODM: Oracle Direct NFS ODM Library Version 2.0
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Connect to DB instance and move existing datafiles to NFS drive or create tablespace on NFS drive to check DNFS is working or not&lt;/b&gt;
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
SYS@ORCL&gt; &lt;b&gt;select * from v$dnfs_servers;&lt;/b&gt;

        ID SVRNAME              DIRNAME                 MNTPORT    NFSPORT      WTMAX      RTMAX
---------- -------------------- -------------------- ---------- ---------- ---------- ----------
         1 freenas-nas          /mnt/nfs_share_1            958       2049      32768      32768

SYS@ORCL&gt; &lt;b&gt;create tablespace nfs_test datafile &#39;/u01/app/nfs_share/nfs_test_1.dbf&#39; size 5m;&lt;/b&gt;

Tablespace created.


SYS@ORCL&gt; &lt;b&gt;select * from v$dnfs_files;&lt;/b&gt;

FILENAME                                             FILESIZE       PNUM     SVR_ID
-------------------------------------------------- ---------- ---------- ----------
/u01/app/nfs_share/nfs_test_1.dbf                     5251072          9          1

&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/2942735185942147704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/10/virtualization-of-nfs-storage-create.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/2942735185942147704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/2942735185942147704'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/10/virtualization-of-nfs-storage-create.html' title='Virtualization of NFS storage: Create and Manage a tablespace that uses NFS mounted file system file'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGM9cs9lk16PvqYErEgVmgxJjJEH6bZIN5vUBCDZcnj7X4sJ-tBwU489UWIiExpQKrNDT2GuGLtz7SC5Q8ykdD9TDUKRUpRbquW7PGe8y6pgxeXIetgWtexHnnKO9-cSYx_OGrUvk3pQhV/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-4921936201862830479</id><published>2012-07-17T12:04:00.001+02:00</published><updated>2012-07-17T12:04:45.164+02:00</updated><title type='text'>Oracle Enterprise Manager 10g Release 5 Grid Control: bin/emdctl: error while loading shared libraries: libjava.so: cannot open shared object file</title><content type='html'>&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@oralin2]$ emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.  
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
/u01/app/oracle/OracleHomes/agent10g/bin/emdctl: error while loading shared libraries: libjava.so:&lt;br /&gt; cannot open shared object file: No such file or directory

&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;b&gt;Solution:&lt;/b&gt;
Execute the following steps to fix this issue.

&lt;ul&gt;
&lt;li&gt;
Rename jdk&lt;timestamp folder&gt; to jdk
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@oralin2 ~]$ &lt;b&gt;echo $ORACLE_HOME&lt;/b&gt;
/u01/app/oracle/OracleHomes/agent10g
[oracle@oralin2 ~]$ &lt;b&gt;cd $ORACLE_HOME&lt;/b&gt;
[oracle@oralin2]$ &lt;b&gt;ls -ld jdk*&lt;/b&gt;
drwxr-xr-x 6 oracle oinstall 4096 Jul 17 09:03 jdk2012-07-17_09-35-41-AM
drwxr-x--- 7 oracle oinstall 4096 Jul 16 20:56 jdk2012-07-17_09-03-00-AM
[oracle@oralin2]$ &lt;b&gt;mv jdk2012-07-17_09-35-41-AM jdk&lt;/b&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;
Run root.sh from AGENT_HOME.
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@oralin2]$ &lt;b&gt;su -&lt;/b&gt;
Password: 
[root@oralin2 ~]# &lt;b&gt;/u01/app/oracle/OracleHomes/agent10g/root.sh&lt;/b&gt;
Finished product-specific root actions.
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;
Verify the jdk director at AGENT_HOME and size of the file. 
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@oralin2]$ &lt;b&gt;ls -l $ORACLE_HOME/jdk*&lt;/b&gt;
/u01/app/oracle/OracleHomes/agent10g/jdk:
total 132
drwxr-xr-x 2 oracle oinstall  4096 Jul 17 09:03 bin
-rwxr-xr-x 1 oracle oinstall  2487 Oct 15  2008 COPYRIGHT
drwxr-xr-x 3 oracle oinstall  4096 Jul 17 09:03 include
drwxr-xr-x 6 oracle oinstall  4096 Jul 17 09:03 jre
drwxr-xr-x 2 oracle oinstall  4096 Jul 17 09:03 lib
-rwxr-xr-x 1 oracle oinstall 18245 Oct 15  2008 LICENSE
-rwxr-xr-x 1 oracle oinstall 20415 Oct 15  2008 README.html
-rwxr-xr-x 1 oracle oinstall 67235 Oct 15  2008 THIRDPARTYLICENSEREADME.txt

/u01/app/oracle/OracleHomes/agent10g/jdk2012-07-17_09-03-00-AM:
total 84
drwxr-x--- 2 oracle oinstall  4096 Jul 16 20:56 bin
-rw-r--r-- 1 oracle oinstall  4431 Apr 20  2005 COPYRIGHT
drwxr-x--- 3 oracle oinstall  4096 Jul 16 20:56 include
drwxr-x--- 6 oracle oinstall  4096 Jul 16 20:56 jre
drwxr-x--- 2 oracle oinstall  4096 Jul 16 20:56 lib
-rw-r--r-- 1 oracle oinstall 17669 Apr 20  2005 LICENSE
-rw-r--r-- 1 oracle oinstall  8986 Apr 20  2005 README
-rw-r--r-- 1 oracle oinstall 16251 Apr 20  2005 README.html
-rw-r--r-- 1 oracle oinstall 10129 Apr 20  2005 THIRDPARTYLICENSEREADME.txt
[oracle@oralin2]$ &lt;b&gt;du -sh $ORACLE_HOME/jdk*&lt;/b&gt;
198M    /u01/app/oracle/OracleHomes/agent10g/jdk
72M     /u01/app/oracle/OracleHomes/agent10g/jdk2012-07-17_09-03-00-AM
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;
Now start the Agent.
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[oracle@oralin2]$ &lt;b&gt;emctl start agent&lt;/b&gt;
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.  
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Agent is already running
[oracle@oralin2]$ &lt;b&gt;emctl status agent&lt;/b&gt;
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.  
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.5.0
OMS Version       : 10.2.0.5.0
Protocol Version  : 10.2.0.5.0
Agent Home        : /u01/app/oracle/OracleHomes/agent10g
Agent binaries    : /u01/app/oracle/OracleHomes/agent10g
Agent Process ID  : 9178
Parent Process ID : 8519
Agent URL         : https://oralin2.oracle.com:3872/emd/main/
Repository URL    : https://oralin2.oracle.com:1159/em/upload
Started at        : 2012-07-17 09:08:05
Started by user   : oracle
Last Reload       : 2012-07-17 09:13:19
Last successful upload                       : 2012-07-17 11:45:16
Total Megabytes of XML files uploaded so far :    12.02
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    46.75%
Last successful heartbeat to OMS             : 2012-07-17 11:46:17
---------------------------------------------------------------
Agent is Running and Ready
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/4921936201862830479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/07/oracle-enterprise-manager-10g-release-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4921936201862830479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4921936201862830479'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/07/oracle-enterprise-manager-10g-release-5.html' title='Oracle Enterprise Manager 10g Release 5 Grid Control: bin/emdctl: error while loading shared libraries: libjava.so: cannot open shared object file'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-4336787813986809078</id><published>2012-07-16T21:18:00.001+02:00</published><updated>2012-07-16T21:18:30.115+02:00</updated><title type='text'>Installing Oracle Enterprise Manager 10g Grid Control: DCM Client Session has been invalidated</title><content type='html'>&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;
Calling updateConfig to notify DCM of new deployments...&lt;br /&gt;
done.&lt;br /&gt;
&lt;b&gt;Adding OC4J mount points for application &#39;IsWebCacheWorking&#39;...done.&lt;br /&gt;
Calling SMI to save changes.&lt;br /&gt;
ERROR: Caught exception in SMISession.saveChanges: oracle.ias.sysmgmt.exception.InvalidSMISessionException: Base Exception:&lt;br /&gt;
This DCM Client Session has been invalidated due to changes made to config files by some other session. All unsaved changes will be lost.&lt;/b&gt;&lt;br /&gt;
Resolution:&lt;br /&gt;
Please close this DCM Client session, start another one and redo the changes made.&lt;br /&gt;
&lt;br /&gt;
ERROR! DEPLOY TOOL CANNOT CONTINUE DEPLOYMENTS: SMI changes for deployed apps could not be saved - ALL APPLICATIONS WILL BE UNDEPLOYED.
&lt;br /&gt;&lt;br /&gt;
Undeploying application &#39;IsWebCacheWorking&#39; from OC4J instance &#39;home&#39;.
&lt;br /&gt;&lt;br /&gt;
Application &#39;IsWebCacheWorking&#39; successfully undeployed.
Calling updateConfig to notify DCM of undeployments...&lt;br /&gt;
done.&lt;br /&gt;
Stopping OC4J instance &#39;home&#39;...&lt;br /&gt;
done.&lt;br /&gt;
Terminating DCM...&lt;br /&gt;
done.&lt;br /&gt;
Copying /u01/app/oracle/OracleHomes/oms10g/j2ee/deploy.ini to /u01/app/oracle/OracleHomes/oms10g/j2ee/deploy.ini.1342465183033.bak.&lt;br /&gt;
Writing any undeployed entries back to /u01/app/oracle/OracleHomes/oms10g/j2ee/deploy.ini.&lt;br /&gt;
&lt;br /&gt;
Oc4jDeploy tool completed, but with errors.&lt;br /&gt;

&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;b&gt;Solution:&lt;/b&gt;
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;&lt;td&gt;
Run as oracle:(all in one command)&lt;br /&gt;
&lt;b&gt;
/u01/app/oracle/OracleHomes/oms10g/jdk/bin/java -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/tmp -mx512M -classpath &lt;br /&gt;/u01/app/oracle/OracleHomes/oms10g/dcm/lib/dcm.jar:&lt;br /&gt;/u01/app/oracle/OracleHomes/oms10g/dcm/lib/oc4j_deploy_tools.jar:/u01/app/oracle/OracleHomes/oms10g/opmn/lib/opmnplugin.jar &lt;br /&gt;-Doracle.ias.sysmgmt.logging.logdir=/u01/app/oracle/OracleHomes/oms10g/j2ee/home/log oracle.j2ee.tools.deploy.Oc4jDeploy &lt;br /&gt;-oraclehome /u01/app/oracle/OracleHomes/oms10g -verbose -inifile /u01/app/oracle/OracleHomes/oms10g/j2ee/deploy.ini
&lt;/b&gt;
&lt;br /&gt;
Reading ini file - &#39;/u01/app/oracle/OracleHomes/oms10g/j2ee/deploy.ini&#39;&lt;br /&gt;
Adding web-app &#39;IsWebCacheWorkingWeb.war&#39; for app &#39;IsWebCacheWorking&#39;.&lt;br /&gt;
Initializing DCM...done.&lt;br /&gt;
OC4J instance &#39;home&#39; already exists.&lt;br /&gt;
Starting OC4J instance &#39;home&#39;...done.&lt;br /&gt;
Deploying application &#39;IsWebCacheWorking&#39; to OC4J instance &#39;home&#39;.&lt;br /&gt;
Notification ==&gt; Application Deployer for IsWebCacheWorking STARTS [ 2012-07-16T21:03:21.870CEST ]&lt;br /&gt;
Notification ==&gt; Undeploy previous deployment&lt;br /&gt;
Notification ==&gt; Removing files for app file:/u01/app/oracle/OracleHomes/oms10g/j2ee/home/applications/IsWebCacheWorking.ear&lt;br /&gt;
Notification ==&gt; Copy the archive to /u01/app/oracle/OracleHomes/oms10g/j2ee/home/applications/IsWebCacheWorking.ear&lt;br /&gt;
Notification ==&gt; Unpack IsWebCacheWorking.ear begins...&lt;br /&gt;
Notification ==&gt; Unpack IsWebCacheWorking.ear ends...&lt;br /&gt;
Notification ==&gt; Initialize IsWebCacheWorking.ear begins...&lt;br /&gt;
Notification ==&gt; Initialize IsWebCacheWorking.ear ends...&lt;br /&gt;
Notification ==&gt; Initialize IsWebCacheWorkingWeb begins...&lt;br /&gt;
Notification ==&gt; Initialize IsWebCacheWorkingWeb ends...&lt;br /&gt;
Notification ==&gt; deleting:  /u01/app/oracle/OracleHomes/oms10g/j2ee/home/applications/IsWebCacheWorking.ear&lt;br /&gt;
Notification ==&gt; deleting:  /u01/app/oracle/OracleHomes/oms10g/j2ee/home/applications/IsWebCacheWorking/IsWebCacheWorkingWeb.war&lt;br /&gt;
Notification ==&gt; Application Deployer for IsWebCacheWorking COMPLETES [ 2012-07-16T21:03:21.917CEST ]&lt;br /&gt; 
&lt;br /&gt;
Calling updateConfig to notify DCM of new deployments...done.&lt;br /&gt;
Adding OC4J mount points for application &#39;IsWebCacheWorking&#39;...done.&lt;br /&gt;
Calling SMI to save changes.&lt;br /&gt;
SMISession.saveChanges succeeded.&lt;br /&gt;
Binding web app &#39;IsWebCacheWorkingWeb&#39; to default-web-site for application &#39;IsWebCacheWorking&#39; in OC4J instance &#39;home&#39;&lt;br /&gt;
Web app &#39;IsWebCacheWorkingWeb&#39; bound successfully.&lt;br /&gt;
Calling updateConfig to notify DCM of new web-bindings...done.&lt;br /&gt;
Adding application &#39;IsWebCacheWorking&#39; to the DCM repository...done.&lt;br /&gt;
Application &#39;IsWebCacheWorking&#39; deployed successfully.&lt;br /&gt;
Stopping OC4J instance &#39;home&#39;...done.&lt;br /&gt;
Calling SMI to retry init of failed plugins...done.&lt;br /&gt;
Terminating DCM...done.&lt;br /&gt;
Copying /u01/app/oracle/OracleHomes/oms10g/j2ee/deploy.ini to /u01/app/oracle/OracleHomes/oms10g/j2ee/deploy.ini.1342465416030.bak.&lt;br /&gt;
Writing any undeployed entries back to /u01/app/oracle/OracleHomes/oms10g/j2ee/deploy.ini.&lt;br /&gt;
&lt;br /&gt;
Oc4jDeploy tool completed successfully!&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/4336787813986809078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/07/installing-oracle-enterprise-manager.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4336787813986809078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4336787813986809078'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/07/installing-oracle-enterprise-manager.html' title='Installing Oracle Enterprise Manager 10g Grid Control: DCM Client Session has been invalidated'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-540360302122942611</id><published>2012-07-01T14:25:00.000+02:00</published><updated>2012-10-03T20:13:33.032+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>Oracle: Understanding the table user$</title><content type='html'>Table &lt;b&gt;user$&lt;/b&gt;:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre&gt;
SQL&gt; desc user$
 Name        Null?    Type
 ----------------------------------------- -------- ----------------------------
 USER#        NOT NULL NUMBER
 NAME        NOT NULL VARCHAR2(30)
 TYPE#        NOT NULL NUMBER
 PASSWORD         VARCHAR2(30)
 DATATS#       NOT NULL NUMBER
 TEMPTS#       NOT NULL NUMBER
 CTIME        NOT NULL DATE
 PTIME          DATE
 EXPTIME         DATE
 LTIME          DATE
 RESOURCE$       NOT NULL NUMBER
 AUDIT$          VARCHAR2(38)
 DEFROLE       NOT NULL NUMBER
 DEFGRP#         NUMBER
 DEFGRP_SEQ#         NUMBER
 ASTATUS       NOT NULL NUMBER
 LCOUNT        NOT NULL NUMBER
 DEFSCHCLASS         VARCHAR2(30)
 EXT_USERNAME         VARCHAR2(4000)
 SPARE1          NUMBER
 SPARE2          NUMBER
 SPARE3          NUMBER
 SPARE4          VARCHAR2(1000)
 SPARE5          VARCHAR2(1000)
 SPARE6          DATE
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

Explanation of some columns:
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;CTIME&lt;/b&gt; is the date the user was created.
&lt;/li&gt;

&lt;li&gt;
&lt;b&gt;LTIME&lt;/b&gt; is the date the user was last locked. (Note that it doesn&#39;t get NULLed when you unlock the user).
&lt;/li&gt;

&lt;li&gt;
&lt;b&gt;PTIME&lt;/b&gt; is the date the password was last changed.
&lt;/li&gt;

&lt;li&gt;
&lt;b&gt;LCOUNT&lt;/b&gt; is the number of failed logins.
&lt;/li&gt;
&lt;/ul&gt;

Table &lt;b&gt;user_astatus_map&lt;/b&gt;:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre&gt;
SQL&gt; desc sys.user_astatus_map
 Name        Null?    Type
 ----------------------------------------- -------- ----------------------------
 STATUS#       NOT NULL NUMBER
 STATUS        NOT NULL VARCHAR2(32)

&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

In this table is a list of all statuses. Therefore you can join those two tables.
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre&gt;
   STATUS# STATUS
---------- --------------------------------
  0 OPEN
  1 EXPIRED
  2 EXPIRED(GRACE)
  4 LOCKED(TIMED)
  8 LOCKED
  5 EXPIRED &amp; LOCKED(TIMED)
  6 EXPIRED(GRACE) &amp; LOCKED(TIMED)
  9 EXPIRED &amp; LOCKED
 10 EXPIRED(GRACE) &amp; LOCKED

9 rows selected.
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/540360302122942611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/07/understanding-table-user.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/540360302122942611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/540360302122942611'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/07/understanding-table-user.html' title='Oracle: Understanding the table user$'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-4612063824524757720</id><published>2012-06-26T10:32:00.001+02:00</published><updated>2012-07-01T16:46:11.553+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>Auto Startup and Shutdown of Database and Listener</title><content type='html'>1. change /etc/oratab as oracle
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre&gt;
ORCL:/u01/app/oracle/product/11.2.0/db_1:Y 
&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

2. As root user create new file with name oracle - for startup and shutdown the database in /etc/init.d/ directory: 
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre&gt;
#!/bin/bash
#
# oracle Init file for starting and stopping
# Oracle Database. Script is valid for 10g and 11g versions.
#
# chkconfig: 35 80 30
# description: Oracle Database startup script

# Source function library.

. /etc/rc.d/init.d/functions

ORACLE_OWNER=&quot;oracle&quot;
ORACLE_HOME=&quot;/u01/app/oracle/product/11.2.0/db_1&quot;

case &quot;$1&quot; in
start)
echo -n $&quot;Starting Oracle DB:&quot;
su - $ORACLE_OWNER -c &quot;$ORACLE_HOME/bin/dbstart $ORACLE_HOME&quot;
echo &quot;OK&quot;
;;
stop)
echo -n $&quot;Stopping Oracle DB:&quot;
su - $ORACLE_OWNER -c &quot;$ORACLE_HOME/bin/dbshut $ORACLE_HOME&quot;
echo &quot;OK&quot;
;;
*)
echo $&quot;Usage: $0 {start|stop}&quot;
esac
&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

3. As root change the permissions and configure runlevel:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre&gt;
chmod 750 /etc/init.d/oracle
chkconfig --add oracle --level 0356 
&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/4612063824524757720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/06/auto-startup-and-shutdown-of-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4612063824524757720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4612063824524757720'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/06/auto-startup-and-shutdown-of-database.html' title='Auto Startup and Shutdown of Database and Listener'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-9107333406522118423</id><published>2012-06-02T20:51:00.002+02:00</published><updated>2012-06-02T20:57:23.216+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>Last Insert ID with PHP &amp; Oracle</title><content type='html'>This article is continue of earlier article &lt;i&gt;&lt;a href=&quot;http://hustatyova.blogspot.sk/2012/04/using-php-with-oracle-database-purpose.html&quot;&gt;Using PHP with Oracle database&lt;/a&gt;&lt;/i&gt;.

You can expand the part of &lt;i&gt;dbUtil.php&lt;/i&gt; with following code:
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre&gt;
public function executeVariable($sql, $printSql = false) {
 
   if ($this-&gt;connection) {
      // Prepare the statement
      $stid = oci_parse($this-&gt;connection, $sql);

      if($printSql) {
         echo $sql;  
      }

      if (!$stid) {
         $e = oci_error($this-&gt;connection);
         var_dump($e);
      }
 
      OCIBindByName($stid,&quot;:ID&quot;,$id);
  
      // Perform the logic of the query
      $r = oci_execute($stid);

      if (!$r) {
         $e = oci_error($stid);
         var_dump($e);
      }

      return array(&quot;result&quot; =&gt; $r, &quot;lastID&quot; =&gt; $id);
   }
}
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;Now you can use new function executeVariable() as following:&lt;/p&gt;
&lt;table class=&#39;code&#39;&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre&gt;
&amp;lt;?php 
error_reporting(E_ALL);

require_once &#39;dbUtil.php&#39;;
$db = new DBUtil();

$sql = $db -&gt; executeVariable(&quot;insert into dbtool_schema.test (id, name) values (1,&#39;test&#39;) returning id into :id&quot;,true);
print &quot;&lt;br /&gt;&quot;.$sql[&quot;lastID&quot;];
?&amp;gt;
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/9107333406522118423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/06/last-insert-id-with-php-oracle.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/9107333406522118423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/9107333406522118423'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/06/last-insert-id-with-php-oracle.html' title='Last Insert ID with PHP &amp; Oracle'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-7676821224453905434</id><published>2012-04-29T21:17:00.000+02:00</published><updated>2012-04-29T21:23:35.570+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Ubuntu 11.10 / 12.04: Starting too long because of &quot;Waiting for network configuration&quot;</title><content type='html'>If someone still experience delay in system booting with message:&lt;br /&gt;
&lt;i&gt;
 - &quot;Waiting for network configuration ...&quot;  &lt;br /&gt;
 - &quot;Waiting up to 60 more seconds for network configuration ...&quot; &lt;br /&gt;
 - &quot;Booting system without full network configuration ...&quot;
&lt;/i&gt;
&lt;br /&gt;
&lt;br /&gt;
You can try to comment out the line &quot;auto wlan0&quot; in /etc/network/interfaces.</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/7676821224453905434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/04/ubuntu-1110-1204-starting-too-long.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/7676821224453905434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/7676821224453905434'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/04/ubuntu-1110-1204-starting-too-long.html' title='Ubuntu 11.10 / 12.04: Starting too long because of &quot;Waiting for network configuration&quot;'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-8761327200802584405</id><published>2012-04-29T17:43:00.001+02:00</published><updated>2012-04-29T21:23:21.070+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Ubuntu: Change / Reset Keyring Password</title><content type='html'>After changing the password of your user/personal account in the Ubuntu 11.04 (also 11.10, 12.04) you are asked to put Password Keyring all the time:
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBmYZ6grfMCXRuyLmulpPt2t73ITBe1xtjCCrPPAcU8ntHjOTbm4XSHsdjA1nId3vTPDwWo0HY6dhhtKvmcEPnZkfZVfDsM-GiIVfzfW7ghA1YWKaYPPmWeI-Ve-tnXbsrQLwvwWinwEZg/s1600/screenshot-unlock-keyring.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;135&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBmYZ6grfMCXRuyLmulpPt2t73ITBe1xtjCCrPPAcU8ntHjOTbm4XSHsdjA1nId3vTPDwWo0HY6dhhtKvmcEPnZkfZVfDsM-GiIVfzfW7ghA1YWKaYPPmWeI-Ve-tnXbsrQLwvwWinwEZg/s320/screenshot-unlock-keyring.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

For unlocking it is necessary to put there your old original password. But sometimes you don&#39;t remember it, hmm... With following steps you can change it or reset it:

&lt;ol&gt;
&lt;li&gt;
Open &lt;i&gt;&quot;Passwords and Keys&quot;:&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAvr4YnDPbQcK63xvSboJ7VqsMWt29bkugCM0s0zGfrMXvHlfmAIHWqQquYuL_OdTGm0TBHLVuCs4FCac80-3o9xUUHLGgQ0HvdbmqDLTtx5I2z4uLvv-lQJ6lhq_Ncfp4oFO3dh2rloFH/s1600/password.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;110&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAvr4YnDPbQcK63xvSboJ7VqsMWt29bkugCM0s0zGfrMXvHlfmAIHWqQquYuL_OdTGm0TBHLVuCs4FCac80-3o9xUUHLGgQ0HvdbmqDLTtx5I2z4uLvv-lQJ6lhq_Ncfp4oFO3dh2rloFH/s320/password.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;
In the &lt;i&gt;&quot;Passwords Tab&quot;&lt;/i&gt; you can &lt;i&gt;Delete&lt;/i&gt; or &lt;i&gt;&quot;Change Password&quot; with right click on you mouse&lt;/i&gt;:&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf0uVx2d2CTD9Shwa8eRdpg4aPtKBY0uou38Nd9JUnNdvVuVAtVZ5G9j4_cY_ZdOpi2C1KFDIvzKA_oqSpCXK_emEXmSYIjFXbZ3mb4argZ7UNb_QmMbXTdk2M8OcG35lVzVr6CTRSK1Ku/s1600/change.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;153&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf0uVx2d2CTD9Shwa8eRdpg4aPtKBY0uou38Nd9JUnNdvVuVAtVZ5G9j4_cY_ZdOpi2C1KFDIvzKA_oqSpCXK_emEXmSYIjFXbZ3mb4argZ7UNb_QmMbXTdk2M8OcG35lVzVr6CTRSK1Ku/s320/change.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;
If you set the keyring login passwords to the same as your user password, Gnome will automatically unlock your keyring during login.</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/8761327200802584405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/04/ubuntu-change-reset-keyring-password.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/8761327200802584405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/8761327200802584405'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/04/ubuntu-change-reset-keyring-password.html' title='Ubuntu: Change / Reset Keyring Password'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBmYZ6grfMCXRuyLmulpPt2t73ITBe1xtjCCrPPAcU8ntHjOTbm4XSHsdjA1nId3vTPDwWo0HY6dhhtKvmcEPnZkfZVfDsM-GiIVfzfW7ghA1YWKaYPPmWeI-Ve-tnXbsrQLwvwWinwEZg/s72-c/screenshot-unlock-keyring.png" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-4106621202341968058</id><published>2012-04-23T13:34:00.002+02:00</published><updated>2012-04-29T21:23:04.920+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>Run a shell script with an HTML result with CSS styles</title><content type='html'>HTML result from shell script useful for reports from database. 
&lt;p&gt;Run the script &lt;i&gt;start.sh&lt;/i&gt; which will start the script &lt;i&gt;scripts.sql&lt;/i&gt;. In the &lt;i&gt;scripts.sql&lt;/i&gt; are another SQL scripts  - SQL statements for database.&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Output:&lt;/b&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIbmR9CJ3zpxmcRDT5i_PdDKc2PqObQJQxxPqgY7hrBLF82AR1WZ9dGBceFHVs2RMqIxGPKMrJ3JVsTNvXLUleznioGei02ZCrc4EldZu83Fd4cSQgRvqxqb6zRPsik2fEJmPfZwM833lD/s1600/output_html.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;314&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIbmR9CJ3zpxmcRDT5i_PdDKc2PqObQJQxxPqgY7hrBLF82AR1WZ9dGBceFHVs2RMqIxGPKMrJ3JVsTNvXLUleznioGei02ZCrc4EldZu83Fd4cSQgRvqxqb6zRPsik2fEJmPfZwM833lD/s320/output_html.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;/p&gt;
&lt;p&gt;&lt;span class=&#39;name2&#39;&gt;Code for start.sh&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
#!/bin/sh
DATE=`date &#39;+%m%d%y_%H%M&#39;`

sSID=$1

# Print beginning of webpage
html_header ()
{
    cat &amp;lt;&amp;lt;END
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;&amp;lt;title&amp;gt;${1}&amp;lt;/title&amp;gt;

  &amp;lt;style type=&quot;text/css&quot;&amp;gt;
 div {
  font-size:8pt;
  color: #000;
  margin-top: 1em;
  margin-botton: 2em;
  border-collapse:collapse;
  background-color:#F5F5F5;
  font-family: courier;
  margin-left: 2em;
  width:1100px;
  border:solid 1px;
 }
 .name {
   font-size:18pt;
   color: #7d181e;
   letter-spacing:1pt;
   font-weight:700;
  }

 .name2 {
   font-size:16pt;
   color: #d52a33;
 }

 .name3 {
   font-size:14pt;
   color: #d52a33;
 }

 ol {
   counter-reset: section;
   list-style-type: none;
 }
  
 ol li { counter-increment: section; }
            
 ol li:before  { content: counters(section, &quot;.&quot;) &quot;. &quot;; }
  &amp;lt;/style&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h3&amp;gt;${1}&amp;lt;/h3&amp;gt;
    &amp;lt;!-- Table of Contents links --&amp;gt;
    &amp;lt;p&amp;gt;
 &amp;lt;ol&amp;gt;
  &amp;lt;li&amp;gt;
   &amp;lt;a href=&#39;#1_heading&#39;&amp;gt;Database info&amp;lt;/a&amp;gt;
   &amp;lt;ol&amp;gt; 
    &amp;lt;li&amp;gt;&amp;lt;a href=&#39;#1_1_name&#39;&gt;Database name&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&#39;#1_2_name&#39;&gt;Database version&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
   &amp;lt;/ol&amp;gt;
  &amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;
   &amp;lt;a href=&#39;#2_heading&#39;&amp;gt;Database users and sessions&amp;lt;/a&amp;gt;
   &amp;lt;ol&amp;gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&#39;#2_1_name&#39;&amp;gt;Number of sessions&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&#39;#2_2_name&#39;&amp;gt;Current sessions&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
   &amp;lt;/ol&amp;gt;
  &amp;lt;/li&amp;gt;
 &amp;lt;/ol&amp;gt;
    &amp;lt;/p&amp;gt;
END
}

html_footer ()
{
  cat &amp;lt;&amp;lt;END
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
END
}

html_title ()
{
  echo &quot;&amp;lt;h3&amp;gt;&amp;lt;a name=&#39;#${2}&#39;&amp;gt;$1&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&quot;
}

DatabaseIntroduction ()
{
echo &quot;&amp;lt;pre&amp;gt;&quot;
sqlplus -s /nolog &amp;lt;&amp;lt;EOF 
connect sys/&amp;lt;password&amp;gt;@&amp;lt;database_name&amp;gt; as sysdba
&lt;b&gt;@scripts.sql&lt;/b&gt;
EOF
echo &quot;&amp;lt;/pre&amp;gt;&quot;
}

html_header &quot;Report Summary for ${DATE}&quot;
DatabaseIntroduction
html_footer
&lt;/td&gt;&lt;/tr&gt;&lt;/pre&gt;
&lt;/table&gt;

&lt;p&gt;&lt;span class=&#39;name2&#39;&gt;Code for scripts.sql&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
@database_info.sql
@database_sessions.sql
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;span class=&#39;name2&#39;&gt;Code for database_info.sql and database_sessions.sql&lt;/span&gt;&lt;/p&gt;
&lt;b&gt;database_info.sql&lt;/b&gt;
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
PROMPT &amp;lt;span class=&#39;name&#39; id=&#39;1_heading&#39;&amp;gt;1. Database info&amp;lt;/span&amp;gt;
PROMPT
PROMPT
PROMPT &amp;lt;span class=&#39;name2&#39; id=&#39;1_1_name&#39;&amp;gt;1.1. Database name&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;
PROMPT
PROMPT &amp;lt;div&amp;gt;
PROMPT

select database_name from v$database;

PROMPT
PROMPT &amp;lt;/div&amp;gt;
PROMPT

PROMPT
PROMPT &amp;lt;span class=&#39;name2&#39; id=&#39;1_2_name&#39;&amp;gt;1.2 Database version&amp;lt;/span&amp;gt;
PROMPT
PROMPT &amp;lt;div&amp;gt;

select version from v$instance;

PROMPT
PROMPT &amp;lt;/div&amp;gt;
PROMPT
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;b&gt;database_sessions.sql&lt;/b&gt;
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
PROMPT
PROMPT &amp;lt;span class=&#39;name&#39; id=&#39;2_heading&#39;&amp;gt;2. Database users and sessions&amp;lt;/span&amp;gt;
PROMPT
PROMPT &amp;lt;span class=&#39;name2&#39; id=&#39;2_1_name&#39;&amp;gt;2.1 Number of sessions&amp;lt;/span&amp;gt;
PROMPT
PROMPT &amp;lt;div&amp;gt;
PROMPT

select count(*) from v$session;

PROMPT
PROMPT &amp;lt;/div&amp;gt;
PROMPT

PROMPT
PROMPT &amp;lt;span class=&#39;name2&#39; id=&#39;2_2_name&#39;&amp;gt;2.2 Current sessions&amp;lt;/span&amp;gt;
PROMPT
PROMPT &amp;lt;div&amp;gt;
PROMPT

select distinct username from v$session;

PROMPT
PROMPT &amp;lt;/div&amp;gt;
PROMPT

&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/4106621202341968058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/04/run-shell-script-with-html-result-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4106621202341968058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4106621202341968058'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/04/run-shell-script-with-html-result-with.html' title='Run a shell script with an HTML result with CSS styles'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIbmR9CJ3zpxmcRDT5i_PdDKc2PqObQJQxxPqgY7hrBLF82AR1WZ9dGBceFHVs2RMqIxGPKMrJ3JVsTNvXLUleznioGei02ZCrc4EldZu83Fd4cSQgRvqxqb6zRPsik2fEJmPfZwM833lD/s72-c/output_html.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-3663799395225388486</id><published>2012-04-13T17:19:00.001+02:00</published><updated>2012-04-17T21:18:33.417+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>How to repair standby database when is problem with one or more datafiles</title><content type='html'>&lt;div&gt;
&lt;span&gt;In case that recovery of the standby side fell down because of failure of the transferring of the archivelog or based on the another error, in the best case you have to repair one or more datafiles, at worst you have to recreate whole standby database. This post is about the reconstruction one or more datafiles on the standby side.&lt;/span&gt;
&lt;/div&gt;

&lt;p&gt;
Terms:&lt;br /&gt;
&lt;b&gt;PRIM&lt;/b&gt; - primary side&lt;br /&gt;
&lt;b&gt;STBY&lt;/b&gt; - standby side
&lt;/p&gt;

&lt;p&gt;If one or more datafiles are unusable, recovery of the standby side crashed automatically. Therefore you don&#39;t need to turn off recovery on the standby side. But shipping of archived logs should work without problem.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;PRIM: Turn on backup mode&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
alter tablespace &lt;tablespace_name&gt; begin backup; 
 or
alter database begin backup; 
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;b&gt;STBY: You can delete wrong datafile from the filesystem&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
  rm /u01/app/oracle/oradata/orcl/example01.dbf
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;b&gt;PRIM: Copy datafile from the PRIM to STBY&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
  scp /u01/app/oracle/oradata/orcl/example01.dbf &amp;lt;stby_host_name&amp;gt;:/u01/app/oracle/oradata/stby/
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;b&gt;PRIM: If it&#39;s necessary, create standby controlfile&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
 alter database create standby controlfile as &#39;/tmp/control_stby.bak&#39;;
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;b&gt;PRIM: Copy standby controlfile from PRIM to STBY&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
  scp /tmp/control_stby.bak &amp;lt;stby_host_name&amp;gt;:/.../control01.ctl
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
And copy this one control file to all locations, where controlfiles are located.

&lt;p&gt;&lt;b&gt;STBY: You can test manual recovery of standby database&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
  RECOVER  standby database until cancel;
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;b&gt;STBY: Turn on automatic recovery of the standby database&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
    RECOVER MANAGED STANDBY DATABASE DISCONNECT;
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;b&gt;PRIM: Turn off backup mode&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
alter tablespace &lt;tablespace_name&gt; end backup; 
 or
alter database end backup; 
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/3663799395225388486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/04/how-to-repaire-standby-database-when-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/3663799395225388486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/3663799395225388486'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/04/how-to-repaire-standby-database-when-is.html' title='How to repair standby database when is problem with one or more datafiles'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-7396382385980365728</id><published>2012-04-13T13:57:00.000+02:00</published><updated>2012-04-13T14:07:55.027+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>View hidden parameters in Oracle database</title><content type='html'>&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
set linesize 200
col &quot;Parameter&quot; for a30
col &quot;Session Value&quot; for a10
col &quot;Instance Value&quot; for a10
col &quot;Default value&quot; for a5
col SESSMOD for a7
col SYSMOD for a9
col &quot;Description&quot; for a45
 
SELECT 
   a.ksppinm  &quot;Parameter&quot;, 
   b.ksppstvl &quot;Session Value&quot;, 
   c.ksppstvl &quot;Instance Value&quot; ,
   b.ksppstdf &quot;Default value&quot; ,
   decode(bitand(a.ksppiflg/256,3),1, &#39;True&#39;, &#39;False&#39;) SESSMOD,
   decode(bitand(a.ksppiflg/65536,3),1,&#39;IMMEDIATE&#39;,2,&#39;DEFERRED&#39;,3,&#39;IMMEDIATE&#39;,&#39;FALSE&#39;) SYSMOD,
   a.ksppdesc &quot;Description&quot; 
FROM
   sys.x$ksppi a, 
   sys.x$ksppcv b , 
   sys.x$ksppsv c 
WHERE 
   a.indx = b.indx 
   and a.indx = c.indx 
   and substr(ksppinm,1,1)=’_&#39;  
ORDER BY 
   a.ksppinm;

&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;
&lt;table class=&quot;normaltable&quot;&gt;
 &lt;tr&gt;
  &lt;td rowspan=&#39;3&#39;&gt;SYSMODE&lt;/td&gt;
  &lt;td rowspan=&#39;3&#39;&gt;system modifiable&lt;/td&gt;
  &lt;td&gt;IMMEDIATE&lt;/td&gt;
  &lt;td&gt;ALTER SYSTEM without restarting the instance&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td&gt;DEFERRED&lt;/td&gt;
  &lt;td&gt;ALTER SYSTEM regardless of the type of parameter file used in the instance startup.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td&gt;FALSE&lt;/td&gt;
  &lt;td&gt;parameter cannot be changed with ALTER SYSTEM unless the database runs on a spfile&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td&gt;SESSMOD&lt;/td&gt;
  &lt;td colspan=&#39;3&#39;&gt;session modifiable&lt;/td&gt;
 &lt;/tr&gt;
&lt;/table&gt;
&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/7396382385980365728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/04/view-hidden-parameters-in-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/7396382385980365728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/7396382385980365728'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/04/view-hidden-parameters-in-oracle.html' title='View hidden parameters in Oracle database'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-7537243049466666396</id><published>2012-04-13T13:06:00.000+02:00</published><updated>2012-04-13T14:08:08.659+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>External procedures: How to run OS commands from the database (SQL*Plus) and result store in the database</title><content type='html'>This solution works for all versions of the Oracle database (8i/9i/10g/11g)&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;#OS&quot;&gt;OS part&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;#DB&quot;&gt;Database part&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;#read&quot;&gt;How to read result and save it to the database&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;name2&quot; id=&quot;OS&quot;&gt;OS part&lt;/span&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;1. already compiled shell.c for specified OS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;/*
 * shell.c
 * Example program used to demonstrate how to call O/S
 * commands from PL/SQL using external procedures. 
 *
 */

#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;
#include&lt;string.h&gt;

void sh(char *command) {

  int num;

  num = system(command);

}

void shell(char *command, char buff[4000]) {
//char buff[4000];
FILE *fp = popen(command, &quot;r&quot; );
while ( fgets( buff, sizeof buff, fp ) != NULL ) {
 // do stuff with lines
 printf(&quot;%s\n&quot;, buff);
}
pclose( fp );
}
&lt;/string.h&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;How to compile shell.c&lt;/b&gt;&lt;br /&gt;
Using the table below, first run the appropriate command to compile the shell.c program then run the command to generate the shared object.&lt;br /&gt;
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;
 &lt;table width=&quot;100%&quot;&gt;
   &lt;tr&gt;
    &lt;td&gt;&lt;b&gt;Operating System&lt;/b&gt;&lt;/td&gt;
    &lt;td&gt;&lt;b&gt;extproc bit version&lt;/b&gt;&lt;/td&gt;
    &lt;td&gt;&lt;b&gt;1st: Compile the shell.c program&lt;/b&gt;&lt;/td&gt;
    &lt;td&gt;&lt;b&gt;2nd: Generate the shared object&lt;/b&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;Solaris SPARC&lt;/td&gt;
   &lt;td&gt;extproc (64 bit)&lt;/td&gt;
   &lt;td&gt;gcc -G -c -m64 shell.c&lt;/td&gt;
   &lt;td&gt;ld -r -o shell.so shell.o&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;Solaris SPARC*&lt;/td&gt;
   &lt;td&gt;extproc32 (32 bit)&lt;/td&gt;
   &lt;td&gt;gcc -G -c shell.c&lt;/td&gt;
   &lt;td&gt;ld -r -o shell.so shell.o&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;Linux RH AS3 32 bit&lt;/td&gt;
   &lt;td&gt;extproc (32 bit)&lt;/td&gt;
   &lt;td&gt;gcc -c shell.c&lt;/td&gt;
   &lt;td&gt;ld -shared -o shell.so shell.o&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;Linux RH AS4 x86-64&lt;/td&gt;
   &lt;td&gt;extproc (64 bit)&lt;/td&gt;
   &lt;td&gt;gcc -fPIC -c shell.c&lt;/td&gt;
   &lt;td&gt;ld -shared -o shell.so shell.o&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;Linux RH AS4 x86-64*&lt;/td&gt;
   &lt;td&gt;extproc32 (32 bit)&lt;/td&gt;
   &lt;td&gt;gcc -m32 -c shell.c&lt;/td&gt;
   &lt;td&gt;ld -shared -melf_i386 -o shell.so shell.o&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;AIX 5L&lt;/td&gt;
   &lt;td&gt;extproc (64 bit)&lt;/td&gt;
   &lt;td&gt;gcc -maix64 -c shell.c&lt;/td&gt;
   &lt;td&gt;gcc -maix64 -shared -o shell.so shell.o&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;AIX 5L*&lt;/td&gt;
   &lt;td&gt;extproc32 (32 bit)&lt;/td&gt;
   &lt;td&gt;gcc -c shell.c&lt;/td&gt;
   &lt;td&gt;gcc -shared -o shell.so shell.o&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;HPUX 11.11**&lt;/td&gt;
   &lt;td&gt;extproc32 (32 bit)&lt;/td&gt;
   &lt;td&gt;gcc -c shell.c&lt;/td&gt;
   &lt;td&gt;gcc -shared -o shell.sl shell.o&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;HPUX 11.11&lt;/td&gt;
   &lt;td&gt;extproc (64 bit)&lt;/td&gt;
   &lt;td&gt;/usr/local/pa64/bin/gcc -c shell.c&lt;/td&gt;
   &lt;td&gt;/usr/local/pa64/bin/gcc -shared -o shell.sl shell.o&lt;/td&gt;
  &lt;/tr&gt;
 &lt;/table&gt;
&lt;br /&gt;
* Add $ORACLE_HOME/lib32 to LD_LIBRARY_PATH, restart the listener and oracle &lt;br /&gt;
** Add $ORACLE_HOME/lib32 to SHLIB_PATH, restart the listener and oracle
&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;2. Change permissions of shell.so and copy the file to $ORACLE_HOME/lib&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
Copying this file will bypass the need for adding ENVS and EXTPROC_DLLS parameters to the listener.ora file.  Remember, tweaking can be done later; for now, we want the configuration to be as simple as possible.
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;
  chmod 755 shell.so
  cp shell.so $ORACLE_HOME/lib
 &lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
Or there is also possibility to configure &lt;b&gt;listener.ora&lt;/b&gt;:
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
 LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = &amp;lt;host_name&amp;gt;)(PORT = &amp;lt;port&amp;gt;))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) --&gt; this must be also included to the definition of listener
    )
  )

 SID_LIST_LISTENER=              
  (SID_LIST=
   (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = &amp;lt;ORACLE_HOME&amp;gt;) --&gt; correct $ORACLE_HOME
    (PROGRAM = extproc)
    (ENVS=&quot;EXTPROC_DLLS=ONLY:&amp;lt;directory&amp;gt;/shell.so&quot;)  --&gt; exactly specified destination to the file
   )
  )
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
Changes in &lt;b&gt;tnsnames.ora&lt;/b&gt;:
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
 extproc_connection_data.world=
 (description=
 (address=(protocol=ipc)(key=EXTPROC))
 (connect_data=(sid=PLSExtProc)))
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;Attention&lt;/b&gt;: listener and tnsnames configuration is case sensitive
&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;3. Test configuration for OS part&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
Use tnsping to test the extproc configuration.  This step has to succeed.
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
  host$ tnsping extproc_connection_data
 
  TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 12-APR-2012 21:21:09
                                
  Copyright (c) 1997,  2007, Oracle.  All rights reserved.
                                 
  Used parameter files:
  /.../sqlnet.ora
                                
                                
  Used TNSNAMES adapter to resolve the alias
  Attempting to contact (description= (address=(protocol=ipc)(key=EXTPROC)) (connect_data=(sid=PLSExtProc)))
  OK (0 msec)
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;span class=&quot;name2&quot; id=&quot;DB&quot;&gt;Database part&lt;/span&gt;&lt;/p&gt;
&lt;b&gt;1. Create a LIBRARY definition in Oracle&lt;/b&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
  CREATE LIBRARY shell_lib is &#39;&amp;lt;path to shell.so&amp;gt;/shell.so&#39;;
  /
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;b&gt;2. Create the PL/SQL procedure&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
  CREATE OR REPLACE PROCEDURE shell(command IN char)
  AS EXTERNAL
  NAME &quot;sh&quot;
  LIBRARY shell_lib
  LANGUAGE C
  PARAMETERS (command string);
  /
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;b&gt;3. Test the stored procedure&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
  exec shell(&#39;ls&#39;);&lt;br /&gt;
  exec shell(&#39;ls&gt;output.txt&#39;);
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;span class=&quot;name2&quot; id=&quot;read&quot;&gt;How to read result and save it to the database&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Create database directory, where will be result of the OS command from the database&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
  create or replace directory TEST_DIR as &#39;&amp;lt;directory_name&amp;gt;&#39;; --&gt; specify directory name

  grant write on directory TEST_DIR to &amp;lt;user_name&amp;gt;;
  grant read on directory TEST_DIR to &amp;lt;user_name&amp;gt;;
  grant execute on UTL_FILE to &amp;lt;user_name&amp;gt;;
  grant create procedure to &amp;lt;user_name&amp;gt;;

 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;p&gt;&lt;b&gt;Create table for storing result&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
 create table test (name varchar2(15), content varchar2(4000));
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;p&gt;&lt;b&gt;Create the PL/SQL procedure for reading and update the table&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
CREATE OR REPLACE PROCEDURE show_file (loc IN VARCHAR2,file IN VARCHAR2)
 IS
 fid UTL_FILE.FILE_TYPE := UTL_FILE.FOPEN (loc, file, &#39;R&#39;);
 line VARCHAR2(4000);
 BEGIN
  DBMS_OUTPUT.PUT_LINE (file);
  insert into test (name, content) values (file,&#39;&#39;);
  commit;
  LOOP
  UTL_FILE.GET_LINE (fid, line);
  update test set content = content ||&#39;|&#39;|| line where name=file;                 
  END LOOP;
  EXCEPTION
  WHEN OTHERS THEN UTL_FILE.FCLOSE (fid);
 END;
/
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;p&gt;&lt;b&gt;How to use it&lt;/b&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;pre&gt;
 exec shell(&#39;ls /tmp &gt; /tmp/test&#39;);
 exec show_file (&#39;TEST_DIR&#39;,&#39;test&#39;);

 select * from test;
 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/7537243049466666396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/04/how-to-run-os-commands-from-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/7537243049466666396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/7537243049466666396'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/04/how-to-run-os-commands-from-database.html' title='External procedures: How to run OS commands from the database (SQL*Plus) and result store in the database'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-379331659935669635</id><published>2012-04-11T13:13:00.000+02:00</published><updated>2012-04-13T14:08:22.908+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>Remove user SYSMAN from the repository database after failed GRID installation</title><content type='html'>&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
DROP USER sysman CASCADE;&lt;br /&gt;
DROP PUBLIC SYNONYM setemviewusercontext;&lt;br /&gt;
DROP ROLE mgmt_user;&lt;br /&gt;
DROP PUBLIC SYNONYM mgmt_target_blackouts;&lt;br /&gt;
DROP USER mgmt_view;&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/379331659935669635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/04/remove-user-sysman-from-repository.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/379331659935669635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/379331659935669635'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/04/remove-user-sysman-from-repository.html' title='Remove user SYSMAN from the repository database after failed GRID installation'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-9193020829193600546</id><published>2012-04-10T21:22:00.000+02:00</published><updated>2012-04-13T14:08:35.316+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>Upgrading existing Oracle Enterprise Manager 10g Grid Control: How to Change / Reset ias_admin Password</title><content type='html'>In the case you know the current password for user ias_admin, you can change it with following command:
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;
emctl set password &amp;lt;old_password&amp;gt; &amp;lt;new_password&amp;gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
Otherwise it&#39;s necessary to change it in the file: $ORACLE_HOME/sysman/j2ee/config/jazn-data.xml
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;
&lt;b&gt;Find following rows:&lt;/b&gt;&lt;br /&gt;
&amp;lt;user&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;name&amp;gt;ias_admin&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;credentials&amp;gt;{903}8QkQ/crno3lX0f3+67dj6WxW9KJMXaCu&amp;lt;/credentials&amp;gt;&lt;br /&gt;
&amp;lt;/user&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Change password:&lt;/b&gt;&lt;br /&gt;
&amp;lt;user&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;name&amp;gt;ias_admin&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;credentials&amp;gt;!welcome1&amp;lt;/credentials&amp;gt;&lt;br /&gt;
&amp;lt;/user&amp;gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
Sign &quot;!&quot; means, that the password is stored in clear text.</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/9193020829193600546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/04/upgrading-existing-oracle-enterprise.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/9193020829193600546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/9193020829193600546'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/04/upgrading-existing-oracle-enterprise.html' title='Upgrading existing Oracle Enterprise Manager 10g Grid Control: How to Change / Reset ias_admin Password'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6973196410674229965.post-4458925407660310335</id><published>2012-04-10T14:09:00.000+02:00</published><updated>2012-10-01T20:34:25.447+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>OEM Gridcontrol 10201 Installation Errors On Oracle Linux 5.5</title><content type='html'>&lt;p&gt;&lt;span class=&quot;name2&quot;&gt;Error:&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;
Failed in smi manipulation().&lt;br /&gt;
A problem has occurred reading the initial configuration and storing it into repository&lt;br /&gt;
Resolution:&lt;br /&gt;
Please refer to the base exception for resolution, or call Oracle support.&lt;br /&gt;
&lt;b&gt;Base Exception:&lt;br /&gt;
/u01/app/oracle/OracleHomes/oms10g/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory&lt;/b&gt;&lt;br /&gt;
Resolution:&lt;br /&gt;
Please make sure the values entered in OHS configuration files are correct.&lt;br /&gt;
&lt;b&gt;oracle.ias.sysmgmt.exception.InvalidConfigurationException: Base Exception:&lt;br /&gt;
/u01/app/oracle/OracleHomes/oms10g/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory&lt;/b&gt;&lt;br /&gt;
Resolution:&lt;br /&gt;
Please make sure the values entered in OHS configuration files are correct.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.repository.plugin.advanced.apache.StateTranslator.checkConfigFileValidity(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.repository.plugin.advanced.apache.StateTranslator.validateConfigDuringEvaluate(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.repository.plugin.advanced.apache.PlugInImpl.localConfigValidation(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.repository.DcmPlugin.localConfigValidation(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.repository.RepositoryImpl.performLocalValidation(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.repository.SyncUpHandler._updatePluginConfigData(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.repository.SyncUpHandler.syncUpFromLocalFiles(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.repository.RepositoryImpl.syncUpFromLocalFiles(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.utility.editpropagator.PropagateLocalEdit.repositoryInit(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.persistence.utility.PMUtility.initConfiguration(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.task.TaskMaster.initConfiguration(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.task.TaskMaster.sysInit(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.task.TaskMaster.sysInit(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.task.InstanceManager.sysInit(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.task.InstanceManager.init(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.sysmgmt.EntryPoint.init(Unknown Source)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.webcache.config.WebcacheConfig.smiSetup(WebcacheConfig.java:483)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.webcache.config.WebcacheConfig.smiEnableWebcache(WebcacheConfig.java:454)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.webcache.config.WebcacheConfig.enableConfiguration(WebcacheConfig.java:299)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at oracle.ias.webcache.config.WebcacheConfig.main(WebcacheConfig.java:87)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Command = /u01/app/oracle/OracleHomes/oms10g/jdk/bin/java has failed &lt;br /&gt;
&lt;br /&gt;
INFO: Configuration assistant &quot;Web Cache Configuration Assistant&quot; failed &lt;br /&gt;
-----------------------------------------------------------------------------
&lt;/tr&gt;&lt;/td&gt;
&lt;/table&gt;

&lt;p&gt;&lt;span class=&quot;name2&quot;&gt;Solution:&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;code&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre&gt;
[root@oralin2 ~]# &lt;b&gt;ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2&lt;/b&gt;
[root@oralin2 ~]# &lt;b&gt;chmod 755 /usr/lib/libgdbm.so.2.0.0&lt;/b&gt;
[root@oralin2 ~]# &lt;b&gt;chmod 755 /usr/lib/libdb.so.2&lt;/b&gt;
[root@oralin2 ~]# &lt;b&gt;locate libdb.so.2&lt;/b&gt;
[root@oralin2 ~]# &lt;b&gt;locate libgdbm.so.2.0.0&lt;/b&gt;
/usr/lib/libgdbm.so.2.0.0
[root@oralin2 ~]# &lt;b&gt;ls -ldd libgdbm.so.2.0.0&lt;/b&gt;
ls: libgdbm.so.2.0.0: No such file or directory&lt;/b&gt;
[root@oralin2 ~]# &lt;b&gt;ls -ldd /usr/lib/libgdbm.so.2.0.0&lt;/b&gt;
-rwxr-xr-x 1 root root 25260 Jun  5  2007 /usr/lib/libgdbm.so.2.0.0
[root@oralin2 ~]# &lt;b&gt;ldd /usr/lib/libgdbm.so.2.0.0&lt;/b&gt;
 linux-gate.so.1 =&gt;  (0x003ab000)
 libc.so.6 =&gt; /lib/libc.so.6 (0x004f7000)
 /lib/ld-linux.so.2 (0x004d9000)
[root@oralin2 ~]# &lt;b&gt;ldd /usr/lib/libgdbm.so.2.0.0&lt;/b&gt;
 linux-gate.so.1 =&gt;  (0x0042a000)
 libc.so.6 =&gt; /lib/libc.so.6 (0x004f7000)
 /lib/ld-linux.so.2 (0x004d9000)
[root@oralin2 ~]#  &lt;b&gt;ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2&lt;/b&gt;
ln: creating symbolic link `/usr/lib/libdb.so.2&#39; to `/usr/lib/libgdbm.so.2.0.0&#39;: File exists
[root@oralin2 ~]# &lt;b&gt;chmod 755 /usr/lib/libgdbm.so.2.0.0&lt;/b&gt;
[root@oralin2 ~]# &lt;b&gt;chmod 755 /usr/lib/libdb.so.2&lt;/b&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://hustatyova.blogspot.com/feeds/4458925407660310335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hustatyova.blogspot.com/2012/04/oem-gridcontrol-10201-installation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4458925407660310335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6973196410674229965/posts/default/4458925407660310335'/><link rel='alternate' type='text/html' href='http://hustatyova.blogspot.com/2012/04/oem-gridcontrol-10201-installation.html' title='OEM Gridcontrol 10201 Installation Errors On Oracle Linux 5.5'/><author><name>Lucia Hustatyova</name><uri>http://www.blogger.com/profile/07186184606764924324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTMF5K2E_deIUPpkBULJnkR8ecoGokOQe3_41su-JUI6lk3dT8BZj1jl8VViOg727dUcEjao0YczXQQe7dUUhfOzvh6vj5psakKFOaKvnD6n99B9Ohs-D4-b1LxWibonY/s220/lucia_hustatyova_20210422.jpg'/></author><thr:total>0</thr:total></entry></feed>