Thursday, 16 February 2017

User Management - II

This is the very basic task a DBA do in his initial stage.

Creating a User

SYSTEM and SYS are the  users that are created by default , and has the the passwords MANAGER and CHANGE_ON_INSTALL.

Example:
SQL >create user username identified (by password | externally);
SQL> create user Nikhil identified by Pass123 ;

To change a password of a user, use the alter user command as a dba user:
SQL > alter user Nikhil identified by newpassword ;


Granting Limited Resources
SQL > alter user Nikhil quota 100M on USERS;

A user’s space quota may be set when the user is created , via the create user command.
If there is no limit on the user’s space quota, then you can grant that user the UNLIMITED TABLESPACE system privilege.

SQL > alter user Nikhil quota unlimited on USERS;

                         
Password Management
Passwords can expire, and accounts may be locked due to repeated failed attempts to connect. When you change your password, a password history may be maintained in order to prevent reuse of previous passwords.
The expiration characteristics of your account’s password are determined by the profile assigned to your account. Profiles, which are created by the create profile command, are managed by the dba.

• The “lifetime” of your password, which determines how frequently you must change it
• The grace period following your password’s “expiration date” during which you can change the password
• The number of consecutive failed connect attempts allowed before the account is automatically “locked”
• The number of days the account will remain locked
• The number of days that must pass before you can reuse a password
• The number of password changes that must pass before you can reuse a password

Another way to change password: use password command

SQL> password
(hit enter)

This will prompt you your old and new password.






No comments:

Post a Comment