<?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>My Technical Notes &#187; SQL server</title>
	<atom:link href="http://hariprasad.info/tag/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://hariprasad.info</link>
	<description></description>
	<lastBuildDate>Sun, 05 Feb 2012 11:14:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	
<!-- Excerpts generated using Auto Excerpt plugin, http://mr.hokya.com/auto-excerpt/ -->
	<item>
		<title>Deleting large number of records from sql server 2005</title>
		<link>http://hariprasad.info/deleting-large-number-of-records-from-sql-server-2005/</link>
		<comments>http://hariprasad.info/deleting-large-number-of-records-from-sql-server-2005/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 04:01:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL server]]></category>
		<category><![CDATA[delete large records]]></category>

		<guid isPermaLink="false">http://hariprasad.info/?p=313</guid>
		<description><![CDATA[WHILE EXISTS ( SELECT * FROM table WHERE &#60;condition to delete&#62;)
BEGIN
  SET ROWCOUNT 1000
  DELETE Table WHERE &#60;Condition&#62;
  SET ROWCOUNT 0
ENd
&#160;
 <a href='http://hariprasad.info/deleting-large-number-of-records-from-sql-server-2005/'>Read More&#8230;</a>]]></description>
			<content:encoded><![CDATA[WHILE EXISTS ( SELECT * FROM table WHERE &lt;condition to delete&gt;)
BEGIN
  SET ROWCOUNT 1000
  DELETE Table WHERE &lt;Condition&gt;
  SET ROWCOUNT 0
ENd
&nbsp;
 <a href='http://hariprasad.info/deleting-large-number-of-records-from-sql-server-2005/'>Read More</a>]]></content:encoded>
			<wfw:commentRss>http://hariprasad.info/deleting-large-number-of-records-from-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	
<!-- Excerpts generated using Auto Excerpt plugin, http://mr.hokya.com/auto-excerpt/ -->
	<item>
		<title>SQL Server Date formats</title>
		<link>http://hariprasad.info/sql-server-date-formats/</link>
		<comments>http://hariprasad.info/sql-server-date-formats/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 15:19:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL server]]></category>
		<category><![CDATA[date formats]]></category>

		<guid isPermaLink="false">http://hariprasad.info/?p=284</guid>
		<description><![CDATA[Date formats in   sql server






DATE FORMATS


Format     #
Query (current date:     12/30/2006)
Sample


1
select     convert(varchar, getdate(), 1)
12/30/06


2
select     convert(varchar, getdate(), 2)
06.12.30


3
select     convert(varchar, getdate(), 3)
30/12/06


4
select     convert(varchar, getdate(), 4)
30.12.06


5
select     convert(varchar, getdate(), 5)
30-12-06


6
select     convert(varchar,  <a href='http://hariprasad.info/sql-server-date-formats/'>Read More&#8230;</a>]]></description>
			<content:encoded><![CDATA[


 Date formats in   sql server






DATE FORMATS


Format     #
Query (current date:     12/30/2006)
Sample


1
select     convert(varchar, getdate(), 1)
12/30/06


2
select     convert(varchar, getdate(), 2)
06.12.30


3
select     convert(varchar, getdate(), 3)
30/12/06


4
select     convert(varchar, getdate(), 4)
30.12.06


5
select     convert(varchar, getdate(), 5)
30-12-06


6
select     convert(varchar,  <a href='http://hariprasad.info/sql-server-date-formats/'>Read More</a>]]></content:encoded>
			<wfw:commentRss>http://hariprasad.info/sql-server-date-formats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	
<!-- Excerpts generated using Auto Excerpt plugin, http://mr.hokya.com/auto-excerpt/ -->
	<item>
		<title>SQL server and code names</title>
		<link>http://hariprasad.info/sql-server-and-code-names/</link>
		<comments>http://hariprasad.info/sql-server-and-code-names/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 09:01:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL server]]></category>

		<guid isPermaLink="false">http://hariprasad.info/?p=198</guid>
		<description><![CDATA[&#8230;]]></description>
			<content:encoded><![CDATA[In 1988, Microsoft released its first  version of SQL Server. It was developed jointly by Microsoft  and Sybase  for the OS/2 platform.

1993 â€“ SQL Server 4.21 for Windows NT
1995 â€“ SQL Server 6.0, codenamed SQL95
1996 â€“ SQL Server 6.5, codenamed Hydra
1999 â€“ SQL Server 7.0, codenamed Sphinx
1999 â€“ SQL Server 7.0 OLAP, codenamed Plato
2000 â€“ SQL Server 2000 32-bit, codenamed Shiloh (version 8.0)
2003 â€ <a href='http://hariprasad.info/sql-server-and-code-names/'>Read More</a>]]></content:encoded>
			<wfw:commentRss>http://hariprasad.info/sql-server-and-code-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	
<!-- Excerpts generated using Auto Excerpt plugin, http://mr.hokya.com/auto-excerpt/ -->
	<item>
		<title>sql management studio &#8211; using non standard port</title>
		<link>http://hariprasad.info/sql-management-studio-using-non-standard-port/</link>
		<comments>http://hariprasad.info/sql-management-studio-using-non-standard-port/#comments</comments>
		<pubDate>Sun, 31 Oct 2010 12:44:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL server]]></category>
		<category><![CDATA[non standard port]]></category>
		<category><![CDATA[sql management studio]]></category>

		<guid isPermaLink="false">http://hariprasad.info/?p=183</guid>
		<description><![CDATA[To connect sql management studio to any sql server using non defualt port, we have to use &#8220;,&#8221; beside the server IP (or host name).
For e.g., server: 1.1.1.1 and port 1234 we specify it as
1.1.1.,1234
 <a href='http://hariprasad.info/sql-management-studio-using-non-standard-port/'>Read More&#8230;</a>]]></description>
			<content:encoded><![CDATA[To connect sql management studio to any sql server using non defualt port, we have to use &#8220;,&#8221; beside the server IP (or host name).
For e.g., server: 1.1.1.1 and port 1234 we specify it as
1.1.1.,1234
 <a href='http://hariprasad.info/sql-management-studio-using-non-standard-port/'>Read More</a>]]></content:encoded>
			<wfw:commentRss>http://hariprasad.info/sql-management-studio-using-non-standard-port/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	
<!-- Excerpts generated using Auto Excerpt plugin, http://mr.hokya.com/auto-excerpt/ -->
	<item>
		<title>Find Largest table by Row count &#8211; SQL server 2005</title>
		<link>http://hariprasad.info/find-largest-table-by-row-count-sql-server-2005/</link>
		<comments>http://hariprasad.info/find-largest-table-by-row-count-sql-server-2005/#comments</comments>
		<pubDate>Mon, 31 May 2010 04:54:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL server]]></category>

		<guid isPermaLink="false">http://hariprasad.info/find-largest-table-by-row-count-sql-server-2005/</guid>
		<description><![CDATA[USE AdventureWorks

GO
SELECT OBJECT_NAME(OBJECT_ID) TableName, st.row_count
FROM sys.dm_db_partition_stats st
WHERE index_id &#60; 2
ORDER BY st.row_count DESC
GO


 <a href='http://hariprasad.info/find-largest-table-by-row-count-sql-server-2005/'>Read More&#8230;</a>]]></description>
			<content:encoded><![CDATA[ 
USE AdventureWorks

GO
SELECT OBJECT_NAME(OBJECT_ID) TableName, st.row_count
FROM sys.dm_db_partition_stats st
WHERE index_id &lt; 2
ORDER BY st.row_count DESC
GO


 <a href='http://hariprasad.info/find-largest-table-by-row-count-sql-server-2005/'>Read More</a>]]></content:encoded>
			<wfw:commentRss>http://hariprasad.info/find-largest-table-by-row-count-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	
<!-- Excerpts generated using Auto Excerpt plugin, http://mr.hokya.com/auto-excerpt/ -->
	<item>
		<title>Delete SQL Log file</title>
		<link>http://hariprasad.info/eliminate-log-file/</link>
		<comments>http://hariprasad.info/eliminate-log-file/#comments</comments>
		<pubDate>Tue, 11 May 2010 10:17:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL server]]></category>
		<category><![CDATA[log file deletion]]></category>

		<guid isPermaLink="false">http://hariprasad.info/eliminate-log-file/</guid>
		<description><![CDATA[Sometimes, we just do not need the big log file. For example, I have a 40GB log file. I am sure I do not need this log file and want to get rid of it completely to free up the hard drive space. The logic is:
Detach the database
Rename the log file
Attach the database without the log file
Delete the log file
Letâ€™s say, the database name is testDev. In the SQL Server Management Studio,
Highlight the database-&#62; T <a href='http://hariprasad.info/eliminate-log-file/'>Read More&#8230;</a>]]></description>
			<content:encoded><![CDATA[Sometimes, we just do not need the big log file. For example, I have a 40GB log file. I am sure I do not need this log file and want to get rid of it completely to free up the hard drive space. The logic is:
Detach the database
Rename the log file
Attach the database without the log file
Delete the log file
Letâ€™s say, the database name is testDev. In the SQL Server Management Studio,
Highlight the database-&gt; T <a href='http://hariprasad.info/eliminate-log-file/'>Read More</a>]]></content:encoded>
			<wfw:commentRss>http://hariprasad.info/eliminate-log-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	
<!-- Excerpts generated using Auto Excerpt plugin, http://mr.hokya.com/auto-excerpt/ -->
	<item>
		<title>Getting tables size SQL server</title>
		<link>http://hariprasad.info/getting-tables-size-sql-server/</link>
		<comments>http://hariprasad.info/getting-tables-size-sql-server/#comments</comments>
		<pubDate>Fri, 07 May 2010 03:57:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL server]]></category>

		<guid isPermaLink="false">http://hariprasad.info/getting-tables-size-sql-server/</guid>
		<description><![CDATA[The following SQL query returns the size of each table in the specified database.
USE 
sp_MSforeachtable @command1=&#8217;EXEC sp_spaceused &#8221;?&#8221;&#8217;,@whereand=&#8217;or OBJECTPROPERTY(o.id, N&#8221;IsSystemTable&#8221;) = 1&#8242;
 <a href='http://hariprasad.info/getting-tables-size-sql-server/'>Read More&#8230;</a>]]></description>
			<content:encoded><![CDATA[The following SQL query returns the size of each table in the specified database.
USE 
sp_MSforeachtable @command1=&#8217;EXEC sp_spaceused &#8221;?&#8221;&#8217;,@whereand=&#8217;or OBJECTPROPERTY(o.id, N&#8221;IsSystemTable&#8221;) = 1&#8242;
 <a href='http://hariprasad.info/getting-tables-size-sql-server/'>Read More</a>]]></content:encoded>
			<wfw:commentRss>http://hariprasad.info/getting-tables-size-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	
<!-- Excerpts generated using Auto Excerpt plugin, http://mr.hokya.com/auto-excerpt/ -->
	<item>
		<title>Search all tables in SQL Server</title>
		<link>http://hariprasad.info/search-all-tables-in-sql-server/</link>
		<comments>http://hariprasad.info/search-all-tables-in-sql-server/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 15:42:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SQL server]]></category>

		<guid isPermaLink="false">http://hariprasad.info/search-all-tables-in-sql-server/</guid>
		<description><![CDATA[While browsing internet for searching string across database, I found the following stored procedure
EXEC SearchAllTables &#8216;Computer&#8217;
GO 
Here is the complete stored procedure code:
CREATE PROC SearchAllTables
(
	@SearchStr nvarchar(100)
)
AS
BEGIN
	&#8211; Copyright Â© 2002 Narayana Vyas Kondreddi. All rights reserved.
	&#8211; Purpose: To search all columns of all tables for a given search string
	&#82 <a href='http://hariprasad.info/search-all-tables-in-sql-server/'>Read More&#8230;</a>]]></description>
			<content:encoded><![CDATA[While browsing internet for searching string across database, I found the following stored procedure
EXEC SearchAllTables &#8216;Computer&#8217;
GO 
Here is the complete stored procedure code:
CREATE PROC SearchAllTables
(
	@SearchStr nvarchar(100)
)
AS
BEGIN
	&#8211; Copyright Â© 2002 Narayana Vyas Kondreddi. All rights reserved.
	&#8211; Purpose: To search all columns of all tables for a given search string
	&#82 <a href='http://hariprasad.info/search-all-tables-in-sql-server/'>Read More</a>]]></content:encoded>
			<wfw:commentRss>http://hariprasad.info/search-all-tables-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	
<!-- Excerpts generated using Auto Excerpt plugin, http://mr.hokya.com/auto-excerpt/ -->
	<item>
		<title>Identifying SQL server version using SQL</title>
		<link>http://hariprasad.info/identifying-sql-server-version-using-sql/</link>
		<comments>http://hariprasad.info/identifying-sql-server-version-using-sql/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 08:40:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL server]]></category>

		<guid isPermaLink="false">http://hariprasad.info/?p=41</guid>
		<description><![CDATA[To find out the SQL server version using SQL query:
&#60;code&#62;
SELECT SERVERPROPERTY(&#8216;productversion&#8217;), SERVERPROPERTY (&#8216;productlevel&#8217;), SERVERPROPERTY (&#8216;edition&#8217;)
&#60;/code&#62;
 <a href='http://hariprasad.info/identifying-sql-server-version-using-sql/'>Read More&#8230;</a>]]></description>
			<content:encoded><![CDATA[To find out the SQL server version using SQL query:
&lt;code&gt;
SELECT SERVERPROPERTY(&#8216;productversion&#8217;), SERVERPROPERTY (&#8216;productlevel&#8217;), SERVERPROPERTY (&#8216;edition&#8217;)
&lt;/code&gt;
 <a href='http://hariprasad.info/identifying-sql-server-version-using-sql/'>Read More</a>]]></content:encoded>
			<wfw:commentRss>http://hariprasad.info/identifying-sql-server-version-using-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

