Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

ORA-01940: cannot drop a user that is currently

2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Oracle deletes a user and reports an error:

12:17:05 SYS@RCBD1 (BAPRCDB) > drop user GSDPAY cascade

Drop user GSDPAY cascade

*

ERROR at line 1:

ORA-01940: cannot drop a user that is currently connected

After using to delete the current user session, the link has been changing and rising.

12:21:13 SYS@RCBD1 (BAPRCDB) > select 'alter system kill session''| | sid | |','| serial# | |''; 'from v$session where username =' GSDPAY'

'ALTERSYSTEMKILLSESSION''' | | SID | |','| | SERIAL# | |'';'

Alter system kill session '39pm 25167'

Alter system kill session '144pm 15001'

Alter system kill session '155pm 31897'

Alter system kill session '297, 27285'

Alter system kill session '478, 61659'

Alter system kill session '1043. 54247.

Alter system kill session '1427747505'

Alter system kill session '1565 and 1707'

Alter system kill session '1608. 4123.

Alter system kill session '161509605'

Alter system kill session '1728,34805'

Alter system kill session '1886 and 5755'

Alter system kill session '2005. 36393'

Alter system kill session '2023 and 62813'

Alter system kill session '2034, 17133'

Alter system kill session '2154. 36941'.

Alter system kill session '2297, 57457'

Alter system kill session '2310pr 34881'

Alter system kill session '2321, 4779'

Alter system kill session '2427pr 5759'

Alter system kill session '2461 Magi 19827'

Alter system kill session '2569pm 56201'

Alter system kill session '2721, 45675'

Alter system kill session '2844CA 19895'

Alter system kill session '2851 par 63481'

Alter system kill session '2984 51063'

Alter system kill session '29999944415'

Alter system kill session '3319, 40307'

Alter system kill session '3450pc8641'

Alter system kill session '3700, 27449'

Alter system kill session '3859pm 35379'

Alter system kill session '3884pm 54613'

Alter system kill session '4265, 62259'

Alter system kill session '4276 and 38659'

Alter system kill session '4428,22593'

Alter system kill session '4438pr 55087'

36 rows selected.

This is not the problem, try to delete the user tablespace

12:24:57 SYS@RCBD1 (BAPRCDB) > select default_tablespace from dba_users where username='GSDPAY'

DEFAULT_TABLESPACE

GSDPAY_DATA

12:25:05 SYS@RCBD1 (BAPRCDB) > drop tablespace GSDPAY_DATA including contents and datafiles

Tablespace dropped.

12:29:08 SYS@RCBD1 (BAPRCDB) > drop user GSDPAY cascade

Delete successfully, a good memory is not as good as a bad pen, record

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report