In oracle, how does one modify the sys password and sys the system password?

Source: Internet
Author: User


Take a look at the following example: Use a sys account to connect to the database: SQL> conn sys/test as sysdba; Connected to Oracle9i Enterprise Edition Release 9.2.0.1.0 Connected as SYS
The following query shows that only the sys account has the permissions of sysdba and sysoper. SQL> select * from v $ pwfile_users; USERNAME SYSDBA SYSOPER ------------------------------ ------ ------- SYS TRUE create a new user test: SQL> create user test identified by test 2 default tablespace users www.2cto.com 3 temporary tablespace temp 4 quota unlimited on users; User created
Grant the user connection and modification permissions to the account: SQL> Grant create session, alter user to test; grant succeeded. The following query again shows that only the sys account has sysdba and sysoper permissions. SQL> select * from v $ pwfile_users; username sysdba sysoper ------------------------------ ------- sys true to connect to the database using user test: SQL> conn test/test; connected to Oracle9i Enterprise Edition Release 9.2.0.1.0 Connected as test modify the password of database superuser sys: SQL> alter user sys identified by abc; User altered sys connect to the database with the modified password, indicates that the modification is successful. SQL> conn sys/abc as sysdba Connected to Oracle9i Enterprise Edition Release 9.2.0.1.0 Connected as SYS www.2cto.com after all the operations are completed and successful, at the end of the following query, only the sys account has the permissions of sysdba and sysoper. SQL> select * from v $ pwfile_users; USERNAME SYSDBA SYSOPER ------------------------------ ------- SYS TRUE is summarized as follows:
1. By default, as long as you have the alter user permission, you can modify any user in oracle, including all optional in alter user. Example: SQL> conn test/test Connected to Oracle9i Enterprise Edition Release 9.2.0.1.0 Connected as test SQL> alter user zgh default tablespace system 2 quota 20 m on system; user altered SQL> alter user zgh default tablespace users 2 quota unlimited on users; User altered
2. By default, the system account can change the sys password because it belongs to the dba role, and the dba role certainly has the alter user permission.
3. The so-called highest permission. By default, the sys account has the sysdba permission and is a Super User in oracle. Therefore, after logging on to sys as sysdba, you can perform almost any operation in the database. In addition, do not authorize other users with sysdba permissions. Otherwise, database security issues may occur. Www.2cto.com
4. By default, the system account belongs to the dba role, and its permissions are second only to the sys account. View user permissions in Oracle;
View user system permissions: select * from dba_sys_privs; select * from all_sys_privs; select * from user_sys_privs; view User object permissions: select * from privileges; select * from all_tab_privs; select * from user_tab_privs; view All roles: select * from dba_roles; view the roles owned by the user: select * from dba_role_privs; select * from user_role_privs; view the permissions of the Role: www.2cto.com select * from role_sys_privs; select * from role_tab_privs; view all system permissions select * from system_privilege_map; view all object permissions select * from table_privilege_map; Author: aaron8219

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.