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
Ïà¹ØÎĵµ£º
´´½¨±í
create table person (pid int,name varchar2(20) unique,
age int check(age between 0 and 150),sex varchar(4) default 'ÄÐ',tp int,
address varchar(200),constraint person_pid_pk primary key(pid));
²åÈëÊý¾Ý
insert into person values(0011,'ÁõÈý½ã',25,'ÄÐ',13930123021,'ºÓ±±Ê¡ÇúÑôÏØ');
´´½¨×Ó±í ......
http://www.oracle.com/technology/global/cn/obe/2day_dba/index.html
¿Î³ÌÁбí
1
¹ÜÀíÊý¾Ý¿âµÄÒªËØÊÇʲô£¨Ã»Óб¾Õ¶ÔÓ¦µÄ¸½¼Ó×ÊÁÏ£©
2
°²×° Oracle ºÍ¹¹½¨Êý¾Ý¿â
3
Oracle Enterprise Manager Êý¾Ý¿â¿ØÖÆÈëÃÅ
4
ÅäÖÃÍøÂç»·¾³
5
¹ÜÀí Oracle Àý³Ì
6
¹ÜÀíÊý¾Ý¿â´æ´¢½á¹¹
7
¹ÜÀíÓû§ºÍ°²È«ÐÔ
8
¹ÜÀíģʽ¶ ......
OracleÖÐstart with…connect by prior×Ó¾äÓ÷¨
connect by Êǽṹ»¯²éѯÖÐÓõ½µÄ£¬Æä»ù±¾Óï·¨ÊÇ£º
select … from tablename
start with Ìõ¼þ1
connect by Ìõ¼þ2
where Ìõ¼þ3;
Àý£º
select * from table
start with org_id = ‘HBHqfWGWPy’
connect by prior org_id = parent_id;
  ......
µÚÒ»´ÎÔÚLinuxÉÏ°²×°OracleµÄʱºòÅöµ½Õâ¸öÎÊÌ⣬ºÇºÇ¡£Ö®Ç°ÔÚLinuxÉÏ°²×°Oracleʱ£¬Ò»°ã¶¼Ê¹ÓÃRedHatϵÁеÄLinux£¬ÔÚ°²×°¹ý³ÌÖУ¬ÐèÒª×ö´óÁ¿µÄ°²×°Ç°Öù¤×÷£¬Èç°²×°RPM°ü£¬´´½¨×éºÍÓû§£¬ÐÞ¸ÄÄں˲ÎÊý£¬Ð޸Ļ·¾³±äÁ¿µÈ¡£Õâ´ÎʹÓõÄÊÇRedFlagµÄAsianux 3£¬¶øÇÒ×Ô´øOracleµÄ°²×°¸¨Öú¹¤¾ßOrana ......
LinuxÏÂOracle×Ô¶¯±¸·Ý½Å±¾
http://freeglad.javaeye.com/blog/586444
½Å±¾Îļþ£º
backup.sh
rq=`date '+%Y%m%d%H%M'`
su - oracle -c "exp zjhk/zjhk_123 owner=zjhk file=/home/oracle/zjhk_$rq.dmp"
cronÊÇÒ»¸ölinuxϵĶ¨Ê±Ö´Ðй¤¾ß£¬¿ÉÒÔÔÚÎÞÐèÈ˹¤¸ÉÔ¤µÄÇé¿öÏÂÔËÐÐ×÷Òµ¡£ÓÉÓÚCron ÊÇLinuxµÄÄÚÖ÷þÎñ£¬µ«Ëü²»×Ô¶ ......