SEVERE: The existing database you have specified has Grid Control repository. This operation is not supported.

oracle-11g-logo

 

Eu estava tentando configurar o DB Control em um servidor que tinha  o GRID Control instalado e usar o mesmo repositório de banco de dados para ambos, mas durante minhas atividades eu recebi o seguinte erro:

[oracle@ocm install]$ emca -config dbcontrol db

STARTED EMCA at Oct 29, 2015 10:34:48 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: OEM
Listener port number: 1522
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
—————————————————————–

You have specified the following settings

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

Local hostname ……………. ocm.localdomain
Listener ORACLE_HOME ……………. /u01/app/oracle/product/11.2.0/dbhome_1
Listener port number ……………. 1522
Database SID ……………. OEM
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………

—————————————————————–
Do you wish to continue? [yes(Y)/no(N)]: Y
Oct 29, 2015 10:35:34 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/OEM/emca_2015_10_29_10_34_47.log.
Oct 29, 2015 10:35:34 AM oracle.sysman.emcp.DatabaseChecks performReposChecks
SEVERE: The existing database you have specified has Grid Control repository. This operation is not supported.

 

Então, eu fiz os seguintes passos para resolver isto (Retirado da documentação da Oracle):

 $ORACLE_HOME/sysman/admin/emdrep/bin/RepManager hostname listener_port sid -action drop

[oracle@ocm dbs]$ cd $ORACLE_HOME/sysman/admin/emdrep/bin
[oracle@ocm bin]$ ./RepManager ocm.localdomain 1522 OEM -sys_password  ****** -action drop

Where ****** it is my sys’s password.

[oracle@ocm bin]$ ./RepManager ocm.localdomain 1522 OEM -sys_password  dm50vnc -action drop
Enter repository user name : sysman
Getting temporary tablespace from database…
Could not connect to SYS/(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=ocm.localdomain)(Port=1522))(CONNECT_DATA=(SID=OEM))): ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin)
[oracle@ocm bin]$ ./RepManager ocm.localdomain 1522 OEM -sys_password dqm50vnc -action drop
Enter repository user name : sysman
Getting temporary tablespace from database…
Found temporary tablespace: TEMP
Checking SYS Credentials … rem error switch
OK.
rem error switch
Dropping the repository..
Checking for Repos User … Exists.
Repos User exists..
Clearing EM Contexts … OK.
Dropping EM users …
Done.
Dropping Repos User … Done.
Dropping Roles/Synonymns/Tablespaces … Done.
Dropped Repository Successfully.

Então, eu tentei criar o repositório para o DB Control novamente, mas…

[oracle@ocm install]$ emca -config dbcontrol db -repos create

STARTED EMCA at Oct 29, 2015 11:33:54 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: OEM
Listener port number: 1522
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
—————————————————————–

You have specified the following settings

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

Local hostname ……………. ocm.localdomain
Listener ORACLE_HOME ……………. /u01/app/oracle/product/11.2.0/dbhome_1
Listener port number ……………. 1522
Database SID ……………. OEM
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………

—————————————————————–
Do you wish to continue? [yes(Y)/no(N)]: Y
Oct 29, 2015 11:34:13 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /home/oracle/cfgtoollogs/emca/OEM/emca_2015_10_29_11_33_54.log.
Oct 29, 2015 11:34:14 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) …
Oct 29, 2015 11:37:00 AM oracle.sysman.emcp.EMReposConfig createRepository
WARNING: ORA-01920: user name ‘MGMT_VIEW’ conflicts with another user or role name
ORA-06512: at line 40

Oct 29, 2015 11:37:00 AM oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Error creating the repository
Oct 29, 2015 11:37:00 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Refer to the log file at /home/oracle/cfgtoollogs/emca/OEM/emca_repos_create_<date>.log for more details.
Oct 29, 2015 11:37:00 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error creating the repository
Refer to the log file at /home/oracle/cfgtoollogs/emca/OEM/emca_2015_10_29_11_33_54.log for more details.
Could not complete the configuration. Refer to the log file at /home/oracle/cfgtoollogs/emca/OEM/emca_2015_10_29_11_33_54.log for more details.

 

Apagando o usuário existente…

drop user MGMT_VIEW cascade;

 

Então, tentando novamente…

[oracle@ocm install]$ emca -config dbcontrol db -repos create

STARTED EMCA at Oct 29, 2015 3:32:28 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: OEM
Listener port number: 1522
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
—————————————————————–

You have specified the following settings

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

Local hostname ……………. ocm.localdomain
Listener ORACLE_HOME ……………. /u01/app/oracle/product/11.2.0/dbhome_1
Listener port number ……………. 1522
Database SID ……………. OEM
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………

—————————————————————–
Do you wish to continue? [yes(Y)/no(N)]: Y
Oct 29, 2015 3:32:45 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /home/oracle/cfgtoollogs/emca/OEM/emca_2015_10_29_15_32_27.log.
Oct 29, 2015 3:32:46 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) …
Oct 29, 2015 3:38:08 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Oct 29, 2015 3:38:17 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) …
Oct 29, 2015 3:40:02 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Oct 29, 2015 3:40:05 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) …
Oct 29, 2015 3:40:13 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Oct 29, 2015 3:40:13 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) …
Oct 29, 2015 3:41:20 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 29, 2015 3:41:20 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://ocm.localdomain:1158/em <<<<<<<<<<<
Oct 29, 2015 3:41:26 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/ocm.localdomain_OEM/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 Oct 29, 2015 3:41:26 PM

Database Control (DB Control) foi criado.

db

 

Referências:
Oracle®   EMCA fails with oracle.sysman.emcp.DatabaseChecks performReposChecks (Doc ID 1377100.1)
Oracle®   Database Administrator’s Guide 10 Managing Oracle Enterprise Manager Database Control

kindregards

 

Related posts

Leave a Comment