我的生产数据库遇到问题。密码已过期,虽然我更改了密码,但仍然表示密码已过期。更奇怪的是,我有一个生产Web应用程序和一个开发Web应用程序。它们都访问同一个数据库。生产Web应用程序运行良好,我总是得到开发Web应用程序:
10:25:42,919 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: ORA-28001: the password has expired
)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:622)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:173)
at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695)
at javax.security.auth.login.LoginContext.login(LoginContext.java:594)
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.defaultLogin(JaasSecurityManagerBase.java:552)
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.authenticate(JaasSecurityManagerBase.java:486)
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.isValid(JaasSecurityManagerBase.java:365)
at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:160)
at org.jboss.web.tomcat.security.JBossWebRealm.authenticate(JBossWebRealm.java:384)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:258)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.sql.SQLException: ORA-28001: the password has expired
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:388)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:381)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:564)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:431)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:366)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:752)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:359)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:207)
... 41 more
我已登录服务器并执行此操作:
bash
cd /opt/oracle/admin/<SID>
. ./setenv.ora
sqlplus / as sysdba
>sql: ALTER USER <user> IDENTIFIED BY <new password>;
以下是信息requested by Jim:
SQL> select * from dba_users where username = 'user';
USERNAME USER_ID PASSWORD ACCOUNT_STATUS LOCK_DATE EXPIRY_DATE
------------------------------ ---------- ------------------------------ -------------------------------- ------------------- -------------------
DEFAULT_TABLESPACE TEMPORARY_TABLESPACE CREATED PROFILE INITIAL_RSRC_CONSUMER_GROUP
------------------------------ ------------------------------ ---------------------- ------------------------------ ------------------------------
EXTERNAL_NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
PASSWORD E AUTHENTI
-------- - --------
<user> 50 OPEN
<userDAT> TEMP 29.07.2010 17:38:32 DEFAULT DEFAULT_CONSUMER_GROUP
10G 11G N PASSWORD
SQL> select p.* from dba_users u, dba_profiles p where u.profile = p.profile and u.userName = 'user';
PROFILE RESOURCE_NAME RESOURCE LIMIT
------------------------------ -------------------------------- -------- ----------------------------------------
DEFAULT COMPOSITE_LIMIT KERNEL UNLIMITED
DEFAULT SESSIONS_PER_USER KERNEL UNLIMITED
DEFAULT CPU_PER_SESSION KERNEL UNLIMITED
DEFAULT CPU_PER_CALL KERNEL UNLIMITED
DEFAULT LOGICAL_READS_PER_SESSION KERNEL UNLIMITED
DEFAULT LOGICAL_READS_PER_CALL KERNEL UNLIMITED
DEFAULT IDLE_TIME KERNEL UNLIMITED
DEFAULT CONNECT_TIME KERNEL UNLIMITED
DEFAULT PRIVATE_SGA KERNEL UNLIMITED
DEFAULT FAILED_LOGIN_ATTEMPTS PASSWORD UNLIMITED
DEFAULT PASSWORD_LIFE_TIME PASSWORD UNLIMITED
DEFAULT PASSWORD_REUSE_TIME PASSWORD UNLIMITED
DEFAULT PASSWORD_REUSE_MAX PASSWORD UNLIMITED
DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD NULL
DEFAULT PASSWORD_LOCK_TIME PASSWORD 1
DEFAULT PASSWORD_GRACE_TIME PASSWORD 7
16 rows selected.
答案 0 :(得分:30)
假设Oracle DB(也适用于Oracle-XE的SAMPLE)在Unix上,ssh-in和:
sqlplus /nolog
SQL> connect / as SYSDBA
Connected.
SQL> SELECT username, account_status FROM dba_users WHERE ACCOUNT_STATUS LIKE '%EXPIRED%';
# ... your locked account should be listed ...
SQL> ALTER USER sample IDENTIFIED BY sample;
User altered.
SQL> ALTER USER sample ACCOUNT UNLOCK;
User altered.
SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Profile altered.
SQL> exit
答案 1 :(得分:8)
我100%确定我的配置是正确的。我用高效的应用服务器上的文件覆盖了所有本地数据。仍然没有成功。
问题是这个密码过期问题在开发时突然出现,所以我确信我没有改变任何东西。
但是,我登录了测试系统并重置了密码。我的测试系统包含100行,我的高效应用程序就像100万,所以我可以肯定地告诉你我在正确的数据库上。
重置测试系统的密码后,我可以再次登录!所以整个故事很奇怪。感谢您的支持。
答案 2 :(得分:5)
您可以发布以下结果吗?另外,您使用的是哪个版本的Oracle?我假设是11G?
select *
from dba_users
where username = '<yourUserName>'
select p.*
from dba_users u
, dba_profiles p
where u.profile = p.profile
and u.userName = '<yourUserName>'
我很想知道您正在使用的个人资料以及您的设置。
答案 3 :(得分:4)
即使我遇到同样的问题。按照以下提到的步骤后问题得到解决,
从dba_users中选择用户名,个人资料,account_status,expiry_date;
选择&#39; ALTER USER&#39; ||用户名|| &#39;由{password}标识;&#39;从 dba_users,其中account_status喜欢&#39; EXPIRED%&#39;和用户名!= &#39; XS $ NULL&#39 ;;
选择&#39; ALTER USER&#39; ||用户名|| &#39;帐户解锁;&#39;来自dba_users account_status喜欢&#39; LOCKED%&#39;和用户名!=&#39; XS $ NULL&#39 ;;
alter profile DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
参考: http://jaredsoablogaz.blogspot.in/2013/04/weblogic-server-not-starting-due-to.html
-Sandeep
答案 4 :(得分:2)
答案 5 :(得分:1)
只需将SQLPlus和受影响的用户连接到您的数据库即可。 SQLPlus将提示您更改密码。
答案 6 :(得分:0)
我确实遇到了与密码过期的Oracle类似的问题,当我尝试启动PLSQL时解决了这个问题,它提示我输入用户名/密码,我输入了正确的密码,但是系统会因密码过期错误而抛出以及密码重置输入。重置密码后,我能够连接到oracle数据库。
答案 7 :(得分:0)
只需执行此查询:
yourUTCDate = yourDate.ToUniversalTime()
提交;
答案 8 :(得分:0)
简单的方法,就做到了:)
C:\>sqlplus /nolog
SQL> connect / as SYSDBA
SQL> select * from dba_profiles;
SQL> alter profile default limit password_life_time unlimited;
SQL> alter user hse identified by oracle;
SQL> commit;
SQL> exit;