PROBLEM:
While granting sysdba privilege to an user, got below error.
SQL> grant sysdba to MONITUSER;
*
ERROR at line 1:
ORA-28017: The password file is in the legacy format
SOLUTION:
Recently we upgraded our database from 11g to 12c. And It is an expected behaviour from 12.1.0.2 database release onwards.
Check the format of the pwd file.
$ orapwd describe file=orapwPROD Password file Description : format=LEGACY ignorecase=N
As the format of the password file is of LEGACY format, it is not capable of holding the SHA-512 verifiers.( NEW IN ORACLE 12C).
So, to fix it, either create a new password file or convert the legacy file to new 12c format.
1. Create a new password file:
orapwd file=orapwPROD password=oracle#123 force=y format=12
2. convert the legacy file to new format.
> orapwd file=orapwPROD password=oracle#123 force=y format=12 input_file=orapwPROD