- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cannot Drop a User
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 04:21 AM
09-29-2003 04:21 AM
Cannot Drop a User
While logged in as SYSTEM/***** AS SYSDBA, I'm trying to delete a user. However, when doing so, I receive the following:
ORA-00604: error occurred at recursive SQL level 2
ORA-20001: Insufficient privileges for DELETE or DROP
ORA-06512: at line 2
I thought SYSTEM could do anything (in fact, it has in the past as far as deleting goes). The user I'm trying to delete became unstable after playing with some role settings. Now that it is no longer needed, I would like to get rid of it. Any ideas as to what I need to do?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 04:54 AM
09-29-2003 04:54 AM
Re: Cannot Drop a User
Make sure the ORACLE_SID is set correctly.
sqlplus internal
>drop user
This should work.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 05:09 AM
09-29-2003 05:09 AM
Re: Cannot Drop a User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 05:19 AM
09-29-2003 05:19 AM
Re: Cannot Drop a User
Is the database up?
Consider a restart of the system.
ORA-20001 seems to be mentioned quite often in patch installations going bad. Any recent activity there?
The Environment variables of the oracle user can cause this:
On a working oracle system:
as oracle
env > /tmp/env.good.text
compate that to the same output on the problem system.
Obviously check the alert logs for problems, I'm assuming you did that and found nothing.
ORA-00604 has been solved by patch installations. Bad idea in the current conext.
Check the ipcs commands, see if shared memory is owned by the right user. If the database was started by root all kinds of ugly things like this can happen.
My experience shows this is environment variables or corrupt shared memory. shmmax, shmseg are the kernel parameters to look at.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 05:51 AM
09-29-2003 05:51 AM
Re: Cannot Drop a User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 07:33 AM
09-29-2003 07:33 AM
Re: Cannot Drop a User
*
try to connect as the oracle user.
*
sqlplus
then connect as
/ as sysdba
*
it is perferrable that you create another user with DBA role to do these operations.
*
If still not OK, post the output of:
select * from v$database;
and
select * from v$instance;
*
regards
YOgeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 08:09 AM
09-29-2003 08:09 AM
Re: Cannot Drop a User
select * from v$database;
DBID - 3091073505
NAME - TST817
CREATED - 27-SEP-01
RESETLOGS_CHANGE# - 1
RESETLOGS_TIME - 27-SEP-01
PRIOR_RESETLOGS_CHANGE# - 0
PRIOR_RESETLOGS_TIME -
LOG_MODE - NOARCHIVELOG
CHECKPOINT_CHANGE# - 30784925
ARCHIVE_CHANGE# - 30772724
CONTROLFILE_TYPE - CURRENT
CONTROLFILE_CREATED - 27-SEP-01
CONTROLFILE_SEQUENCE# - 123825
CONTROLFILE_CHANGE# - 30785692
CONTROLFILE_TIME - 25-SEP-03
OPEN_RESETLOGS - NOT ALLOWED
VERSION_TIME - 27-SEP-01
OPEN_MODE - READ WRITE
select * from v$instance;
INSTANCE_NUMBER - 1
INSTANCE_NAME - TST817
HOST_NAME - xxxxxx
VERSION - 8.1.7.0.0
STARTUP_TIME - 20-SEP-03
STATUS - OPEN
PARALLEL - NO
THREAD# - 1
ARCHIVER - STOPPED
LOG_SWITCH_WAIT -
LOGINS - ALLOWED
SHUTDOWN_PENDING - NO
DATABASE_STATUS - ACTIVE
INSTANCE_ROLE - PRIMARY_INSTANCE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 09:10 AM
09-29-2003 09:10 AM
Re: Cannot Drop a User
Thanks,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2003 01:18 AM
09-30-2003 01:18 AM
Re: Cannot Drop a User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2003 09:11 AM
09-30-2003 09:11 AM
Re: Cannot Drop a User
Connect in as internal or sysdba, run "alter session set sql_trace = true", try to drop the user, and get the trace for it. Post it back on here when you get the chance, and I will try and figure out where your permission problem is.
Thanks,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2003 04:11 PM
09-30-2003 04:11 PM
Re: Cannot Drop a User
*
could it be that you have a database BEFORE DROP trigger? YES - Most probably!!
*
Post the output of the following SQL query:
===========================================
select owner, substr(triggering_event,1,45)
from dba_triggers
where triggering_event like '%DROP%';
===========================================
*
revert
*
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2003 04:18 PM
09-30-2003 04:18 PM
Re: Cannot Drop a User
-
I tried to simulate something similar!
-
see below:
===========================================
yd@MYDB.MU> grant create session, create user, drop user to a identified by a;
Grant succeeded.
*
yd@MYDB.MU> grant create session to b identified by b;
Grant succeeded.
*
yd@MYDB.MU> create table app_users ( username varchar2(30) );
Table created.
*
yd@MYDB.MU> insert into app_users values ( 'B' );
1 row created.
*
yd@MYDB.MU> create or replace trigger drop_user_trigger
2 before drop on database
3 when ( user = 'A' )
4 declare
5 l_cnt number;
6 l_name varchar2(30);
7 begin
8 if ( ora_dict_obj_type = 'USER' )
9 then
10 l_name := ORA_DICT_OBJ_NAME;
11 select count(*) into l_cnt
12 from dual
13 where exists ( select null
14 from app_users
15 where username = l_name );
16 if ( l_cnt <> 1 )
17 then
18 raise_application_error( -20001, 'Insufficient privileges for DELETE or DROP' );
19 end if;
20 end if;
21 end;
22 /
*
Trigger created.
*
yd@MYDB.MU> @connect a/a
*
a@MYDB.MU> drop user scott;
drop user scott
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-20001: Insufficient privileges for DELETE or DROP
ORA-06512: at line 15
*
a@MYDB.MU> drop user b;
*
User dropped.
*
a@MYDB.MU>
*
Hope this helps!
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 01:25 AM
10-01-2003 01:25 AM
Re: Cannot Drop a User
Now, Brian, here is the trace you requested. You'll see towards the end where the 'insufficient privilege' message appears. ABC_CODE is the first table under the M460QA817 user. Is there an issue with DUAL?
Yogeeraj, here is the output you requested from you select statement:
OWNER SUBSTR(TRIGGERING_EVENT,1,45)
------------------------------ ---------------------------------------------
SYS DROP
SYSTEM DROP
SYSTEM DROP
MDSYS DROP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 02:31 AM
10-01-2003 02:31 AM
Re: Cannot Drop a User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 08:42 AM
10-01-2003 08:42 AM
Re: Cannot Drop a User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 04:32 PM
10-01-2003 04:32 PM