Home » RDBMS Server » Enterprise Manager » Drop sysman schema
Drop sysman schema [message #146730] Sun, 13 November 2005 07:58 Go to next message
raquelframe
Messages: 7
Registered: November 2005
Location: Republic of Panama
Junior Member

Hi,

I am installing Oracle Enterprize Manager onto my RDBMS 10g orcl instance. I was able to configure the instance and now I am required to drop the sysman schema. I logged in as system as sysdba and issued the command

drop user sysman cascade;

I received a message that I was not able to drop a user that was connected. I issued the command

disconnect sysman;

I was disconnected from the RDMBS instance.

How do I drop the sysman schema???

Thanks

Raquel
Re: Drop sysman schema [message #146759 is a reply to message #146730] Sun, 13 November 2005 19:55 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Quote:


Reported By: raquelframe On: Sun, 13 November 2005 18:25 In: RDBMS Server » Enterprise Manager » Drop sysman schema
Reason I am having difficulty in droping the sysman schema. When I disconnect sysman, system and sys are both disconnected. I cannot drop the user sysman with cascade option. I receive the message that sysman is connected, and I must disconnect it. Any ide

Do not report the posting to get attention.
Re: Drop sysman schema [message #146909 is a reply to message #146730] Mon, 14 November 2005 10:18 Go to previous messageGo to next message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
Here is what Oracle had me do:

Note.278100.1 Ext/Pub How to Recreate the DB Control Repository


The way I usually perform this renewal is as follows:

1. Remove the repository objects from the database with the following commands:

Stop the DB Control web site and logon to SQLPLUS as user SYS or SYSTEM, and drop the sysman account and mangement objects:

SHUTDOWN IMMEDIATE;
STARTUP RESTRICT;
EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
EXEC sysman.setEMUserContext('',5);
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;
DROP USER mgmt_view CASCADE;
DROP ROLE mgmt_user;
DROP USER sysman CASCADE;
ALTER SYSTEM DISABLE RESTRICTED SESSION;

Note that the section from "DECLARE" to "END;" is PL/SQL and, while it can be copied and pasted into a SQL*Plus session, it will need to be terminat
ed with a slash (/) on its own line before executing with a carriage return.
You can see if sysman exists in dba_users to verify the effectiveness of the proced
ure (select * from dba_users;).


2. Remove the existing DB Control web site configuration in the OS file system by running the command:

emca -x <sid> (where you supply the SID name, i.e. emca -x orcl)

This command remove the following directories from the database Oracle Home:

O_H/<host>_<sid>
O_H/oc4j/j2ee/OC4J_DBConsole_<host>_<SID>

If they are not removed in the emca -x <sid> process, delete them manually.


3. Recreate both the repository objects and the DB control web site with the following command:

emca

This command opens up an interview process in which you will pass the information required to both recreate the rep
ository objects and the web site configuration.
Note:
Port number refers to tnslistener port
The value for sid and service name are normally the same
You can leave the email configuration entries blank, since they can be added later
You will need to remember the passwords for sys and dbsnmp from the database, so reset
them in SQL*Plus if you have forgotten them.

At the end of the emca command, the DB Control web site should be started and you should be able to log in through
a browser.

Best regards,
David
Re: Drop sysman schema [message #146914 is a reply to message #146909] Mon, 14 November 2005 10:37 Go to previous messageGo to next message
raquelframe
Messages: 7
Registered: November 2005
Location: Republic of Panama
Junior Member

I issued the command

SHUTDOWN IMMEDIATE;

With success as system as sysdba

I was not able to

STARTUP RESTRICT; (No Listener)
Re: Drop sysman schema [message #146916 is a reply to message #146730] Mon, 14 November 2005 10:40 Go to previous messageGo to next message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
The listener must be running.

lsnrctl start
Re: Drop sysman schema [message #146918 is a reply to message #146730] Mon, 14 November 2005 10:45 Go to previous messageGo to next message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
How are you connecting? Via ssh? On the console?

Make sure you tnsnames.ora and listener.ora are setup correctly. Here how is mine are:

Tnsnames:
>cat tnsnames.ora
#
# Created by Neil MacDannald for OS2P Listener
# Version Date: Aug-19-2000
# Filename: Tnsnames.ora
#
MGW_AGENT =
(DESCRIPTION=
(ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC)(KEY=EXTPROC)))
(CONNECT_DATA= (SID=mgwextproc) (PRESENTATION=RO)))
os2p_BEQ =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = BEQ)(PROGRAM = /u04/app/oracle/product/10.0.1)
(argv0 = oracleos2p)
(args = '(DESCRIPTION = (LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))')
(envs = 'ORACLE_HOME=/u04/app/oracle/product/10.0.1,ORACLE_SID=os2p')
)
)
oem =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= nova)(Port= 5500))
(CONNECT_DATA = (SID = os2p))
)
#(DESCRIPTION=
# (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC)(KEY=EXTPROC)))
# (CONNECT_DATA= (SID=mgwextproc) (PRESENTATION=RO)))
oemctl =
(DESCRIPTION=
(ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC)(KEY=EXTPROC)))
(CONNECT_DATA= (SID=mgwextproc) (PRESENTATION=RO)))
os2p =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= nova.deltacollege.edu)(Port= 1521))
(CONNECT_DATA = (SID = os2p))
)
os2t =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= solarsystem.deltacollege.edu)(Port= 1521))
(CONNECT_DATA = (SID = os2t))
)
ofnp.world =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= sunburst.deltacollege.edu)(Port= 1521))
(CONNECT_DATA = (SID = ofnp))
)
ofnt.world =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= sunburst.deltacollege.edu)(Port= 1522))
(CONNECT_DATA = (SID = ofnt))
)
ODWP101 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= perseus.sjdccd.cc.ca.us)(Port= 1521))
(CONNECT_DATA = (SID = odwp101))
)
ofnp
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= sunburst.sjdccd.cc.ca.us)(Port= 1521))
(CONNECT_DATA = (SID = ofnp))
)
ofnt
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= sunburst.sjdccd.cc.ca.us)(Port= 1522))
(CONNECT_DATA = (SID = ofnt))
)



