<?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>SQL and PLSQL &#187; Tablespaces</title>
	<atom:link href="http://plsql.globinch.com/category/tablespaces/feed/" rel="self" type="application/rss+xml" />
	<link>http://plsql.globinch.com</link>
	<description>SQL and PLSQL Technology Tips</description>
	<lastBuildDate>Thu, 07 Apr 2011 17:04:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Oracle Tablespace, and Datafiles &#8211; Introduction</title>
		<link>http://plsql.globinch.com/2008/10/31/oracle-tablespace-and-datafiles-introduction/</link>
		<comments>http://plsql.globinch.com/2008/10/31/oracle-tablespace-and-datafiles-introduction/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 10:38:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tablespaces]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=10</guid>
		<description><![CDATA[The data in oracle is stored logically in tablespaces and physically in datafiles.
Tablespaces collectively store all of the database's data.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "Oracle Tablespace, and Datafiles &#8211; Introduction";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2008/10/31/oracle-tablespace-and-datafiles-introduction/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2008%2F10%2F31%2Foracle-tablespace-and-datafiles-introduction%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2008%2F10%2F31%2Foracle-tablespace-and-datafiles-introduction%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>The data in oracle is stored logically in <span style="font-weight: bold; color: #009900;">tablespaces </span>and physically in <span style="font-weight: bold; color: #33cc00;">datafiles</span>.<br />
<span style="font-weight: bold;">Tablespaces </span>collectively store all of the database&#8217;s data.<br />
Each <span style="font-weight: bold;">tablespace </span>in an Oracle database consists of one or more files called <span style="font-weight: bold;">datafiles</span>.<span style="font-weight: bold;"> Datafiles </span>conform to the operating system in which Oracle is running.<span class="fullpost"><br />
The size of a database is the collective size of the <span style="font-weight: bold;">tablespaces </span>included in that database.</span></p>
<p><span style="font-weight: bold; color: #cc0000;">Types of tablespaces:</span><br />
<span style="font-weight: bold;">1. </span>A <span style="font-weight: bold;">permanent tablespace</span> contains persistent schema objects which are stored in datafiles.<br />
<span style="font-weight: bold;">2.</span> An <span style="font-weight: bold;">undo tablespace</span> is a type of permanent tablespace used by Oracle Database to manage undo data if the database in automatic undo management mode.<br />
<span style="font-weight: bold;">3. </span>A <span style="font-weight: bold;">temporary tablespace</span> contains schema objects only for the duration of a session.</p>
<p><span style="font-weight: bold;">Creating Basic Tablespaces:</span></p>
<p>Developer can use <span style="font-style: italic; color: #6600cc;">CREATE TABLESPACE</span> statement to create a tablespace.</p>
<p>The following statement creates a tablespace named &#8216;mytabspace&#8217; with one datafile:</p>
<pre class="brush: css;">
CREATE TABLESPACE mytabspace1 DATAFILE 'mytabspace_1.dat' SIZE 40M  ONLINE;
</pre>
<p><span style="font-weight: bold;">Enabling Autoextend to increase size of datafiles for a Tablespace:</span><br />
When more space is required, 900 kilobyte extents will be added up to a maximum size of 200 megabytes</p>
<pre class="brush: css;">
CREATE TABLESPACE mytabspace2   DATAFILE 'mytabspace12_1.dat'
SIZE 900K REUSE  AUTOEXTEND ON NEXT 900K MAXSIZE 200M;
</pre>
<p><span style="font-weight: bold;">Creating a Temporary Tablespace: </span></p>
<p>This following statement creates temporary tablespace.</p>
<pre class="brush: css;">
CREATE TEMPORARY TABLESPACE temptbspace TEMPFILE 'temptbspace.dbf' SIZE 5M AUTOEXTEND ON;
</pre>
<p><span style="font-weight: bold; font-style: italic; color: #3333ff;">Also Read,</span></p>
<ul class="posts">
<li><a href="http://plsql.globinch.com/2008/10/28/formatting-date-in-sql-oracle-simple-date-formatting/">Formatting date in SQL (Oracle) -Simple date forma&#8230;</a></li>
<li><a href="http://plsql.globinch.com/2008/10/28/finding-database-objects-finding-valid-and-invalid-objects-and-finding-object-counts-sql-tips/">FINDING database objects, finding valid and INVALI&#8230;</a></li>
<li><a href="http://plsql.globinch.com/2007/06/05/oracle-data-types/">Oracle  Data types</a></li>
<li><a href="http://plsql.globinch.com/category/plsql-fundamentals/">PL/SQL Fundamentals</a></li>
</ul>
<p>_______________________________________________________________________________</p>
<p style="text-align: right; font-size: 9px;">Technorati Tags:<br />
<a title="Link to Technorati Tag category for CREATE TABLESPACE" rel="tag" href="http://www.technorati.com/tag/CREATE+TABLESPACE" target="_blank">CREATE TABLESPACE</a>, <a title="Link to Technorati Tag category for Tablespace" rel="tag" href="http://www.technorati.com/tag/Tablespace" target="_blank">Tablespace</a>, <a title="Link to Technorati Tag category for Datafiles" rel="tag" href="http://www.technorati.com/tag/Datafiles" target="_blank">Datafiles</a>, <a title="Link to Technorati Tag category for AUTOEXTEND" rel="tag" href="http://www.technorati.com/tag/AUTOEXTEND" target="_blank">AUTOEXTEND</a>, <a title="Link to Technorati Tag category for TEMPORARY TABLESPACE" rel="tag" href="http://www.technorati.com/tag/TEMPORARY+TABLESPACE" target="_blank">TEMPORARY TABLESPACE</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2008/10/31/oracle-tablespace-and-datafiles-introduction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

