Vous êtes sur la page 1sur 7

Step 1: Drop AQ related objects in the SYSMAN schema Logon SQLPLUS as user SYS

SQL> exec
DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'SYSMAN.MGMT_NOTIFY_QTABLE',force=>TRUE);

Step 2: Drop the DB Control Repository Objects Logon SQLPLUS as user SYS or SYSTEM,
and drop the sysman account and management objects:

SQL> EXEC sysman.emd_maintenance.remove_em_dbms_jobs;


SQL> EXEC sysman.setEMUserContext('',5);
SQL> REVOKE dba FROM sysman;
DECLARE
CURSOR c1 IS
SELECT owner, synonym_name name
FROM dba_synonyms
WHERE table_owner = 'SYSMAN';
BEGIN
FOR r1 IN c1 LOOP
IF r1.owner = 'PUBLIC' THEN
EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
ELSE
EXECUTE IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
END IF;
END LOOP;
END;
/

SQL> DROP USER mgmt_view CASCADE;


SQL> DROP ROLE mgmt_user;
SQL> DROP USER sysman CASCADE;

===================================================================================
===================================================================================
=
set ORACLE_HOSTNAME
set ORACLE_HOME
set ORACLE_SID
===================================================================================
===================================================================================
=

export TZ=GMT+05:00
echo $TZ
unset TZ
===================================================================================
===================================================================================
=

emca -config dbcontrol db -repos create

emca -config dbcontrol db -repos recreate

===================================================================================
===================================================================================
=

emca -config dbcontrol db -repos create -cluster

know cluster name.


cemutlo -n
===================================================================================
===================================================================================
=
Timezone
/u01/app/oracle/product/11.2.0/dbhome_1/sysman/admin/supportedtzs.lst

file rights problem


/u01/app/oracle/product/11.2.0/dbhome_1/sysman/admin/scripts/emca
emcaDbUtil.pl
EmcaUtil.pm
emcaDbUtil
===================================================================================
===================================================================================
=

http://www.dba-oracle.com/sf_error_dbconsole_java_lang_exception_no_such_metric.htm
http://www.orafaq.com/forum/t/88160/

===================================================================================
===================================================================================
=

select target_name, target_type from mgmt_targets where target_name like '%express


%';

===================================================================================
===================================================================================
=

agentTZRegion=GMT --- C:/oracle/product/10.2.0/db_1/sysman/config/emd.properties


[Change TimeZone value]

===================================================================================
===================================================================================
=
select target_name,target_type,emd_url,timezone_region from mgmt_targets;
SELECT SESSIONTIMEZONE FROM DUAL;
SELECT current_timestamp FROM DUAL;
SELECT dbtimezone FROM DUAL;
select systimestamp from dual;

===================================================================================
===================================================================================
=

resetTZ failed.
The agentTZRegion in:
G:\oracle\product\10.2.0\db_1/express_orcl/sysman/config/emd.properties
is not in agreement with what the agent thinks it should be.
Fix your environment.
Pick a TZ value that corresponds to time zone settings listed in:
G:\oracle\product\10.2.0\db_1/sysman/admin/supportedtzs.lst

===================================================================================
===================================================================================
=
/u01/app/oracle/product/11.2.0/dbhome_1/install/portlist.ini
Enterprise Manager Console HTTP Port (orcl) = 1158
Enterprise Manager Agent Port (orcl) = 3938
Enterprise Manager Console HTTP Port (prodb01) = 5500
Enterprise Manager Agent Port (prodb01) = 3938

===================================================================================
===================================================================================
=
To solve this re-start problem, try to run these commands at command prompt:

1.Set ORACLE_SID= <DatabaseName>

2.emctl resetTZ agent

3. Read the instructions that will be displayed after issuing the command and do
exactly that.

4. Restart the dbconsole by issuing the commands


**********************************************************************************
emctl start dbconsole
emctl stop dbconsole
emctl status dbconsole
**********************************************************************************
emctl start agent
emctl stop agent
emctl status agent
emctl config agent getTZ
**********************************************************************************
http://www.dba-oracle.com/t_java_lang_exception_ioexception_in_sending_request.htm

http://colbran.co.za/wordpress/2010/04/22/ora-20233-invalid-timezone-region-on-oms/
To complete this process, you must either:

connect to the database served by this DBConsole as user 'sysman', and execute:

SQL> exec mgmt_target.set_agent_tzrgn('bafdbprod:3938','+05:00');


express = hostname
exec mgmt_target.set_agent_tzrgn('server:port','timezone');

-- or --

connect to the database served by this DBConsole as user 'sys', and execute:

SQL> alter session set current_schema = SYSMAN;


SQL> exec mgmt_target.set_agent_tzrgn('EXPRESS:3938','Europe/London')

===================================================================================
===================================================================================
=

emctl config agent getTZ

return the timezone of the system

===================================================================================
===================================================================================
=
login as sysman user and execute
exec mgmt_target.set_agent_tzrgn(�kp2:3938',�+05:00')

===================================================================================
===================================================================================
=

