.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Code Snippets >> SQL Query >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Change SQL Server Authentication Mode Using TSQL

Posted By:Sajid P K       Posted Date: October 14, 2010    Points: 5    Category: SQL Query    URL: http://www.dotnetspark.com  

This Code Guide you, how to change SQL server Authentication Mode using TSQL

We can use undocumented procedure xp_regwrite/xp_instance_regwrite, to change the authentication mode form query.



exec master..xp_instance_regwrite N'HKEY_LOCAL_MACHINE',N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer','LoginMode', N'REG_DWORD', 2

  0 or 2 => Mixed Mode


   1    =>  integrated


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend