修改ORACLE資料庫某個使用者的表空間

2021-09-27 02:27:36 字數 512 閱讀 9972

查詢資料庫表空間的sql如下:

select a.table_name, b.comments, a.tablespace_name tbspname

from user_tables a, user_tab_comments b

where a.table_name = b.table_name

order by a.tablespace_name

這個sql查詢出的結果為當前使用者的所有表以及表空間。

查詢修改語句如下:

select replace(wm_concat('alter table '||table_name||' move tablespace tb1;'),',',chr(13)) from user_tables where tablespace_name = 'users'
上面這個sql "tb1"表示預設表空間,"users"表示需要修改的表空間,執行上面的sql,將查詢出的結果複製出來直接執行

Oracle匯入 匯出某個使用者下的資料庫

空表不會被匯出 基本語法和例項 1 exp 有三種主要的方式 完全 使用者 表 1 完全 exp system manager buffer 64000 file c full.dmp full y 如果要執行完全匯出,必須具有特殊的許可權 2 使用者模式 exp sonic sonic buffe...

ORACLE資料庫建立刪除使用者及修改密碼CMD命令

建立使用者 test 1234 create user test identified by 1234 grant dba to test 授予dba許可權 刪除使用者名為test使用者 drop user test cascade 撤銷dba許可權 revoke dba from test onl...

如何修改oracle資料庫使用者密碼過期策略

轉至 1.查詢資料庫使用者何時過期 登陸資料庫pl sql工具,輸入以下sql語句 由以上sql查詢得到system使用者到2019 7 12過期,tfds使用者到2020 1 31過期。2.查詢oracle資料庫的密碼過期策略 1 查詢使用者的密碼策略使用的哪個引數檔案 由此可以看出密碼引數檔案為...