wjlcn 发表于 2011-12-23 03:16

Oracle 11g存在密码过期问题

<span class="Apple-style-span" style="color: rgb(56, 56, 56); font-family: Arial, Helvetica, sans-serif; line-height: 24px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">【原因/触发因素】</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">确定是由于oracle11g中默认在default概要文件中设置了“PASSWORD_LIFE_TIME=180天”所导致。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">【影响和风险】</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">影响</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">密码过期后,业务进程连接数据库异常,影响业务使用。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">问题发生频率</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">数据库密码过期后,业务进程一旦重启会提示连接失败。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">【解决方案】</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">按照如下步骤进行操作:</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">1、查看用户的proifle是哪个,一般是default:</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">sql&gt;SELECT username,PROFILE FROM dba_users;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">2、查看指定概要文件(如default)的密码有效期设置:</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">sql&gt;SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME';</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">3、将密码有效期由默认的180天修改成“无限制”:</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">sql&gt;ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">修改之后不需要重启动数据库,会立即生效。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">4、修改后,还没有被提示ORA-28002警告的帐户不会再碰到同样的提示;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">已经被提示的帐户必须再改一次密码,举例如下:</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">$sqlplus / as sysdba</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">sql&gt; alter user smsc identified by &lt;原来的密码&gt; ----不用换新密码</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 24px; color: rgb(56, 56, 56); font-size: 14px; ">oracle11g启动参数resource_limit无论设置为false还是true,密码有效期都是生效的,所以必须通过以上方式进行修改。以上的帐户名请根据实际使用的帐户名更改。</p></span>
页: [1]
查看完整版本: Oracle 11g存在密码过期问题