Oracle Password File

Source: Internet
Author: User

The Oracle password file is used to store the passwords of all users who connect to the database with the sysdba or sysoper permission. to remotely connect to the database with the sysdba permission, you must use the password file. Otherwise, you cannot connect to the database, because the sys user must use the sysdba or sysoper method to connect to the database, that is, the sys user must use a password file to connect to the database, therefore, I think it makes no sense to store the password of the sys user in the database! The advantage of using the password file is that even if the database is not in the open state, you can still connect to the database through password file verification. After installing oracle, the common user is not granted the sysdba permission. The password file only stores the sys password. If the sysdba permission is then granted to the common user, at this time, the password of a common user will be read from the database and saved in the password file. Of course, the database must be in the open state.

If the database's sysdba is authenticated by the database, the password information will be stored in this file. What should I do if I accidentally forget the sys password?

Step 1: Change Oracle's sysdba logon to OS authentication: Change sqlnet. ora (Windows: \ oracle \ product \ 10.2.0 \ db_1 \ NETWORK \ ADMIN) SQLNET. AUTHENTICATION_SERVICES = (ETS)

At this time, users in the ORA_DBA group can log on to the database with sysdba without a password, such as sqlplus sys as sysdba, even if an incorrect password is specified, you can log on to sqlplus sys/aaaaa @ orcl as sysdba. Because the password is not checked at this time, the system does not even check whether the password is sys, once the as sysdba is specified, it will Log On as A sys user.

Step 2: recreate the password file: orapwd file = D: \ oracle \ product \ 10.2.0 \ db_1 \ database \ PWDorcl. ora password = test entries = 5

Note: file = cannot be followed by spaces.

Step 3: Change the database login to database Authentication: Change sqlnet. ora (for Windows, under: \ oracle \ product \ 10.2.0 \ db_1 \ NETWORK \ ADMIN)

SQLNET. AUTHENTICATION_SERVICES = (NONE)

At this time again with the wrong password to log on will get the error: ORA-01017: invalid username/password; logon denied

You can log on to the system using the password specified in step 2: sqlplus sys/test @ orcl as sysdba;

After logon, you can view the user information related to the password file through select * from v $ pwfile_users.

The file specified in step 2 above is the default file name of the Oracle default path. If you want to use another file name, you can add information in the registry, for example, sid is orcl, you can set the value to the full path value of the file by adding a string ora_orcl_pwfile. In unix, environment variables are used.

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.