Silahkan Melihat Tutorial di website kami dengan nyaman ENJOY YOUR LIFE ☕

How to drop connected users in Oracle database

Solution 1:
sql>Shutdown immediate;
sql>startup restrict;
sql>drop user TEST cascade;
If you want to re-activate DB normally either reset the server or :
sql>Shutdown immediate;
sql>startup;

Solution 2: find the sessions for the users/schema , as a DBA use :
select sid,serial# from v$session where username = '<user_schema>'
Then kill them with :
 alter system kill session '<sid>,<serial#>'
Now Drop the user :  
drop user <user_schema_name> cascade;


Or: 
 select 'alter system kill session ''' || sid || ',' || serial# || ''';' from v$session where username = 'USER_SCHEMA';




0 komentar:

Post a Comment

How to drop connected users in Oracle database