oracle 建立使用者

2021-08-30 07:39:08 字數 952 閱讀 3334

# 建立使用者

create user angeos identified by angeos;

建立了使用者:angeos,密碼為:angeos

# 對使用者授權

grant connect,resource to angeos;

對使用者angeos授予了連線資料庫和訪問資源的許可權

# 對使用者授權

grant create session,dba to angeos;

create session是乙個系統特權,它可以為使用者提供連線資料庫的能力。

dba是乙個具有超過120個系統特權的角色,所以它可以讓使用者在資料庫中完成幾乎任何工作。

# 改變使用者的密碼

alter user angeos identified by oracle;將使用者angeos的密碼改變為:oracle.

# 鎖定帳號以及解鎖

alter user oe account unlock;

然後用使用者oe登入資料庫伺服器,密碼為oe.注意:使用者解鎖後,要重啟服務。

# 修改表空間的設定

預設情況下,它會使用表空間system和temp(用於存放臨時資料)。

不推薦採用這種方法。所以我們需要改變表空間。

通過系統使用者連線資料庫伺服器

conn sys/sysadmin@hostname_services as sysdba;

然後檢視表空間

select tablespace_name,contents from dba_tablespaces

order by tablespace_name;

使用user表空間代替system表空間

alter user angeos default tablespace users

temporary tablespace temp;

Oracle 使用者建立

執行 cmd 進入 dos視窗 c sqlplus sys password as sysdba 使用sys使用者登入 sql create user username identified by password 建立使用者名稱和密碼 sql create tablespace ts userna...

Oracle建立使用者

當你建立使用者時,應該定義它的表空間 default tablespace 否則,它會使用系統表空間 system tablespace 這是應該避免的。這是常用的建立使用者的乙個例子 create user xx identified by xx profile default default t...

oracle 建立使用者

oracle10g建立使用者 oracle10g 的建立使用者名稱 1 linux 下oracle 的啟動以 oracle 身份登入 啟動lsnrctl start 登入sqplus nolog 連線資料庫 connect assysdba 啟動資料庫 startup 關閉資料庫 shutdown ...