<?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>How To ... &#187; database</title>
	<atom:link href="http://howto.tawaret.com/c/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://howto.tawaret.com</link>
	<description></description>
	<lastBuildDate>Fri, 27 May 2011 08:53:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Flush the buffer cache in Oracle</title>
		<link>http://howto.tawaret.com/flush-the-buffer-cache-in-oracle/</link>
		<comments>http://howto.tawaret.com/flush-the-buffer-cache-in-oracle/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 10:01:15 +0000</pubDate>
		<dc:creator>pjdc</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://howto.tawaret.com/index.php/flush-the-buffer-cache-in-oracle/</guid>
		<description><![CDATA[Flush the buffer cache in [tag]Oracle[/tag]. This invalidates also the read cache, so the query performance results provides from the physical reads time. alter system flush buffer_cache; This command is not available prior to 10g. It flushes the buffer cache in the SGA.9i had an undocumented command to flush the buffer cache: alter session set [...]]]></description>
			<content:encoded><![CDATA[<p>Flush the buffer cache in [tag]Oracle[/tag]. This invalidates also the read cache, so the query performance results provides from the physical reads time.
<pre>alter system flush buffer_cache;</pre>
<p> This command is not available prior to 10g. It flushes the buffer cache in the SGA.<br />9i had an undocumented command to flush the buffer cache: 
<pre>alter session set events = 'immediate trace name flush_cache';</pre>
]]></content:encoded>
			<wfw:commentRss>http://howto.tawaret.com/flush-the-buffer-cache-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dump database schema to a file</title>
		<link>http://howto.tawaret.com/dump-database-schema-to-a-file/</link>
		<comments>http://howto.tawaret.com/dump-database-schema-to-a-file/#comments</comments>
		<pubDate>Tue, 30 Jan 2007 16:13:11 +0000</pubDate>
		<dc:creator>pjdc</dc:creator>
				<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://howto.tawaret.com/index.php/dump-database-schema-to-a-file/</guid>
		<description><![CDATA[export all oracle database to a dump file: $ORACLE_HOME/bin/exp / GRANTS=y ROWS=y FILE="exp.dmp exp_1.dmp" FILESIZE=1GB LOG=export.log OWNER="()"]]></description>
			<content:encoded><![CDATA[<p>export all oracle database to a dump file:</p>
<div align="left">
<pre lang="sql">$ORACLE_HOME/bin/exp / GRANTS=y ROWS=y FILE="exp.dmp exp_1.dmp" FILESIZE=1GB LOG=export.log OWNER="()"</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://howto.tawaret.com/dump-database-schema-to-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implement pagination with SQL Server 2005</title>
		<link>http://howto.tawaret.com/implement-pagination-with-sql-server-2005/</link>
		<comments>http://howto.tawaret.com/implement-pagination-with-sql-server-2005/#comments</comments>
		<pubDate>Tue, 09 Jan 2007 18:29:25 +0000</pubDate>
		<dc:creator>pjdc</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://howto.tawaret.com/index.php/implement-pagination-with-sql-server-2005/</guid>
		<description><![CDATA[With the new row_number() feature of the MS SQL Server 2005, now it&#8217;s very easy to implement pagination: get data rows page by page to avoid the retrieve too much data at same time. The new feature it&#8217;s very similar to the Oracle ROWUM. The prepare statement could be like the follow: SELECT * FROM [...]]]></description>
			<content:encoded><![CDATA[<p>With the new <strong>row_number() </strong>feature of the MS SQL Server 2005, now it&#8217;s very easy to implement pagination: get data rows page by page to avoid the retrieve too much data at same time. The new feature it&#8217;s very similar to the Oracle ROWUM.<br />
The prepare statement could be like the follow:</p>
<pre lang="sql">SELECT * FROM ( SELECT row_number() OVER (ORDER BY id) as resultNum, id FROM table_name) as numberResultsWHERE resultNum  BETWEEN ? AND ?</pre>
<p>More information <a href="http://www.webdevref.com/blog/index.cfm?t=Pagination_made_easier_with_SQL_Server_2005&#038;mode=entry&#038;entry=A8848275-10B7-AFAB-AE7A1058DEA7D968">here.</a></p>
<p>Technorati Tags: <a rel="tag" class="performancingtags" href="http://technorati.com/tag/SQL%20Server">SQL Server</a>, <a rel="tag" class="performancingtags" href="http://technorati.com/tag/row_number">row_number</a></p>
]]></content:encoded>
			<wfw:commentRss>http://howto.tawaret.com/implement-pagination-with-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Retrieving identity column values from MS SQL Server by JDBC</title>
		<link>http://howto.tawaret.com/retrieving-identity-column-values-from-ms-sql-server-by-jdbc/</link>
		<comments>http://howto.tawaret.com/retrieving-identity-column-values-from-ms-sql-server-by-jdbc/#comments</comments>
		<pubDate>Wed, 03 Jan 2007 18:43:46 +0000</pubDate>
		<dc:creator>pjdc</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://howto.tawaret.com/index.php/retrieving-identity-column-values-from-ms-sql-server-by-jdbc/</guid>
		<description><![CDATA[Retrieving identity column values in JDBC applications: You define an identity column in a CREATE TABLE by specifying the IDENTITY clause when you define a column. This feature is defined in the JDBC, and implmented in the MS Sql Server 2005, not in the older version. For Oracle database this is not implemented, but the [...]]]></description>
			<content:encoded><![CDATA[<h3 id="tjvjdidn"><strong>Retrieving identity column values in  JDBC applications:</strong></h3>
<p>You define an <span id="changed" />identity column in a CREATE TABLE  by specifying the <span id="changed" /> IDENTITY clause when you define a column.<br />
This feature is defined in the JDBC, and implmented in the MS Sql Server 2005, not in the older version. For Oracle database this is not implemented, but the common solution of the rownum can be used instead.</p>
<p>1.Set the prepared statement to get the identity column from DB:</p>
<pre lang="java">Connection.prepareStatement(sql-statement,
Statement.RETURN_GENERATED_KEYS);</pre>
<p>or</p>
<pre lang="java">Statement.executeUpdate(sql-statement, Statement.RETURN_GENERATED_KEYS);</pre>
<p>2. Get the generated values from the statement</p>
<pre lang="java">rs = stmt.getGeneratedKeys();
while (rs.next()) {
rs.getBigDecimal(1);
}</pre>
<p>Technorati Tags: <a rel="tag" class="performancingtags" href="http://technorati.com/tag/ms%20sql%20server">ms sql server</a>, <a rel="tag" class="performancingtags" href="http://technorati.com/tag/jdbc">jdbc</a>, <a rel="tag" class="performancingtags" href="http://technorati.com/tag/identity">identity</a></p>
]]></content:encoded>
			<wfw:commentRss>http://howto.tawaret.com/retrieving-identity-column-values-from-ms-sql-server-by-jdbc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

