Tuesday, 22 July 2014

Oracle11g: Expiry Password Ora-28002

Login with the Db user :

C:\users\ruchi>set oracle_sid=xyz
C:\users\ruchi>sqlplus  / as sysdba

Run following query on the sql prompt:

SQL> SELECT USERNAME,EXPIRY_DATE FROM DBA_USERS;
USERNAME                       EXPIRY_DA
------------------------------ ---------
OUTLN                           10-MAY-14
PS                                   10-MAY-14
SYS                                 10-MAY-14
SYSTEM                         10-MAY-14
PEOPLE                         18-MAY-14
SYSADM                        17-JUN-14
APPQOSSYS                  11-NOV-13
DIP                                 11-NOV-13
DBSNMP                       11-NOV-13

ORACLE_OCM              11-NOV-13


Or you can run the following one :

select username,account_status,expiry_date from dba_users;
USERNAME                       ACCOUNT_STATUS                   EXPIRY_DA
------------------------------ -------------------------------- ---------
OUTLN                            OPEN
SYSADM                         OPEN
PS                                   OPEN
SYS                                 OPEN
PEOPLE                         EXPIRED                                      07-APR-14
SYSTEM                         EXPIRED                                     07-APR-14
APPQOSSYS                  EXPIRED & LOCKED                30-SEP-13
DIP                                 EXPIRED & LOCKED                  30-SEP-13
DBSNMP                       EXPIRED & LOCKED                  30-SEP-13
ORACLE_OCM              EXPIRED & LOCKED                 30-SEP-13

10 rows selected.

Then run,

sql>select password from sys.user$ where name='PEOPLE';;

PASWORD
------------------------------
61345973333c38A

sql>alter user PEOPLE identified by values '61345973333c38A';

User altered.

COMMIT;

Commit complete.

Sql>  select username,account_status,expiry_date from dba_users;

USERNAME                       ACCOUNT_STATUS                   EXPIRY_DA
------------------------------ -------------------------------- ---------
OUTLN                          OPEN
SYSADM                       OPEN
PEOPLE                         OPEN
PS                                   OPEN
SYS                                OPEN
SYSTEM                        EXPIRED                                     07-APR-14
APPQOSSYS                EXPIRED & LOCKED                 30-SEP-13
DIP                                 EXPIRED & LOCKED                 30-SEP-13
DBSNMP                       EXPIRED & LOCKED                 30-SEP-13
ORACLE_OCM            EXPIRED & LOCKED                 30-SEP-13

10 rows selected.



Sql>  select resource_name,resource_type, limit from dba_profiles where profile=' DEFAULT';

no rows selected

Sql> select resource_name,resource_type, limit from dba_profiles where profile='  2  ;
Error:
Ora-01756: quoted string not properly terminated

SQL> SELECT profile
  2    FROM dba_users
  3   WHERE username = 'KENNAM'
  4
Sql>  Select  PROFILE FROM DBA_USERS WHERE username = 'Sys';
  2  ;

Profile
------------------------------
DEFAULT

Sql> select Ressource_type= limit from dba_profiles where profile='DEFAULT';
select Resource_type= limit from dba_profiles where profile='DEFAULT'
                    *
Eror aat line 1:
Ora  - 00923: FROM keyword not found where expected


Sql > ED
C:\Users\Admiinistrator>^V^V^Q s
'???' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Administrator>
C:\Users\Administrator>SQLPLUS / AS SYSDBA

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 10 11:41:28 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to::
Oracle Datbase 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning,OlAP, Data Mining and Real Application Testing optionss

SQL> select Resource_type=limit from dba_profiles where profile='Default"'
  2  /
select Resource_type=limit from dba_profiles where profile='Default"'
                    *
Eror at line 1:
Ora--00923: FROM keyword was not found where needed


Sql >> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

Profile altered.

SQL> COMMIT;

Commit complete.

SQL> ALTER USER SYSADM IDENTIFIED BY SYSADM;

User altered.

Sql >  COMIT
  2  ;
error


sql>commit;
Commit complete.



2 comments: