该系列是向 韩顺平 老师学习的笔记
高级权限账号:scott pwd sysdba
新建一个 Command Window,也可以 开始,运行 sqlplus
连接命令
–1.0 切换账号
SQL> show user;
User is “SYS”
–conn 账号/密码
SQL> conn system/123456
Connected to Oracle Database 11g Express Edition Release 11.2.0.2.0
Connected as system
SQL> show user;
User is “SYSTEM”
–conn 账号/密码 AS 角色
SQL> conn scott/tiger AS SYSDBA
Connected to Oracle Database 11g Express Edition Release 11.2.0.2.0
Connected as scott AS SYSDBA
–2.0 disc
SQL> disc
Not logged on
–3.0 passw[ord]
SQL> passw tiger
–4.0 show user
–5.0 exit
–6.0 clear
其他命令
1)start和@
说明:运行sql脚本
SQL> start D:\Oracle\test.sql
2)edit D:\Oracle\test.sql
3)&符号:获取用户输入
SQL> select * from alert_qt t where t.q_name=’&name’;
4)set pagesize 10;
sys,system,scott等用户,不同用户看到的数据对象不一样.
oracle的2个主要服务:OracleTSNListener,OracleService