Create users in the _User table
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Using the CREATE USER statement, you
can only create users in the _User table. Users
defined in other user accounts must be created outside of SQL. Use the
following syntax to employ the CREATE USER statement:
|
Examples: CREATE USER statement
In the following example, an account with DBA privileges
creates the 'username' 'GPS' with 'password'
'star'.
|
In the following example, CREATE USER creates
the user Jasper to connect to mtdomain domain
with the password spaniel:
|
The user Jasper should be associated with the
tenant identified by the domain mtdomain.
A user's password can be changed easily by using the ALTER
USER statement, as shown:
|
To set a new password without specifying the old password, use the following syntax:
|
Examples: ALTER USER statement
The following example demonstrates the use of the ALTER
USER statement:
|
The following example demonstrates how to change the password
for a user associated with a domain. The following ALTER
USER statement changes the password from normandy to brittany for
the user Jasper associated with mtdomain domain:
|
When users are created, the default DBA (the user who created the database) becomes disabled. It is important to grant DBA privileges to at least one user so you will have a valid DBA account.
For complete details on the CREATE USER
statement, see OpenEdge SQL Reference.