Creating login accounts

The following steps describe creating a login account for a particular server and manage permissions for the users.

  1. A system security officer creates a login account for a new user.

  2. A system administrator or database owner adds a user to database or assigns a user to a group.

  3. A system security officer grants specific roles to the user.

  4. A system administrator, database owner, or object owner grants the user, or group specific permissions on specific commands and database objects.

Use create login to add a new login name to Adaptive Server. Only the system security officer can execute create login.

See create login in the Reference Manual: Commands for complete syntax.

At login creation, the crdate column in syslogins is set to the current time.

The suid column in syslogins uniquely identifies each user on Adaptive Server. A user’s suid remains the same, no matter what database he or she is using. The suid 1 is always assigned to the default “sa” account that is created when Adaptive Server is installed. Other users’ server user IDs are integers assigned consecutively by Adaptive Server each time create login is executed.

For information about choosing passwords, see Choosing and creating a password.

The following statement sets up an account for the user “maryd” with the password “100cents,” the default database (master), the default language (us_english), and no full name:

create login maryd with password "100cents"

The password requires quotation marks because it begins with 1.

After this statement is executed, “maryd” can log in to Adaptive Server. She is automatically treated as a “guest” user in master, with limited permissions, unless she has been specifically given access to master.

The following statement sets up a login account “omar_khayyam” and password “rubaiyat” and makes “pubs2” the default database for this user:

create login omar_khayyam with password rubaiyat default database pubs2