Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 知乎專欄 | 視頻教程 | About

75.2. User

75.2.1. Create user

create user userName identified by password; 
			

指定表空間

create user neo identified by 123456 default tablespace netkiller;
			

75.2.2. Drop user

drop user userName cascade; 
			

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

75.2.3. Alter user

alter user neo default tablespace neo;			
			

75.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;			
			

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

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

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