How does oracle remove the user to provide a solution
- 2020-12-13 19:09:46
- OfStack
When deleting a user in Oracle: ORACLE cannot delete the current connection user can use the following statement
Sql code
SQL >
USERNAME SID SERIAL#
------------------------------ ---------- ----------
1 1
2 1
3 1
4 1
5 1
6 1
7 1
SYS 8 3
A 9 4
9 rows have been selected.
SQL >
The system has changed.
SQL >
Sql code
SQL >
select username,sid,serial# from v$session;
USERNAME SID SERIAL#
------------------------------ ---------- ----------
1 1
2 1
3 1
4 1
5 1
6 1
7 1
SYS 8 3
A 9 4
9 rows have been selected.
SQL >
alter system kill session'9,4';
The system has changed.
SQL >
drop user a cascade;// Delete the user and all objects under the user table space
The user has been discarded.