Creating a SQL Login (for a Windows Login or Group)

Creating a SQL Login (for a Windows Login or Group)

Creates a SQL login for a given Windows user login or group name. ::Requires OSQL (Installed with SQL Client Tools) CALL :ExecSQLQuery "ServerName" "" "" "MASTER" "EXEC sp_grantlogin 'DOMAINNAME\DomainObject" GOTO:EOF ExecSQLQuery SETLOCAL ENABLEEXTENSIONS Set OutFile=%RANDOM%.txt Set SQL=SET NOCOUNT ON %5 ::Remove quotes Set SQL=%SQL:"=% Set Server=%1 IF %Server%=="" Set Server="(local)" IF NOT %2==...

Read the full article

Error Code / Error Levels

Error Code / Error Levels

I hate when running a schell script or command, it errors, and an error code with no description is returned.  How am I supposed to know what error code “14080″ means?  The info below should help out if you find yourself in the same situation. How to translate error codes to thier text descriptions from the command prompt: net helpmsg ErrorCode Some Errror Codes and thier descriptions: Code Description� 0 The operation completed successfully.� 1 Incorrect function.� 2 The ...

Read the full article