Authentication

  • 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

  • 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_Integrated1Allow Windows Authentication only.
    SQLDMOSecurity_Mixed2Allow Windows Authentication or SQL Server Authentication.
    SQLDMOSecurity_Normal0Allow SQL Server Authentication only.
    SQLDMOSecurity_Unknown9Security type unknown.
  • Great, thanks

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply