---
title: "删除已连接用户"
author: "hougbin"
date: "2010-12-30T09:28:13Z"
tags: ["SQL"]
categories: ["数据库"]
slug: "untitled"
draft: false
lastmod: "2010-12-30T09:28:13Z"
id: 855426
url: "https://hougbin.iteye.com/blog/855426"
---

1 删除表空

   drop tablespace  tbs including contents;

 

 

2删除一个连接的用户  
SQL&gt; select sid.serial# from v$session where username-^H;  
select sid.serial# from v$session where username-  
                                                 *  
ERROR at line 1:  
ORA-00911: invalid character

SQL&gt; select sid,serial# from v$session where username='ECN';

       SID    SERIAL#  
\---------- ----------  
 15  3279

SQL&gt; alter system kill session '15,3279';

System altered.

SQL&gt; drop user ECN cascade;

User dropped.

SQL&gt;