<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>BLOG DE MAXI ACCOTTO : pasar logins</title><link>http://msmvps.com/blogs/maxiaccotto/archive/tags/pasar+logins/default.aspx</link><description>Tags: pasar logins</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Como pasar Logins entre servidores</title><link>http://msmvps.com/blogs/maxiaccotto/archive/2007/02/07/como-pasar-logins-entre-servidores.aspx</link><pubDate>Thu, 08 Feb 2007 00:50:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:553117</guid><dc:creator>Maxi Accotto</dc:creator><slash:comments>10</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/maxiaccotto/rsscomments.aspx?PostID=553117</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/maxiaccotto/commentapi.aspx?PostID=553117</wfw:comment><comments>http://msmvps.com/blogs/maxiaccotto/archive/2007/02/07/como-pasar-logins-entre-servidores.aspx#comments</comments><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Hola, he vuelto de mis vacaciones &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt; y me estoy poniendo al dia, prometo tratar de escribir mucho mas seguido por aqui.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;En este post voy a explicar uno de los dolores de cabeza mas frecuentes que tenemos y es el pasar los logins entre servidores.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Sabemos que en SQLServer hay 2 tipos de login, los de Windows y los de SQL, los primeros son usuarios del dominio que tambien tienen acceso al servidor de base de datos y los segundos son usuarios que se guardan dentro del SQLServer, o sea, la password esta dentro del SQLServer , en lugar de la de windows que la controla el controlador de dominio.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Lo recomendado es tratar de tener y usar siempre usuarios Windows, la recomendacion se debe a que le dejaremos toda la administracion (complejidad de password, control de vencimientos, etc) al sistema operativo y ademas permitirle a un usuario que no deba volver a hacer login (si usara usuarios SQL) cuando ya lo hizo al entrar a su windows.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;OK, hay varios servidores donde me ha tocado trabajar donde no solo hay usuarios windows sino que tambien muchos SQL, esto es por lo general por el tipo de aplicaciones que usan SQLServer y como han sido pensadas, pero eso ya es otro tema que discutiremos en otro momento &lt;img src="http://msmvps.com/emoticons/emotion-5.gif" alt="Wink" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Bien, como hacemos si deseamos pasar los logins SQL y los de windows de un servidor a otro, esto podria ser a la misma version de SQL o bien a distintas versiones, por ej se desea migrar todo el servidor 7 y 2000 a un 2005 pero no es cuestion de solo migrar las bases sino tambien los logins entre otras cosas.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Si deseamos migrar los usuarios SQL podriamos por ej desde SQL2005 usar Integration Service (el reemplazo de DTS) y usar una tarea para esa funcion, la desventaja de hacer esto es que pasara los logins pero no las password con lo cual le deberiamos decir a todos los usuarios SQL que vuelvan a cambiar las password (nada agradable no?)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Lo que les voy a dejar es un script el cual nos permitira migrar los usuarios de un server a otro, este script no solo migra usuarios SQL sino tambien los de windows y lo mas lindo de esto es que se puede usar para migrar de 7 a 2005 , de 7 a 2000 o de 2000 a 2005 &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Estos seran los pasos que debemos realizar para migrar usuarios&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Generamos&amp;nbsp;SP del&amp;nbsp;script en el servidor origen&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Ejecutamos el&amp;nbsp;SP en el servidor origen&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;El resultado del SP lo copiamos a un archivo .sql &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Ejecutamos este archivo .sql en el servidor destino&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-bidi-font-size:11.0pt;mso-fareast-font-family:'Times New Roman';"&gt;Script&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;USE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; [master] &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;GO &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:green;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;/****** Object:&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;StoredProcedure [dbo].[sp_hexadecimal]&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Script Date: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:green;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;03/23/2006 10:24:06 ******/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:blue;"&gt;ANSI_NULLS&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;OFF&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;GO &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:blue;"&gt;QUOTED_IDENTIFIER&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;ON&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;GO &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;CREATE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:blue;"&gt;PROCEDURE&lt;/SPAN&gt; [dbo]&lt;SPAN style="COLOR:gray;"&gt;.&lt;/SPAN&gt;[sp_hexadecimal] &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@binvalue &lt;SPAN style="COLOR:blue;"&gt;varbinary&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;256&lt;SPAN style="COLOR:gray;"&gt;),&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@hexvalue &lt;SPAN style="COLOR:blue;"&gt;varchar&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;256&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;OUTPUT&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @charvalue &lt;SPAN style="COLOR:blue;"&gt;varchar&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;256&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @i &lt;SPAN style="COLOR:blue;"&gt;int&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @length &lt;SPAN style="COLOR:blue;"&gt;int&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @hexstring &lt;SPAN style="COLOR:blue;"&gt;char&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;16&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @charvalue &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'0x'&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @i &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @length &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:fuchsia;"&gt;DATALENGTH&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@binvalue&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @hexstring &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'0123456789ABCDEF'&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;WHILE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@i &lt;SPAN style="COLOR:gray;"&gt;&amp;lt;=&lt;/SPAN&gt; @length&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;BEGIN&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;DECLARE&lt;/SPAN&gt; @tempint &lt;SPAN style="COLOR:blue;"&gt;int&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;DECLARE&lt;/SPAN&gt; @firstint &lt;SPAN style="COLOR:blue;"&gt;int&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;DECLARE&lt;/SPAN&gt; @secondint &lt;SPAN style="COLOR:blue;"&gt;int&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SELECT&lt;/SPAN&gt; @tempint &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:fuchsia;"&gt;CONVERT&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;int&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="COLOR:fuchsia;"&gt;SUBSTRING&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@binvalue&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt;@i&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt;1&lt;SPAN style="COLOR:gray;"&gt;))&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SELECT&lt;/SPAN&gt; @firstint &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:fuchsia;"&gt;FLOOR&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@tempint&lt;SPAN style="COLOR:gray;"&gt;/&lt;/SPAN&gt;16&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SELECT&lt;/SPAN&gt; @secondint &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; @tempint &lt;SPAN style="COLOR:gray;"&gt;-&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@firstint&lt;SPAN style="COLOR:gray;"&gt;*&lt;/SPAN&gt;16&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SELECT&lt;/SPAN&gt; @charvalue &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; @charvalue &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:fuchsia;"&gt;SUBSTRING&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@hexstring&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @firstint&lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt;1&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; 1&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:fuchsia;"&gt;SUBSTRING&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@hexstring&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @secondint&lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt;1&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; 1&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SELECT&lt;/SPAN&gt; @i &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; @i &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;END&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @hexvalue &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; @charvalue &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;set&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:blue;"&gt;ANSI_NULLS&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;ON&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;set&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:blue;"&gt;QUOTED_IDENTIFIER&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;ON&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;go &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;create&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:blue;"&gt;PROCEDURE&lt;/SPAN&gt; [dbo]&lt;SPAN style="COLOR:gray;"&gt;.&lt;/SPAN&gt;[sp_help_revlogin] @login_name &lt;SPAN style="COLOR:blue;"&gt;sysname&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;NULL&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;AS&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @name&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;sysname&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @xstatus &lt;SPAN style="COLOR:blue;"&gt;int&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @binpwd&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;varbinary&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;256&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @txtpwd&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;sysname&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @tmpstr&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;varchar&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;256&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @SID_varbinary &lt;SPAN style="COLOR:blue;"&gt;varbinary&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;85&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @SID_string &lt;SPAN style="COLOR:blue;"&gt;varchar&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;256&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@login_name &lt;SPAN style="COLOR:gray;"&gt;IS&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;NULL)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;DECLARE&lt;/SPAN&gt; login_curs &lt;SPAN style="COLOR:blue;"&gt;CURSOR&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;FOR&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SELECT&lt;/SPAN&gt; sid&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; xstatus&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; password &lt;SPAN style="COLOR:blue;"&gt;FROM&lt;/SPAN&gt; master&lt;SPAN style="COLOR:gray;"&gt;..&lt;/SPAN&gt;sysxlogins &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;WHERE&lt;/SPAN&gt; srvid &lt;SPAN style="COLOR:gray;"&gt;IS&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;NULL&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;name&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'sa'&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;ELSE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;DECLARE&lt;/SPAN&gt; login_curs &lt;SPAN style="COLOR:blue;"&gt;CURSOR&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;FOR&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SELECT&lt;/SPAN&gt; sid&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; xstatus&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; password &lt;SPAN style="COLOR:blue;"&gt;FROM&lt;/SPAN&gt; master&lt;SPAN style="COLOR:gray;"&gt;..&lt;/SPAN&gt;sysxlogins &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;WHERE&lt;/SPAN&gt; srvid &lt;SPAN style="COLOR:gray;"&gt;IS&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;NULL&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;name&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; @login_name &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;OPEN&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; login_curs &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;FETCH&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; NEXT &lt;SPAN style="COLOR:blue;"&gt;FROM&lt;/SPAN&gt; login_curs &lt;SPAN style="COLOR:blue;"&gt;INTO&lt;/SPAN&gt; @SID_varbinary&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @name&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @xstatus&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @binpwd &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR:fuchsia;"&gt;@@fetch_status&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;-&lt;/SPAN&gt;1&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;BEGIN&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;PRINT&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'No login(s) found.'&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;CLOSE&lt;/SPAN&gt; login_curs &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;DEALLOCATE&lt;/SPAN&gt; login_curs &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;RETURN&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;-&lt;/SPAN&gt;1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;END&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'/* sp_help_revlogin script '&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;PRINT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @tmpstr&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;' -- '&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'** Generated '&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:fuchsia;"&gt;CONVERT&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;varchar&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="COLOR:fuchsia;"&gt;GETDATE&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;())&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;' on '&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:fuchsia;"&gt;@@SERVERNAME&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;' */'&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;PRINT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;' -- '&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;PRINT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:red;"&gt;''&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;' -- '&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;PRINT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:red;"&gt;'DECLARE @pwd sysname'&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;' -- '&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;WHILE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR:fuchsia;"&gt;@@fetch_status&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;-&lt;/SPAN&gt;1&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;BEGIN&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;IF&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR:fuchsia;"&gt;@@fetch_status&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;-&lt;/SPAN&gt;2&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;BEGIN&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;PRINT&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;''&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SET&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'-- Login: '&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; @name &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;PRINT&lt;/SPAN&gt; @tmpstr&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;' -- '&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;IF&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@xstatus &lt;SPAN style="COLOR:gray;"&gt;&amp;amp;&lt;/SPAN&gt; 4&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; 4 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;BEGIN&lt;/SPAN&gt; &lt;SPAN style="COLOR:green;"&gt;-- NT authenticated account/group &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;IF&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@xstatus &lt;SPAN style="COLOR:gray;"&gt;&amp;amp;&lt;/SPAN&gt; 1&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;BEGIN&lt;/SPAN&gt; &lt;SPAN style="COLOR:green;"&gt;-- NT login is denied access &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SET&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'EXEC master..sp_denylogin '''&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; @name &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;''''&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;PRINT&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;' -- '&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;END&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;ELSE&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;BEGIN&lt;/SPAN&gt; &lt;SPAN style="COLOR:green;"&gt;-- NT login has access &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SET&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'EXEC master..sp_grantlogin '''&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; @name &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;''''&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;PRINT&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;' -- '&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;END&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;END&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;ELSE&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;BEGIN&lt;/SPAN&gt; &lt;SPAN style="COLOR:green;"&gt;-- SQL Server authentication &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;IF&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@binpwd &lt;SPAN style="COLOR:gray;"&gt;IS&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;NOT&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;NULL)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;BEGIN&lt;/SPAN&gt; &lt;SPAN style="COLOR:green;"&gt;-- Non-null password &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;EXEC&lt;/SPAN&gt; sp_hexadecimal @binpwd&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @txtpwd OUT &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;IF&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@xstatus &lt;SPAN style="COLOR:gray;"&gt;&amp;amp;&lt;/SPAN&gt; 2048&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; 2048 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SET&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'SET @pwd = CONVERT (varchar(256), '&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; @txtpwd &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;') &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;-- '&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;ELSE&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SET&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'SET @pwd = CONVERT (varbinary(256), '&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; @txtpwd &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;') -- '&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;PRINT&lt;/SPAN&gt; @tmpstr &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;EXEC&lt;/SPAN&gt; sp_hexadecimal @SID_varbinary&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt;@SID_string OUT &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SET&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'EXEC master..sp_addlogin '''&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; @name &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;''', @pwd, @sid = '&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; @SID_string &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;', @encryptopt = '&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;END&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;ELSE&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;BEGIN&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:green;"&gt;-- Null password &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;EXEC&lt;/SPAN&gt; sp_hexadecimal @SID_varbinary&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt;@SID_string OUT &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SET&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'EXEC master..sp_addlogin '''&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; @name &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;''', NULL, @sid = '&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; @SID_string &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;', @encryptopt = '&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;END&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;IF&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;@xstatus &lt;SPAN style="COLOR:gray;"&gt;&amp;amp;&lt;/SPAN&gt; 2048&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; 2048 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:green;"&gt;-- login upgraded from 6.5 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SET&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'''skip_encryption_old'''&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;ELSE&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;SET&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;'''skip_encryption'''&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;PRINT&lt;/SPAN&gt; @tmpstr &lt;SPAN style="COLOR:gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR:red;"&gt;' -- '&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;END&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;END&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;FETCH&lt;/SPAN&gt; NEXT &lt;SPAN style="COLOR:blue;"&gt;FROM&lt;/SPAN&gt; login_curs &lt;SPAN style="COLOR:blue;"&gt;INTO&lt;/SPAN&gt; @SID_varbinary&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @name&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @xstatus&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @binpwd &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;END&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;CLOSE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; login_curs &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DEALLOCATE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; login_curs &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;RETURN&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt; 0 &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;Ahora debemos ejecutar como hemos mencionado anteriormente el &lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:11.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;SP_HELP_REVLOGIN&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt; y su resultado guardarlo como .sql para luego ejecutarlo en el servidor destino.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:12pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;use&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; master&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;go&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-SIZE:12pt;COLOR:blue;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;EXEC&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Courier New';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt; sp_help_revlogin&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:8pt;FONT-FAMILY:'Times New Roman','serif';mso-bidi-font-size:11.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';mso-bidi-font-size:12.0pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;El resultado de este SP por ej en mi caso es el siguiente:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;/* sp_help_revlogin script -- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;** Generated Feb 7 2007 10:13PM on NOTEBOOK */ -- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;-- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;DECLARE @pwd sysname -- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;-- Login: BUILTIN\Administrators -- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;EXEC master..sp_grantlogin 'BUILTIN\Administrators' -- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;-- Login: maxi -- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;SET @pwd = CONVERT (varbinary(256), 0x010063041400C219E42B05857103FA7537624D18A08EF952471C43B39E21C47C5A098B75FAE89F36B27D912666AA) -- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;EXEC master..sp_addlogin 'maxi', @pwd, @sid = 0xF6630592B345974588C021007A10A99A, @encryptopt = 'skip_encryption' -- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:7.5pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Arial','sans-serif';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-ansi-language:ES-AR;"&gt;Como podemos obervar el SP ha recorrido todos los usuarios de mi servidor (menos el SA) y ha dado como resultado las sentencias de comando que debo ejecutar en mi servidor destino.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:6.5pt;FONT-FAMILY:'Arial','sans-serif';mso-bidi-font-size:7.5pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Arial','sans-serif';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-ansi-language:ES-AR;"&gt;Las claves seran pasadas pero como se observa no podemos identificar cual es la misma, con lo cual es un proceso totalmente seguro ya que lo unico que aseguramos que pasen los logins y sus claves tambien para que el usuario se pueda conectar sin ningun problema en el servidor destino.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:6.5pt;FONT-FAMILY:'Arial','sans-serif';mso-bidi-font-size:7.5pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:6.5pt;FONT-FAMILY:'Arial','sans-serif';mso-bidi-font-size:7.5pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;LINE-HEIGHT:normal;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Arial','sans-serif';mso-bidi-font-size:16.0pt;mso-no-proof:yes;mso-ansi-language:ES-AR;"&gt;Bueno espero que el truco les sea de utilidad&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:6.5pt;FONT-FAMILY:'Arial','sans-serif';mso-bidi-font-size:7.5pt;mso-no-proof:yes;mso-fareast-font-family:'Times New Roman';mso-ansi-language:ES-AR;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=5&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=553117" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/maxiaccotto/archive/tags/sql+2000/default.aspx">sql 2000</category><category domain="http://msmvps.com/blogs/maxiaccotto/archive/tags/pasar+logins/default.aspx">pasar logins</category><category domain="http://msmvps.com/blogs/maxiaccotto/archive/tags/sql+2005/default.aspx">sql 2005</category></item></channel></rss>