<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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: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>Comments on: SQL SERVER &#8211; Simple Use of Cursor to Print All Stored Procedures of Database Including Schema</title>
	<atom:link href="http://blog.sqlauthority.com/2008/11/22/sql-server-simple-use-of-cursor-to-print-all-stored-procedures-of-database-including-schema/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/11/22/sql-server-simple-use-of-cursor-to-print-all-stored-procedures-of-database-including-schema/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Wed, 22 May 2013 19:03:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #004 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2008/11/22/sql-server-simple-use-of-cursor-to-print-all-stored-procedures-of-database-including-schema/#comment-379681</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #004 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 24 Nov 2012 01:31:20 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1550#comment-379681</guid>
		<description><![CDATA[[...] Simple Use of Cursor to Print All Stored Procedures of Database Including Schema This is a very interesting requirement I used to face in my early career days, I needed to print all the Stored procedures of my database. Interesting enough I had written a cursor to do so. Today when I look back at this stored procedure, I believe there will be a much cleaner way to do the same task, however, I still use this SP quite often when I have to document all the stored procedures of my database. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Simple Use of Cursor to Print All Stored Procedures of Database Including Schema This is a very interesting requirement I used to face in my early career days, I needed to print all the Stored procedures of my database. Interesting enough I had written a cursor to do so. Today when I look back at this stored procedure, I believe there will be a much cleaner way to do the same task, however, I still use this SP quite often when I have to document all the stored procedures of my database. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: santhosh</title>
		<link>http://blog.sqlauthority.com/2008/11/22/sql-server-simple-use-of-cursor-to-print-all-stored-procedures-of-database-including-schema/#comment-353841</link>
		<dc:creator><![CDATA[santhosh]]></dc:creator>
		<pubDate>Fri, 28 Sep 2012 07:26:59 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1550#comment-353841</guid>
		<description><![CDATA[hi,

Am beginner in sql server, i faced one question in interview, 
i.e),
 In my stored procedure i have a cursor but it killing the performance, can i use alternative for that? if it possible how can I ? with small example.. in simple language.


Thank full to you.]]></description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>Am beginner in sql server, i faced one question in interview,<br />
i.e),<br />
 In my stored procedure i have a cursor but it killing the performance, can i use alternative for that? if it possible how can I ? with small example.. in simple language.</p>
