oracle 建使用者,表空間,導資料流程

2021-09-01 20:35:27 字數 1727 閱讀 2789

/*分為四步 */

/*第1步:建立臨時表空間 */

create temporary tablespace user_temp

tempfile 'd:\oracle\oradata\oracle9i\user_temp.dbf'

size 50m

autoextend on

next 50m maxsize 20480m

extent management local;

/*第2步:建立資料表空間 */

create tablespace idss_dev_user

logging

datafile 'f:\oracle\product\10.2.0\oradata\orcl\idss_dev_user.dbf'

size 50m

autoextend on

next 50m maxsize 20480m

extent management local;

/*第3步:建立使用者並指定表空間 */

create user username identified by password

default tablespace user_data

temporary tablespace user_temp;

/*第4步:給使用者授予許可權 */

grant connect,resource,dba to username;

刪除表空間

drop tablespace tablespace_name including contents and datafiles;

修改表空間

alter user test1 default tablespace user_tbs

檢視使用者許可權

select * from user_role_privs;

select * from session_privs

oracle 匯入命令

imp idss_dev_user/idss_dev_user file=f:\sogo/idss_all.dmp log=f:\sogo/dblog full=y ignore=y

idss_dev_user

idss_all.dmp 表空間檔案

ias_tbs

omcw_tbs

alter user kcgl default tablespace kcgl temporary tablespace temp;

針對某個使用者的:

alter user user_name default tablespace tbs_name;

設定資料庫的預設臨時表空間:

alter database default temporary tablespace temp_tbs_name;

select username from dba_users

匯出exp username/passwd@dbname tables= tablename file=filename.dmp rows=n compress=n

exp idss_dev_user/idss_dev_user@dbname tables= tablename file=filename.dmp rows=n compress=n

oracle中如何查詢所有表及其所使用的表空間

select owner,table_name,tablespace_name from dba_tables;

oracle建表空間 使用者

建表空間 語法 create tablespacetablespace namedatafiledatafile pathsize 2048m autoextend on tablespace name 表空間的名稱 datafile path 資料檔案的儲存路徑,必須有讀寫的許可權,可以用chmo...

Oracle資料庫 建庫 建表空間,建使用者

oracle資料庫 建庫 建表空間,建使用者 oracle安裝完後,其中有乙個預設的資料庫,除了這個預設的資料庫外,我們還可以建立自己的資料庫。對於初學者來說,為了避免麻煩,可以用 database configuration assistant 嚮導來建立資料庫。建立完資料庫後,並不能立即在資料庫...

Oracle資料庫 建庫 建表空間,建使用者

oracle安裝完後,其中有乙個預設的資料庫,除了這個預設的資料庫外,我們還可以建立自己的資料庫。對於初學者來說,為了避免麻煩,可以用 database configuration assistant 嚮導來建立資料庫。建立完資料庫後,並不能立即在資料庫中建表,必須先建立該資料庫的使用者,並且為該使...