oracle更改使用者名稱
--建立測試使用者
create user haohao1 identified by oracle default tablespace users ;
grant connect,dba to haohao1;
SQL> conn haohao1/oracle@10.13.7.219:1521/orcl11g
Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
Connected as haohao1
SQL> create table test1 (a number(1));
SQL> create table test2 (a number(1));
SQL> select owner,object_name,object_id from dba_objects a where a.owner='HAOHAO1';
OWNER OBJECT_NAME OBJECT_ID
------------------------------ -------------------------------------------------------
HAOHAO1 TEST1 85172
HAOHAO1 TEST2 85173
----修改使用者名稱
SQL> show user
User is "SYS"
SQL> select user#,name,password from user$ where name ='HAOHAO1';
USER# NAME PASSWORD
---------- ------------------------------ ------------------------------
84 HAOHAO1 F671C230A1E05C80
SQL> update user$ set name='HAOHAO' where user#=84;
SQL> COMMIT;
SQL> create user haohao1 identified by oracle default tablespace users;
create user haohao1 identified by oracle default tablespace users
ORA-01920: 使用者名稱 'HAOHAO1' 與另外一個使用者名稱或角色名發生衝突
---強制寫入資料檔案
SQL> alter system checkpoint;
----清楚快取資料字典資訊,強制oracle讀實際資料(即更改後的資料)
SQL> alter system flush shared_pool;
SQL> create user haohao1 identified by oracle default tablespace users;
SQL> grant connect,resource to haohao1;
SQL> commit;
SQL> select user#,name,password from user$ where name ='HAOHAO';
USER# NAME PASSWORD
---------- ------------------------------ ------------------------------
84 HAOHAO F671C230A1E05C80
SQL> select user#,name,password from user$ where name ='HAOHAO1';
USER# NAME PASSWORD
---------- ------------------------------ ------------------------------
85 HAOHAO1 F671C230A1E05C80
SQL> drop user haohao1;
SQL> select user#,name,password from user$ where name ='HAOHAO1';
USER# NAME PASSWORD
---------- ------------------------------ ------------------------------
SQL> conn haohao/oracle@10.13.7.219:1521/orcl11g
Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
Connected as haohao
SQL> select owner,object_name,object_id from dba_objects a where a.owner='HAOHAO';
OWNER OBJECT_NAME OBJECT_ID
------------------------------ -------------------------------------------------------
HAOHAO TEST1 85172
HAOHAO TEST2 85173
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14710393/viewspace-1175319/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 一、更改ORACLE SID名稱Oracle
- 更改MYSQL使用者名稱密碼MySql密碼
- win10怎麼改使用者名稱_win10如何更改使用者名稱Win10
- 更改模型名稱空間模型
- 快速修改Oracle使用者名稱Oracle
- 修改了github使用者名稱後,部落格的更改Github
- win10電腦使用者名稱怎麼改_windows10怎麼更改使用者名稱Win10Windows
- oracle 11g rac更改public的網路卡名稱Oracle
- 更改Xamarin Android App名稱AndroidAPP
- Windows10系統更改使用者名稱的方法Windows
- win10電腦使用者名稱怎麼改_win10更改電腦使用者名稱步驟Win10
- win10家庭版更改使用者名稱怎麼改_如何修改win10使用者名稱Win10
- Win10電腦名稱怎麼更改 win10更改電腦名稱的方法Win10
- CentOS 6.X怎麼更改網路卡名稱?CentOS 6.X更改網路卡名稱的方法CentOS
- win10怎麼更改使用者名稱資料夾_win10如何修改suers使用者名稱資料夾Win10
- win10電腦怎麼改開機使用者名稱 win10電腦開機使用者名稱更改方法Win10
- oracle更改例項名Oracle
- 在蘋果Mac上如何更改AirDrop名稱?蘋果MacAI
- oracle11g修改使用者名稱Oracle
- 修改oracle使用者名稱,表空間名字,Oracle
- win10電腦怎麼改開機使用者名稱 win10開機賬戶名稱更改方法Win10
- win10系統怎麼更改user使用者名稱中文為英文Win10
- 更改Linux系統的網路卡名稱Linux
- 如何更改監聽器日誌檔名稱
- oracle中的某一個使用者名稱修改Oracle
- Oracle EM Express要求使用者名稱和密碼OracleExpress密碼
- Oracle11g 建立使用者名稱、授權Oracle
- 修改oracle中的使用者名稱和密碼Oracle密碼
- win10系統svn使用者名稱密碼怎樣更改_win10 svn更換使用者名稱密碼操作方法Win10密碼
- WINDOWS7更改訪問windows共享的使用者名稱和密碼薦Windows密碼
- Oracle Apps(EBS)模組名稱 & SAP模組名稱OracleAPP
- ORACLE 11G R2 修改"使用者名稱"Oracle
- Oracle 11g修改資料庫使用者名稱Oracle資料庫
- Oracle---使用者重新命名、建立同樣的使用者名稱Oracle
- windows10家庭版怎麼更改c盤中的使用者名稱_win10家庭版修改c盤使用者名稱操作方法WindowsWin10
- github修改使用者名稱Github
- Oracle 11g支援修改資料庫使用者名稱Oracle資料庫
- oracle忘記使用者名稱密碼怎樣恢復Oracle密碼