June 3, 2004 at 8:41 am
Hi,
does anybody know if you can change the authentication on a server via a script. And if not, how to install MSDE to use SQL server authentication?
Any and all help is greatly appreciated.
Wynand
June 3, 2004 at 10:52 am
Not sure with T-SQL but you can do the below through DMO. If you are not faimiliar with DMO, save the file below as .vbs and execute it.
dim osqlserver
dim sSQLserver
dim susername
dim spassword
set osqlserver = createobject("SQLDMO.SQLServer")
sSQLSERver = XXXXX
susername = xxxxx
spassword = xxxxx
osqlserver.connect sSQLServer, susername, spassword
osqlserver.integratedsecurity.securitymode = 1
Below are other values which you can use
SQLDMOSecurity_Integrated | 1 | Allow Windows Authentication only. |
SQLDMOSecurity_Mixed | 2 | Allow Windows Authentication or SQL Server Authentication. |
SQLDMOSecurity_Normal | 0 | Allow SQL Server Authentication only. |
SQLDMOSecurity_Unknown | 9 | Security type unknown. |
June 4, 2004 at 3:02 am
Great, thanks
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply