protected void ExecuteCore() { SqlServerAdministrator = new SqlServerAdministrator(Settings); if (!string.IsNullOrEmpty(UserName)) { Logger.Log("Creating login and user '{0}' in database {1}", new object[] { UserName, Settings.DatabaseName }); SqlServerAdministrator.CreateLogin(UserName, Password); SqlServerAdministrator.CreateUser(UserName, false); } }
public void ExecuteCore() { SqlServerAdministrator = new SqlServerAdministrator(AmbientSettings.Settings ?? Settings); if (!string.IsNullOrEmpty(UserName)) { Logger.Log("Creating windows login '{0}' in database {1}", new object[] { UserName, Settings.DatabaseName }); SqlServerAdministrator.CreateWindowsLogin(UserName); SqlServerAdministrator.CreateUser(UserName, false); } }
public void Execute(Assembly asm) { Settings = new XmlSettingsParser(asm); SqlServerAdministrator = new SqlServerAdministrator(AmbientSettings.Settings ?? Settings); if (!string.IsNullOrEmpty(UserName)) { Logger.Log("Creating login and user '{0}' in database {1}", new object[] { UserName, Settings.DatabaseName }); SqlServerAdministrator.CreateLogin(UserName, Password); SqlServerAdministrator.CreateUser(UserName, false); } }