Google it ....

Showing posts with label Enterprise Manager. Show all posts
Showing posts with label Enterprise Manager. Show all posts

Wednesday, August 2, 2017

How to add oracle database with custom character set into OEM12c

If you have custom characterset database and you want to add this database into Oracle Enterprise Manager(OEM), during addition it definitely fails and here I''ll try to help you.
Our environment:
Operating System is CentOS release 6.6 (Final) x86_64 and installed Oracle Enterprise Manager 12c Release 4 (12.1.0.4.0), Repository Database - Oracle Database 12c (12.1.0.2.0) exist on same host which character set is AL32UTF8.
We have Oracle Database 11g (11.2.0.3) with custom character set on another host, also we have installed agent and our goal is to monitor that database with OEM12c, hence we want to add this database into OEM.
Our custom character set nlt file is: lx22900.nlt, you also need its nlb file.
1)
Copy lx0boot.nlb, lx1boot.nlb, lx22900.nlb files into :
$ORACLE_HOME/nls/data/

/u1/app/oracle/oem12c/Oracle_WT/nls/data/

$OMS_HOME/nls/data/

2)
Add custom locale definitions to java components with Ginstall utility
java -cp /u1/app/oracle/oem12c/oms/jlib/orai18n-tools.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-utility.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-collation.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-lcsd.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-mapping.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-net.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-servlet.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-translation.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n.jar:

/u1/app/oracle/oem12c/oms/lib/xmlparserv2.jar

Ginstall -a lx22900.nlt

output must be :
oracle/i18n/data/lx22900.glb has been successfully stored in gdk_custom.jar CharConv1ByteBuilder lx22900.nlt

3)
create a custom character set file custom_orai18n-mapping.jar, that includes our custom characterset which for example is GEO8:
java -jar $OMS_HOME/jlib/orai18n.jar -custom-charsets-jar custom_orai18n-mapping.jar -charset GEO8

Added Character set : GEO8

Check it:
java -jar custom_orai18n-mapping.jar

Oracle Globalization Development Kit - 11.1.0.7.0 - Production
This custom character set jar/zip file was created with the following command: 

java -jar orai18n.jar -custom-charsets-jar custom_orai18n-mapping.jar -charset GEO8

4)
Copy generated files into these directories:
cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/Oracle_WT/oui/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/Oracle_WT/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/oracle_common/modules/oracle.nlsrtl_11.1.0/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/oracle_common/oui/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/oms/oui/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/oms/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/wlserver_10.3/server/ext/jdbc/oracle/11g/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/agent/core/12.1.0.4.0/oui/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/agent/core/12.1.0.4.0/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/owb/lib/patches/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/inventory/Scripts/ext/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/sqldeveloper/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/oui/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/oc4j/jdbc/lib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/database/stage/ext/jlib/

5)
Add CLASSPATH and LD_LIBRARY_PATH environment variables into .bash_profile file
Load .bash_profile parameters with command :
source .bash_profile
 
Check.bash_profile parameters with command
Cat .bash_profile
ORACLE_SID=OEM12C
 
ORACLE_BASE=/u1/app/oracle
 
ORACLE_HOME=$ORACLE_BASE/product/11.2.0
 
OMS_HOME=/u1/app/oracle/oem12c/oms
 
AGENT_HOME=/u1/app/oracle/agent/core/12.1.0.4.0
 
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
 
CLASSPATH=/u1/app/oracle/oem12c/oms/jlib/custom_orai18n-mapping.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-tools.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-utility.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-collation.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-lcsd.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-mapping.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-net.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-servlet.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-translation.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n.jar:/u1/app/oracle/oem12c/oms/jlib/:gdk_custom.jar:/u1/app/oracle/oem12c/oms/jlib/:gsstemp.zip
 
LD_LIBRARY_PATH=$OMS_HOME/jlib
 
export ORACLE_BASE ORACLE_HOME ORACLE_SID OMS_HOME AGENT_HOME PATH CLASSPATH LD_LIBRARY_PATH
 
6)
Restart OMS, AGENT and repository database
$OMS_HOME/bin/emctl stop oms –all
 
$AGENT_HOME/bin/emctl stop agent
 
