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

<channel>
	<title>DB Tricks &#187; Oracle</title>
	<atom:link href="http://dbtricks.com/?feed=rss2&#038;cat=3" rel="self" type="application/rss+xml" />
	<link>http://dbtricks.com</link>
	<description>DataBase Tips and Tricks</description>
	<lastBuildDate>Thu, 02 Sep 2010 11:11:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to grant privileges on all tables to a user</title>
		<link>http://dbtricks.com/?p=135</link>
		<comments>http://dbtricks.com/?p=135#comments</comments>
		<pubDate>Wed, 12 May 2010 18:53:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[grant]]></category>
		<category><![CDATA[oracle grant select]]></category>
		<category><![CDATA[select]]></category>

		<guid isPermaLink="false">http://dbtricks.com/?p=135</guid>
		<description><![CDATA[Sometimes you need to grant privileges to one user&#8217;s objects to another user. While granting should be done very carefully, when you have a lot of tables it is nice to have an automated script to do it.

It is important to note that the best way to do that is creating a role, granting the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to grant privileges to one user&#8217;s objects to another user. While granting should be done very carefully, when you have a lot of tables it is nice to have an automated script to do it.<br />
<br />
It is important to note that the best way to do that is creating a role, granting the privileges to this role and then grant the role to the user. This way, you can fine tune the privileges and the process will be a lot faster next time.<br />
<br />
Another important thing to note is that you should avoid the temptation to use the  &#8221;SELECT ANY TABLE&#8221; privilege. This will indeed allow the user to select any table but (and this is a big but) since it is a system privilege, it will allow him to select any table from any schema. Depends on the setting, it might even allow to user to select from the dictionary tables themselves. There is no reason to grant this privilege to someone who is not the DBA.<br />
<br />
The easiest way to grant select on all of  one account&#8217;s object to another user is to use a PL/SQL loop. This script will grant select on tables but it should be easy to adapt it to any other privilege.<br />
<br />
 <strong>begin</strong></p>
<p><strong> for i in (select * from user_tables)       </strong></p>
<p><strong> loop<br />
     execute immediate &#8216;grant select on &#8216;||i.table_name||&#8217; to a_role_created_for_this&#8217;;<br />
   end loop;<br />
 end;</strong><br />
<br />
In case you need a pure SQL solution, the best way to go would be to spool the results of the following query and run the script created in grant-all.txt.<br />
<br />
<strong>SQL&gt; set lin 150</strong></p>
<p><strong>SQL&gt; spool c:\grant-all.txt</strong></p>
<p><strong>SQL&gt;select &#8216;grant select  to &#8216;||table_name||&#8217; to &#8220;the new user&#8221;;&#8217; from all_tables where owner=&#8217;the old user;</strong></p>
<p><strong>SQL&gt; spool off</strong><br /></p>
]]></content:encoded>
			<wfw:commentRss>http://dbtricks.com/?feed=rss2&amp;p=135</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;A service specific error occurred: 2&#8243; when trying to start dbconsole</title>
		<link>http://dbtricks.com/?p=130</link>
		<comments>http://dbtricks.com/?p=130#comments</comments>
		<pubDate>Tue, 23 Feb 2010 20:46:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Enterprise Manager]]></category>

		<guid isPermaLink="false">http://dbtricks.com/?p=130</guid>
		<description><![CDATA[When logging in to database control after some time you may get a message that some accounts&#8217; passwords need to be changed (sysman, system etc..).  A page will be displayed allowing you to change those password but if something (like timeout)  happens during the page processing you will not be able to log in [...]]]></description>
			<content:encoded><![CDATA[<p>When logging in to database control after some time you may get a message that some accounts&#8217; passwords need to be changed (sysman, system etc..).  A page will be displayed allowing you to change those password but if something (like timeout)  happens during the page processing you will not be able to log in again to the database control and change the passwords.<br />
<br />
usually, to solve you should restart the dbconsole by opening the command prompt and typing <strong>emctl stop dbconsole</strong>. However, you may find that the service is no longer running. Trying to start the dbconsole by typing <strong>emctl start dbconsole</strong> in the command prompt will result in the following message:<br />
<br />
<strong>The OracleDBConsole[ServiceName] service could not be started.</strong></p>
<p><strong>A service specific error occurred: 2.</strong></p>
<p><strong>More help is available by typing NET HELPMSG 3547.</strong></p>
<p>as expected, typing NET HELPMSG will not provide usefull information.<br />
<br />
To solve this:</p>
<p>1) Delete and recreate the Enterprise Manager agent.</p>
<p>In the command prompt type&gt; <strong>emca -deconfig dbcontrol db</strong></p>
<p>even if this fails, type&gt; <strong>emca -config dbcontrol db</strong></p>
<p>You will be asked to provide the database SID, the listener port, password for SYS, DBSNMP and SYSMAN accounts, and some optional settings.</p>
<p>This process will run for several minutes.</p>
<p>2)<strong> </strong>restart the dbconsole<strong> </strong></p>
<p>&gt; <strong>emctl stop dbconsole</strong></p>
<p>&gt; <strong>emctl start dbconsole</strong></p>
<p>
This should solve the issue, however, if you are still unable to log in or you get the following error:</p>
<p>ORA-28001: the password has expired (DBD ERROR: OCISessionBegin), <strong>make sure that the SYSMAN account is unlocked</strong></p>
<p>SQL&gt; conn / as sysdba<br />
Connected.<br />
SQL&gt; <strong>alter user sysman identified by [new password]</strong><br />
2  /</p>
<p>User altered.<br />
SQL&gt; <strong>alter user sysman account unlock;</strong></p>
<p>User altered.<br />
SQL&gt; exit</p>
<p>&gt; <strong>emctl stop dbconsole</strong></p>
<p>&gt; <strong>emctl start dbconsole</strong><br />
</p>
<p>if you still have problems logging in to database control, refer to the following post</p>
<p><a href="http://dbtricks.com/?p=34" target="_self">What to do when Enterprise Manager is not able to connect to the database instance.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dbtricks.com/?feed=rss2&amp;p=130</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Net configuration assistant changes are not saved on Windows 7</title>
		<link>http://dbtricks.com/?p=122</link>
		<comments>http://dbtricks.com/?p=122#comments</comments>
		<pubDate>Thu, 28 Jan 2010 20:29:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Net Configuration Assistant]]></category>
		<category><![CDATA[ORA-12154]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://dbtricks.com/?p=122</guid>
		<description><![CDATA[If you are trying to use the oracle net configuration assistant in order to create tnsnames.ora entry on windows 7, you may notice that sometimes the net service name is simply not created. Even after you run through the wizard successfully you may get the famous “ORA-12154 – TNS could not resolve service name” when [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 0pt;">If you are trying to use the oracle net configuration assistant in order to create tnsnames.ora entry on windows 7, you may notice that sometimes the net service name is simply not created. Even after you run through the wizard successfully you may get the famous “ORA-12154 – TNS could not resolve service name” when you actually try to use it. Another symptom would be that when you run the net configuration assistant again, the entry you just added will not be there.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"> </p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;">This issue is caused by the change in Windows 7 default permissions. Windows 7 has the &#8220;Administrator&#8221; account disabled by default right out of the box. During the Windows 7 setup, the user is prompted for a username that has administrator rights and is in the administrator group. Running the net configuration assistant as the “administrator” user does not guarantee that this user has the administrator’s rights. This probably prevents the Network Configuration Assistant from editing the tnsnames.ora therefore the changes are not saved.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"> </p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"> </p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;">A simple solution to this issue is to <strong>run the network configuration assistant as an administrator.</strong></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"> </p>
<ol>
<li>
<div class="MsoNormal" style="margin: 0in 0in 0pt;"> Press and hold Ctrl+Shift while opening the program. Alternatively, you can navigate to the program shortcut (or the actual exe file), right click and then click on Run as administrator.</div>
</li>
<li>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">If prompted by the UAC you should click on Yes to apply permission to allow the program to run with full permission as an Administrator (You may need to provide the administrator password if you are logged in as a standard user).</div>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://dbtricks.com/?feed=rss2&amp;p=122</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What to do when listener.log is growing.</title>
		<link>http://dbtricks.com/?p=95</link>
		<comments>http://dbtricks.com/?p=95#comments</comments>
		<pubDate>Tue, 04 Aug 2009 16:09:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[file too big]]></category>
		<category><![CDATA[listener log]]></category>

		<guid isPermaLink="false">http://dbtricks.com/?p=95</guid>
		<description><![CDATA[over time, the Listener.log file can grow to huge size and take a lot of disk space.
If you will try to delete it in windows you may get the following error:

&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
Error Deleting File or Folder
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
Cannot delete listener: It is being used by another person or program.
Close any programs that might be using the file and [...]]]></description>
			<content:encoded><![CDATA[<p>over time, the Listener.log file can grow to huge size and take a lot of disk space.<br />
If you will try to delete it in windows you may get the following error:</p>
<p>
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Error Deleting File or Folder<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Cannot delete listener: It is being used by another person or program.</p>
<p>Close any programs that might be using the file and try again.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
OK<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
<P><br />
Linux will allow you to delete the file but it will not create a new one.<br />
<P><br />
The solution to this issue is simple. following are some options:<br />
<P><br />
The easiest solution would be to <strong>stop the listener process, delete the file and restart the listener service</strong>. However, stopping the listener will prevent new connections to the database and disrupt service.<br />
<P><br />
A better option would be to<strong> stop logging to the listener.log file</strong>:</p>
<p>In the command prompt type ><strong>lsnrctl</strong><br />
This will open the Listener control utility. Type LSNRCTL> <strong>set log_status off</strong><br />
now you can navigate to the file location and delete the file using the operating system.<br />
This will prevent the file from growing in the futre.<br />
If you like, you can restart logging LSNRCTL> <strong>set log_status on</strong><br />
This will allow you to delete listener.log but nothing will be logged when the log_status is set to off.<br />
<P><br />
If you want to the logging to continue. you can switch to a different logging file:<br />
type LSNRCTL> <strong> set log_file listener2.log </strong></p>
<p>The listener will now log to the new file. you can delete or move the old file. </p>
]]></content:encoded>
			<wfw:commentRss>http://dbtricks.com/?feed=rss2&amp;p=95</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Possible Causes to ORA-00980 Synonym Transaltion no longer valid</title>
		<link>http://dbtricks.com/?p=89</link>
		<comments>http://dbtricks.com/?p=89#comments</comments>
		<pubDate>Tue, 23 Jun 2009 14:53:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[ORA-00980]]></category>

		<guid isPermaLink="false">http://dbtricks.com/?p=89</guid>
		<description><![CDATA[ORA-00980: synonym translation is no longer valid
This error usually means that the synonym used is based on a table, view, or synonym that no longer exists. in order to fix it you will need to replace the synonym with the name of the object it references or re-create the synonym so that it refers to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>ORA-00980: synonym translation is no longer valid</strong><br />
This error usually means that the synonym used is based on a table, view, or synonym that no longer exists. in order to fix it you will need to replace the synonym with the name of the object it references or re-create the synonym so that it refers to a valid table, view, or synonym. However, this is not always simple. following are some common causes and suggested solutions.</p>
<ol>
<strong>1)</strong> If you imported a specific schema, <strong>it is possible that one of the sysnonyms is pointing to an object on a different schema</strong> that is simply not there. run <strong>SELECT * FROM all_synonyms</strong> and verify that all the table name are there and reachable.<br />
<strong>2) </strong>If you imported from a different version it is also possible that that the synonym is pointing to an object that does not exists in the new version. This could be due to the fact that <strong> this component was not installed on the new version or that the component is not in a valid state.<br />
  SELECT comp_name, version,status FROM dba_registry </strong> and make sure that all the components are valid.<br />
<strong>3)</strong> it is also possible that <strong>object is there but you don&#8217;t have access to it</strong>. connect as system and do the <strong>SELECT * FROM dba_synonyms WHERE  owner=&#8217;YOUR USER&#8221;</strong>. again, make sure that your user have access to all the objects under TABLE_NAME. If not, grant it.<br />
<strong>4)</strong> if this issue happens during import or export, <strong>add trace=y</strong> to the imp/exp command (imp user/pass file=filename.dmp trace=y) This will create a trace file that will provide more information on what is failing. </ol>
]]></content:encoded>
			<wfw:commentRss>http://dbtricks.com/?feed=rss2&amp;p=89</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OUI.EXE has stopped working on Windows 2008</title>
		<link>http://dbtricks.com/?p=65</link>
		<comments>http://dbtricks.com/?p=65#comments</comments>
		<pubDate>Tue, 17 Mar 2009 19:50:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Client]]></category>
		<category><![CDATA[OUI has stopped working]]></category>
		<category><![CDATA[Windows 2008]]></category>

		<guid isPermaLink="false">http://dbtricks.com/?p=65</guid>
		<description><![CDATA[If you are trying to install Oracle 10.2.0.3 client on a Windows 2008 server and you get the following error:




OUI.EXE has stopped working
Close the program
 
For some reason, the Oracle installer is having problem with long directory structures.
To overcome this, you can simply copy the installtion directory to a location with a shorter path.
1)create a new Temp [...]]]></description>
			<content:encoded><![CDATA[<p>If you are trying to install Oracle 10.2.0.3 client on a Windows 2008 server and you get the following error:</p>
<p style="text-align: center;"><a href="http://dbtricks.com/wp-content/uploads/2009/03/oui-exe-has-stopped-working.jpg"><img class="aligncenter size-full wp-image-68" title="oui-exe-has-stopped-working" src="http://dbtricks.com/wp-content/uploads/2009/03/oui-exe-has-stopped-working.jpg" alt="" width="366" height="152" /></a></p>
<p><strong></strong></p>
<p><strong></strong></p>
<p><strong></strong></p>
<p><strong>OUI.EXE has stopped working<br />
Close the program</strong></p>
<p> </p>
<p>For some reason, the Oracle installer is having problem with long directory structures.<br />
To overcome this, you can simply copy the installtion directory to a location with a shorter path.</p>
<ol><strong>1)</strong>create a new Temp directory on the root of your drive<br />
<strong>2)</strong>copy the installtion files to this directory. it is possible that windows will say that &#8221; you need permission to perform this action&#8221;. This could be overcome by turning off the User Account Control (UAC) but a simpler soulution would be to copy the files using the command prompt<strong>move &#8220;10203_vista_w2k8_x86_production_client&#8221; c:\temp\</strong> (weird, but it works)<br />
<strong>3)</strong> run the installer from the new location.</ol>
]]></content:encoded>
			<wfw:commentRss>http://dbtricks.com/?feed=rss2&amp;p=65</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restart Data Pump after import errors</title>
		<link>http://dbtricks.com/?p=62</link>
		<comments>http://dbtricks.com/?p=62#comments</comments>
		<pubDate>Tue, 10 Mar 2009 02:10:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[data pump]]></category>
		<category><![CDATA[expdp]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[impdb]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[ORA-01653]]></category>
		<category><![CDATA[ORA-01691]]></category>
		<category><![CDATA[ORA-39171]]></category>

		<guid isPermaLink="false">http://dbtricks.com/?p=62</guid>
		<description><![CDATA[When using Data Pump, you may encounter the following error:
ORA-39171: Job is experiencing a resumable wait.
Together with
ORA-01653: Unable to extend table %s.%s by %s in tablespace %s 
Or
ORA-01691  unable to extend lob segment string.string by string in tablespace string
Both errors basically say that the table space you are using can not allocate more space. This [...]]]></description>
			<content:encoded><![CDATA[<p>When using Data Pump, you may encounter the following error:<br />
<strong>ORA-39171: Job is experiencing a resumable wait.</strong><br />
Together with</p>
<p><strong>ORA-01653: Unable to extend table %s.%s by %s in tablespace %s </strong><br />
Or<br />
<strong>ORA-01691  unable to extend lob segment string.string by string in tablespace string</strong><br />
Both errors basically say that the table space you are using can not allocate more space. This could be because the datafile is full, the disk is full or autoextend is not set. This is simple to check by running the following query on DBA_DATA_FILE:<br />
<strong>select *<br />
from dba_data_files<br />
where tablespace_name=&#8217;TABLESPACE_NAME&#8217;<br />
</strong><br />
The bytes column will tell you how many bytes are used by Oracle in the tablespace. If AUTOEXTENSIBLE is set to NO, then Oracle will not extend the size of the tablespace.</p>
<p>In many cases, the Data Pump import may seem to hang. Data Pump will try to continue after some time but unless something is changed, you will keep getting the above errors.</p>
<p>The solution, however, is simple enough. All you need to do is use the Data Pump Restart Capability:<br />
1)    In the IMPDP window, click CTRL-C to stop the job.<br />
2)    In the command line type:<br />
<strong>Import&gt; stop_job=immediate</strong><br />
3)    Use SQLPlus to make the required changes to the table space. You can:</p>
<ol>
a)    Add DataFile ALTER TABLESPACE &lt;tablespace name&gt; ADD DATAFILE &#8216;&lt;path to file name and  file name&gt;&#8217; SIZE &lt;integer&gt;M;</p>
<p>b)    Resize the Datafile:<br />
ALTER DATABASE DATAFILE &#8216;&lt; path to file name and  file name &gt;&#8217; RESIZE &lt;integer&gt;M;<br />
c)     Enable autoextend:<br />
ALTER DATABASE DATAFILE &#8216;&lt; path to file name and  file name &gt;&#8217; AUTOEXTEND ON MAXSIZE UNLIMITED;</ol>
<p>4)    Attach the Job.<br />
&gt;<strong>impdp system/manager attach=Job_Name</strong><br />
If you did not provide a specific job name when you first ran the IMPDP, Oracle will assign a default name for it. In order to find the System assigned name for the IMPDP job you can run the following query:<br />
<strong> SELECT * FROM DBA_DATAPUMP_JOBS;</strong><br />
The result will probably be something like SYS_IMPORT_FULL_number.<br />
5)     Restart the job<br />
<strong>Import&gt; start_job</strong><br />
6)    You can check the status of the job by simply typing STATUS in the utility command prompt.<br />
<strong> Import&gt; status</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://dbtricks.com/?feed=rss2&amp;p=62</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Configure the ODBC on Oracle XE Client</title>
		<link>http://dbtricks.com/?p=55</link>
		<comments>http://dbtricks.com/?p=55#comments</comments>
		<pubDate>Wed, 11 Feb 2009 23:24:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[ODBC]]></category>
		<category><![CDATA[Oracle Client]]></category>
		<category><![CDATA[Oracle XE]]></category>
		<category><![CDATA[Oracle XE Client]]></category>

		<guid isPermaLink="false">http://dbtricks.com/?p=55</guid>
		<description><![CDATA[Even Oracle veterans may encounter some challenges when it comes to setting an odbc  using the Oracle XE Client.    As every DBA will tell you, you will need to configure the tnsnames.ora  (using  net configuration Assistant or by going  to oracle home\network\admin and edit it manually). After that, theTNS Service name in the ODBC [...]]]></description>
			<content:encoded><![CDATA[<p>Even Oracle veterans may encounter some challenges when it comes to setting an odbc  using the Oracle XE Client.    As every DBA will tell you, you will need to configure the tnsnames.ora  (using  net configuration Assistant or by going  to oracle home\network\admin and edit it manually). After that, theTNS Service name in the ODBC will be populated with the entries from the tnsnames.ora file. You will only be required to choose the appropriate entry and you should be good to go.<br />
This was the case in all the latest Oracle releases However If you will download the Oracle XE client you will quickly discover  that <strong>there is no tnsnames.ora under the Oracle client XE directory structure</strong>. In addition, the network\admin directory is not there as well.<br />
Oracle documentation explains (In their usual user friendly way) how to connect to the Data Base using a connection string (<strong>username/password@[//]host[:port][/service_name</strong>] where service name is usually XE and port is 1521) but it is not that obvious how to configure the odbc to use this.<br />
The solution is simple enough (once you find it). All that needs to be done is to type  the connection string  on the ODBC’s “ TNS Service Name” field.  Just add the line <strong>127.0.0.1/XE</strong> (no need to use the drop down) and test the connection.<br />
If the Data Base is on a different machine, you can replace 127.0.0.1 with the address of the remote server.<br />
<a href="http://dbtricks.com/wp-content/uploads/2009/02/xe-client-odbc2.jpg"><img class="aligncenter size-medium wp-image-58" title="xe-client-odbc2" src="http://dbtricks.com/wp-content/uploads/2009/02/xe-client-odbc2-300x192.jpg" alt="" width="300" height="192" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dbtricks.com/?feed=rss2&amp;p=55</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing Oracle on a machine with DHCP</title>
		<link>http://dbtricks.com/?p=53</link>
		<comments>http://dbtricks.com/?p=53#comments</comments>
		<pubDate>Fri, 30 Jan 2009 22:10:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[install]]></category>

		<guid isPermaLink="false">http://dbtricks.com/?p=53</guid>
		<description><![CDATA[During Oracle installation on a windows machine that is configured to use DHCP in order to obtain its IP address, the Following message will probably be displayed:
Checking Network Configuration requirements &#8230;
Check complete. The overall result of this check is: Failed &#60;&#60;&#60;&#60;
Problem: The install has detected that the primary IP address of the system is DHCP-assigned.
Recommendation: [...]]]></description>
			<content:encoded><![CDATA[<p>During Oracle installation on a windows machine that is configured to use DHCP in order to obtain its IP address, the Following message will probably be displayed:</p>
<p><strong>Checking Network Configuration requirements &#8230;<br />
Check complete. The overall result of this check is: Failed &lt;&lt;&lt;&lt;<br />
Problem: The install has detected that the primary IP address of the system is DHCP-assigned.<br />
Recommendation: Oracle supports installations on systems with DHCP-assigned IP addresses; However, before you can do this, you must configure the Microsoft LoopBack Adapter to be the primary network adapter on the system.  See the Installation Guide for more details on installing the software on systems configured with DHCP.</strong></p>
<p>As the error message say, this due to the fact that you are trying to install Oracle on a machine that is using DHCP to obtain its IP address. You can still install oracle on a machine without a constant IP address. All you need to do is configure the LoopBack adapter:</p>
<p><strong> Install the Loopback adapter</strong><br />
1)     Go to the control panel and choose add hardware<br />
2)    The Add Hardware wizard will be displayed, click Next<br />
3)    Choose “Yes, I have already connected the hardware” and click Next<br />
4)    An hardware list will be displayed. Navigate to the bottom of the list and choose “Add new hardware       device”<br />
5)    Choose Install the hardware that I manually select from a list (Advance)”<br />
6)    Choose “Network adapter”<br />
7)    Choose “Microsoft” on the left side of the window and “Microsoft Loopback Adapter” on the right             window”<br />
8)    Click Next and verify that Microsoft Loopback Adapter is about to install and click next again and       finish.</p>
<p><strong>Configure the loop back adapter</strong><br />
1)    Go to control panel &#8211; network connections, you will see a new network connection.<br />
2)    Choose “local area connection 2” (the name may vary but basically it is the one we just added) and       click properties.<br />
3)    Click on tcp/ip and then properties.<br />
4)    Enter an IP address and a subnet mask (you can use 1.1.1.2 and subnet 255.255.255.0)</p>
<p>Go to network connection and click on Advanced settings under the Advanced menu and <strong>verify that the loopback adapter is in the first one</strong>. (Update: it look like this step is optional because it seems to work in most cases anyway)</p>
<p>Now you can continue your oracle installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://dbtricks.com/?feed=rss2&amp;p=53</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>ORA-01758 when trying to alter table</title>
		<link>http://dbtricks.com/?p=51</link>
		<comments>http://dbtricks.com/?p=51#comments</comments>
		<pubDate>Tue, 06 Jan 2009 19:30:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[alte table]]></category>
		<category><![CDATA[ora-01758]]></category>

		<guid isPermaLink="false">http://dbtricks.com/?p=51</guid>
		<description><![CDATA[If you are trying to add a new Not NULL columns to a table and you get the following error:
ORA-01758: table must be empty to add mandatory (NOT NULL) column 
Since the values in the new column are null (after all, you just added the column) the new constraint can not be satisfied.
There are several [...]]]></description>
			<content:encoded><![CDATA[<p>If you are trying to add a new Not NULL columns to a table and you get the following error:</p>
<p><strong>ORA-01758: table must be empty to add mandatory (NOT NULL) column </strong></p>
<p>Since the values in the new column are null (after all, you just added the column) the new constraint can not be satisfied.</p>
<p>There are several option to overcome ORA-01758:</p>
<p>1) <strong>provide a default value for the column.</strong></p>
<p><strong>ALTER TABLE table-name ADD column-name VARCHAR2(15) DEFAULT ‘X’ NOT NULL</strong></p>
<p>If you don&#8217;t want the default value you can remove it after the column will be populated with the new data.</p>
<p>2) <strong>Add the column without the NOT NULL constraint, </strong></p>
<p><strong>ALTER TABLE table-name ADD (column-name VARCHAR2(15));</strong></p>
<p>&#8211; add the data</p>
<p><strong>UPDATE table-name set column-name=&#8217;x';</strong></p>
<p>&#8211; apply the NOT NULL  constraint.</p>
<p><strong>ALTER TABLE table-name MODIFY (column-name NOT NULL)</strong></p>
<p>3) <strong>Empty the table</strong>, apply the NOT NULL and add the data back to the table</p>
]]></content:encoded>
			<wfw:commentRss>http://dbtricks.com/?feed=rss2&amp;p=51</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
