事先启动数据库

①用sys连接到数据库:sqlplus / as sysdba
②alter user scott account unlock
③exit
④sqlplus scott/tiger
⑤一般提示需要修改密码,修改完毕即可使用。
⑥show user; USER is "SCOTT" 修改成功!

使用scott用户,是因为一般scott用户下建立了默认的table用来使用学习,很方便。有以下几个方法可以查询scott用户下面的表:
①select table_name,column_name from dba_tab_cols where owner='SCOTT' order by table_name; (系统用户)
②select * from cat; (scott用户)
③select * from user_tables (scott用户)
④select * from tab; (scott用户)
⑤select owner,table_name from dba_tables where OWNER='SCOTT'; (系统用户)

0 评论

发表评论

订阅: 博文评论 (Atom)