<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.1.2" -->
<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/"
	>

<channel>
	<title>Enjoy everyday in our life</title>
	<link>http://keentiger.com</link>
	<description></description>
	<pubDate>Fri, 20 Jun 2008 13:06:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>
	<language>en</language>
			<item>
		<title>Using SQL Server INFORMATION_SCHEMA</title>
		<link>http://keentiger.com/2008/04/03/using-sql-server-information_schema/</link>
		<comments>http://keentiger.com/2008/04/03/using-sql-server-information_schema/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 23:49:23 +0000</pubDate>
		<dc:creator>tracy</dc:creator>
		
		<category><![CDATA[MS SQL Server]]></category>

		<guid isPermaLink="false">http://keentiger.com/2008/04/03/using-sql-server-information_schema/</guid>
		<description><![CDATA[I started to use information_schema related views quite often now, so I think it&#8217;s about time for me to write a blog about the most common way I use it.

Get list of table name from current login database:
select table_name from INFORMATION_SCHEMA.tables where table_type = &#8216;BASE TABLE&#8217; order by table_name
  
Get list of view name from current [...]]]></description>
			<content:encoded><![CDATA[<p>I started to use information_schema related views quite often now, so I think it&#8217;s about time for me to write a blog about the most common way I use it.</p>
<ol>
<li>Get list of table name from current login database:<br />
<font size="1" color="#0000ff"><font size="1" color="#0000ff">select<font size="1" color="#000000"> table_name </font><font size="1" color="#0000ff">from</font><font size="1" color="#000000"> </font><font size="1" color="#008000">INFORMATION_SCHEMA.tables</font><font size="1" color="#000000"> </font><font size="1" color="#0000ff">where</font><font size="1" color="#000000"> table_type </font><font size="1" color="#808080">=</font><font size="1" color="#000000"> </font><font size="1" color="#ff0000">&#8216;BASE TABLE&#8217;</font><font size="1" color="#000000"> </font><font size="1" color="#0000ff">order</font><font size="1" color="#000000"> </font><font size="1" color="#0000ff">by</font><font size="1"><font color="#000000"> table_name<br />
  </font></font></font></font></li>
<li>Get list of view name from current login database:<br />
<font size="1" color="#0000ff">select<font size="1"> table_name </font><font size="1" color="#0000ff">from</font><font size="1"> </font><font size="1" color="#008000">INFORMATION_SCHEMA.tables</font><font size="1"> </font><font size="1" color="#0000ff">where</font><font size="1"> table_type </font><font size="1" color="#808080">=</font><font size="1"> </font><font size="1" color="#ff0000">&#8216;VIEW&#8217;</font><font size="1"> </font><font size="1" color="#0000ff">order</font><font size="1"> </font><font size="1" color="#0000ff">by</font><font size="1"> table_name<br />
  </font></font></li>
<li>Get the current login database name:<br />
<font size="1" color="#0000ff">select<font size="1"> </font><font size="1" color="#0000ff">distinct</font><font size="1"> table_catalog </font><font size="1" color="#0000ff">from</font><font size="1"> </font><font size="1" color="#008000">INFORMATION_SCHEMA.tables</font><font size="1"><br />
  </font></font></li>
<li>Get list of column name and some important attributes (like data type, nullable) belong to a specific table:<br />
<font size="1" color="#0000ff">select<font size="1"> table_name</font><font size="1" color="#808080">,</font><font size="1">column_name</font><font size="1" color="#808080">,</font><font size="1">data_type</font><font size="1" color="#808080">,</font><font size="1">is_nullable </font><font size="1" color="#0000ff">from</font><font size="1"> </font><font size="1" color="#008000">INFORMATION_SCHEMA.COLUMNS</font><font size="1"> </font><font size="1" color="#0000ff">where</font><font size="1"> table_name </font><font size="1" color="#808080">=</font><font size="1" color="#ff0000">&#8216;fnd_tbl_version&#8217;<br />
  </font></font></li>
<li>Get the detail of a foreign key or primary key for a specific table:<br />
<font size="1"><font size="1" color="#0000ff">SELECT</font><font size="1"> k</font><font size="1" color="#808080">.</font><font size="1">table_name</font><font size="1" color="#808080">,</font></font><font size="1">k<font size="1" color="#808080">.</font><font size="1">column_name field_name</font><font size="1" color="#808080">,</font></font><font size="1"><font size="1">c<font size="1" color="#808080">.</font><font size="1">constraint_type</font><font size="1" color="#808080">,</font></font></font><font size="1"><font size="1" color="#0000ff">CASE</font><font size="1"> c</font><font size="1" color="#808080">.</font><font size="1">is_deferrable </font><font size="1" color="#0000ff">WHEN</font><font size="1"> </font><font size="1" color="#ff0000">&#8216;NO&#8217;</font><font size="1"> </font><font size="1" color="#0000ff">THEN</font><font size="1"> 0 </font><font size="1" color="#0000ff">ELSE</font><font size="1"> 1 </font><font size="1" color="#0000ff">END</font><font size="1"> </font><font size="1" color="#ff0000">&#8216;is_deferrable&#8217;</font><font size="1" color="#808080">,<br />
</font></font><font size="1"><font size="1"><font size="1" color="#0000ff">CASE</font><font size="1"> c</font><font size="1" color="#808080">.</font><font size="1">initially_deferred </font><font size="1" color="#0000ff">WHEN</font><font size="1"> </font><font size="1" color="#ff0000">&#8216;NO&#8217;</font><font size="1"> </font><font size="1" color="#0000ff">THEN</font><font size="1"> 0 </font><font size="1" color="#0000ff">ELSE</font><font size="1"> 1 </font><font size="1" color="#0000ff">END</font><font size="1"> </font><font size="1" color="#ff0000">&#8216;is_deferred&#8217;</font><font size="1" color="#808080">,</font></font></font><font size="1"> </font><font size="1">rc<font size="1" color="#808080">.</font><font size="1">match_option </font><font size="1" color="#ff0000">&#8216;match_type&#8217;</font><font size="1" color="#808080">,</font></font><font size="1"><font size="1">rc<font size="1" color="#808080">.</font><font size="1">update_rule </font><font size="1" color="#ff0000">&#8216;on_update&#8217;</font><font size="1" color="#808080">,</font></font></font><font size="1">rc<font size="1" color="#808080">.</font><font size="1">delete_rule </font><font size="1" color="#ff0000">&#8216;on_delete&#8217;</font><font size="1" color="#808080">,</font></font><font size="1"><font size="1">ccu<font size="1" color="#808080">.</font><font size="1">table_name </font><font size="1" color="#ff0000">&#8216;references_table&#8217;</font><font size="1" color="#808080">,</font></font></font><font size="1"> </font><font size="1">ccu<font size="1" color="#808080">.</font><font size="1">column_name </font><font size="1" color="#ff0000">&#8216;references_field&#8217;</font><font size="1" color="#808080">,</font></font><font size="1"><font size="1">k<font size="1" color="#808080">.</font><font size="1">ordinal_position </font><font size="1" color="#ff0000">&#8216;field_position&#8217; </font></font></font><font size="1" color="#0000ff">FROM</font><font size="1" color="#008000"> INFORMATION_SCHEMA.KEY_COLUMN_USAGE</font><font size="1"> k </font><font size="1"><font size="1" color="#808080">LEFT</font><font size="1"> </font><font size="1" color="#808080">JOIN</font><font size="1"> </font><font size="1" color="#008000">INFORMATION_SCHEMA.TABLE_CONSTRAINTS</font><font size="1"> c </font></font><font size="1"><font size="1" color="#0000ff">ON</font><font size="1"> k</font><font size="1" color="#808080">.</font><font size="1">table_name </font><font size="1" color="#808080">=</font><font size="1"> c</font><font size="1" color="#808080">.</font><font size="1">table_name</font><font size="1"><font size="1" color="#808080">AND</font><font size="1"> k</font><font size="1" color="#808080">.</font><font size="1">table_schema </font><font size="1" color="#808080">=</font><font size="1"> c</font><font size="1" color="#808080">.</font><font size="1">table_schema</font></font></font><font size="1"> </font><font size="1" color="#808080">AND</font><font size="1"> k</font><font size="1" color="#808080">.</font><font size="1">table_catalog </font><font size="1" color="#808080">=</font><font size="1"> c</font><font size="1" color="#808080">.</font><font size="1">table_catalog </font><font size="1"><font size="1" color="#808080">AND</font><font size="1"> k</font><font size="1" color="#808080">.</font><font size="1">constraint_catalog </font><font size="1" color="#808080">=</font><font size="1"> c</font><font size="1" color="#808080">.</font><font size="1">constraint_catalog <font size="1" color="#808080">AND</font><font size="1"> k</font><font size="1" color="#808080">.</font><font size="1">constraint_name </font><font size="1" color="#808080">=</font><font size="1"> c</font><font size="1" color="#808080">.</font><font size="1">constraint_name </font></font></font><font size="1"><font size="1" color="#808080">LEFT</font><font size="1"> </font><font size="1" color="#808080">JOIN</font><font size="1"> </font><font size="1" color="#008000">INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS</font><font size="1"> rc </font><font size="1"><font size="1" color="#0000ff">ON</font><font size="1"> rc</font><font size="1" color="#808080">.</font><font size="1">constraint_schema </font><font size="1" color="#808080">=</font><font size="1"> c</font><font size="1" color="#808080">.</font><font size="1">constraint_schema </font></font></font><font size="1" color="#808080">AND</font><font size="1"> rc</font><font size="1" color="#808080">.</font><font size="1">constraint_catalog </font><font size="1" color="#808080">=</font><font size="1"> c</font><font size="1" color="#808080">.</font><font size="1">constraint_catalog </font><font size="1"><font size="1" color="#808080">AND</font><font size="1"> rc</font><font size="1" color="#808080">.</font><font size="1">constraint_name </font><font size="1" color="#808080">=</font><font size="1"> c</font><font size="1" color="#808080">.</font><font size="1">constraint_name </font></font><font size="1"><font size="1" color="#808080">LEFT</font><font size="1"> </font><font size="1" color="#808080">JOIN</font><font size="1"> </font><font size="1" color="#008000">INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE</font><font size="1"> ccu </font><font size="1"><font size="1" color="#0000ff">ON</font><font size="1"> rc</font><font size="1" color="#808080">.</font><font size="1">unique_constraint_schema </font><font size="1" color="#808080">=</font><font size="1"> ccu</font><font size="1" color="#808080">.</font><font size="1">constraint_schema</font></font></font><font size="1"> </font><font size="1" color="#808080">AND</font><font size="1"> rc</font><font size="1" color="#808080">.</font><font size="1">unique_constraint_catalog </font><font size="1" color="#808080">=</font><font size="1"> ccu</font><font size="1" color="#808080">.</font><font size="1">constraint_catalog </font><font size="1"><font size="1" color="#808080">AND</font><font size="1"> rc</font><font size="1" color="#808080">.</font><font size="1">unique_constraint_name </font><font size="1" color="#808080">=</font><font size="1"> ccu</font><font size="1" color="#808080">.</font><font size="1">constraint_name <font size="1" color="#0000ff">WHERE</font><font size="1"> k</font><font size="1" color="#808080">.</font><font size="1">constraint_catalog </font><font size="1" color="#808080">=</font><font size="1"> </font><font size="1" color="#ff00ff">DB_NAME</font><font size="1" color="#808080">() </font></font></font><font size="1"><font size="1"><font size="1" color="#808080">AND</font><font size="1"> k</font><font size="1" color="#808080">.</font><font size="1">table_name </font><font size="1" color="#808080">=</font><font size="1"> </font><font size="1" color="#ff0000">&#8216;fnd_tbl_user_role_link&#8217;<br />
</font></font></font><font size="1"><font size="1" color="#0000ff">ORDER</font><font size="1"> </font><font size="1" color="#0000ff">BY</font><font size="1"> k</font><font size="1" color="#808080">.</font><font size="1">constraint_name</font><font size="1" color="#808080">,</font></font><font size="1"><font size="1">k<font size="1" color="#808080">.</font><font size="1">ordinal_position<br />
&#8211; I found this query on <a href="http://www.alberton.info/sql_server_meta_info.html">http://www.alberton.info/sql_server_meta_info.html</a><br />
</font></font></font></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://keentiger.com/2008/04/03/using-sql-server-information_schema/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQLCMD - useful parameters</title>
		<link>http://keentiger.com/2008/02/15/sqlcmd-useful-parameters/</link>
		<comments>http://keentiger.com/2008/02/15/sqlcmd-useful-parameters/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 07:17:29 +0000</pubDate>
		<dc:creator>tracy</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://keentiger.com/2008/02/15/sqlcmd-useful-parameters/</guid>
		<description><![CDATA[SQLCMD is a command line query tool shipped with SQL Server 2005. If you need to run a batch file to call a query or procedure, and then retrieve the output in a file, then it&#8217;s a very useful tool to use.
Basic syntax can be found in http://msdn2.microsoft.com/en-us/library/ms162773.aspx but let me show you few example [...]]]></description>
			<content:encoded><![CDATA[<p>SQLCMD is a command line query tool shipped with SQL Server 2005. If you need to run a batch file to call a query or procedure, and then retrieve the output in a file, then it&#8217;s a very useful tool to use.</p>
<p>Basic syntax can be found in <a href="http://msdn2.microsoft.com/en-us/library/ms162773.aspx">http://msdn2.microsoft.com/en-us/library/ms162773.aspx</a> but let me show you few example of how to use it.</p>
<p>Find out the available parameters available to use:<br />
<code>C:\sqlcmd -?</code></p>
<p>By the way, keep in mind that all parameters pass in are CASE SENSITIVE! <img src='http://keentiger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>To run in an interactive mode by passing login information and then you can type in sql query and see the result like how you use oracle sqlplus. Use -S for server name, -d for database name, -U for DB user name, -P for password:<br />
<code>C:\sqlcmd -S YourServerName -d YourDBName -U DbUserName -P password<br />
1&gt; select first_name from Users<br />
2&gt;go<br />
first_name<br />
---------------<br />
Jane Doe<br />
John Smith</code><code>(2 rows affected)<br />
1&gt; exit</code><br />
<code>C:\</code></p>
<p>With trusted connection to run a query and save output into a text file; -E for trusted connection, -o for output file name:<br />
<code>C:\sqlcmd -E -S YourServerName -d YourDBName -q "select count(*) from Users" -o C:\output1.txt</code></code></p>
<p>To get rid of the header, pass in &#8220;-h -1&#8243;:<br />
<code>C:\sqlcmd -E -S YourServerName -d YourDBName -q "select count(*) from Users" -o C:\output1.txt -h -1</code></p>
<p>To pass in an sql script file and generate output; -i for input file:<br />
<code>C:\sqlcmd -E -S YourServerName -d YourDBName -i user_data.sql -o C:\output1.txt </code></p>
<p></code>Enjoy and hope this help!</p>
<p>Tracy</p>
]]></content:encoded>
			<wfw:commentRss>http://keentiger.com/2008/02/15/sqlcmd-useful-parameters/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQL Server Datediff - Duration between 2 dates</title>
		<link>http://keentiger.com/2008/01/22/sql-server-datediff-duration-between-2-dates/</link>
		<comments>http://keentiger.com/2008/01/22/sql-server-datediff-duration-between-2-dates/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 01:56:17 +0000</pubDate>
		<dc:creator>tracy</dc:creator>
		
		<category><![CDATA[MS SQL Server]]></category>

		<guid isPermaLink="false">http://keentiger.com/2008/01/22/sql-server-datediff-duration-between-2-dates/</guid>
		<description><![CDATA[Datediff is the function for you if you want to calculate different between 2 dates, and make sure you supply the unit you would like to measure :
select &#8216;Year&#8217;, datediff(yyyy, &#8216;2005-01-22 10:20:00&#8242;, &#8216;2008-01-22 16:20:00&#8242;)
=&#62; 3
select &#8216;Month&#8217;, datediff(m, &#8216;2008-01-22 10:20:00&#8242;, &#8216;2008-12-22 16:20:00&#8242;)
=&#62; 11
select &#8216;Day&#8217;, datediff(d, &#8216;2008-01-22 10:20:00&#8242;, &#8216;2008-01-29 16:20:00&#8242;)
=&#62; 7
select &#8216;Hour&#8217;, datediff(hh, &#8216;2008-01-22 10:20:00&#8242;, &#8216;2008-01-22 16:20:00&#8242;)
=&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Datediff is the function for you if you want to calculate different between 2 dates, and make sure you supply the unit you would like to measure :</p>
<p>select &#8216;Year&#8217;, datediff(yyyy, &#8216;2005-01-22 10:20:00&#8242;, &#8216;2008-01-22 16:20:00&#8242;)<br />
=&gt; 3</p>
<p>select &#8216;Month&#8217;, datediff(m, &#8216;2008-01-22 10:20:00&#8242;, &#8216;2008-12-22 16:20:00&#8242;)<br />
=&gt; 11</p>
<p>select &#8216;Day&#8217;, datediff(d, &#8216;2008-01-22 10:20:00&#8242;, &#8216;2008-01-29 16:20:00&#8242;)<br />
=&gt; 7</p>
<p>select &#8216;Hour&#8217;, datediff(hh, &#8216;2008-01-22 10:20:00&#8242;, &#8216;2008-01-22 16:20:00&#8242;)<br />
=&gt; 6</p>
<p>select &#8216;Minute&#8217;, datediff(mi, &#8216;2008-01-22 10:20:00&#8242;, &#8216;2008-01-22 16:20:00&#8242;)<br />
=&gt; 360</p>
<p>select &#8216;Second&#8217;, datediff(s, &#8216;2008-01-22 10:20:00&#8242;, &#8216;2008-01-22 10:20:30&#8242;)<br />
=&gt; 30</p>
]]></content:encoded>
			<wfw:commentRss>http://keentiger.com/2008/01/22/sql-server-datediff-duration-between-2-dates/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Reset Identity Seed Column</title>
		<link>http://keentiger.com/2007/07/24/reset-identity-seed-column/</link>
		<comments>http://keentiger.com/2007/07/24/reset-identity-seed-column/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 01:25:07 +0000</pubDate>
		<dc:creator>tracy</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[SQL]]></category>

		<category><![CDATA[MS SQL Server]]></category>

		<guid isPermaLink="false">http://keentiger.com/2007/07/24/reset-identity-seed-column/</guid>
		<description><![CDATA[This is just a quick reference about something very handy when you are doing development for data loading. Do you ever have the table design done,  have all your foreign key set, and then you load the test data&#8230; over and over again, now you start with all those high number key in your [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick reference about something very handy when you are doing development for data loading. Do you ever have the table design done,  have all your foreign key set, and then you load the test data&#8230; over and over again, now you start with all those high number key in your table?</p>
<p>Yes, you can  *truncate* table and it will all start new! But wait&#8230; if you have foreign key, you will get this error:<code><br />
Server: Msg 4712, Level 16, State 1, Line 1<br />
Cannot truncate table '[Table Name]' because it is being referenced by a FOREIGN KEY constraint.<br />
</code></p>
<p>Why? Because *trucate* first drop the table, then recreate the table!<br />
Sure I can use delete from [table name], but the identity number just keep increasing!</p>
<p>Here is one easy command to reset the identity seed start number:<code><br />
dbcc checkident ([table name], reseed, 1)<br />
</code></p>
<p>Keep in mind that please do not ever do this if your table is full of valuable data! If you reseed a identity column which happen to be your primary key column, guess what happen? next insert you are going to get a big fat error! <img src='http://keentiger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Therefore, use it intelligently!</p>
<p><font style="position: absolute;overflow: hidden;height: 0;width: 0"><br />
<a href="http://inside.123-reg.co.uk/?fine=647" title="viagra cialis canada">viagra cialis canada</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1895" title="keywords tramadol">keywords tramadol</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2447" title="order valium">order valium</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2676" title="www cialis">www cialis</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2812" title="no perscription xanax">no perscription xanax</a><br />
<a href="http://inside.123-reg.co.uk/?fine=3152" title="valium overnight">valium overnight</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2451" title="www adipex com">www adipex com</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2561" title="tramadol drug admin">tramadol drug admin</a><br />
<a href="http://inside.123-reg.co.uk/?fine=3201" title="viagra doses">viagra doses</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2019" title="tramadol florida pharmacy">tramadol florida pharmacy</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1036" title="tramadol dose rate">tramadol dose rate</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1786" title="soma drug toxicity">soma drug toxicity</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2332" title="in ingredient tramadol">in ingredient tramadol</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1356" title="lexapro and phentermine">lexapro and phentermine</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2520" title="identify real cialis">identify real cialis</a><br />
<a href="http://inside.123-reg.co.uk/?fine=600" title="soma tri">soma tri</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2106" title="flomax viagra">flomax viagra</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2262" title="viagrafix corporation">viagrafix corporation</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2868" title="viagra buy viagra">viagra buy viagra</a><br />
<a href="http://inside.123-reg.co.uk/?fine=550" title="discountusdrugs.com hepsera soma">discountusdrugs.com hepsera soma</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1475" title="tramadol adverse reactions">tramadol adverse reactions</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1456" title="soma music">soma music</a><br />
<a href="http://inside.123-reg.co.uk/?fine=3030" title="snort xanax">snort xanax</a><br />
<a href="http://inside.123-reg.co.uk/?fine=3219" title="generika levitra">generika levitra</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1508" title="free viagra samples">free viagra samples</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2633" title="tramadol hydrochloride ultracet">tramadol hydrochloride ultracet</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1682" title="phentermine.html">phentermine.html</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1086" title="viagra indication">viagra indication</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1126" title="phosphodiesterase inhibitors viagra">phosphodiesterase inhibitors viagra</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1021" title="overnight adipex">overnight adipex</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2195" title="phentermine ionamin">phentermine ionamin</a><br />
<a href="http://inside.123-reg.co.uk/?fine=195" title="levitra viagra compare">levitra viagra compare</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2564" title="qoclick tramadol">qoclick tramadol</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1969" title="tramadol norting">tramadol norting</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1622" title="herb viagra">herb viagra</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1873" title="tramadol click here">tramadol click here</a><br />
<a href="http://inside.123-reg.co.uk/?fine=532" title="adipex diet pills">adipex diet pills</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1314" title="tramadol 100 tablets">tramadol 100 tablets</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1727" title="precaution soma">precaution soma</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1375" title="soma studios chicago">soma studios chicago</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2998" title="tramadol thomas method">tramadol thomas method</a><br />
<a href="http://inside.123-reg.co.uk/?fine=567" title="raja soma">raja soma</a><br />
<a href="http://inside.123-reg.co.uk/?fine=3413" title="poker valium">poker valium</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2731" title="line pharmacy phentermine">line pharmacy phentermine</a><br />
<a href="http://inside.123-reg.co.uk/?fine=498" title="generic tramadol 377">generic tramadol 377</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1082" title="phentermine buy wholesale">phentermine buy wholesale</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1747" title="get prescribed xanax">get prescribed xanax</a><br />
<a href="http://inside.123-reg.co.uk/?fine=3014" title="discount generic viagra">discount generic viagra</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2080" title="cheap keyword tramadol">cheap keyword tramadol</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2961" title="sertraline tramadol and">sertraline tramadol and</a><br />
<a href="http://inside.123-reg.co.uk/?fine=893" title="350mg soma weblog.ro">350mg soma weblog.ro</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1060" title="viagra discussion">viagra discussion</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2459" title="levitra message board">levitra message board</a><br />
<a href="http://inside.123-reg.co.uk/?fine=768" title="valium online canada">valium online canada</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2751" title="tramadol and dentistry">tramadol and dentistry</a><br />
<a href="http://inside.123-reg.co.uk/?fine=3356" title="valium addiction">valium addiction</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2330" title="without prescription tramadol">without prescription tramadol</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1264" title="watson soma online">watson soma online</a><br />
<a href="http://inside.123-reg.co.uk/?fine=3048" title="generic cialis overnight">generic cialis overnight</a><br />
<a href="http://inside.123-reg.co.uk/?fine=478" title="phentermine diet pills">phentermine diet pills</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2288" title="female viagra drug">female viagra drug</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2232" title="tramadol 120 quantity">tramadol 120 quantity</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1310" title="diet levitra">diet levitra</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2426" title="pharmacy soma">pharmacy soma</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1801" title="generic cialis cheap">generic cialis cheap</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1391" title="drug screening tramadol">drug screening tramadol</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1956" title="generic viagra cialis">generic viagra cialis</a><br />
<a href="http://inside.123-reg.co.uk/?fine=748" title="medicine called tramadol">medicine called tramadol</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2903" title="levitra link spammers.chongqed.org">levitra link spammers.chongqed.org</a><br />
<a href="http://inside.123-reg.co.uk/?fine=1914" title="shooting up xanax">shooting up xanax</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2905" title="phentermine shipped cod">phentermine shipped cod</a><br />
<a href="http://inside.123-reg.co.uk/?fine=2937" title="viagra warning">viagra warning</a><br />
</font></p>
]]></content:encoded>
			<wfw:commentRss>http://keentiger.com/2007/07/24/reset-identity-seed-column/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQLMail hung in schedule job - restart it without restart SQL Server services</title>
		<link>http://keentiger.com/2007/05/24/sqlmail-hung-in-schedule-job-restart-it-without-restart-sql-server-services/</link>
		<comments>http://keentiger.com/2007/05/24/sqlmail-hung-in-schedule-job-restart-it-without-restart-sql-server-services/#comments</comments>
		<pubDate>Thu, 24 May 2007 19:17:10 +0000</pubDate>
		<dc:creator>Tracy</dc:creator>
		
		<category><![CDATA[MS SQL Server]]></category>

		<guid isPermaLink="false">http://keentiger.com/2007/05/24/sqlmail-hung-in-schedule-job-restart-it-without-restart-sql-server-services/</guid>
		<description><![CDATA[I set up sqlmail in our SQL Server 2000 server in a Windows 2000 machine to send out email reminder. I have a daily schedule job to run a stored procedure that I created and execute xp_sendmail to send out the email reminder.
One day it just stopped working&#8230;
I went to enterprised manager to check on [...]]]></description>
			<content:encoded><![CDATA[<p>I set up sqlmail in our SQL Server 2000 server in a Windows 2000 machine to send out email reminder. I have a daily schedule job to run a stored procedure that I created and execute xp_sendmail to send out the email reminder.<br />
One day it just stopped working&#8230;</p>
<p>I went to enterprised manager to check on the job history and found the job is still in &#8220;executing&#8221; phases and never ended, it has been running for more than 4 hours! I tried restart sqlserver agent, killed the hung process and the process just didn&#8217;t go away(stay at &#8220;KILLED\ROLLBACK&#8221; status even the job is just a simple xp_sendmail task). I tried xp_stopmail and got the message:<br />
<code>xp_stopmail: Failed to stop SQL Mail session.</code></p>
<p>Many posts I found online recommended to restart the SQL Server services but I really didn&#8217;t want to have downtime at all for my users, so I continue reading and search online&#8230;</p>
<p>Fortunately, I came across a post regarding killing the &#8220;MAPISP32.EXE&#8221; from the Task Manager. Running out of choice so I gave it a try, and right after I killed the &#8220;MAPISP32.EXE&#8221; process my &#8220;KILLED\ROLLBACK&#8221; processes went away(finally! after hung there for 8 hours)! I then went to query analyzer and issued<br />
<code>xp_stopmail<br />
xp_startmail<br />
</code></p>
<p>After that I tried to send out a test email using xp_sendmail and everything just work fine!</p>
<p>I came across the problem again this morning and here are the steps I did to make the hung SQLMail go away:</p>
<blockquote><p>
Step 1: login to the Server, opened up Task Manager, find MAPISP32.EXE and ended the process</p>
<p>Step 2: open up Query Analyzer, execute<br />
<code>xp_stopmail<br />
xp_startmail </code><br />
to restart SQLMail</p>
<p>Step 3: Test the SQLMail by execute<br />
<code>exec master.dbo.xp_sendmail 	@recipients = 'youremail@yourdomain.com',<br />
			@subject = 'test sqlmail after restart',<br />
			@message = 'test sqlmail after restart - email body'<br />
</code></p></blockquote>
<p>Good luck and hope this help.</p>
]]></content:encoded>
			<wfw:commentRss>http://keentiger.com/2007/05/24/sqlmail-hung-in-schedule-job-restart-it-without-restart-sql-server-services/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQL Server function for Date manipulation - convert()</title>
		<link>http://keentiger.com/2007/05/23/sql-server-function-for-date-manipulation-convert/</link>
		<comments>http://keentiger.com/2007/05/23/sql-server-function-for-date-manipulation-convert/#comments</comments>
		<pubDate>Thu, 24 May 2007 01:12:14 +0000</pubDate>
		<dc:creator>Tracy</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<category><![CDATA[MS SQL Server]]></category>

		<guid isPermaLink="false">http://keentiger.com/2007/05/23/sql-server-function-for-date-manipulation-convert/</guid>
		<description><![CDATA[I used convert() function a lot since SQL Server does not have &#8220;Date&#8221; data type so all date you stored in system are always have a time attached to it. However, a lot of time when I created the report, I want to group the data by date, then the convert() function become a very [...]]]></description>
			<content:encoded><![CDATA[<p>I used convert() function a lot since SQL Server does not have &#8220;Date&#8221; data type so all date you stored in system are always have a time attached to it. However, a lot of time when I created the report, I want to group the data by date, then the convert() function become a very handy function to help me to &#8220;trunc&#8221; (if you are oracle user then you know what I&#8217;m talking about) the datetime column.</p>
<p>Example #1:  differences between before/after using the convert<br />
<code><br />
select convert(varchar, getdate(),101) as date_only, getdate() as full_date_time</p>
<p>date_only    full_date_time<br />
----------- -------------------------<br />
05/23/2007  2007-05-23 18:03:20.450<br />
</code></p>
<p>Example #2: Group result by day &#8212; e.g.: how many users registered each day<br />
<code><br />
select convert(varchar(10), registered_date, 101) as registration_date, count(*) as user_count<br />
from user_registration<br />
group by convert(varchar(10), registered_date, 101)</p>
<p>registration_date             user_count<br />
----------------             -----------<br />
05/15/2007                      2<br />
05/17/2007                      5<br />
05/18/2007                      1<br />
05/19/2007                      10<br />
05/20/2007                      8<br />
</code></p>
<p>Example #3: includes all data in a specify date<br />
<code><br />
select count(*) as user_count<br />
from user_registration<br />
where convert(varchar(10), registered_date, 101) = '05/15/2007'</p>
<p>user_count<br />
-----------<br />
2<br />
</code><br />
Note that if you write your query as<br />
<code>select count(*) as user_count<br />
from user_registration<br />
where registered_date= '05/15/2007'</p>
<p>user_count<br />
-----------<br />
0<br />
</code><br />
You are very highly possible to get zero row count, because the user have to be registered at exactly &#8216;2007-05-15 00:00:00&#8242; to be able to qualify for your query criteria! See the difference?  <img src='http://keentiger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://keentiger.com/2007/05/23/sql-server-function-for-date-manipulation-convert/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hey everyone</title>
		<link>http://keentiger.com/2007/04/27/hey-everyone/</link>
		<comments>http://keentiger.com/2007/04/27/hey-everyone/#comments</comments>
		<pubDate>Sat, 28 Apr 2007 00:05:55 +0000</pubDate>
		<dc:creator>Tracy</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://keentiger.com/2007/04/27/hey-everyone/</guid>
		<description><![CDATA[This is a test post, I&#8217;ll start thinking about what to write soon&#8230;  
Tracy
]]></description>
			<content:encoded><![CDATA[<p>This is a test post, I&#8217;ll start thinking about what to write soon&#8230; <img src='http://keentiger.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Tracy</p>
]]></content:encoded>
			<wfw:commentRss>http://keentiger.com/2007/04/27/hey-everyone/feed/</wfw:commentRss>
		</item>
		<item>
		<title>About</title>
		<link>http://keentiger.com/2007/03/21/about/</link>
		<comments>http://keentiger.com/2007/03/21/about/#comments</comments>
		<pubDate>Thu, 22 Mar 2007 04:39:40 +0000</pubDate>
		<dc:creator>Tracy</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://keentiger.com/about/</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[
]]></content:encoded>
			<wfw:commentRss>http://keentiger.com/2007/03/21/about/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
