Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

9.2. User

9.2.1. Create user

create user userName identified by password; 
			

指定表空間

create user neo identified by 123456 default tablespace netkiller;
			

9.2.2. Drop user

drop user userName cascade; 
			

cascade 刪除用戶同時刪除該用戶所創建的對象。

9.2.3. Alter user

alter user neo default tablespace neo;			
			

9.2.4. 修改密碼

輸入 sqlplus /nolog 回車

$ sqlplus /nolog

SQL> conn /as sysdba

SQL> alter user system identified by "123456";
SQL> alter user sys identified by "123456";
SQL> alter user FINANCE identified by "123123" account unlock;

User altered.
			

account unlock 解鎖賬號

alter user backup identified by "passw0rd" account unlock;			
			

9.2.5. Reset Password 忘記密碼重置密碼

密碼檔案 orapwORACLE_SID 這裡的SID是orcl,所以密碼檔案是 orapworcl

orapwd file=$ORACLE_HOME/dbs/orapworcl password=newpass