Home> php教程> PHP开发> body text

Two methods to set Oracle user password to not expire

高洛峰
Release: 2017-01-06 11:54:36
Original
1394 people have browsed it

1. Under SQL Plus, log in as DBA

Username/Password@ServerSID as sysdba

Method 1: (Note that the following must be enclosed in double quotes)

C:/Documents and Settings/ssy>sqlplus sys/system@test as sysdba

SQL*Plus: Release 9.2.0.1.0 - Production on Monday, March 17 18:01 :41 2008 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connect to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.1.0 - Production

Method 2:

C:/Documents and Settings/ssy>sqlplus /nolog SQL*Plus: Release 9.2.0.1.0 - Production on Monday, March 17 17:59: 08 2008 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> conn sys/system@test_192.168.80.38 as sysdba 已连接。 SQL> quit
Copy after login

2. Check which proifle the user has, usually default:

sql>SELECT username,PROFILE FROM dba_users;
Copy after login
Copy after login

3. View the password validity period setting of the specified profile (such as default):

sql>SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME';
Copy after login

4. Change the password validity period from the default 180 days to "unlimited":

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Copy after login
Copy after login

There is no need to restart the database after the modification, it will take effect immediately.

5. After modification, accounts that have not been prompted with the ORA-28002 warning will not encounter the same prompt again;

Accounts that have been prompted must change their passwords again, for example:

$sqlplus / as sysdba sql> alter user smsc identified by <原来的密码> ----不用换新密码1、在SQL Plus下,以DBA身份登陆
Copy after login

Username/Password@ServerSID as sysdba

Method 1: (Note that the following must be enclosed in double quotes)

C:/Documents and Settings/ssy>sqlplus sys/system@test as sysdba

SQL*Plus: Release 9.2.0.1.0 - Production on Monday, March 17 18:01: 41 2008 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connect to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.1.0 - Production

Method 2:

C:/Documents and Settings/ssy>sqlplus /nolog SQL*Plus: Release 9.2.0.1.0 - Production on Monday March 17 17: 59:08 2008 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> conn sys/system@test_192.168.80.38 as sysdba is connected.
SQL> quit

2. Check which profile the user has, usually default:

sql>SELECT username,PROFILE FROM dba_users;
Copy after login
Copy after login

3. Check the specified profile (such as default) password validity period setting:

sql>SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME';
Copy after login

4. Change the password validity period from the default 180 days to "unlimited":

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Copy after login
Copy after login

There is no need to restart the database after modification, it will take effect immediately.

5. After modification, accounts that have not been prompted with the ORA-28002 warning will not encounter the same prompt again;

Accounts that have been prompted must change their passwords again, for example:

$sqlplus / as sysdba sql> alter user smsc identified by <原来的密码> ----不用换新密码
Copy after login

The above are the two methods that the editor introduces to you to set the Oracle user password to not expire. I hope it will be helpful to you. If you If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank you all for your support of the PHP Chinese website!

For more related articles on two ways to set Oracle user passwords to non-expiry, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!