官术网_书友最值得收藏!

Unlocking sample user accounts

Oracle Database 11g XE comes with sample database users such as HR, MDSYS, and others. Some of the user accounts are by default locked. In the rest of the chapters, we will use HR schema objects for our testing and building applications.

Log on to SQL*Plus as SYSDBA, query account status for all users, and unlock the HR account as shown below:

SQL> connect /as sysdba
SQL> select username, account_status from dba_users;
SQL> alter user hr account unlock; # Unlock the locked account
SQL> alter user hr identified by hr; # Open the expired account

Or:

SQL> alter user hr identified by hr account unlock; #Unlock and open in a single statement
SQL> connect hr/hr
主站蜘蛛池模板: 临洮县| 资中县| 和顺县| 伊川县| 信阳市| 泾源县| 湟源县| 扎兰屯市| 清丰县| 武威市| 东兴市| 车险| 原阳县| 拉萨市| 平江县| 金门县| 项城市| 山西省| 两当县| 南郑县| 皮山县| 永宁县| 巍山| 通海县| 德昌县| 东阳市| 郯城县| 通榆县| 镇沅| 新乐市| 东丽区| 静宁县| 新兴县| 同德县| 宁德市| 惠水县| 尖扎县| 开平市| 岢岚县| 昭觉县| 成安县|