Oacle 사용 안내
5321 단어 Oacle
3 :
sys change_on_install [as sysdba]
system manage
scott tiger
、
oracle:
sqlplus / as sysdba
:
lsnrctl start
:
oradim -startup -sid orcl
SQL> show user; //
SQL> create user lisi identified by lisi; //
SQL> grant create session to lisi; //
SQL> sqlplus lisi/lisi //
SQL> grant unlimited tablespace to lisi //
SQL> grant create table to lisi; //
SQL> create table mytable (id int); //
SQL> insert into mytable values (1); //
SQL> select * from mytable; //
SQL> drop table mytable //
SQL> revoke create table from lisi; //
SQL> select * from user_sys_privs; //
SQL>revoke unlimited tablespace from lisi; //
?
sys
sqlplus / as sysdba
alter user scott Identified by tiger;
oracle 9
E:\oracle\ora92\database\pwdora9i.ora;
orapwd file=E:\oracle\ora92\database\pwdora9i.ora password=sys entries=10;
select * from v$pwfile_users;
oracle 10+
E:\oracle\ora92\database\PWDorcl.ora;
orapwd file=E:\oracle\ora92\database\PWDorcl.ora password=sys entries=10;
select * from v$pwfile_users;
。
show user;
create role myrole;
grant create session to myrloe; session
grant create table to myrole;
create user zhangsan identified by zhangesan;
grant myrole to zhangsan;
sqlplus zhangsan/zhangsan
drop role myrole;
grant unlimited tablespace to myrole; , ,
show user:
select * from user_sys_privs
grant alter any table to lisi; sys
grant alter any table to wangwu;
grant alter any table to lisi with admin option; //
grant alter any table to wangwu with admin option; //
create table A(id int); // sys A
grant select On A to lisi; // ,
grant select On A to lisi with grant option; //
grant select on sys.A to wangwu with grant option;; // 。
SQL> create user wanwu identified by wangwu
SQL> grant create session to wangwu;
SQL> sqlplus wangwu/wangwu
SQL> grant create table,unlimited tablespace to wangwu;
SQL> create table mytab(id int);
SQL> insert into mytab values(2);
lisi wangwu ,
SQL> select * from wangwu.mytab;
sys wangwu , ,
SQL> select * from wangwu.mytab;
SQL> select * from wangwu.mytab;
lisi wangwu
SQL> grant select on mytab to lisi; //
SQL> grant insert on mytab to lisi; //
SQL> commit; //
SQL> grant all on mytab ot lisi; //
SQL> revoke all on mytab from lisi; //
SQL> disconn
SQL> conn wangwu/wangwu
SQL> commit: //
SQL> alter table mytab add name varchar(50);
SQL> insert into mytab values(1,'zhang');
SQL> insert into mytab values(2,'li');
SQL> insert into mytab values(3,'wang');
SQL> commit;
SQL> grant update(name) on mytab to lisi; // name
SQL> grant insert(id) on mytab to lisi; // id
SQL> update wangwu.mytab set name='lihuoming' where id=1;
1. :
scott( )
conn scott/tiger
manager( )
conn system/manager
sys( )
conn sys/change_on _install as sysdba
:
create user identified by
default tableSpace
Temporary TableSpace
Quota [ K | M | Limited | unlimited ] on
:
create user abc
identified by 123
default tablespace Users
Temporary tablespace Temp
Quota 50M on Users
:
-- alter user account lock
-- alter user account unlock
-- alter user password expire
:
drop user [CasCade]
CasCade
:
drop user abc cascade;
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
자바 작업 은 Clob 또는 NClob 데이터 형식의 저장 프로 세 스 인 스 턴 스 를 포함 합 니 다.텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.