The example in this article describes how to delete users and table spaces in Oracle under Linux. Share it with everyone for your reference, the details are as follows:
1. Delete a user
SQL> conn /as sysdba Connected. SQL> drop user userName cascade;
The user has been deleted
If the user cannot be deleted and an error is reported:
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected
View the user’s progress and kill the user process , and then delete the user.
SQL> select sid,serial# from v$session where username='userName'; SID SERIAL# ---------- ---------- 150 9019 SQL> alter system kill session '150,9019'; System altered.
2. Delete the table space
Prerequisite: Before deleting the table space, make sure that the table space is not used by other users before deleting it.
drop tablespace nsName including contents and datafiles cascade constraints ;
including contents Delete the contents in the table space. If there is content in the table space before deleting the table space, but this parameter is not added, the table space cannot be deleted, so it is customary to add this parameter.
including datafiles Delete the data files in the table space.
cascade constraints Also delete foreign key references to tables in tablespace.
I hope this article will be helpful to everyone in Oracle database programming.
For more related articles on how to delete users and table spaces in Oracle under Linux, please pay attention to the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software