oracle表空間啓動數據庫命令

爲了方便大家學習,下面yjbys小編爲大家準備了關於Oracle表空間啓動數據庫命令的方法,歡迎閱讀。

oracle表空間啓動數據庫命令

啓動數據庫命令分爲三個階段:

startup nomount

alter database mount

alter database open

本用戶讀取其他用戶對象的權限:

select * from user_tab_PRivs;

本用戶所擁有的系統權限:

select * from user_sys_privs;

———————————————————

Oracle中數據字典視圖分爲3大類, 用前綴區別,分別爲:USER,ALL 和 DBA,許多數據字典視圖包含相似的信息。

USER_*:有關用戶所擁有的對象信息,即用戶自己創建的對象信息

ALL_*:有關用戶可以訪問的對象的信息,即用戶自己創建的對象的信息加上其他用戶創建的對象但該用戶有權訪問的`信息

DBA_*:有關整個數據庫中對象的信息

———————————————

Oracle 10i

ALTER DATABASE DEFAULT TABLESPACE 修改數據庫的默認表空間

———————————–

set echo off;

spool 產生腳本文件的路徑

select ‘grant select,insert,delete,update on ’|| table_name||‘ to 用戶名;’ from user_tables;

spool off;

select ‘revoke select,insert,update,delete on ’||table_name||‘ from 用戶名;’ from user_tables;

revoke select,insert,delete,update any table from 用戶名 with grant option;

————–

grant select,insert,delete,insert,update any table to 用戶名 with grant option ;

修改表 所屬的表空間

alter table 表名 move tablespace 表空間名

注意:在此操作之後,一定要把表上的索引重建, alter index index-name rebuild

——————-

創建表空間語句

create tablespace tableName datafile ‘e:oracle/’ size 1024M autoextend on next 100M maxsize unlimited;