﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administering / SQL Server 2005  / List all Logins in the server and change the CHECK_POLICY=ON" / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 19:36:48 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: List all Logins in the server and change the CHECK_POLICY=ON"</title><link>http://www.sqlservercentral.com/Forums/Topic967196-146-1.aspx</link><description>Hi,You guys are really helpful.  I really appreciate your reply on this, it save me a lot of time.  Thanks.  :-D</description><pubDate>Wed, 11 Aug 2010 21:17:10 GMT</pubDate><dc:creator>Jimmy.Liew</dc:creator></item><item><title>RE: List all Logins in the server and change the CHECK_POLICY=ON"</title><link>http://www.sqlservercentral.com/Forums/Topic967196-146-1.aspx</link><description>All the pieces from above, all put together.[code="sql"]SELECT 'ALTER LOGIN ' + QuoteName(name) + ' WITH CHECK_POLICY = ON;'   FROM sys.server_principals WHERE [type] = 'S' -- SQL Server Logins only   AND principal_id &amp;gt; 1  -- not sa - omit this line if you want to include it[/code]</description><pubDate>Wed, 11 Aug 2010 09:24:55 GMT</pubDate><dc:creator>WayneS</dc:creator></item><item><title>RE: List all Logins in the server and change the CHECK_POLICY=ON"</title><link>http://www.sqlservercentral.com/Forums/Topic967196-146-1.aspx</link><description>Use [b][url=http://msdn.microsoft.com/en-us/library/ms189828.aspx]ALTER LOGIN[/url][/b] in conjunction with the above query to turn on CHECK POLICY</description><pubDate>Wed, 11 Aug 2010 08:49:11 GMT</pubDate><dc:creator>Adiga</dc:creator></item><item><title>RE: List all Logins in the server and change the CHECK_POLICY=ON"</title><link>http://www.sqlservercentral.com/Forums/Topic967196-146-1.aspx</link><description>This hould give you all SQL accounts (so no domain or built-in accounts)And then you will have to write a script to wrap around each account and turn policy either on or off.[quote]SELECT name, loginname FROM syslogins WHERE name NOT LIKE '%\%' AND name NOT LIKE '#%'[/quote]</description><pubDate>Wed, 11 Aug 2010 03:12:29 GMT</pubDate><dc:creator>Schadenfreude-Mei</dc:creator></item><item><title>List all Logins in the server and change the CHECK_POLICY=ON"</title><link>http://www.sqlservercentral.com/Forums/Topic967196-146-1.aspx</link><description>Hi all,Can anyone like to share how to list all the logins from syslogins system table, later change all the "CHECK_POLICY=ON" if it is "OFF".Kindly advice.  Thanks.</description><pubDate>Wed, 11 Aug 2010 01:43:39 GMT</pubDate><dc:creator>Jimmy.Liew</dc:creator></item></channel></rss>