agentTZRegion=Europe/London ===== add this in last emd.properties


agentTZRegion=+05:00
system timezone === GMT (Greenwhich)
Restart system

===================================================================================
===================================================================================
=
http://www.orafaq.com/forum/t/140815/
http://kamudba.blogspot.com/2013/05/recreating-oracle-em-after-changing-ip.html
https://community.oracle.com/thread/2237784?tstart=0
SELECT SESSIONTIMEZONE FROM DUAL;
sqlplus sys/oracle@orcl as sysdba
===================================================================================
===================================================================================
=
Note make sure you sys password is correct and your orapwd file is correct.
password file
Latest java
Browser version
Delete ---> HOSTNAME_SID ---> localhost_orcl

===================================================================================
===================================================================================
=
https://oraclenz.wordpress.com/2012/07/19/db-controldb-console-oem-changing-
hostname-or-ip-address/
http://www.oracledistilled.com/oracle-database/administration/database-
control/database-control-dbconsole-will-not-start/
http://www.orafaq.com/forum/t/162719/

Database Control Agent Does Not Start 'EM Daemon Is Not Running' [ID 341551.1]
Failing to start the DBConsole with 'EM Daemon is not running' [ID 1067546.1]
Master Note for Enterprise Manager Configuration Assistant (EMCA) in Single
Instance Database Environment (Doc ID 1099271.1)
How To Drop, Create And Recreate the Database Control (DB Control) Release 10g and
11g (Doc ID 278100.1)
336629.1
1081481.1
Found MOS document "Dbconsole 11.2 Does Not Start Logs Shows Timezone Mismatch (Doc
ID 1329914.1)".
***********************************************************************************
************************************
https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:3083336233923

alter database only takes effect after a shutdown/restart".

select dbtimezone from dual;

DBTIME
------
-04:00
alter database set time_zone = 'EST';

Database altered.

select dbtimezone from dual;

DBTIME
------
-04:00

connect / as sysdba;
Connected.
shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.

startup
ORACLE instance started.

Total System Global Area 358909124 bytes


Fixed Size 279748 bytes
Variable Size 335544320 bytes
Database Buffers 16777216 bytes
Redo Buffers 6307840 bytes
Database mounted.
Database opened.

select dbtimezone from dual;

DBTI
----
EST
***************************************************
http://www.orafaq.com/forum/t/140815/
Step 1: Go to dbhome > hostname_SID > Sysman > Config > open emd.properties in
notepad and set the value agentTZRegion=+05:00 to the value of your timezone and
click save. You can also do it using export and time zone reset commands.

Step 2: ALTER DATABASE SET TIME_ZONE='+05:00'; according to your time zone. You can
check DB TIME Zone using " select dbtimezone from dual ;
***************************************************

Check the Enterprise Manager agent timezone located

ORACLE_HOME/HOST_NAME_SID\sysman\config
emd.properties file and set the timezone
agentTZRegion=+05:00

***************************************************

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=apex
export NLS_LANG=PORTUGUESE;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$ORACLE_HOME/bin:$PATH
***************************************************

Run the following commands to check the current timezone and update to the new
timezone (it will update the $ORACLE_HOME\sysman\config\emd.properties file with
the correct timezone)

emctl config agent getTZ


emctl config agent updateTZ

*****************************************************************************
Oracle 11g R2 EM Agent Unreachable
http://www.rajdbsolutions.com/2012/09/oracle-11g-r2-em-agent-unreachable.html
*****************************************************************************

alter session set time_zone='-04:00';

Session altered.

select sessiontimezone from dual;

SESSIONTIMEZONE
---------------------------------------------------------------------------
-04:00

declare
2 l_dt date := sysdate;
3 l_tz date := localtimestamp;
4 begin
5 dbms_output.put_line( 'sysdate = ' || l_dt );
6 dbms_output.put_line( 'localtimestamp = ' || l_tz );
7 end;
8 /
sysdate = 07-may-2008 01:28:33
localtimestamp = 07-may-2008 01:28:33

PL/SQL procedure successfully completed.

alter session set time_zone='+02:00';

Session altered.

select sessiontimezone from dual;

SESSIONTIMEZONE
---------------------------------------------------------------------------
+02:00

declare
2 l_dt date := sysdate;
3 l_tz date := localtimestamp;
4 begin
5 dbms_output.put_line( 'sysdate = ' || l_dt );
6 dbms_output.put_line( 'localtimestamp = ' || l_tz );
7 end;
8 /
sysdate = 07-may-2008 01:28:33
localtimestamp = 07-may-2008 07:28:33
PL/SQL procedure successfully completed.

************************************************************************

Failing to start the DBConsole with 'EM Daemon is not running' (Doc ID 1067546.1)
EMCA Fails On emcaDbUtil.pl line 64 and Fails to Unlock all EM-related Accounts
When Creating Dbconsole (Doc ID 851952.1)
Startup: Database Control Agent Does Not Start 'EM Daemon Is Not Running' (Doc ID
341551.1)

http://www.orafaq.com/forum/t/140815/

Vous aimerez peut-être aussi