ORACLE basic commands and user management

Source: Internet
Author: User


ORACLE basic commands and user management 1. connection command connection: conn [ect] user name/password @ network server [as sysdba/sysoper] If you log on to sys, because sys can have two roles, therefore, you must log on as the "connect user name/password as role" and specify the login role. Www.2cto.com disconnect from the solution: disc [onnect] Change the User Password: passw [ord] the user name must be logged in as the administrator (sys/system) to modify (Others) password jack;) if a common user changes his or her password, enter the "password" command to view the current Login user: show user. exit command window: exit or quit 2. file Operation Command Execution external file: start c: \. SQL or @ c: \. SQL; edit the external file: edit c: \. SQL; record window command: spool d: \ B. SQL ;.......... spool off; 3. ORACLE user management creates new users: create user username identified by password; (create user jack indentified by tiger) new users do not have the permission to connect to the current scheme, must be authorized (connection permission): grant Connect to user name; (grant connect to jack;) Change Password: in addition to the two types described earlier, there is also a new password: alter user Username identified by; delete user: drop user Username [cascade]; if the user is deleted with cascade, it means that the user is deleted, and all the tables and views created by the user are deleted at www.2cto.com. the user authorizes a new user not to have any permissions, including the connection scheme permissions, and must be authorized. The corresponding permission names for adding, deleting, modifying, and querying a table are: insert, delete, update, and select to grant the user a permission: grant permission name on user name. table name to user name (grant insert/delete/update/select on scott. emp to jack) to grant all the preceding permissions to a user, you can grant one permission or grant all on user name at a time. table name to user name (grant all on scott. emp to jack) to revoke a permission: revoke permission name on user name. table name from username (revoke insert/delete/update/select on scott. emp from jack) to revoke all the preceding permissions: revoke all on user name. table name from username (revoke all on scott. emp from jack) if the system administrator uses the with grant (admin) option when authorizing a user, the user can grant the permission to another user.
However, once the Administrator revokes this permission, the permissions of other users are also revoked. run the following commands on www.2cto.com to lock the DBA account: create profile file name limit failed_login_attempts times password_lock_time: alter user Username profile file name unlock: alter user Username account unlock Stop command: create profile file name limit password_life_time interval days password_grace_time Grace days [Number of days after password_reuse_time password can be reused] Delete profile: drop profile file name [cascade] author heardy

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.