Home Database Mysql Tutorial Oracle 密码过期 ORA-28002: 7 天之后口令将过期 的解决方法

Oracle 密码过期 ORA-28002: 7 天之后口令将过期 的解决方法

Jun 07, 2016 pm 05:12 PM

Oracle 密码过期 ORA-28002: 7 天之后口令将过期 的解决方法

今天福州大学的合作伙伴说我们数据库的登录密码过期。他们现在平台无法登录。希望得到解决。

登陆Oracle数据库时错误信息提示:“ORA-28002: 7 天之后口令将过期”。

原因:oracle11g中默认在default概要文件中设置了"PASSWORD_LIFE_TIME=180”所导致,oracle用户的密码必须在180天内更改,或则启动数据库的时候会提示连接失败.

oracle 密码过期的解决方法,按照如下步骤进行操作:

1、查看用户的proifle是哪个,一般是default:

sql>SELECT username,PROFILE FROM dba_users;

2、查看指定概要文件(如default)的密码有效期设置:

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

(如果这样写有可能提示“你未选中行”,其实这样就行了

SELECT * FROM dba_profiles WHERE resource_name='PASSWORD_LIFE_TIME';

我的就是这样)

3、将密码有效期由默认的180天修改成“无限制”:

sql>ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

如需更改为有限制的,如60天:

SQL>alter profile default limit PASSWORD_LIFE_TIME 60 ;

修改之后不需要重启动数据库,会立即生效。

另外的思路

查看用户所属的 profile ,一般为DEFAULT

SQL>select * from dba_profiles where resource_type='PASSWORD';

 

取消密码管理:

SQL>alter profile DEFAULT limit unlimited;
如:
SQL>alter profile DEFAULT limit password_reuse_time unlimited;

停止密码检验函数:

SQL>alter profile DEFAULT limit password_verify_function null;

创建 用户 专用 profile:

CREATE PROFILE test LIMIT
SESSIONS_PER_USER       UNLIMITED
CPU_PER_SESSION          UNLIMITED
CPU_PER_CALL             3000
CONNECT_TIME             45
LOGICAL_READS_PER_SESSION   DEFAULT
LOGICAL_READS_PER_CALL     1000
PRIVATE_SGA             15K
COMPOSITE_LIMIT          5000000;

如需更改:

SQL>alter profile test limit PASSWORD_LIFE_TIME 60 ;

更改用户profile

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Reduce the use of MySQL memory in Docker Reduce the use of MySQL memory in Docker Mar 04, 2025 pm 03:52 PM

Reduce the use of MySQL memory in Docker

How do you alter a table in MySQL using the ALTER TABLE statement? How do you alter a table in MySQL using the ALTER TABLE statement? Mar 19, 2025 pm 03:51 PM

How do you alter a table in MySQL using the ALTER TABLE statement?

How to solve the problem of mysql cannot open shared library How to solve the problem of mysql cannot open shared library Mar 04, 2025 pm 04:01 PM

How to solve the problem of mysql cannot open shared library

What is SQLite? Comprehensive overview What is SQLite? Comprehensive overview Mar 04, 2025 pm 03:55 PM

What is SQLite? Comprehensive overview

Run MySQl in Linux (with/without podman container with phpmyadmin) Run MySQl in Linux (with/without podman container with phpmyadmin) Mar 04, 2025 pm 03:54 PM

Run MySQl in Linux (with/without podman container with phpmyadmin)

Running multiple MySQL versions on MacOS: A step-by-step guide Running multiple MySQL versions on MacOS: A step-by-step guide Mar 04, 2025 pm 03:49 PM

Running multiple MySQL versions on MacOS: A step-by-step guide

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? Mar 21, 2025 pm 06:28 PM

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)? How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)? Mar 18, 2025 pm 12:00 PM

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?

See all articles