1. Create password file command
Orapwd file = <> password = <> entries = maximum number
The file naming rules are in orapw in unix/linux and pwd. ora in windows.
For more information, see the description below (this is a summary of pub's netizens)
1. unix environment:
Query the Administrator's Reference 10g Release 2 (10.2) for UNIX-Based Operating Systems.
1. Log in as the Oracle software owner.
2. Use the orapwd utility to create the password file as follows:
$ ORACLE_HOME/bin/orapwd file = filename password = password entries = max_users
...
Filename The name of the file in which password information is written
The name of the file must be orapwsid, and you must supply the full
Path name. Its contents are encrypted. Typically, the password file is
Created in the $ ORACLE_HOME/dbs directory.
Note that the password file must use orapw in unix.
2. windows environment:
Checked Platform. Guide 10g Release 2 (10.2) for Microsoft Windows (32-Bit) (64-bit not found)
To create and populate a password file:
(1). Create a password file with the Password Utility:
C:> orapwd FILE = PWDsid. ora PASSWORD = password ENTRIES = max_users
Where
Specified FILE specifies the password filename.
Specified SID identifies the database instance.
Your PASSWORD sets the password for account SYS.
Incluentries sets maximum number of ENTRIES in password file. This corresponds
To maximum number of distinct users allowed to connect to the database
Simultaneously with either the SYSDBA or the sysoper dba privilege.
(2). Set initialization parameter file parameter REMOTE_LOGIN_PASSWORDFILE
Exclusive, shared, or none.
In search of the password file, Oracle Database looks in the registry for the value of parameter
ORA_SID_PWFILE. If no value is specified, then it looks in the registry for
Value of parameter ORA_PWFILE, which points to a file containing usernames,
Passwords, and privileges. If that is not set, then it uses the default:
ORACLE_BASEORACLE_HOMEDATABASEPWDsid.ORA.
The default value is shared.
Note that in the windows environment, a large part is based on the setting of ora_sid_pwfile or ora_pwfile in the registry. The default value, as the paulyibinyi brother pointed out, is pwd. ora (this is not in unix. ora suffix ).
2. In windows, connect/as sysdba and other users can log on without a password.
1. This is because oracle adopts the OS authentication method. For details, refer to sqlnet. ora. The specific content is as follows:
SQLNET. AUTHENTICATION_SERVICES = (CNT)
Change it
SQLNET. AUTHENTICATION_SERVICES = (NONE)
This is the oracle authentication method.
2. Because the OS authentication method is used, you can choose the operating system> Control Panel> Computer Management> the user to remove the current user's attribute group ORA_DBA,
If you do not have a user name or password, you cannot.
As follows:
SQL> connect/as sysdba
ERROR:
ORA-01031: insufficient privileges
SQL> connect sys/oracle as sysdba
Connected.
3. Use alter user identified by... to change the password.
Alter user sys identified by abc, and change the password in the database to abc together with the password in the password file;
4. What if the password file is lost?
Use orapwd to create a new one.