<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: Mrtrombone's Code Snippets</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 00:35:01 GMT</pubDate>
    <description>DZone Snippets: Mrtrombone's Code Snippets</description>
    <item>
      <title>Search for specific text in all stored procedures</title>
      <link>http://snippets.dzone.com/posts/show/3905</link>
      <description>&lt;code&gt;&lt;br /&gt;declare @search varchar(50)&lt;br /&gt;SET @search = 'searchterm'&lt;br /&gt;&lt;br /&gt;SELECT    &lt;br /&gt;     ROUTINE_NAME,&lt;br /&gt;     ROUTINE_DEFINITION&lt;br /&gt;FROM    &lt;br /&gt;    INFORMATION_SCHEMA.ROUTINES&lt;br /&gt;WHERE    &lt;br /&gt;    ROUTINE_DEFINITION LIKE @search&lt;br /&gt;ORDER BY&lt;br /&gt;    ROUTINE_NAME&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 26 Apr 2007 03:08:05 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3905</guid>
      <author>mrtrombone (Mark Easton)</author>
    </item>
    <item>
      <title>Connection To Active Directory From SQL Server</title>
      <link>http://snippets.dzone.com/posts/show/3800</link>
      <description>SQL Code to link to active directory from within SQl Server.&lt;br /&gt;ound by searching through a forum so can't claim I thought of it&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;//Follow this syntax:&lt;br /&gt;EXEC master.dbo.sp_addlinkedserver @server = N'ADSI',&lt;br /&gt;@srvproduct=N'Active Directory Services', @provider=N'ADsDSOObject',&lt;br /&gt;@datasrc=N'Servername.domain.com'  --AKA the full computer name of the AD server&lt;br /&gt;&lt;br /&gt;//Then execute the openquery like this:&lt;br /&gt;&lt;br /&gt;select * from openquery&lt;br /&gt;(&lt;br /&gt;ADSI,'SELECT name&lt;br /&gt;FROM ''LDAP://Servername.domain.com''&lt;br /&gt;WHERE objectCategory = ''Person'' AND objectClass = ''user''&lt;br /&gt;')&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 11 Apr 2007 22:16:00 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3800</guid>
      <author>mrtrombone (Mark Easton)</author>
    </item>
  </channel>
</rss>
