<?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>betweenGo &#187; Database</title>
	<atom:link href="http://betweengo.com/category/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://betweengo.com</link>
	<description>We make Ruby on Rails easy.  We make ATG easy.</description>
	<lastBuildDate>Tue, 06 Dec 2011 14:03:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Create Tablespaces in Oracle</title>
		<link>http://betweengo.com/2011/03/21/create-tablespaces-in-oracle/</link>
		<comments>http://betweengo.com/2011/03/21/create-tablespaces-in-oracle/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 16:00:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://betweengo.com/2011/03/21/create-tablespaces-in-oracle/</guid>
		<description><![CDATA[Zero Table by CommandZed Previously I posted about how to import and create users in Oracle and in those examples I used the tablespaces provided by Oracle, users and temp.  But often you will want to create your own tablespace and use that one as the default tablespace for your users. Here is an example [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/' rel='bookmark' title='How to Import and Create Users in Oracle'>How to Import and Create Users in Oracle</a></li>
<li><a href='http://betweengo.com/2008/10/08/ruby-on-rails-and-oracle/' rel='bookmark' title='Ruby on Rails and Oracle'>Ruby on Rails and Oracle</a></li>
<li><a href='http://betweengo.com/2007/01/05/oracle-sequences/' rel='bookmark' title='Oracle Triggers'>Oracle Triggers</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/zara/2752802532/"><img class="aligncenter" title="Zero Table | Flickr" src="http://farm4.static.flickr.com/3257/2752802532_3484ed5037.jpg" alt="Zero Table | Flickr" /></a></p>
<p style="text-align: center;"><a title="Zero Table | Flickr" href="http://www.flickr.com/photos/zara/2752802532/">Zero Table</a> by <a title="Flickr: CommandZed's Photostream" href="http://www.flickr.com/photos/zara/">CommandZed</a></p>
<p>Previously I posted about <a title="How to Import and Create Users in Oracle « betweenGo" href="http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/">how to import and create users in Oracle</a> and in those examples I used the tablespaces provided by Oracle, <tt>users</tt> and <tt>temp</tt>.  But often you will want to create your own tablespace and use that one as the default tablespace for your users.</p>
<p>Here is an example of how to create a tablespace with the name foo of size 1 GB. Note that it is created in <tt>/Users/oracle/oradata/orcl</tt> which is the default folder for dataspaces on Mac OS X.</p>
<pre>create tablespace
foo
datafile '/Users/oracle/oradata/orcl/foo.dbf'
size 1g;</pre>
<p>Here is an example of how to create the same tablespace except now you are allowing it to grow bigger in 100 MB increments up to a maximum of 2 GB.  If you don&#8217;t specify the maximum it will grow unlimited.</p>
<pre>create tablespace
foo
datafile '/Users/oracle/oradata/orcl/foo.dbf'
size 1g
autoextend on
next 100m
maxsize 2g;</pre>
<p>If your tablespace is not big enough you can resize it using syntax like this.</p>
<pre>alter database
datafile '/Users/oracle/oradata/orcl/foo.dbf'
resize 10g;</pre>
<p>To see how big your tablespaces are you can use this query.</p>
<pre>SELECT /* + RULE */  df.tablespace_name "Tablespace",
       df.bytes / (1024 * 1024) "Size (MB)",
       SUM(fs.bytes) / (1024 * 1024) "Free (MB)",
       Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "% Free",
       Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% Used"
  FROM dba_free_space fs,
       (SELECT tablespace_name,SUM(bytes) bytes
          FROM dba_data_files
         GROUP BY tablespace_name) df
 WHERE fs.tablespace_name (+)  = df.tablespace_name
 GROUP BY df.tablespace_name,df.bytes
UNION ALL
SELECT /* + RULE */ df.tablespace_name tspace,
       fs.bytes / (1024 * 1024),
       SUM(df.bytes_free) / (1024 * 1024),
       Nvl(Round((SUM(fs.bytes) - df.bytes_used) * 100 / fs.bytes), 1),
       Round((SUM(fs.bytes) - df.bytes_free) * 100 / fs.bytes)
  FROM dba_temp_files fs,
       (SELECT tablespace_name,bytes_free,bytes_used
          FROM v$temp_space_header
         GROUP BY tablespace_name,bytes_free,bytes_used) df
 WHERE fs.tablespace_name (+)  = df.tablespace_name
 GROUP BY df.tablespace_name,fs.bytes,df.bytes_free,df.bytes_used
 ORDER BY 4 DESC;</pre>
<p>Here is an example of how to drop a tablespace including its contents and datafiles.</p>
<pre>drop tablespace foo including contents and datafiles</pre>
<p>For further reading please see <a title="Oracle create tablespace &amp; alter tablespace syntax" href="http://www.dba-oracle.com/t_tablespace_create_alter.htm">Oracle create tablespace &amp; alter tablespace syntax</a>, <a title="Tablespace – Oracle FAQ" href="http://www.orafaq.com/wiki/Tablespace">Tablespace – Oracle FAQ</a> and <a title="How enlarge or decrease the size of an Oracle Tablespace" href="http://peoplecnc.com/whitepapers/article.php?story=20060518130813908">How enlarge or decrease the size of an Oracle Tablespace</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2011%2F03%2F21%2Fcreate-tablespaces-in-oracle%2F&amp;title=Create%20Tablespaces%20in%20Oracle" id="wpa2a_2"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/' rel='bookmark' title='How to Import and Create Users in Oracle'>How to Import and Create Users in Oracle</a></li>
<li><a href='http://betweengo.com/2008/10/08/ruby-on-rails-and-oracle/' rel='bookmark' title='Ruby on Rails and Oracle'>Ruby on Rails and Oracle</a></li>
<li><a href='http://betweengo.com/2007/01/05/oracle-sequences/' rel='bookmark' title='Oracle Triggers'>Oracle Triggers</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2011/03/21/create-tablespaces-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Delete in One Table Based on Values in Another Table</title>
		<link>http://betweengo.com/2011/03/14/sql-delete-in-one-table-based-on-values-in-another-table/</link>
		<comments>http://betweengo.com/2011/03/14/sql-delete-in-one-table-based-on-values-in-another-table/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 16:00:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[ATG]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://betweengo.com/2011/03/14/sql-delete-in-one-table-based-on-values-in-another-table/</guid>
		<description><![CDATA[Growing by Simon Peckham Delete From One Table Whose Values Don’t Appear in Another Table Sometimes you will find that you have items in a table whose values reference items in another table that no longer exist.&#160; For example in ATG you may have orders that reference profiles that no longer exist.&#160; This could happen [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2010/01/18/sql-insert-in-one-table-based-on-values-in-another-table/' rel='bookmark' title='SQL Insert in One Table Based on Values in Another Table'>SQL Insert in One Table Based on Values in Another Table</a></li>
<li><a href='http://betweengo.com/2008/07/02/sql-update-in-one-table-based-on-values-in-another/' rel='bookmark' title='SQL Update in One Table Based on Values in Another Table'>SQL Update in One Table Based on Values in Another Table</a></li>
<li><a href='http://betweengo.com/2009/10/06/how-to-alter-table/' rel='bookmark' title='How to Alter Table'>How to Alter Table</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/speckham/3848251199/"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Growing | Flickr" alt="Growing | Flickr" src="http://farm4.static.flickr.com/3573/3848251199_3d84512d5f.jpg" /></a></p>
<p align="center"><a title="Growing | Flickr" href="http://www.flickr.com/photos/speckham/3848251199/">Growing</a> by <a title="Flickr: Simon Peckham&#39;s Photostream" href="http://www.flickr.com/photos/speckham/">Simon Peckham</a></p>
<p><strong>Delete From One Table Whose Values Don’t Appear in Another Table</strong></p>
<p>Sometimes you will find that you have items in a table whose values reference items in another table that no longer exist.&#160; For example in ATG you may have orders that reference profiles that no longer exist.&#160; This could happen if an <a title="Persistent Cart for Anonymous Users « betweenGo" href="http://betweengo.com/2010/05/03/persistent-cart-for-anonymous-users/">order is for an anonymous profile</a> that was deleted.</p>
<p>Here is an example of how to delete items in a table whose values reference items in another table that no longer exist, in this case ATG orders whose profiles no longer exist.</p>
<pre>DELETE FROM dcspp_order
WHERE profile_id
NOT IN
(
  SELECT id
  FROM dps_user
);</pre>
<p>This example does not actually work because of the dependencies on the <tt>dcspp_order</tt> table so please don’t try it. <img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://betweengo.com/wp-content/uploads/2011/03/wlEmoticon-smile1.png" /></p>
<p><strong>Delete From One Table Based on Values in Another Table</strong></p>
<p>Sometimes you want to delete items in one tables based on values in another table.&#160; You can do this similarly to the previous case.</p>
<pre>DELETE FROM dcspp_order
WHERE profile_id
IN
(
  SELECT id
  FROM dps_user
  WHERE id LIKE '6%'
);</pre>
<p>This example also does not actually work because of the dependencies on the <tt>dcspp_order</tt> table so please don’t try it. <img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://betweengo.com/wp-content/uploads/2011/03/wlEmoticon-smile1.png" /></p>
<p>For further reading please see <a title="How to delete records from a SQL Server database - Stack Overflow" href="http://stackoverflow.com/questions/4715549/how-to-delete-records-from-a-sql-server-database">How to delete records from a SQL Server database</a> and <a title="SQL Delete Rows Based on Another Table - Stack Overflow" href="http://stackoverflow.com/questions/1783784/sql-delete-rows-based-on-another-table">SQL Delete Rows Based on Another Table</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2011%2F03%2F14%2Fsql-delete-in-one-table-based-on-values-in-another-table%2F&amp;title=SQL%20Delete%20in%20One%20Table%20Based%20on%20Values%20in%20Another%20Table" id="wpa2a_4"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2010/01/18/sql-insert-in-one-table-based-on-values-in-another-table/' rel='bookmark' title='SQL Insert in One Table Based on Values in Another Table'>SQL Insert in One Table Based on Values in Another Table</a></li>
<li><a href='http://betweengo.com/2008/07/02/sql-update-in-one-table-based-on-values-in-another/' rel='bookmark' title='SQL Update in One Table Based on Values in Another Table'>SQL Update in One Table Based on Values in Another Table</a></li>
<li><a href='http://betweengo.com/2009/10/06/how-to-alter-table/' rel='bookmark' title='How to Alter Table'>How to Alter Table</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2011/03/14/sql-delete-in-one-table-based-on-values-in-another-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Insert in One Table Based on Values in Another Table</title>
		<link>http://betweengo.com/2010/01/18/sql-insert-in-one-table-based-on-values-in-another-table/</link>
		<comments>http://betweengo.com/2010/01/18/sql-insert-in-one-table-based-on-values-in-another-table/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 18:00:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://betweengo.com/2010/01/18/sql-insert-in-one-table-based-on-values-in-another-table/</guid>
		<description><![CDATA[(Photo: Love&#8217;s Old Sweet Song by linda yvonne) The syntax for doing this is similar to doing an update in one table based on values in another table yet simpler. INSERT INTO suppliers (name) SELECT customers.name FROM customers WHERE customers.id = suppliers.id); If you want to add constant values into the insert you can do [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/07/02/sql-update-in-one-table-based-on-values-in-another/' rel='bookmark' title='SQL Update in One Table Based on Values in Another Table'>SQL Update in One Table Based on Values in Another Table</a></li>
<li><a href='http://betweengo.com/2011/03/14/sql-delete-in-one-table-based-on-values-in-another-table/' rel='bookmark' title='SQL Delete in One Table Based on Values in Another Table'>SQL Delete in One Table Based on Values in Another Table</a></li>
<li><a href='http://betweengo.com/2005/09/29/sequence-oracle/' rel='bookmark' title='Sequences on Oracle'>Sequences on Oracle</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/from_linda_yvonne/2449770721/"><img style="display: inline; margin-left: 0px; margin-right: 0px" title="Love&#39;s Old Sweet Song on Flickr" alt="Love&#39;s Old Sweet Song on Flickr" src="http://farm3.static.flickr.com/2364/2449770721_71ac512444.jpg" /></a> </p>
<p align="center">(Photo: <a title="Love&#39;s Old Sweet Song on Flickr" href="http://www.flickr.com/photos/from_linda_yvonne/2449770721/">Love&#8217;s Old Sweet Song</a> by <a title="Flickr: linda yvonne&#39;s Photostream" href="http://www.flickr.com/photos/from_linda_yvonne/">linda yvonne</a>)</p>
<p>The syntax for doing this is similar to doing an <a title="SQL update in one table based on values in another - betweenGo" href="http://betweengo.com/2008/07/02/sql-update-in-one-table-based-on-values-in-another/">update in one table based on values in another table</a> yet simpler.</p>
<pre>INSERT INTO suppliers (name)
SELECT customers.name
  FROM customers
  WHERE customers.id = suppliers.id);</pre>
<p>If you want to add constant values into the insert you can do something like this.</p>
<pre>INSERT INTO suppliers (name, city)
SELECT customers.name, 'Toronto'
  FROM customers
  WHERE customers.id = suppliers.id);</pre>
<p>For further reading please see <a title="SQL INSERT INTO" href="http://www.1keydata.com/sql/sqlinsert.html">SQL INSERT INTO</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2010%2F01%2F18%2Fsql-insert-in-one-table-based-on-values-in-another-table%2F&amp;title=SQL%20Insert%20in%20One%20Table%20Based%20on%20Values%20in%20Another%20Table" id="wpa2a_6"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/07/02/sql-update-in-one-table-based-on-values-in-another/' rel='bookmark' title='SQL Update in One Table Based on Values in Another Table'>SQL Update in One Table Based on Values in Another Table</a></li>
<li><a href='http://betweengo.com/2011/03/14/sql-delete-in-one-table-based-on-values-in-another-table/' rel='bookmark' title='SQL Delete in One Table Based on Values in Another Table'>SQL Delete in One Table Based on Values in Another Table</a></li>
<li><a href='http://betweengo.com/2005/09/29/sequence-oracle/' rel='bookmark' title='Sequences on Oracle'>Sequences on Oracle</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2010/01/18/sql-insert-in-one-table-based-on-values-in-another-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Alter Table</title>
		<link>http://betweengo.com/2009/10/06/how-to-alter-table/</link>
		<comments>http://betweengo.com/2009/10/06/how-to-alter-table/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 17:53:19 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=901</guid>
		<description><![CDATA[(Photo: Rain on a window in Sunnyvale by basictheory) There are various ways to alter a table and I usually forget what they are so I am writing this post to remind me. Columns ALTER TABLE foo DROP COLUMN nickname; ALTER TABLE foo RENAME COLUMN name TO nickname; ALTER TABLE foo ADD name VARCHAR2(254) DEFAULT [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2006/08/17/altering-a-column-in-a-table/' rel='bookmark' title='HOWTO Alter a Column in a Table'>HOWTO Alter a Column in a Table</a></li>
<li><a href='http://betweengo.com/2008/08/01/best-practices-creating-tables/' rel='bookmark' title='Best Practices for Creating Tables'>Best Practices for Creating Tables</a></li>
<li><a href='http://betweengo.com/2010/01/21/specifying-one-to-many-relationship-in-atg-repositories/' rel='bookmark' title='Specifying One-to-Many Relationship in ATG Repositories'>Specifying One-to-Many Relationship in ATG Repositories</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://www.flickr.com/photos/basictheory/296819473/"><img title="Rain on a window in Sunnyvale on Flickr" src="http://farm1.static.flickr.com/105/296819473_d0bb6d8c2c.jpg" alt="Rain on a window in Sunnyvale" /></a></p>
<p style="text-align: center">(Photo: <a title="IMG_1021.JPG on Flickr" href="http://www.flickr.com/photos/basictheory/296819473/">Rain on a window in Sunnyvale</a> by <a title="Flickr: basictheory's Photostream" href="http://www.flickr.com/photos/basictheory/">basictheory</a>)</p>
<p>There are various ways to alter a table and I usually forget what they are so I am writing this post to remind me. <img src='http://betweengo.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Columns</strong></p>
<pre>ALTER TABLE foo DROP COLUMN nickname;
ALTER TABLE foo RENAME COLUMN name TO nickname;
ALTER TABLE foo ADD name VARCHAR2(254) DEFAULT 'Frank' NOT NULL;
ALTER TABLE foo ADD age INTEGER DEFAULT 0 NOT NULL;
ALTER TABLE foo MODIFY name VARCHAR2(500);</pre>
<p><strong>Constraints</strong></p>
<pre>ALTER TABLE foo DROP CONSTRAINT foo_a_f;
ALTER TABLE foo ADD CONSTRAINT foo_b_f FOREIGN KEY (bar_id) REFERENCES bar (id);</pre>
<p>If you forget the name of a constraint and you can try to find it using this handy piece of SQL.</p>
<pre>SELECT constraint_name FROM user_constraints WHERE constraint_name LIKE 'foo_%_f%';</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2009%2F10%2F06%2Fhow-to-alter-table%2F&amp;title=How%20to%20Alter%20Table" id="wpa2a_8"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2006/08/17/altering-a-column-in-a-table/' rel='bookmark' title='HOWTO Alter a Column in a Table'>HOWTO Alter a Column in a Table</a></li>
<li><a href='http://betweengo.com/2008/08/01/best-practices-creating-tables/' rel='bookmark' title='Best Practices for Creating Tables'>Best Practices for Creating Tables</a></li>
<li><a href='http://betweengo.com/2010/01/21/specifying-one-to-many-relationship-in-atg-repositories/' rel='bookmark' title='Specifying One-to-Many Relationship in ATG Repositories'>Specifying One-to-Many Relationship in ATG Repositories</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/10/06/how-to-alter-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL*Plus Commit on Exit</title>
		<link>http://betweengo.com/2009/08/25/sqlplus-commit-on-exit/</link>
		<comments>http://betweengo.com/2009/08/25/sqlplus-commit-on-exit/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 16:24:50 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sqlplus]]></category>

		<guid isPermaLink="false">http://betweengo.com/2009/08/25/sqlplus-commit-on-exit/</guid>
		<description><![CDATA[I was always doing a commit before exiting SQL*Plus when it occurred to me today that maybe I didn’t need to do that.&#160; Doing a Google search quickly answered that for me. If you issue a graceful exit (via the “exit” or “quit” command), sqlplus will always issue a commit. However, if you were to [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2010/01/18/sql-insert-in-one-table-based-on-values-in-another-table/' rel='bookmark' title='SQL Insert in One Table Based on Values in Another Table'>SQL Insert in One Table Based on Values in Another Table</a></li>
<li><a href='http://betweengo.com/2008/07/03/ora-12514-ora-27101/' rel='bookmark' title='ORA-12514 and ORA-27101'>ORA-12514 and ORA-27101</a></li>
<li><a href='http://betweengo.com/2006/12/06/how-to-retrieve-oracle-version-information/' rel='bookmark' title='How to Retrieve Oracle Version Information'>How to Retrieve Oracle Version Information</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://www.flickr.com/photos/cpstorm/140115572/"><img title="EXIT on Flickr" alt="EXIT on Flickr" src="http://farm1.static.flickr.com/47/140115572_d1eff7c94a.jpg" /></a> </p>
<p>I was always doing a commit before exiting SQL*Plus when it occurred to me today that maybe I didn’t need to do that.&#160; Doing a <a title="commit exit - Google Search" href="http://www.google.com/search?q=commit+exit">Google search</a> quickly answered that for me.</p>
<blockquote><p>If you issue a graceful exit (via the “exit” or “quit” command), sqlplus will always issue a commit. However, if you were to be ungracefully disconnected, for example by closing your terminal window, then PMON will issue a rollback like it does with any other disconnected session.</p>
<p><a title="sqlplus commit-on-exit? «  die Seilerwerks" href="http://seilerwerks.wordpress.com/2007/01/09/sqlplus-commit-on-exit/">sqlplus commit-on-exit?</a></p>
</blockquote>
<p><strong>Therefore there is no need to do a commit before you exit. </strong></p>
<p>You can also set autocommit on, it is off by default, but I would not recommend doing this.</p>
<blockquote><p>During interactive usage with sqlplus, Oracle also supports an AUTOCOMMIT option. With this option set to ON each individual SQL statement is treated as a transaction an will be automatically commited right after it is executed. A user can change the AUTOCOMMIT option by typing </p>
<pre> SET AUTOCOMMIT ON</pre>
<p>or </p>
<pre> SET AUTOCOMMIT OFF</pre>
<p>whereas by typing </p>
<pre> SHOW ALL</pre>
<p>a user can see the current setting for the option (including other ones).</p>
<p><a title="Oracle SQL Transactions" href="http://infolab.stanford.edu/~ullman/fcdb/oracle/or-nonstandard.html#transactions">Oracle SQL Transactions</a></p>
</blockquote>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2009%2F08%2F25%2Fsqlplus-commit-on-exit%2F&amp;title=SQL%2APlus%20Commit%20on%20Exit" id="wpa2a_10"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2010/01/18/sql-insert-in-one-table-based-on-values-in-another-table/' rel='bookmark' title='SQL Insert in One Table Based on Values in Another Table'>SQL Insert in One Table Based on Values in Another Table</a></li>
<li><a href='http://betweengo.com/2008/07/03/ora-12514-ora-27101/' rel='bookmark' title='ORA-12514 and ORA-27101'>ORA-12514 and ORA-27101</a></li>
<li><a href='http://betweengo.com/2006/12/06/how-to-retrieve-oracle-version-information/' rel='bookmark' title='How to Retrieve Oracle Version Information'>How to Retrieve Oracle Version Information</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/08/25/sqlplus-commit-on-exit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Import and Create Users in Oracle</title>
		<link>http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/</link>
		<comments>http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 17:09:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/</guid>
		<description><![CDATA[When you do an import sometimes you will find you will need to also create a user for this new set of data. Today I find myself in that situation as I imported data from Bell Canada and set up a new user for that data. Create a new user for the data. This example [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2011/03/21/create-tablespaces-in-oracle/' rel='bookmark' title='Create Tablespaces in Oracle'>Create Tablespaces in Oracle</a></li>
<li><a href='http://betweengo.com/2006/02/22/import-project-into-eclipse/' rel='bookmark' title='Import A Project Into Eclipse'>Import A Project Into Eclipse</a></li>
<li><a href='http://betweengo.com/2006/08/19/howto-really-delete-tables-on-oracle-10g/' rel='bookmark' title='HOWTO Really Delete Tables On Oracle 10g'>HOWTO Really Delete Tables On Oracle 10g</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://java.sun.com/j2ee/compatibility_1.4.html"><img class="alignright" title="Oracle" alt="Oracle" src="http://java.sun.com/j2ee/images/oracle_logo.gif" /></a> When you do an import sometimes you will find you will need to also create a user for this new set of data. Today I find myself in that situation as I imported data from Bell Canada and set up a new user for that data.</p>
<ol>
<li><strong>Create a new user for the data.</strong>
<p>This example creates a user named &quot;foo&quot; with the password &quot;foo&quot;.&#160; Foo is a typical user that can create sessions, synonyms, procedures and tables.</p>
<pre>CREATE USER FOO IDENTIFIED BY FOO
  DEFAULT TABLESPACE users
  TEMPORARY TABLESPACE temp
  QUOTA UNLIMITED ON users;

GRANT CREATE SESSION to FOO;
GRANT CREATE SYNONYM TO FOO;
GRANT CREATE PROCEDURE TO FOO;
GRANT CREATE TABLE TO FOO;
GRANT CREATE VIEW TO FOO;</pre>
<p>For more information please read <a title="Oracle&#39;s CREATE USER documentation" href="http://www.mcs.csueastbay.edu/support/oracle/doc/10.2/server.102/b14200/statements_8003.htm">Oracle&#8217;s CREATE USER documentation</a>.</p>
<p>If you want this user to be a DBA you can grant that to her too</p>
<pre>GRANT DBA TO FOO;</pre>
</li>
<li><strong>Import the dump using the new user.</strong>
<p>This example imports the dump from the file &quot;dump.dmp&quot;. This dump was created using the user &quot;foo&quot; and is being imported to the user &quot;foo&quot;. The dump will be logged in the file &quot;dump.log&quot;. </p>
<pre>imp system/system@example file=dump.dmp log=dump.log fromuser=foo touser=foo</pre>
<p>For more information please read <a title="Oracle&#39;s Import Export FAQ" href="http://www.orafaq.com/wiki/Import_Export_FAQ">Oracle&#8217;s Import Export FAQ</a>.</p>
</li>
<li><strong>To redo recreate user and then import again.</strong>
<p>If you need to redo an import the easiest thing to do is to drop the user, recreate her and then do the import again. When you drop the user specify <tt>CASCADE</tt> to drop all the objects in the user&#8217;s schema.</p>
<pre>DROP USER FOO CASCADE;</pre>
<p>For more information please read <a title="Oracle&#39;s DROP USER documentation" href="http://stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_9008.htm">Oracle&#8217;s DROP USER documentation</a>.</p>
</li>
</ol>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2009%2F07%2F17%2Fhow-to-import-and-create-users-in-oracle%2F&amp;title=How%20to%20Import%20and%20Create%20Users%20in%20Oracle" id="wpa2a_12"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2011/03/21/create-tablespaces-in-oracle/' rel='bookmark' title='Create Tablespaces in Oracle'>Create Tablespaces in Oracle</a></li>
<li><a href='http://betweengo.com/2006/02/22/import-project-into-eclipse/' rel='bookmark' title='Import A Project Into Eclipse'>Import A Project Into Eclipse</a></li>
<li><a href='http://betweengo.com/2006/08/19/howto-really-delete-tables-on-oracle-10g/' rel='bookmark' title='HOWTO Really Delete Tables On Oracle 10g'>HOWTO Really Delete Tables On Oracle 10g</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails and Oracle</title>
		<link>http://betweengo.com/2008/10/08/ruby-on-rails-and-oracle/</link>
		<comments>http://betweengo.com/2008/10/08/ruby-on-rails-and-oracle/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 23:04:18 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=331</guid>
		<description><![CDATA[Get the Ruby OCI8 driver.  Download the file that ends with &#8220;mswin32.rb&#8221; and install like this: E:\ruby&#62;ruby ruby-oci8-1.0.3-mswin32.rb Copy OCI8.rb to e:/ruby/lib/ruby/site_ruby/1.8/DBD/OCI8 Copy oci8.rb to e:/ruby/lib/ruby/site_ruby/1.8 Copy oci8lib.so to e:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt OK? Enter Yes/No: Yes Copying OCI8.rb to e:/ruby/lib/ruby/site_ruby/1.8/DBD/OCI8 ... done Copying oci8.rb to e:/ruby/lib/ruby/site_ruby/1.8 ... done Copying oci8lib.so to e:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt ... done OK You can [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2006/01/10/possible-reason-for-ruby-on-rails-tests-failing/' rel='bookmark' title='Possible reason for Ruby on Rails tests failing'>Possible reason for Ruby on Rails tests failing</a></li>
<li><a href='http://betweengo.com/2005/11/08/setting-up-a-windows-ruby-on-rails-environment/' rel='bookmark' title='Setting up a Windows Ruby on Rails Environment'>Setting up a Windows Ruby on Rails Environment</a></li>
<li><a href='http://betweengo.com/2005/10/16/what-is-ruby-on-rails/' rel='bookmark' title='What Is Ruby on Rails'>What Is Ruby on Rails</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<ol>
<li>Get the <a title="ruby-oci8" href="http://rubyforge.org/projects/ruby-oci8/">Ruby OCI8 driver</a>.  Download the file that ends with &#8220;mswin32.rb&#8221; and install like this:
<pre>E:\ruby&gt;ruby ruby-oci8-1.0.3-mswin32.rb
Copy OCI8.rb to e:/ruby/lib/ruby/site_ruby/1.8/DBD/OCI8
Copy oci8.rb to e:/ruby/lib/ruby/site_ruby/1.8
Copy oci8lib.so to e:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt
OK?
Enter Yes/No: Yes
Copying OCI8.rb to e:/ruby/lib/ruby/site_ruby/1.8/DBD/OCI8 ... done
Copying oci8.rb to e:/ruby/lib/ruby/site_ruby/1.8 ... done
Copying oci8lib.so to e:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt ... done
OK</pre>
<p>You can test the driver by running a query using Ruby.</p>
<pre>E:\&gt;ruby -r oci8 -e "OCI8.new('foo','12345','sid').exec(
'SELECT * from users') do |r| puts r.join(' | ') ; end"</pre>
</li>
<li>Install the ActiveRecord Oracle adapter.gem
<pre>E:\ruby&gt;install activerecord-oracle-adapter --source http://gems.rubyonrails.org</pre>
</li>
<li>Update config/database.yml to connect to Oracle
<pre>development:
  adapter: oracle
  database: sid
  username: foo
  password: 12345
  timeout: 5000</pre>
</li>
<li>Test by doing a rake db:migrate.</li>
<li>Test by running the Ruby on Rails server and making sure there are no errors upon startup.</li>
</ol>
<p>This article is based on these articles.</p>
<ul>
<li><a title="Oracle in Ruby on Rails" href="http://wiki.rubyonrails.com/rails/pages/Oracle">Oracle in Ruby on Rails</a></li>
<li><a title="Ruby on Rails with Oracle FAQ" href="http://www.oracle.com/technology/pub/articles/saternos-ror-faq.html">Ruby on Rails with Oracle FAQ</a></li>
<li><a title="Connecting Ruby on Rails to Oracle on an Intel Mac in Leopard (Mac OSX 10.5)" href="http://www.foliosus.com/2007/11/19/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-mac-osx-105/">Connecting Ruby on Rails to Oracle on an Intel Mac in Leopard (Mac OSX 10.5)</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F10%2F08%2Fruby-on-rails-and-oracle%2F&amp;title=Ruby%20on%20Rails%20and%20Oracle" id="wpa2a_14"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2006/01/10/possible-reason-for-ruby-on-rails-tests-failing/' rel='bookmark' title='Possible reason for Ruby on Rails tests failing'>Possible reason for Ruby on Rails tests failing</a></li>
<li><a href='http://betweengo.com/2005/11/08/setting-up-a-windows-ruby-on-rails-environment/' rel='bookmark' title='Setting up a Windows Ruby on Rails Environment'>Setting up a Windows Ruby on Rails Environment</a></li>
<li><a href='http://betweengo.com/2005/10/16/what-is-ruby-on-rails/' rel='bookmark' title='What Is Ruby on Rails'>What Is Ruby on Rails</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/10/08/ruby-on-rails-and-oracle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>List users</title>
		<link>http://betweengo.com/2008/08/08/list-users/</link>
		<comments>http://betweengo.com/2008/08/08/list-users/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 19:31:19 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=265</guid>
		<description><![CDATA[To list all the users in a database log in as the sysadmin and query the dba_users table. $ sqlplus sysman/123456@dev01 SQL&#62; select username from dba_users where username like 'Frank%'; Related posts: Determining Permissions for a User ORA-12514 and ORA-27101 How to Retrieve Oracle Version Information
Related posts:<ol>
<li><a href='http://betweengo.com/2007/07/23/determining-user-permissions/' rel='bookmark' title='Determining Permissions for a User'>Determining Permissions for a User</a></li>
<li><a href='http://betweengo.com/2008/07/03/ora-12514-ora-27101/' rel='bookmark' title='ORA-12514 and ORA-27101'>ORA-12514 and ORA-27101</a></li>
<li><a href='http://betweengo.com/2006/12/06/how-to-retrieve-oracle-version-information/' rel='bookmark' title='How to Retrieve Oracle Version Information'>How to Retrieve Oracle Version Information</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>To list all the users in a database log in as the sysadmin and query the dba_users table.</p>
<pre>$ sqlplus sysman/123456@dev01

SQL&gt; select username from dba_users where username like 'Frank%';</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F08%2F08%2Flist-users%2F&amp;title=List%20users" id="wpa2a_16"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2007/07/23/determining-user-permissions/' rel='bookmark' title='Determining Permissions for a User'>Determining Permissions for a User</a></li>
<li><a href='http://betweengo.com/2008/07/03/ora-12514-ora-27101/' rel='bookmark' title='ORA-12514 and ORA-27101'>ORA-12514 and ORA-27101</a></li>
<li><a href='http://betweengo.com/2006/12/06/how-to-retrieve-oracle-version-information/' rel='bookmark' title='How to Retrieve Oracle Version Information'>How to Retrieve Oracle Version Information</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/08/08/list-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Practices for Creating Tables</title>
		<link>http://betweengo.com/2008/08/01/best-practices-creating-tables/</link>
		<comments>http://betweengo.com/2008/08/01/best-practices-creating-tables/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 15:02:04 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=258</guid>
		<description><![CDATA[Recently our DBA recommended the following for creating tables. All constraints (primary keys, unique keys, foreign keys, etc&#8230;.) should be declared outside of the CREATE TABLE &#8230;. statements, and instead done as ALTER TABLE statements. All tables must have table and column comments to provide information for the data dictionary/schema metadata. Not Best Practice: CREATE [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/08/01/repository-creating-tables-automatically/' rel='bookmark' title='Repository creating tables automatically'>Repository creating tables automatically</a></li>
<li><a href='http://betweengo.com/2005/07/28/user-defined-property-type-gotchas/' rel='bookmark' title='user-defined property type gotcha&#8217;s'>user-defined property type gotcha&#8217;s</a></li>
<li><a href='http://betweengo.com/2010/01/21/specifying-one-to-many-relationship-in-atg-repositories/' rel='bookmark' title='Specifying One-to-Many Relationship in ATG Repositories'>Specifying One-to-Many Relationship in ATG Repositories</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Recently our DBA recommended the following for creating tables.</p>
<ol>
<li>All constraints (primary keys, unique keys, foreign keys, etc&#8230;.) should be declared outside of the CREATE TABLE &#8230;. statements, and instead done as ALTER TABLE statements.</li>
<li>All tables must have table and column comments to provide information for the data dictionary/schema metadata.</li>
</ol>
<p><strong>Not Best Practice:</strong></p>
<pre>CREATE TABLE items (
  id   VARCHAR2(40) NOT NULL,
  type NUMBER(5)    NOT NULL,
  PRIMARY KEY (id)
);</pre>
<p><strong>Best Practice:</strong></p>
<pre>CREATE TABLE items (
  id   VARCHAR2(40) NOT NULL,
  type NUMBER(5)    NOT NULL
);
ALTER TABLE items ADD CONSTRAINT items_pk PRIMARY KEY (id);
COMMENT ON TABLE items IS 'repository items';
COMMENT ON COLUMN items.id IS 'primary key (repository id)';
COMMENT ON COLUMN items.type IS 'item type';</pre>
<p>I asked the DBA why this is considered best practice and this is what he said.</p>
<blockquote><p>The DBA’s put indexes into a different tablespace than the table itself for storage, admin, and somewhat performance reasons (NetApp spreads out the I/O so does not quite apply to Upromise environment).</p>
<p>If the PK is part of the table create statement, they have to break out the statement in order to put the PK into a different tablespace or different storage parameters than the table. Having the statements separate from the start makes things smoother.</p>
<p>- Jeff Janousek, Upromise DBA</p></blockquote>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F08%2F01%2Fbest-practices-creating-tables%2F&amp;title=Best%20Practices%20for%20Creating%20Tables" id="wpa2a_18"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/08/01/repository-creating-tables-automatically/' rel='bookmark' title='Repository creating tables automatically'>Repository creating tables automatically</a></li>
<li><a href='http://betweengo.com/2005/07/28/user-defined-property-type-gotchas/' rel='bookmark' title='user-defined property type gotcha&#8217;s'>user-defined property type gotcha&#8217;s</a></li>
<li><a href='http://betweengo.com/2010/01/21/specifying-one-to-many-relationship-in-atg-repositories/' rel='bookmark' title='Specifying One-to-Many Relationship in ATG Repositories'>Specifying One-to-Many Relationship in ATG Repositories</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/08/01/best-practices-creating-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ORA-12514 and ORA-27101</title>
		<link>http://betweengo.com/2008/07/03/ora-12514-ora-27101/</link>
		<comments>http://betweengo.com/2008/07/03/ora-12514-ora-27101/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 13:57:45 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=205</guid>
		<description><![CDATA[This morning I was unable to access my Oracle database which runs on my laptop. It&#8217;s the first time I have had this problem. When I tried to login I saw this. $ sqlplus foo/foo@dev01 SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 3 06:38:20 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. ERROR: [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/04/18/oracle-tns-listener-service-not-starting/' rel='bookmark' title='Oracle TNS Listener service not starting'>Oracle TNS Listener service not starting</a></li>
<li><a href='http://betweengo.com/2007/01/26/93/' rel='bookmark' title='Catching Oracle exceptions'>Catching Oracle exceptions</a></li>
<li><a href='http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/' rel='bookmark' title='How to Import and Create Users in Oracle'>How to Import and Create Users in Oracle</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This morning I was unable to access my Oracle database which runs on my laptop.  It&#8217;s the first time I have had this problem.</p>
<p>When I tried to login I saw this.</p>
<pre>$ sqlplus foo/foo@dev01

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 3 06:38:20 2008

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

ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor</pre>
<p>When I tried to login without the TNS alias I saw this:</p>
<pre>$ sqlplus foo/foo

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 3 06:38:20 2008

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

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist</pre>
<p>On the internet I saw recommendations to set your ORACLE_SID and ORACLE_HOME environment variables.  But on my system ORACLE_SID is not set and ORACLE_HOME is blank.  Finally I just tried restarting the OracleServiceDEV01 service and that worked.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F07%2F03%2Fora-12514-ora-27101%2F&amp;title=ORA-12514%20and%20ORA-27101" id="wpa2a_20"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/04/18/oracle-tns-listener-service-not-starting/' rel='bookmark' title='Oracle TNS Listener service not starting'>Oracle TNS Listener service not starting</a></li>
<li><a href='http://betweengo.com/2007/01/26/93/' rel='bookmark' title='Catching Oracle exceptions'>Catching Oracle exceptions</a></li>
<li><a href='http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/' rel='bookmark' title='How to Import and Create Users in Oracle'>How to Import and Create Users in Oracle</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/07/03/ora-12514-ora-27101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
