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

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
主站蜘蛛池模板: 芜湖县| 疏勒县| 长宁区| 温宿县| 勃利县| 巫溪县| 丹棱县| 吉隆县| 阿拉尔市| 襄樊市| 铅山县| 吴川市| 滨州市| 赤壁市| 汕尾市| 蓝山县| 宁阳县| 樟树市| 康保县| 建昌县| 榕江县| 温州市| 开阳县| 恩平市| 双江| 景东| 壤塘县| 连江县| 曲麻莱县| 冷水江市| 新巴尔虎左旗| 深泽县| 莫力| 荣成市| 甘肃省| 库尔勒市| 普安县| 临洮县| 保德县| 兰西县| 博客|