https://dwgeek.com/netezza-create-user-command-examples.html/
CREATE USER
Use the CREATE USER command to create a new user account.
Syntax
<clause>
represents one of:<seclabel>
represents:<access_time>
represents:Inputs
Input | Description |
---|---|
<username> | The name of the user account to be created. This name must be unique among global objects, that is, it cannot be shared by another user, or by any database, group, or scheduler rule. |
PASSWORD | The password for this account. Specify NULL to create a user with no password. NULL is the default. You can specify a password when you alter a database user account, but the password is used only for LOCAL authentication. When using LOCAL authentication, the user must have a password to log on; a null password is not allowed. If you change authentication from LDAP or Kerberos to LOCAL, use the ALTER USER command to specify a password for the user. A user who has privileges to access the _t_user table can find all users with null passwords by running the following command: |
EXPIRE PASSWORD | Forces the user to change the password after logging in for the first time. |
PASSWORDEXPIRY | The number of days that the password is valid. If you do not specify the option, or if you specify a value of 0, the password does not expire. After the password expires, the database displays the message Restricted Session. User password has expired the next time that the user logs in to the database. The user must change the account password such as by using the ALTER USER command to regain full capabilities. The expiration is used for locally authenticated accounts. If you do not set an expiration for the user account, the account password could expire if there is a expiration for a database group in which the user is a member, or if the system-wide expiration is set. |
AUTH | The authentication type to be used by the user:
|
SYSID | The user ID to be associated with the new user account. The default is the larger of:
|
IN GROUP | The user group or groups to which the user is to be added as a new member. |
IN RESOURCEGROUP | The resource group to which the user is to be assigned. |
VALID UNTIL | The date (and, optionally, the time) when this user account expires. |
DEFPRIORITY | The default priority for queries submitted by the user. |
MAXPRIORITY | The maximum priority for a query submitted by the user. |
ROWSETLIMIT | The maximum number of rows that a query made by the user can return. The value can be:
|
SESSIONTIMEOUT | The number of minutes that a session can be idle before the system terminates it. The value can be:
|
QUERYTIMEOUT | The number of minutes that a query can run before the system notifies the administrator. The value can be:
For the administrator to receive the issued message, the RunAwayQuery event rule must be enabled. This rule is described in the IBM Netezza System Administrator’s Guide. |
CONCURRENT SESSIONS | The maximum number of concurrent sessions this user can have. The value can be:
|
SECURITY LABEL | The security label of the user. The default is PUBLIC:: . The label must be specified in single quotation marks so that identifiers in the label do not conflict with other user clauses. |
AUDIT CATEGORY | One or more audit categories that are to be added to the security label during audit logging for the user. |
COLLECT HISTORY | Whether the system is to collect history data for the sessions of this user:
|
ALLOW CROSS JOIN | Whether the user can carry out explicit cross joins:
|
ACCESS TIME | When the user is allowed to start sessions on the system:
|
Output
Output | Description |
---|---|
CREATE USER | The command completed successfully. |
Privileges
- If you specify the SECURITY LABEL, AUDIT CATEGORY, or COLLECT HISTORY options, you must have the Manage Security privilege.
- If you specify any of the other options, you must satisfy at least one of the following criteria:
- You are the admin user.
- You are the owner of the database or schema.
- Your account has the Create User privilege
- If you specify the IN GROUP option, you must also have List access to the corresponding group or to the Group object class.
Usage
- Create a user account with a password that must be changed when the user logs on for the first time:
- Create a user account with a password that expires after 60 days:
- Create a user account that expires at 1 PM on January 1, 2003:
- Create a user account with an audit category:
- Create a user account that can start a session only Monday to Friday between 9:00 and 13:00 and Wednesday between 14:00 and 17:00:
Komentar
Posting Komentar
Silakan dikomen...