Data Control Language, User-ID & Authentication (Part 2 of 2)
How does SQL know to associate your user-ID with the statement or program being executed?When you sign-on to an interactive SQL computer system, you generally enter a user-ID and a password. Once you have signed-on to the system, your user-ID has been established until you sign-off or cancel the computer session.
On a database server, when you sign-on, your user-ID is established by the work station you are using.
If you use a query program or a forms-based system, again your sign-on has established your user-ID.
When several people have identical needs, you can create a user-ID for a user group. If everyone in the payroll department can perform the same commands on the PAYROLL_TBL, then they can be given the same user-ID and password or they can be assigned their own user-ID and password.
For example:
Users from the payroll department may have user-IDs of PRUSER.
Users from the accounts payable department may have user-IDs of APUSER.
The president of the company may have a user-ID of WILLIAMD.
The database administrator may have a user-ID of K3R7CFC or DBA1.
> DB2 allows a single user to have a primary user-ID, and multiple secondary user-IDs.
> SQL Server and Sybase allow a single user to have both a single user-ID and a group user-ID.