<p>Thank full to you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Using RANKING Functions Instead of SQL Looping Logic of Cursor &#8211; Quiz &#8211; Puzzle &#8211; 8 of 31 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2008/11/22/sql-server-simple-use-of-cursor-to-print-all-stored-procedures-of-database-including-schema/#comment-233869</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Using RANKING Functions Instead of SQL Looping Logic of Cursor &#8211; Quiz &#8211; Puzzle &#8211; 8 of 31 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Mon, 09 Jan 2012 01:31:14 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1550#comment-233869</guid>
		<description><![CDATA[[...] INTO … SELECT instead of Cursor  Simple Use of Cursor to Print All Stored Procedures of Database  Simple Use of Cursor to Print All Stored Procedures of Database Including Schema  Simple Example of Cursor  Cursor to Kill All Process in [...]]]></description>
		<content:encoded><![CDATA[<p>[...] INTO … SELECT instead of Cursor  Simple Use of Cursor to Print All Stored Procedures of Database  Simple Use of Cursor to Print All Stored Procedures of Database Including Schema  Simple Example of Cursor  Cursor to Kill All Process in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bagya</title>
		<link>http://blog.sqlauthority.com/2008/11/22/sql-server-simple-use-of-cursor-to-print-all-stored-procedures-of-database-including-schema/#comment-127547</link>
		<dc:creator><![CDATA[bagya]]></dc:creator>
		<pubDate>Fri, 08 Apr 2011 05:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1550#comment-127547</guid>
		<description><![CDATA[Hi! 
How to write a cursor stored procedure for sysobjects and syscolumns
 
I want to know, how a cursor stored procedure prints the select query as sp_help (table name)  using sysobjects and syscolumns for the example given below

 for example:
Select Id from sysobjects where name=&#039;samp&#039;
ans:503672842
select name from syscolumns where id=503672842]]></description>
		<content:encoded><![CDATA[<p>Hi!<br />
How to write a cursor stored procedure for sysobjects and syscolumns</p>
<p>I want to know, how a cursor stored procedure prints the select query as sp_help (table name)  using sysobjects and syscolumns for the example given below</p>
<p> for example:<br />
Select Id from sysobjects where name=&#8217;samp&#8217;<br />
ans:503672842<br />
select name from syscolumns where id=503672842</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manish</title>
		<link>http://blog.sqlauthority.com/2008/11/22/sql-server-simple-use-of-cursor-to-print-all-stored-procedures-of-database-including-schema/#comment-44881</link>
		<dc:creator><![CDATA[Manish]]></dc:creator>
		<pubDate>Wed, 17 Dec 2008 12:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1550#comment-44881</guid>
		<description><![CDATA[Hi Pinal &amp; Chaitanya

The word &quot;Text&quot; appears before the beginning of every stored procedure, Please advice how can that be eliminated.

Thanks
Manish]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal &amp; Chaitanya</p>
<p>The word &#8220;Text&#8221; appears before the beginning of every stored procedure, Please advice how can that be eliminated.</p>
<p>Thanks<br />
Manish</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chaitanya</title>
		<link>http://blog.sqlauthority.com/2008/11/22/sql-server-simple-use-of-cursor-to-print-all-stored-procedures-of-database-including-schema/#comment-44454</link>
		<dc:creator><![CDATA[Chaitanya]]></dc:creator>
		<pubDate>Mon, 01 Dec 2008 05:15:12 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1550#comment-44454</guid>
		<description><![CDATA[or else we can use 


DECLARE @procName VARCHAR(1000)
DECLARE @getprocName CURSOR
SET @getprocName = CURSOR FOR
SELECT Name = &#039;[&#039; + SCHEMA_NAME(SCHEMA_ID) + &#039;].[&#039; + Name + &#039;]&#039;
FROM sys.all_objects WHERE TYPE = &#039;P&#039;
AND is_ms_shipped&lt;= 1--for all the procedures

OPEN @getprocName
FETCH NEXT
FROM @getprocName INTO @procName
WHILE @@FETCH_STATUS = 0
BEGIN

PRINT &#039;sp_HelpText &#039; + @procName
EXEC sp_HelpText @procName

FETCH NEXT FROM @getprocName INTO @procName
END

CLOSE @getprocName
DEALLOCATE @getprocName
GO]]></description>
		<content:encoded><![CDATA[<p>or else we can use </p>
<p>DECLARE @procName VARCHAR(1000)<br />
DECLARE @getprocName CURSOR<br />
SET @getprocName = CURSOR FOR<br />
SELECT Name = &#8216;[' + SCHEMA_NAME(SCHEMA_ID) + '].[' + Name + ']&#8216;<br />
FROM sys.all_objects WHERE TYPE = &#8216;P&#8217;<br />
AND is_ms_shipped&lt;= 1&#8211;for all the procedures</p>
<p>OPEN @getprocName<br />
FETCH NEXT<br />
FROM @getprocName INTO @procName<br />
WHILE @@FETCH_STATUS = 0<br />
BEGIN</p>
<p>PRINT &#8216;sp_HelpText &#8216; + @procName<br />
EXEC sp_HelpText @procName</p>
<p>FETCH NEXT FROM @getprocName INTO @procName<br />
END</p>
<p>CLOSE @getprocName<br />
DEALLOCATE @getprocName<br />
GO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chaitanya</title>
		<link>http://blog.sqlauthority.com/2008/11/22/sql-server-simple-use-of-cursor-to-print-all-stored-procedures-of-database-including-schema/#comment-44453</link>
		<dc:creator><![CDATA[Chaitanya]]></dc:creator>
		<pubDate>Mon, 01 Dec 2008 05:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1550#comment-44453</guid>
		<description><![CDATA[There is a small mistake in the procedure written above.
I think this could help you out



DECLARE @procName VARCHAR(1000)
DECLARE @getprocName CURSOR
SET @getprocName = CURSOR FOR
SELECT Name = &#039;[&#039; + SCHEMA_NAME(SCHEMA_ID) + &#039;].[&#039; + Name + &#039;]&#039;
FROM sys.all_objects WHERE TYPE = &#039;P&#039;
AND is_ms_shipped= 1

OPEN @getprocName
FETCH NEXT
FROM @getprocName INTO @procName
WHILE @@FETCH_STATUS = 0
BEGIN

PRINT &#039;sp_HelpText &#039; + @procName
EXEC sp_HelpText @procName

FETCH NEXT FROM @getprocName INTO @procName
END

CLOSE @getprocName
DEALLOCATE @getprocName
GO]]></description>
		<content:encoded><![CDATA[<p>There is a small mistake in the procedure written above.<br />
I think this could help you out</p>
<p>DECLARE @procName VARCHAR(1000)<br />
DECLARE @getprocName CURSOR<br />
SET @getprocName = CURSOR FOR<br />
SELECT Name = &#8216;[' + SCHEMA_NAME(SCHEMA_ID) + '].[' + Name + ']&#8216;<br />
FROM sys.all_objects WHERE TYPE = &#8216;P&#8217;<br />
AND is_ms_shipped= 1</p>
<p>OPEN @getprocName<br />
FETCH NEXT<br />
FROM @getprocName INTO @procName<br />
WHILE @@FETCH_STATUS = 0<br />
BEGIN</p>
<p>PRINT &#8216;sp_HelpText &#8216; + @procName<br />
EXEC sp_HelpText @procName</p>
<p>FETCH NEXT FROM @getprocName INTO @procName<br />
END</p>
<p>CLOSE @getprocName<br />
DEALLOCATE @getprocName<br />
GO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vs</title>
		<link>http://blog.sqlauthority.com/2008/11/22/sql-server-simple-use-of-cursor-to-print-all-stored-procedures-of-database-including-schema/#comment-44374</link>
		<dc:creator><![CDATA[vs]]></dc:creator>
		<pubDate>Mon, 24 Nov 2008 18:30:17 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1550#comment-44374</guid>
		<description><![CDATA[what about procedures which are encrypted?]]></description>
		<content:encoded><![CDATA[<p>what about procedures which are encrypted?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
