/// <summary> /// Creates the login and user in the named DB /// </summary> /// <param name="connString"></param> /// <param name="loginName"></param> public static AccountsResult CreateWindowsLogin(string connString, string loginName) { return((AccountsResult)SqlHandler.ExecuteScalar <int>(connString, SqlCommands.CreateWindowsLogin, new SqlParameter[] { new SqlParameter("loginName", loginName) })); }
/// <summary> /// Removes an existing user from the TFSIPEXEC role of the named DB /// </summary> /// <param name="connString"></param> /// <param name="account"></param> public static AccountsResult RemoveAccountFromTFSIPEXECRole(string connString, string account) { return((AccountsResult)SqlHandler.ExecuteScalar <int>(connString, SqlCommands.RemoveAccountFromTFSIPEXECRole, new SqlParameter[] { new SqlParameter("account", account) })); }
/// <summary> /// Creates the TFSIPEXEC role and grants db_datareader, db_datawriter, EXECUTE rights to it in a named DB /// </summary> /// <param name="connString"></param> public static AccountsResult CreateTFSIPEXECRole(string connString) { return((AccountsResult)SqlHandler.ExecuteScalar <int>(connString, SqlCommands.CreateTFSIPEXECRole, null)); }