sqlplus / as sysdba
 
SQL> shutdown immediate;
 
SQL> startup;

$OMS_HOME/bin/emctl start oms

$AGENT_HOME/bin/emctl start agent

7)
Copy gsstemp.zip and gdk_custom.jar into client's agent jlib directory where resides database with custom character set, for example:
cp gsstemp.zip gdk_custom.jar oracle@testhost:/u1/agent12c/core/12.1.0.4.0/jlib

and restart client's agent.
That's all now you can add custom character set database into oem12c.

Thursday, July 27, 2017

OEM sent emails alert history

Sometimes you need to get list of alerts incidents that sent from Oracle Enterprise Manager - OEM for audit team or something else, It is time consuming to find all sent emails in E-mail, therefore here is script which you can use in Oracle Enterprise Manager repository database for get this information:
select a.TARGET_NAME,
       a.target_type,
       a.message,
       a.alert_state,
       a.collection_timestamp,
       a.delivery_message
  from SYSMAN.MGMT$ALERT_NOTIF_LOG a
 where a.collection_timestamp >=
       to_date('01-05-2017 00:00:00', 'DD-MM-YYYY HH24:MI:SS') --sent alerts after 01-APRIL-2017
 order by a.collection_timestamp asc;

Friday, June 5, 2015

Solaris OEM12c Agent Unreachable with Error "peer not authenticated"

Today faced this error on solaris 5.10 sparc
./emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 2  
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Status agent Failure:unable to connect to http server at 
https://myhost.mydomain.ge:3872/emd/lifecycle/main/. [peer not authenticated]

solution : Stop the Agent:
$ ./emctl stop agent

Verfiy the java process has stopped
$ ps -ef |grep java

If the java process is still running you would see like the following still running
$AGENT_HOME/core/12.1.0.2.0/jdk/bin/sparcv9/java
$kill -9 pid

Update Config File:
$cd $AGENT_HOME/agent_inst/sysman/config
$cp s_jvm_options.opt s_jvm_options.opt.bkp

Add the following line to s_jvm_options.opt
-Dsun.security.pkcs11.enable-solaris=false

Restart Agent and Test Upload:
$ cd $AGENT_HOME/bin
$ ./emctl start agent
$ ./emctl upload agent

Monday, March 2, 2015

Enterprise Manager - perl: warning: Setting locale failed, LC_ALL =(unset)

Today we faced warnings when starting agent of enterprise manager grid control.
emctl start agent

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = "en_GB:en",
 LC_ALL = (unset),
 LANG = "en_GB"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").


check your locale settings by type locale
solution is very simple in the .bash_profile add LC_ALL="en_GB.utf8" :
locale
.........
.........
vi .bash_profile
export LC_ALL="en_GB.utf8"

Tuesday, April 8, 2014

Textual description of firstImageUrl

How to clear alerts in enterprise manager (database control)

When alert appear in enterprise manager and with some action solve, it may stay in enterprise manager as shown picture:














