Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracle Óû§¹ÜÀí

ϵͳȨÏÞ£º »ØÊÕʱ²»»á²úÉú¼¶Áª»ØÊÕ
conn / as sysdba;
create user t1 identified by t1;
create user t2 identified by t2;
grant connect to t1,t2;
grant create table, create view to t1 with admin option;
conn t1/t1
grant create table to t2;
conn / as sysdba;
select * from dba_sys_privs where grantee in('T1', 'T2');
GRANTEE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
T1 CREATE TABLE YES
T1 CREATE VIEW YES
T2 CREATE TABLE NO
with admin option ¿Éʹ±»ÊÚÓèȨÏÞÕßÓÐȨתÊÚÆäËûÈË¡£
revoke create table, create view from t1;
select * from dba_sys_privs where grantee in('T1', 'T2');
GRANTEE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
T2 CREATE TABLE NO
²»»á¼¶ÁªÉ¾³ýÒѾ­ÊÚÓèµÄϵͳȨÏÞ¡£
    
¶ÔÏóȨÏÞ£º¼¶Áª»ØÊÕËùÓÐȨÏÞ
conn test/test
grant select on t to t1 with grant option;
conn t1/t1
grant select on test.t to t2;
conn test/test
select * from dba_tab_privs where grantee in('T1', 'T2');
GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE
------------------------------ ------------------------------ ------------------------------ ------- --------------------------------
T2 TEST T T1 SELECT
T1 TEST T TEST SELECT
revoke select on t from t1;
select * from dba_tab_privs where grantee in('T1', 'T2');
SQL> select * from dba_tab_privs where grantee in('T1', 'T2');
¡¡¡¡
¼¶ÁªÉ¾³ýÒѾ­ÊÚÓèµÄ¶ÔÏóȨÏÞ¡£
½ÇɫȨÏÞ£º¼¶Áª»ØÊÕËùÓÐȨÏÞ
create role ttt;
grant create table, create user, create session to ttt with admin option;
grant select on test.t to ttt with grant option;
SQL> grant select on test.t to ttt with grant option;
grant select on test.t to ttt with grant option
ORA-01926:
 
ÎÞ·¨Ê¹ÓÃwith grant optionÑ¡Ïî¸ø½ÇÉ«ÊÚȨ¡£
grant select on test.t to ttt;
create user d identified by d;
create user e identified by e;
grant ttt to d with admin option;
conn d/d
grant ttt to e;
select * from test.t;
SQL> select * from test.t;
conn / as


Ïà¹ØÎĵµ£º

oracleÁ·Ï°Ì⣨mldnÊÓÆµ£©Ò»

1,Áгö×îµÍн½ð´óÓÚ1500µÄ¸÷ÖÖ¹¤×÷¼°´ÓÊ´˹¤×÷µÄÈ«²¿¹ÍÔ±ÈËÊý¡£
select job,count(empno) from emp
where job in(select job from emp group by job having min(sal)>1500)
group by job;
2£¬Áгöн½ð¸ßÓÚ¹«Ë¾Æ½¾ùн½ðµÄËùÓÐÔ±¹¤ËùÔÚ²¿ÃÅ£¬Éϼ¶Áìµ¼£¬¹«Ë¾µÄ¹¤×ʵȼ¶¡£
select e.ename,d.dname,m.ename,e.sal,sa. ......

PostgreSQLºÍOracleÓ÷¨ÉϵÄÒ»Ð©Çø±ð

£¨1 £© ×¢ÒâÔö¼ÓÔ¼ÊøÊ±µÄд·¨£¬ºÍORACLE ÂÔÓв»Í¬
Oracle £º
ALTER TABLE SCHEMA.PREFIX_INFO ADD (
CONSTRAINT PK_PREFIX_INFO PRIMARY KEY (INFO_ID));
PostgresQL £º
alter table schema.prefix_info add constraint prefix_info_pkey primary key(info_id);
£¨2 £©ÏµÍ³Ä¬ÈϵÄ×î´óÖµÓëORACLE ²»Í¬
Oracle £ ......

ORACLE³£ÓÃÃüÁî

ORACLE³£ÓÃÃüÁî
Ò»¡¢ORACLEµÄÆô¶¯ºÍ¹Ø±Õ
1¡¢ÔÚµ¥»ú»·¾³ÏÂ
ÒªÏëÆô¶¯»ò¹Ø±ÕORACLEϵͳ±ØÐëÊ×ÏÈÇл»µ½ORACLEÓû§£¬ÈçÏÂ
su - oracle
a¡¢Æô¶¯ORACLEϵͳ
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>startup
SVRMGR>quit
b¡¢¹Ø±ÕORACLEϵͳ
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