<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Simon&#039;s SQL</title>
	<atom:link href="http://simonsql.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://simonsql.com</link>
	<description>SQL,DBA,tuning,Trouble Shooting,Performance</description>
	<lastBuildDate>Tue, 21 May 2013 16:50:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='simonsql.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Simon&#039;s SQL</title>
		<link>http://simonsql.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://simonsql.com/osd.xml" title="Simon&#039;s SQL" />
	<atom:link rel='hub' href='http://simonsql.com/?pushpress=hub'/>
		<item>
		<title>Excel import using XML and T-SQL</title>
		<link>http://simonsql.com/2013/05/08/excel-import-using-xml-and-t-sql/</link>
		<comments>http://simonsql.com/2013/05/08/excel-import-using-xml-and-t-sql/#comments</comments>
		<pubDate>Wed, 08 May 2013 18:13:49 +0000</pubDate>
		<dc:creator>Simon Cho</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Excel import]]></category>
		<category><![CDATA[SQL Excel Import]]></category>

		<guid isPermaLink="false">http://simonsql.com/?p=366</guid>
		<description><![CDATA[http://www.sqlservercentral.com/articles/ETL/69339/ Filed under: Common Tagged: Excel import, SQL Excel Import<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=366&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<pre><a href="http://www.sqlservercentral.com/articles/ETL/69339/">http://www.sqlservercentral.com/articles/ETL/69339/</a></pre>
<br />Filed under: <a href='http://simonsql.com/category/common/'>Common</a> Tagged: <a href='http://simonsql.com/tag/excel-import/'>Excel import</a>, <a href='http://simonsql.com/tag/sql-excel-import/'>SQL Excel Import</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simonsql.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simonsql.wordpress.com/366/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=366&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://simonsql.com/2013/05/08/excel-import-using-xml-and-t-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/54205a299e4ad6fb188a599c2da8bca3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simonsql</media:title>
		</media:content>
	</item>
		<item>
		<title>TempDB Misconceptions around TF 1118</title>
		<link>http://simonsql.com/2013/03/12/tempdb-misconceptions-around-tf-1118/</link>
		<comments>http://simonsql.com/2013/03/12/tempdb-misconceptions-around-tf-1118/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 17:36:53 +0000</pubDate>
		<dc:creator>Simon Cho</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[T1118]]></category>
		<category><![CDATA[TempDB]]></category>
		<category><![CDATA[TF1118]]></category>

		<guid isPermaLink="false">http://simonsql.com/?p=359</guid>
		<description><![CDATA[http://www.sqlskills.com/blogs/paul/misconceptions-around-tf-1118/ [Edit 2012:] 4a) What is Paul&#8217;s recommendation for using trace flag 1118? Everyone should turn it on, on all instances of SQL Server, from SQL Server 2000 onwards. There&#8217;s no down-side to having it turned on. http://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-1230-tempdb-should-always-have-one-data-file-per-processor-core/ But there’s now even better guidance, and what I also recommend. At PASS in 2011, my good [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=359&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.sqlskills.com/blogs/paul/misconceptions-around-tf-1118/">http://www.sqlskills.com/blogs/paul/misconceptions-around-tf-1118/</a></p>
<p><strong>[Edit 2012:] 4a) What is Paul&#8217;s recommendation for using trace flag 1118? </strong>Everyone should turn it on, on all instances of SQL Server, from SQL Server 2000 onwards. There&#8217;s no down-side to having it turned on.</p>
<p><a href="http://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-1230-tempdb-should-always-have-one-data-file-per-processor-core/">http://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-1230-tempdb-should-always-have-one-data-file-per-processor-core/</a></p>
<p>But there’s now even better guidance, and what I also recommend. At PASS in 2011, my good friend Bob Ward, who’s the top guy in SQL Product Support, espoused a new formula: if you have less than 8 cores, use #files = #cores. If you have more than 8 cores, use 8 files and if you’re seeing in-memory contention, add 4 more files at a time.</p>
<p><a href="http://technet.microsoft.com/library/Cc966545">http://technet.microsoft.com/library/Cc966545</a></p>
<p>Use TF-1118. Under this trace flag SQL Server allocates full extents to each <strong>tempdb</strong> object, thereby eliminating the contention on SGAM page. This is done at the expense of some waste of disk space in <strong>tempdb</strong>. This trace flag has been available since SQL Server 2000. With improvements in <strong>tempdb</strong> object caching in SQL Server 2005, there should be significantly less contention in allocation structures. If you see contention in SGAM pages, you may want to use this trace flag. Cached <strong>tempdb</strong> objects may not always be available. For example, cached <strong>tempdb</strong> objects are destroyed when the query plan with which they are associated is recompiled or removed from the procedure cache.</p>
<br />Filed under: <a href='http://simonsql.com/category/common/'>Common</a> Tagged: <a href='http://simonsql.com/tag/t1118/'>T1118</a>, <a href='http://simonsql.com/tag/tempdb/'>TempDB</a>, <a href='http://simonsql.com/tag/tf1118/'>TF1118</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simonsql.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simonsql.wordpress.com/359/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=359&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://simonsql.com/2013/03/12/tempdb-misconceptions-around-tf-1118/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/54205a299e4ad6fb188a599c2da8bca3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simonsql</media:title>
		</media:content>
	</item>
		<item>
		<title>Bulk load data conversion error (overflow) SQLINT (BCP)</title>
		<link>http://simonsql.com/2013/03/07/bulk-load-data-conversion-error-overflow-sqlint-bcp/</link>
		<comments>http://simonsql.com/2013/03/07/bulk-load-data-conversion-error-overflow-sqlint-bcp/#comments</comments>
		<pubDate>Thu, 07 Mar 2013 19:57:30 +0000</pubDate>
		<dc:creator>Simon Cho</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[BCP]]></category>
		<category><![CDATA[Bulk]]></category>
		<category><![CDATA[Bulk Insert]]></category>

		<guid isPermaLink="false">http://simonsql.com/?p=356</guid>
		<description><![CDATA[http://msdn.microsoft.com/en-us/library/ms189110%28v=sql.90%29.aspx Only SQLCHAR is allowed for fmt files if the file storage type is Char. &#160; &#160; 1 Data files that are stored in character format use char as the file storage type. Therefore, for character data files, SQLCHAR is the only data type that appears in a format file. 2 You cannot bulk import [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=356&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/ms189110%28v=sql.90%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms189110%28v=sql.90%29.aspx</a></p>
<p>Only SQLCHAR is allowed for fmt files if the file storage type is Char.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>1 Data files that are stored in character format use <strong>char</strong> as the file storage type. Therefore, for character data files, <span style="color:#ff0000;">SQLCHAR is the only data type that appears in a format file.</span></p>
<p>2 You cannot bulk import data into <strong>text</strong>, <strong>ntext</strong>, and <strong>image</strong> columns that have DEFAULT values.</p>
<div>
<div><a title="Collapse">Additional Considerations for File Storage Types</a></p>
<div>
<hr />
</div>
</div>
</div>
<p>When you bulk export data from an instance of SQL Server to a data file:</p>
<ul>
<li>You can always specify <strong>char</strong> as the file storage type.</li>
<li>If you enter a file storage type that represents an invalid implicit conversion, <strong>bcp</strong> fails; for example, though you can specify <strong>int</strong> for <strong>smallint</strong> data, if you specify <strong>smallint</strong> for <strong>int</strong> data, <span style="color:#ff0000;">overflow errors result.</span></li>
<li>When noncharacter data types such as <strong>float</strong>, <strong>money</strong>, <strong>datetime</strong>, or <strong>int</strong> are stored as their database types, the data is written to the data file in the SQL Server native format.</li>
</ul>
<br />Filed under: <a href='http://simonsql.com/category/common/'>Common</a> Tagged: <a href='http://simonsql.com/tag/bcp/'>BCP</a>, <a href='http://simonsql.com/tag/bulk/'>Bulk</a>, <a href='http://simonsql.com/tag/bulk-insert/'>Bulk Insert</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simonsql.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simonsql.wordpress.com/356/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=356&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://simonsql.com/2013/03/07/bulk-load-data-conversion-error-overflow-sqlint-bcp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/54205a299e4ad6fb188a599c2da8bca3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simonsql</media:title>
		</media:content>
	</item>
		<item>
		<title>Paging file for SQL server</title>
		<link>http://simonsql.com/2013/02/27/paging-file-for-sql-server/</link>
		<comments>http://simonsql.com/2013/02/27/paging-file-for-sql-server/#comments</comments>
		<pubDate>Thu, 28 Feb 2013 00:32:37 +0000</pubDate>
		<dc:creator>Simon Cho</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Paging File]]></category>
		<category><![CDATA[Paging file for SQL server]]></category>

		<guid isPermaLink="false">http://simonsql.com/?p=351</guid>
		<description><![CDATA[Please don&#8217;t put 1.5 time of Physical memory. Less amount is better for SQL server if you have a x64 machine and enough physical memory. http://support.microsoft.com/kb/889654/en-us http://blogs.msdn.com/b/buckwoody/archive/2010/06/29/the-windows-page-file-and-sql-server.aspx http://www.brentozar.com/archive/2009/11/christian-bolton-on-sql-server-memory/ http://blogs.technet.com/b/askperf/archive/2007/12/14/what-is-the-page-file-for-anyway.aspx http://www.brentozar.com/archive/2008/03/sql-server-2005-setup-checklist-part-1-before-the-install/ &#160; Filed under: Common Tagged: Paging File, Paging file for SQL server<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=351&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Please don&#8217;t put 1.5 time of Physical memory.</p>
<p>Less amount is better for SQL server if you have a x64 machine and enough physical memory.</p>
<p><a href="http://support.microsoft.com/kb/889654/en-us" rel="nofollow">http://support.microsoft.com/kb/889654/en-us</a></p>
<p><a href="http://blogs.msdn.com/b/buckwoody/archive/2010/06/29/the-windows-page-file-and-sql-server.aspx" rel="nofollow">http://blogs.msdn.com/b/buckwoody/archive/2010/06/29/the-windows-page-file-and-sql-server.aspx</a></p>
<p><a href="http://www.brentozar.com/archive/2009/11/christian-bolton-on-sql-server-memory/" rel="nofollow">http://www.brentozar.com/archive/2009/11/christian-bolton-on-sql-server-memory/</a></p>
<p><a href="http://blogs.technet.com/b/askperf/archive/2007/12/14/what-is-the-page-file-for-anyway.aspx" rel="nofollow">http://blogs.technet.com/b/askperf/archive/2007/12/14/what-is-the-page-file-for-anyway.aspx</a></p>
<p><a href="http://www.brentozar.com/archive/2008/03/sql-server-2005-setup-checklist-part-1-before-the-install/" rel="nofollow">http://www.brentozar.com/archive/2008/03/sql-server-2005-setup-checklist-part-1-before-the-install/</a></p>
<p>&nbsp;</p>
<br />Filed under: <a href='http://simonsql.com/category/common/'>Common</a> Tagged: <a href='http://simonsql.com/tag/paging-file/'>Paging File</a>, <a href='http://simonsql.com/tag/paging-file-for-sql-server/'>Paging file for SQL server</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simonsql.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simonsql.wordpress.com/351/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=351&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://simonsql.com/2013/02/27/paging-file-for-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/54205a299e4ad6fb188a599c2da8bca3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simonsql</media:title>
		</media:content>
	</item>
		<item>
		<title>BACKUP DATABASE TO DISK = N‘NUL’</title>
		<link>http://simonsql.com/2013/01/04/backup-database-to-disk-nnul/</link>
		<comments>http://simonsql.com/2013/01/04/backup-database-to-disk-nnul/#comments</comments>
		<pubDate>Sat, 05 Jan 2013 01:48:14 +0000</pubDate>
		<dc:creator>Simon Cho</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Backup chain broken]]></category>
		<category><![CDATA[Backup Database NUL]]></category>
		<category><![CDATA[NUL]]></category>
		<category><![CDATA[Veeam]]></category>

		<guid isPermaLink="false">http://simonsql.com/?p=348</guid>
		<description><![CDATA[http://sqlservermct.wordpress.com/2011/10/07/backup-database-to-disk-n%E2%80%98nul%E2%80%99-%E2%80%93-and-misconceptions/ Veeam can truncate log base on some option. http://www.veeam.com/vmware-backup/help-center/v6_1/hyperv/index.html?vmware_replica_guest_processing.htm It make backup chain broken. When they perform truncate log, you can see 2 of the log like this. SQL VSS is normal behavior to create SnapShot on disk. But, Veeam Backup and replication with truncate log isn&#8217;t good option to manage database. I recommend [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=348&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://sqlservermct.wordpress.com/2011/10/07/backup-database-to-disk-n%E2%80%98nul%E2%80%99-%E2%80%93-and-misconceptions/">http://sqlservermct.wordpress.com/2011/10/07/backup-database-to-disk-n%E2%80%98nul%E2%80%99-%E2%80%93-and-misconceptions/</a></p>
<p>Veeam can truncate log base on some option.</p>
<p><a href="http://www.veeam.com/vmware-backup/help-center/v6_1/hyperv/index.html?vmware_replica_guest_processing.htm">http://www.veeam.com/vmware-backup/help-center/v6_1/hyperv/index.html?vmware_replica_guest_processing.htm</a></p>
<p>It make backup chain broken.<br />
When they perform truncate log, you can see 2 of the log like this.</p>
<p>SQL VSS is normal behavior to create SnapShot on disk.<br />
But, Veeam Backup and replication with truncate log isn&#8217;t good option to manage database.</p>
<p>I recommend that do not enable truncate log on Veeam replication manager.</p>
<pre>select top 10 * 
  from msdb.dbo.backupset
 where is_snapshot=1

--It's due to SQL VSS.
--Program_Name : "Microsoft SQL Server VSS Writer"
--ex)
--BACKUP DATABASE [DBNAME] TO VIRTUAL_DEVICE='{4C5C20F9-FE32-4FCA-BE43-FFFFFFFFFFFF}1' WITH SNAPSHOT,BUFFERCOUNT=1,BLOCKSIZE=1024

select top 10 * 
  from msdb.dbo.backupmediafamily
 where physical_device_name='NUL'

--It's due to Veeam.
--Program_Name : "Veeam Backup and Replication"
--ex)
--BACKUP LOG [DBNAME] TO DISK = 'NUL'</pre>
<br />Filed under: <a href='http://simonsql.com/category/common/'>Common</a> Tagged: <a href='http://simonsql.com/tag/backup-chain-broken/'>Backup chain broken</a>, <a href='http://simonsql.com/tag/backup-database-nul/'>Backup Database NUL</a>, <a href='http://simonsql.com/tag/nul/'>NUL</a>, <a href='http://simonsql.com/tag/veeam/'>Veeam</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simonsql.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simonsql.wordpress.com/348/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=348&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://simonsql.com/2013/01/04/backup-database-to-disk-nnul/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/54205a299e4ad6fb188a599c2da8bca3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simonsql</media:title>
		</media:content>
	</item>
		<item>
		<title>uniqueidentifier : GUID in SQL</title>
		<link>http://simonsql.com/2013/01/02/unique-sequence-identifier-newsequentialid/</link>
		<comments>http://simonsql.com/2013/01/02/unique-sequence-identifier-newsequentialid/#comments</comments>
		<pubDate>Wed, 02 Jan 2013 17:33:24 +0000</pubDate>
		<dc:creator>Simon Cho</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[NewID]]></category>
		<category><![CDATA[NEWSEQUENTIALID]]></category>
		<category><![CDATA[Sequence NewID]]></category>

		<guid isPermaLink="false">http://simonsql.com/?p=327</guid>
		<description><![CDATA[1. newsequentialid() http://msdn.microsoft.com/en-us/library/ms189786%28v=sql.100%29.aspx This is one of the function to generate sequence GUID to reduce fragmentation. But, it&#8217;s not grantee uniqueness. It&#8217;s wrapped by windows function UuidCreateSequential, http://msdn.microsoft.com/en-us/library/aa379322%28VS.85%29.aspx. Creates a GUID that is greater than any GUID previously generated by this function on a specified computer since Windows was started. After restarting Windows, the GUID [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=327&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>1. newsequentialid()</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms189786%28v=sql.100%29.aspx">http://msdn.microsoft.com/en-us/library/ms189786%28v=sql.100%29.aspx</a></p>
<p>This is one of the function to generate sequence GUID to reduce fragmentation.</p>
<p>But, it&#8217;s not grantee uniqueness.<br />
It&#8217;s wrapped by windows function UuidCreateSequential, <a href="http://msdn.microsoft.com/en-us/library/aa379322%28VS.85%29.aspx">http://msdn.microsoft.com/en-us/library/aa379322%28VS.85%29.aspx</a>.</p>
<p>Creates a GUID that is greater than any GUID previously generated by this function on a specified computer since Windows was started.<br />
<span style="color:#ff0000;">After restarting Windows, the GUID can start again from a lower range, but is still globally unique.</span><br />
When a GUID column is used as a row identifier, using NEWSEQUENTIALID can be faster than using the NEWID function.<br />
This is because the NEWID function causes random activity and uses fewer cached data pages. Using NEWSEQUENTIALID also helps to completely fill the data and index pages.</p>
<p>2. uniqueidentifier sorting.</p>
<p><a href="http://sqlblog.com/blogs/alberto_ferrari/archive/2007/08/31/how-are-guids-sorted-by-sql-server.aspx">http://sqlblog.com/blogs/alberto_ferrari/archive/2007/08/31/how-are-guids-sorted-by-sql-server.aspx</a></p>
<p>3. uniqueidentifier converting</p>
<pre>SELECT CONVERT(uniqueidentifier, 0x000102030405060708090A0B0C0D0E0F)
UNION ALL
SELECT CONVERT(uniqueidentifier, 0x00000000000000000123456789ABCDEF)
UNION ALL
SELECT CONVERT(uniqueidentifier, 0x000000000123456789ABCDEF00000000)
UNION ALL
SELECT CONVERT(UNIQUEIDENTIFIER, '00000000-0123-4567-89AB-CDEF00000000')</pre>
<br />Filed under: <a href='http://simonsql.com/category/common/'>Common</a> Tagged: <a href='http://simonsql.com/tag/newid/'>NewID</a>, <a href='http://simonsql.com/tag/newsequentialid/'>NEWSEQUENTIALID</a>, <a href='http://simonsql.com/tag/sequence-newid/'>Sequence NewID</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simonsql.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simonsql.wordpress.com/327/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=327&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://simonsql.com/2013/01/02/unique-sequence-identifier-newsequentialid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/54205a299e4ad6fb188a599c2da8bca3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simonsql</media:title>
		</media:content>
	</item>
		<item>
		<title>Contact information</title>
		<link>http://simonsql.com/2012/12/20/contact-information/</link>
		<comments>http://simonsql.com/2012/12/20/contact-information/#comments</comments>
		<pubDate>Thu, 20 Dec 2012 08:10:05 +0000</pubDate>
		<dc:creator>Simon Cho</dc:creator>
				<category><![CDATA[Contact us]]></category>

		<guid isPermaLink="false">http://simonsql.com/?p=322</guid>
		<description><![CDATA[simon@simonsql.com Tuning, Consulting and all DB related questions. Filed under: Contact us<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=322&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>simon@simonsql.com</p>
<p>Tuning, Consulting and all DB related questions.</p>
<br />Filed under: <a href='http://simonsql.com/category/contact-us/'>Contact us</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simonsql.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simonsql.wordpress.com/322/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=322&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://simonsql.com/2012/12/20/contact-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/54205a299e4ad6fb188a599c2da8bca3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simonsql</media:title>
		</media:content>
	</item>
		<item>
		<title>Cross-Database Access</title>
		<link>http://simonsql.com/2012/12/05/cross-database-access/</link>
		<comments>http://simonsql.com/2012/12/05/cross-database-access/#comments</comments>
		<pubDate>Thu, 06 Dec 2012 00:03:29 +0000</pubDate>
		<dc:creator>Simon Cho</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Cross database Ownership Chaining]]></category>
		<category><![CDATA[DB chaining]]></category>
		<category><![CDATA[Ownership chaining]]></category>

		<guid isPermaLink="false">http://simonsql.com/?p=319</guid>
		<description><![CDATA[http://www.sommarskog.se/grantperm.html &#160; Filed under: Common Tagged: Cross database Ownership Chaining, DB chaining, Ownership chaining<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=319&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://http://www.sommarskog.se/grantperm.html">http://www.sommarskog.se/grantperm.html</a></p>
<p>&nbsp;</p>
<br />Filed under: <a href='http://simonsql.com/category/common/'>Common</a> Tagged: <a href='http://simonsql.com/tag/cross-database-ownership-chaining/'>Cross database Ownership Chaining</a>, <a href='http://simonsql.com/tag/db-chaining/'>DB chaining</a>, <a href='http://simonsql.com/tag/ownership-chaining/'>Ownership chaining</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simonsql.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simonsql.wordpress.com/319/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=319&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://simonsql.com/2012/12/05/cross-database-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/54205a299e4ad6fb188a599c2da8bca3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simonsql</media:title>
		</media:content>
	</item>
		<item>
		<title>Backup chain is broken due to Veeam Backup configuration improperly.</title>
		<link>http://simonsql.com/2012/11/29/backup-chain-is-broken-due-to-veeam-backup-configuration-doesnt-setup-properly/</link>
		<comments>http://simonsql.com/2012/11/29/backup-chain-is-broken-due-to-veeam-backup-configuration-doesnt-setup-properly/#comments</comments>
		<pubDate>Thu, 29 Nov 2012 21:29:21 +0000</pubDate>
		<dc:creator>Simon Cho</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Backup chain broken]]></category>
		<category><![CDATA[Log Shipping broken]]></category>
		<category><![CDATA[Veeam]]></category>

		<guid isPermaLink="false">http://simonsql.com/?p=312</guid>
		<description><![CDATA[http://www.veeam.com/vmware-backup/help-center/v6_1/hyperv/index.html?vmware_replica_guest_processing.htm Please select this one, “Do not truncate logs”. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Use the Truncation logs section to define the scenario of transaction log handing: •Select Truncate logs on successful backup only if you want Veeam Backup &#38; Replication to trigger truncation of logs only after the job is finished successfully. In this case, Veeam agent will [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=312&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.veeam.com/vmware-backup/help-center/v6_1/hyperv/index.html?vmware_replica_guest_processing.htm">http://www.veeam.com/vmware-backup/help-center/v6_1/hyperv/index.html?vmware_replica_guest_processing.htm</a></p>
<p>Please select this one, “Do not truncate logs”.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Use the Truncation logs section to define the scenario of transaction log handing:</p>
<p>•Select Truncate logs on successful backup only if you want Veeam Backup &amp; Replication to trigger truncation of logs only after the job is finished successfully. In this case, Veeam agent will wait for the replication to complete, and then will trigger truncation of transaction logs. If truncation of transaction logs is not possible for some reason, the logs will remain untouched in the VM guest OS till the next start of the Veeam agent.</p>
<p>•Select Truncate logs immediately if you want Veeam Backup &amp; Replication to trigger truncation of logs in any case, no matter whether the job finishes successfully or fails.</p>
<p>•Select <strong>Do not truncate logs</strong> if you do not want Veeam Backup &amp; Replication to truncate logs at all. This option is recommended if you are using another tool to perform guest-level replication and this tool maintains consistency of the database state. In such scenario, truncation of logs with Veeam Backup &amp; Replication will break the guest-level replication chain and cause it to fall out of sync.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>When I checked backup list, it&#8217;s truncate log like this.</p>
<p>BACKUP LOG xxxDB TO DISK = &#8216;NUL&#8217;</p>
<p>So, physical_device_name is presented as &#8216;NUL&#8217;.</p>
<pre>select bs.*
	 , bf.*
  from msdb.dbo.dbo.backupset bs
  join msdb.dbo.[backupmediafamily] bf
    on bs.media_set_id = bf.media_set_id
 where 1=1
   and database_name='MyDB' and type='L'
 order by backup_start_date desc</pre>
<br />Filed under: <a href='http://simonsql.com/category/common/'>Common</a> Tagged: <a href='http://simonsql.com/tag/backup-chain-broken/'>Backup chain broken</a>, <a href='http://simonsql.com/tag/log-shipping-broken/'>Log Shipping broken</a>, <a href='http://simonsql.com/tag/veeam/'>Veeam</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simonsql.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simonsql.wordpress.com/312/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=312&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://simonsql.com/2012/11/29/backup-chain-is-broken-due-to-veeam-backup-configuration-doesnt-setup-properly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/54205a299e4ad6fb188a599c2da8bca3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simonsql</media:title>
		</media:content>
	</item>
		<item>
		<title>Snapshot and Synonyms</title>
		<link>http://simonsql.com/2012/10/26/snapshot-and-synonyms/</link>
		<comments>http://simonsql.com/2012/10/26/snapshot-and-synonyms/#comments</comments>
		<pubDate>Fri, 26 Oct 2012 17:56:08 +0000</pubDate>
		<dc:creator>Simon Cho</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Snapshot]]></category>
		<category><![CDATA[Synonym]]></category>

		<guid isPermaLink="false">http://simonsql.com/?p=310</guid>
		<description><![CDATA[http://blogs.msdn.com/b/sqlcat/archive/2008/08/05/microsoft-sql-server-database-snapshots-and-synonyms.aspx Filed under: Common Tagged: Snapshot, Synonym<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=310&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://blogs.msdn.com/b/sqlcat/archive/2008/08/05/microsoft-sql-server-database-snapshots-and-synonyms.aspx" rel="nofollow">http://blogs.msdn.com/b/sqlcat/archive/2008/08/05/microsoft-sql-server-database-snapshots-and-synonyms.aspx</a></p>
<br />Filed under: <a href='http://simonsql.com/category/common/'>Common</a> Tagged: <a href='http://simonsql.com/tag/snapshot/'>Snapshot</a>, <a href='http://simonsql.com/tag/synonym/'>Synonym</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/simonsql.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/simonsql.wordpress.com/310/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=simonsql.com&#038;blog=20889387&#038;post=310&#038;subd=simonsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://simonsql.com/2012/10/26/snapshot-and-synonyms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/54205a299e4ad6fb188a599c2da8bca3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">simonsql</media:title>
		</media:content>
	</item>
	</channel>
</rss>
