一. 安装是用户管理:
sqlplus /nolog;
connect /as sysdba;
alter user sys identified by change_on_install;
alter user system identified by manager;
alter user scott identified by tiger;
(默认scott锁定)(scott用户中有emp dept等表)
alter user scott account unlock;
二. Oracle常用命令:
show user;(查看当前用户)
connect sys/change_on_install as sysdba;(切换sys用户)
或connect sys/change_on_install as sysoper;(切换sys用户 )
connect system/manager;
connect scott/tiger;
三. 查看当前用户的表:
select table_name from user_tables;
四. 查看Oracle中的用户:
select * from dba_users; 查看数据库里面所有用户,前提是你是有dba权限的帐号,如sys,system
select * from all_users; 查看你能管理的所有用户!
select * from user_users; 查看当前用户信息 !
五.
oracle里面不叫数据库了,叫创建一个命名空间
创建表空间的语法是:
CREATE TABLESPACE tablespacename
DATAFILE ‘filename’ [SIZE integer [K|M]]
[AUTOEXTEND [OFF|ON]];
--创建用户
create user scce identified by 123;
--授权
grant connect to scce;
grant resource to scce;
grant create synonym to scce;
--连接
SQL> conn scce/123;