oracle基礎 使用者與表空間

2021-10-02 02:17:02 字數 1370 閱讀 5316

sys–超級使用者

system–管理員使用者

sysman–操作企業管理器

scott–oracle創始人的名字

system/[email protected]:1521

show user
alter user username account unlock/lock
–永久表空間(表,檢視,儲存過程)

–臨時表空間(中間執行過程)

–undo表空間(事務修改前的資料)

desc dba_tablespaces; 查詢表空間

select tablespce_name from dba_tablespaces;

desc user_tablespaces;查詢普通使用者表空間
alter user system default tablespace system;

設定使用者system的預設表空間為system;

create [temporary] tablespace tablespace_name tempfile|datafile 'xx.dbf' size xx;

建立表空間語句

eg:create tablespace test datafile 'testfile.dbf' size 10m;建立永久性表空間

create temporary tablespace test tempfile 'testfile.dbf' size 10m;建立臨時表空間

select file_name from dba_data_files where tablespace_name=

'test'

;檢視表空間檔案路徑

select status from dba_tablespaces where tablespace_name=

'test'

;檢視表空間狀態

alter tablespace test

read only/read write

;修改表空間唯讀/讀寫狀態;

alter tablespace table_name add datafile 'xx.dfb' size xx;增加資料檔案

alter tablespace table_name drop datafile 'xx.dfb' size xx;刪除資料檔案

drop tablespace table_name [including contents]

刪除表空間 [刪除資料檔案]

Oracle基礎 使用者和表空間

1.登入sql plus 系統使用 sys,system 許可權比較高 sys system pwd 自己設定的 sysman 用於操作企業管理器來使用 pwd 自己設定的 scott pwd tiger 使用系統使用者登入 2.使用系統使用者登入 使用system使用者登入 connect use...

oracle 使用者與表空間關係

使用者 商家 表 商品 表空間 倉庫 1.1個商家 使用者 能有很多商品 表 1個商品 表 只能屬於乙個商家 使用者 2.1個商品 表 可以放到倉庫a 表空間 也可以放到倉庫b 表空間 但不能同時放入a 表空間 和b 表空間 3.倉庫 表空間 不屬於任何商家 使用者 4.商家 使用者 都有乙個預設的...

oracle建立使用者與表空間

1.建立使用者 在 sys 使用者下操作 create user 使用者名稱 identified by 密碼 2.修改使用者密碼 在 sys 使用者下操作 alter user 使用者名稱 identified by 新密碼 3.刪除使用者 在 sys 使用者下操作 drop user 使用者名稱...