Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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);
            }
        }