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

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
主站蜘蛛池模板: 永州市| 太保市| 永年县| 泾源县| 怀来县| 门源| 贺兰县| 澄江县| 宁乡县| 闽侯县| 镇宁| 大新县| 霞浦县| 莎车县| 武汉市| 班玛县| 曲沃县| 米泉市| 灵璧县| 都安| 宝山区| 三穗县| 忻州市| 蒙阴县| 武冈市| 深圳市| 渝北区| 石屏县| 祁东县| 泸溪县| 永寿县| 定边县| 无极县| 霸州市| 德清县| 岳普湖县| 鄂温| 拉萨市| 塘沽区| 台东县| 十堰市|