• david.griffiths 57552 (11/29/2010)


    Can this script be amended so it will read a spreadsheet with a list of

    Username, password database access?

    You can create a stored procedure that accepts username, password, etc..

    Then in another column of your excel file using concatenate function create the sql statement for each on

    somethin Like =CONCATENATE("EXEC usp_CreateLogin @username='",A2,"', @Password = '",B2,"' … ")

    Then copy the cell and paste it all the way down until a statement per username is created, after that copy the whole column and paste it in the SQL Management Studio

    This should create all the users