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

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
主站蜘蛛池模板: 鸡东县| 湘潭市| 郎溪县| 灵石县| 祁阳县| 固原市| 光山县| 涪陵区| 尉犁县| 汾西县| 新巴尔虎左旗| 苍梧县| 涞源县| 北京市| 肇源县| 游戏| 庆元县| 桐城市| 屏南县| 上饶市| 吉安市| 绍兴市| 晋江市| 临安市| 巴楚县| 同心县| 磐安县| 射洪县| 阿巴嘎旗| 迁西县| 凤冈县| 全椒县| 扎囊县| 朝阳县| 伊宁县| 南召县| 抚顺市| 青神县| 丹寨县| 南涧| 庐江县|