Link to home
Create AccountLog in
Oracle Database

Oracle Database

--

Questions

--

Followers

Top Experts

Avatar of profjohan11
profjohan11🇿🇦

unexpire oracle account
12:15:37 SQL> select username,user_id,account_status,password,PROFILE from dba_users;

USERNAME                          USER_ID ACCOUNT_STATUS                   PASSWORD
------------------------------ ---------- -------------------------------- ------------------------------
PROFILE
------------------------------
OPS$SAPSERVICEZPX                      37 OPEN                             EXTERNAL
DEFAULT

OPS$ORAZPX                             39 OPEN                             EXTERNAL
DEFAULT

OPS$ZPXADM                             33 OPEN                             EXTERNAL
DEFAULT

SYS                                     0 OPEN
DEFAULT

SYSTEM                                  5 OPEN
DEFAULT

SAPSR3DB                               38 EXPIRED
SAPUPROF

SAPSR3                                 34 EXPIRED(GRACE)
SAPUPROF

OUTLN                                   9 LOCKED
DEFAULT

APPQOSSYS                              31 EXPIRED & LOCKED
DEFAULT

DIP                                    14 EXPIRED & LOCKED
DEFAULT

DBSNMP                                 30 EXPIRED & LOCKED
DEFAULT

ORACLE_OCM                             21 EXPIRED & LOCKED


Need to unexpire account for user SAPSR3DB VERY URGENTLY PRODUCTION SYSTEM AFFECTED oracle 11g

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Naveen KumarNaveen Kumar🇮🇳

reset the password for them which are showing as EXPIRED ....

reset the password and unlock the account which are showing as EXPIRED & LOCKED

UNLOCK COMMAND WILL DO THAT

SOLUTION
Avatar of Christoffer SwanströmChristoffer Swanström🇨🇭

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of OP_ZaharinOP_Zaharin🇲🇾

- as SAPSR3DB  is marked as expired, you just need to set a new password for it:
ALTER USER SAPSR3DB IDENTIFIED BY <newpassword>;

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of profjohan11profjohan11🇿🇦

ASKER

hi,

This is what worked for me:

assword set to original password fpr user sapsr3db

SQL> conn sapsr3db
Enter password:
ERROR:
ORA-28001: the password has expired


Changing password for sapsr3db
New password:
Retype new password:
Password changed
Connected.
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


My question is as follows:

What is the difference between my solution and using ALTER USER SAPSR3DB IDENTIFIED BY <newpassword>;  ?

I do know that this is a SAP instance running on oracle so if you only do this and set new password you may have inconsistencies in sap due toe sapuser table not being updated.

ALTER USER SAPSR3DB IDENTIFIED BY <newpassword>;  ?


Another sap suggessted solution was to use brconnect -u sapsr3db/\password -f chpass  and this did not work either.

I will award points shortly to all who answers and thanks for your replies.

Johan

You say you set the password to the original one. Where did you do that?

ASKER CERTIFIED SOLUTION
Avatar of OP_ZaharinOP_Zaharin🇲🇾

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

-- get you r account uloncked and set password to Sap1234!

alter user SAPSR3DB account unlock;

alter user SAPSR3DB identified by Sap1234!;



Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of profjohan11profjohan11🇿🇦

ASKER

H guys,

How do I determine the password_grace_period before account locks.

i.e. username sapsr3 and profile name sapuprof



SELECT * FROM dba_profiles WHERE resource_name = 'PASSWORD_GRACE_TIME'

Open in new window


To be more accurate:
SELECT * FROM dba_profiles WHERE resource_name = 'PASSWORD_GRACE_TIME' AND profile = 'SAPUPROF'

Open in new window


Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


this query will give you those details..

you need to query dba_users to get the profile_name of an user an that should be substituted in below query to get the desired result

select * from dba_profiles where profile='<PROFILE_NAME>' and name='PASSWORD_GRACE_TIME';


SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Avatar of profjohan11profjohan11🇿🇦

ASKER

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Check expiry_date from dba_users and then add the password_grace_time from dba_profiles.

Here's a query to do that, just add the proper user name:

SELECT
  usr.username
  ,usr.expiry_date
  ,prf.limit
  ,usr.expiry_date + prf.limit AS grace_time_limit
FROM
  dba_users usr
INNER JOIN
  dba_profiles prf
ON
  prf.profile = usr.profile
AND
  prf.resource_name = 'PASSWORD_GRACE_TIME'
WHERE
  usr.username = <ADD USER NAME>

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


By the way, I think your original question about "unexpiring" accounts has been answered. For any follow-up questions it would be fair to open a new question.
Oracle Database

Oracle Database

--

Questions

--

Followers

Top Experts

Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.