Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Sybase SQL Server 4.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

  1                       Version 4.0 -- 1/15/89             sp_addlogin
  ______________________________________________________________________

  NAME:  sp_addlogin

  FUNCTION:
       Authorizes  a  new  SQL Server  user  by  adding  an   entry   to
       master.dbo.syslogins.

  SYNTAX:
       sp_addlogin loginame [, passwd [, defdb]]

  EXAMPLES:
       1)  sp_addlogin victoria








  sp_addlogin             Version 4.0 -- 1/15/89                       2
  ______________________________________________________________________
           Creates a SQL Server login for someone named victoria.  Since
           the  passwd and defdb parameters are not included, victoria's
           password is NULL and his default database is master.

       2)  sp_addlogin albert, food, corporate

           Creates a SQL Server login for albert.  His password is  food
           and his default database is corporate.

  PARAMETERS:
       loginame -  is the login name of the user.  Login names must fol-
           low rules for identifiers.
       passwd -  is the user's password.  If no password is  given,  the
           default password is the NULL value.
       defdb -  is the name of the user's default or ``home''  database-
           the  database  to  which the user is connected when he or she
           logs in.  If no defdb is given, the default is master.



  3                       Version 4.0 -- 1/15/89             sp_addlogin
  ______________________________________________________________________

  COMMENTS:

       o After  sp_addlogin  is  executed,  the  user  can  log  in   to
         SQL Server.
       o The user can change his or her own password at  any  time  with
         sp_password.   The  System  Administrator can change any user's
         password with sp_password.

       o If a third parameter (the name of a default database)  is  sup-
         plied,  the user is connected to the specified database without
         the USE command and without passing through  master.   However,
         the  user  cannot  use  the default database until he or she is
         given access to that database by its Database Owner (using  the
         sp_adduser or sp_addalias procedures).
       o The user can change his or her own default database at any time
         with  sp_defaultdb.   The  System  Administrator can change any



  sp_addlogin             Version 4.0 -- 1/15/89                       4
  ______________________________________________________________________
         user's default database with sp_defaultdb.

  MESSAGES:
       An SQL Server login for loginame has been created successfully.
       Someone other than the System Administrator has executed the pro-
           cedure.   Only  the  System  Administrator  can add logins to
           SQL Server.
       A user with that login  name  has  already  been  added.   Choose
           another loginame.
       The specified default database does not exist.  Create the  data-
           base first or choose a database that already exists as defdb.

  PERMISSIONS:
       Execute permission to System Administrator.

  TABLES USED:
       master.dbo.sysdatabases, master.dbo.syslogins



  5                       Version 4.0 -- 1/15/89             sp_addlogin
  ______________________________________________________________________

  SEE ALSO:
       sp_adduser, sp_addalias, sp_defaultdb, sp_droplogin, sp_password,
       USE















Typewritten Software • bear@typewritten.org • Edmonds, WA 98026