Listener.ora :
oem =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= TCP)(Host= nova)(Port= 1521))
)
SID_LIST_oem =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = os2p)
(ORACLE_HOME = /u04/app/oracle/product/10.0.1)
(SID_NAME = os2p)
)
(SID_DESC =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u04/app/oracle/product/10.0.1)
(PROGRAM = extproc)
)
)
os2p =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= TCP)(Host= nova)(Port= 1521))
)
SID_LIST_ofnp =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = os2p)
(ORACLE_HOME = /u04/app/oracle/product/10.0.1)
(SID_NAME = os2p)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u04/app/oracle/product/10.0.1)
(PROGRAM = extproc)
)
)

[Updated on: Mon, 14 November 2005 11:51]

Report message to a moderator

Re: Drop sysman schema [message #146919 is a reply to message #146730] Mon, 14 November 2005 10:49 Go to previous messageGo to next message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
By the way, the web based OEM is a (certain negitive words come to mind).

[Updated on: Mon, 14 November 2005 11:14]

Report message to a moderator

Re: Drop sysman schema [message #176904 is a reply to message #146909] Sun, 11 June 2006 16:06 Go to previous messageGo to next message
jcai
Messages: 1
Registered: June 2006
Junior Member
Hello David,

We have oracle 10g running. I want to recreate the OEM. I have followed the procedure you posted in the forum, with 3 steps:
Step 1: Remove the repository objects from the database
step 2: Remove the existing DB Control web site configuration in the OS file system ("emca -x sid")
step 3: recreate both the repository object and DB control web site ("emca")

But I could not recreate the repository and DB control. Here are some errors in the log file generated from step 3:

Warning: Package Body created with compilation errors.

Errors for PACKAGE BODY EMD_NOTIFICATION:
32/23 PL/SQL: Item ignored
32/23 PLS-00201: identifier 'UTL_SMTP' must be declared
47/7 PL/SQL: Statement ignored
47/7 PLS-00320: the declaration of the type of this expression is
incomplete or malformed

48/7 PL/SQL: Statement ignored
48/21 PLS-00320: the declaration of the type of this expression is
incomplete or malformed

50/7 PL/SQL: Statement ignored
50/21 PLS-00320: the declaration of the type of this expression is
incomplete or malformed


I uploaded the log file here. Does anyone has the idea how to fix it?

Thanks
Jennifer
Re: Drop sysman schema [message #176905 is a reply to message #146730] Sun, 11 June 2006 18:35 Go to previous message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
David is correct. Shutdown restrict, remove all objects that sysman owns. Remove the user and tablespace. Remove the directory tree under $ORACLE_HOME/sysman or $ORACLE_HOME/<sid>/sysman.
Then recreate using the emca -x <your sid>
Previous Topic: Price
Next Topic: Oracle 10g EM installation problem
Goto Forum:
  


Current Time: Fri Nov 22 23:49:12 CST 2024