Here I'll show you how to clear this unnecessary information.
login into database with sysman user and execute this script:
SELECT t.target_name,
       t.target_type,
       collection_timestamp,
       MESSAGE,
          'exec em_severity.delete_current_severity('''
       || t.target_guid
       || ''','''
       || metric_guid
       || ''','''
       || key_value
       || ''')'
          em_severity
  FROM    sysman.mgmt_targets t
       INNER JOIN
          sysman.mgmt_current_severity s
       ON t.target_guid = s.target_guid;

result:









after that run this scripts
SQL> exec em_severity.delete_current_severity('C894D538793FFA3B4727BCBCD84D4925',
'3F2BBE6BF105C0D16A3710F2868B8399','RECOVERY AREA');

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.

same way you can clear entire alerts.

Friday, October 18, 2013

Enterprise Manager DB Control/DB Console (OEM) is not working after Changing Hostname or IP Address

After change hostname on oracle linux 6, enterprise manager doesn't working, for solve this problem make next steps:
1) Set $ORACLE_HOSTNAME to the old hostname
export ORACLE_HOSTNAME=old_name

2) De-configure the old DB Console by running the following command:
$ORACLE_HOME/bin/emca -deconfig dbcontrol db

3) Set $ORACLE_HOSTNAME to the new hostname:
export ORACLE_HOSTNAME=new_name

4)Configure the new DB Console
$ORACLE_HOME/bin/emca -config dbcontrol db -repos recreate

Thursday, October 10, 2013

Textual description of firstImageUrl

Enterprise Manager (OEM) is not able to connect to the database instance. The state of the components are listed below

When started browser for login in enterprise manager, it shows next:


Enterprise Manager is not able to connect to the database instance. The state of the components are listed below.
first of all check enterprise manager status :
emctl status dbconsole
that told Oracle Enterprise Manager 10g is running.
after that i checked log files under $ORACLE_HOME\hostname.domainname_dbname\sysman\log
and found the following error
[SystemThreadGroup-8] ERROR app.SessionObjectManager sessionDestroyed.128 - java.sql.SQLException: ORA-28000: the account is locked
now Solution is simple:
sqlplus  / as sysdba                            

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Oct 10 09:59:32 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select account_status from dba_users where username='SYSMAN';

ACCOUNT_STATUS
--------------------------------
LOCKED(TIMED)

SQL> alter user sysman account unlock;

User altered.


after that run browser and enjoy with enterprise manager.




if that don't help then make next steps:
SQL> alter user sysman account unlock;
SQL> alter user sysman identified by passwd;

emctl setpasswd dbconsole

and this must helps.

Friday, September 13, 2013

Textual description of firstImageUrl

The database is down. Please specify the host credentials to access database restart and diagnostics tools











The database is down. Please specify the host credentials to access database restart and diagnostics tools.
Enterprise manager shows that database is down but in real it is not.
[oracle@oel6 trace]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Sep 13 10:38:01 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> select status from v$instance;

STATUS
------------
OPEN

check status of listener
[oracle@oel6 log]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 16-DEC-2013 11:54:14

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                16-DEC-2013 11:51:59
Uptime                    0 days 0 hr. 2 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u0/app/oracle/diag/tnslsnr/oel6/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel6)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

check status of dbconsole
[oracle@oel6 oracle]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://oel6:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running. 
------------------------------------------------------------------
Logs are generated in directory /u0/app/oracle/product/11.2.0/dbhome_1/oel6_orcl/sysman/log 

it's runing, after that i checked alert.log but there was nothing about some errors.
Solution:
select username, account_status from dba_users order by 2;
shows that
DBSNMP EXPIRED
SYSMAN EXPIRED
SYSTEM EXPIRED(GRACE)

now simple change their statuses.

alter user SYSTEM identified by oracle;
alter user SYSMAN identified by oracle;
alter user DBSNMP identified by oracle;

if they are locked then simple unlock with commands:

alter user DBSNMP account unlock;
alter user SYSTEM account unlock;
alter user SYSMAN account unlock;

it's all, now enjoy with enterprise manager

Wednesday, June 12, 2013

Recreate Oracle Enterprise Manager (OEM) database control 11g for Real Application Cluster (RAC)

If you you want to recrate enterprise manager for rac scenario is next:
[oracle@node1-230-231 ~]$ emca -config dbcontrol db -repos recreate -cluster

STARTED EMCA at Jun 12, 2013 12:15:19 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database unique name: orcl
Service name: orcl
Listener ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
Password for SYS user:  
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
This will remove the existing configuration and the default settings and 
perform a fresh configuration
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Password for DBSNMP user:  
Password for SYSMAN user:  
Cluster name: rac-scan

if you don't know cluster name open another terminal
[oracle@node1-230-231 ~]$ su - grid
Password: 
[grid@node1-230-231 ~]$ cemutlo -n
rac-scan

Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
ASM ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
ASM port [ 1521 ]: 
ASM username [ ASMSNMP ]: 
ASM user password:  
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1

Database instance hostname ................ Listener ORACLE_HOME ... /u01/app/11.2.0/grid
Listener port number ................ 1521
Cluster name ................ rac-scan
Database unique name ................ orcl
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 
ASM ORACLE_HOME ................ /u01/app/11.2.0/grid
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP

-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 12, 2013 12:17:27 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at 
/u01/app/oracle/cfgtoollogs/emca/orcl/emca_2013_06_12_12_15_19.log.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5540 is already in use.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5520 is already in use.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jun 12, 2013 12:18:18 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jun 12, 2013 12:22:02 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Jun 12, 2013 12:22:06 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jun 12, 2013 12:30:28 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jun 12, 2013 12:30:47 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jun 12, 2013 12:31:50 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jun 12, 2013 12:31:51 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating 
/u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_node1-230-231_orcl to remote nodes ...
Jun 12, 2013 12:31:52 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating 
/u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_node2-232-233_orcl to remote nodes ...
Jun 12, 2013 12:32:04 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/dbhome_1/node1-230-231_orcl to remote nodes ...
Jun 12, 2013 12:32:06 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/dbhome_1/node2-232-233_orcl to remote nodes ...
Jun 12, 2013 12:32:29 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jun 12, 2013 12:33:17 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jun 12, 2013 12:33:59 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jun 12, 2013 12:33:59 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is 
https://node1-230-231:1158/em <<<<<<<<<<<
Jun 12, 2013 12:34:09 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO: 
****************  Current Configuration  ****************
 INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------

orcl              node1-230-231              node1-230-231
orcl              node2-232-233              node1-230-231


Jun 12, 2013 12:34:09 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING: 
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  
The encryption key has been placed in the file: 
/u01/app/oracle/product/11.2.0/dbhome_1/node1-230-231_orcl/sysman/config/emkey.ora. 
Ensure this file is backed up as the encrypted data will become unusable if this file is lost. 

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 12, 2013 12:34:09 PM


check status of enterprise manager
[oracle@node1-230-231 ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://node1-230-231:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running. 
------------------------------------------------------------------
Logs are generated in directory 
/u01/app/oracle/product/11.2.0/dbhome_1/node1-230-231_orcl/sysman/log 


that's all.

Monday, February 11, 2013

Textual description of firstImageUrl

A lot of failed login attempts in the last 30 minutes

Oracle Enterprise manager shows errors:
A lot of failed login attempts in the last 30 minutes














Checking:
select USERNAME, ACTION_NAME, RETURNCODE, count(*)
   from DBA_AUDIT_SESSION
  where TIMESTAMP > (sysdate - 2 / 24)
    and RETURNCODE != 0
  group by USERNAME, ACTION_NAME, RETURNCODE
  order by count(*);

USERNAME                       ACTION_NAME                  RETURNCODE
------------------------------ ---------------------------- ----------
  COUNT(*)
----------
MGMT_VIEW                      LOGON                             28000
        12

return code is 28000, this mean : ora-2800: the account is locked.
tet's check :
select USERNAME, PASSWORD_VERSIONS,account_status  from dba_users where username='MGMT_VIEW';

USERNAME                       PASSWORD ACCOUNT_STATUS
------------------------------ -------- --------------------------------
MGMT_VIEW                      10G 11G  LOCKED(TIMED)

In 11g, by default the password expired time is set to 180 days(in 10g it is unlimited).
select * from dba_profiles WHERE RESOURCE_NAME='PASSWORD_LIFE_TIME';
PROFILE                        RESOURCE_NAME                    RESOURCE LIMIT
------------------------------ -------------------------------- -------- -----
DEFAULT                        PASSWORD_LIFE_TIME               PASSWORD  180

Ok, let's correct this:
ALTER PROFILE DEFAULT limit  PASSWORD_LIFE_TIME UNLIMITED;

profile altered.

select * from dba_profiles WHERE RESOURCE_NAME='PASSWORD_LIFE_TIME';
PROFILE                        RESOURCE_NAME                    RESOURCE LIMIT
------------------------------ -------------------------------- -------- -----
DEFAULT                        PASSWORD_LIFE_TIME               PASSWORD  UNLIMITED

This account which already in LOCKED status didn't back to normal auto. We need to do below:
alter user MGMT_VIEW account unlock;

User altered.

select USERNAME, PASSWORD_VERSIONS,account_status  from dba_users where username='MGMT_VIEW';

USERNAME                       PASSWORD ACCOUNT_STATUS
------------------------------ -------- --------------------------------
MGMT_VIEW                      10G 11G  OPEN

that's all. Thank you ;)