´«ÖDz¥¿ÍOracleÊÓƵѧϰ±Ê¼Ç
ÊÖ¶¯Æô¶¯Êý¾Ý¿â£º
Æô¶¯¼àÌý³ÌÐò£ºlsnrctl start
Æô¶¯Oracle·þÎñ£ºoradim -startup -sid orcl»òÕßnet start oracleserviceorcl
ÆäÖÐorclΪÊý¾Ý¿âµÄ·þÎñÃû»òÕßSID£¬oradim -startup -sid orclÕâ¸öÃüÁîÒÔÇ°×Ô¼ºÃ»Óùý
ȨÏÞ¹ÜÀí£º
ϵͳȨÏÞ£º
create user zhangsan identified by zhangsan;
grant create session to lisi;
grant create table to lisi;
grant unlimited tablespace to lisi;
create table mytable (id int);
insert into mytable values(1);
select * from mytable;
select * from user_sys_privs;---²éѯµ±Ç°µÇ½Óû§µÄϵͳȨÏÞ
revoke create table from lisi;
revoke unlimited tablespace from lisi;
grant create any table to public;--ÊÚÓèËùÓÐÓû§
×¢Ò⣺grantÓëtoÊÇÅä¶ÔʹÓõģ¬¶ørevokeÓëfromÅä¶ÔʹÓõÄ
¶ÔÏóȨÏÞ£º
grant select on tablename to lisi;
grant on tablename to lisi;
revoke all on tablename from lisi;
select * from user_tab_privs;---²éѯµ±Ç°µÇ½Óû§µÄ¶ÔÏóȨÏÞ
disconn ¶Ï¿ªÁ¬½Ó
¶ÔÏóȨÏÞ¿ÉÒÔ¿ØÖƵ½ÁУº
grant update(name) on mytab to lisi;
grant insert(id) on mytab to lisi;
update wangwu.mytab set name='songyakun',id=1 where id=2;
×¢Ò⣺²éѯºÍɾ³ý²»ÄÜ¿ØÖƵ½ÁУ¬Ö»ÄÜ¿ØÖƵ½ÐÐ
select * from user_col_privs;---²éѯµ±Ç°µÇ½Óû§µÄÁÐȨÏÞ
ȨÏ޵Ĵ«µÝ£º
Çл»ÒÔsysµÇ½£º
grant alter any table to lisi;
grant alter any table to lisi with admin option;
grant select on A to lisi with grant option;
Çл»ÒÔlisiµÇ½:
grant alter any table to wangwu;
½ÇÉ«¹ÜÀí£º
create role myrole;
grant create session to myrole;
&nbs
Ïà¹ØÎĵµ£º
ÎÄÕÂÒ»£ºSCNÊÇʲô£¿The System Change Number
system change number (SCN)ÊÇÒ»¸ö·Ç³£ÖØÒªµÄ±ê¼Ç£¬OracleʹÓÃËüÀ´±ê¼ÇÊý¾Ý¿âÔÚ¹ýȥʱ¼äÄÚµÄ״̬ºÍ¹ì¼£¡£
OracleʹÓÃSCNÀ´±£´æËùÓб仯µÄ¹ì¼£¡£SCNÊÇÒ»¸öÂ߼ʱÖÓÀ´¼Ç¼Êý¾Ý¿âʼþ¡£Ëü·Ç³£µÄÖØÒª£¬²¢²»ÊÇÖ»ÊÇΪÁ˻ָ´¡£
SCNÓеãÀàËÆÓÚsequence£¬OracleÔÚSGAÖÐÔ ......
ʲôÊÇË®Ïß(High Water Mark)?
----------------------------
ËùÓеÄoracle¶Î(segments£¬ÔÚ´Ë£¬ÎªÁËÀí½â·½±ã£¬½¨Òé°Ñsegment×÷Ϊ±íµÄÒ»¸öͬÒå´Ê) ¶¼ÓÐÒ»¸öÔÚ¶ÎÄÚÈÝÄÉÊý¾ÝµÄÉÏÏÞ£¬ÎÒÃÇ°ÑÕâ¸öÉÏÏÞ³ÆΪ"high water mark"»òHWM¡£Õâ¸öHWMÊÇÒ»¸ö±ê¼Ç£¬ÓÃÀ´ËµÃ÷ÒѾÓжàÉÙûÓÐʹÓõÄÊý¾Ý¿é·ÖÅä¸øÕâ¸ösegment¡£HWMͨ³£Ôö³¤µÄ·ù¶ ......
ÔÚSQL*PlusÖУº£¨1£©ÈçºÎÌí¼Óɾ³ýÊý¾Ý¿â£¿£¨2£©Êý¾Ý¿â¾ÍÊDZíÂ𣿣¿£¨3£©ÈçºÎ´´½¨±í¿Õ¼ä£¿£¨4£©ÈçºÎ´´½¨Óû§£¿£¨5£©ÊDz»ÊÇÒ»¸ö±í¿Õ¼äÖ»ÄÜ´´½¨Ò»¸öÓû§£¿£¨6£©ÔõÑù´Ó¿Í»§¶Ë·ÃÎÊÊý¾Ý¿â·þÎñÆ÷µÄÅäÖã¿
¡¡¡¡
¡¡¡¡»Ø´ð£º
¡¡¡¡1¡¢ºÎÌí¼Óɾ³ýÊý¾Ý¿â£¿Ã»ÕâÖÖ¸ÅÄ²»¶®¡£
¡¡¡¡2¡¢Êý¾Ý¿â=ËùÓеÄoracleµÄÊý¾ÝÎļþ+¿ØÖÆÎļþ+ÈÕÖ¾Îļ ......
½ñÌì²Å·¢ÏÖÁËwmsys.wm_concatÕâ¸öÓÐȤÓÐÓõĺ¯Êý£¬ËüµÄ×÷ÓÃÊÇÒÔ','Á´½Ó×Ö·û¡£
Àý×ÓÈçÏ£º
SQL> create table idtable (id number,name varchar2(30));
Table created
SQL> insert into idtable values(10,'ab');
1 row inserted
SQL> insert into idtable values(10,'bc');
1 row inserted
SQL> insert ......
Ò»Ö±ÏëѧϰÈçºÎµÃµ½Êý¾Ý¿âµÄIOÊý¾Ý£¬ORIONÊÇÒ»¸ö²»´íµÄ·ÂÕæ²âÊÔOracle IOµÄ¹¤¾ß¡£
ÏÂÃæÊÇÎҵIJâÊԵIJ½Ö裺
1 ´ÓoracleµÄÍøÕ¾ÉÏÏÂÔØORIONµÄÈí¼þ£¨11.1.0.7£©
2 ½âѹorion_linux_x86-64.gz
3 ½¨Á¢²ÎÊýÎļþ mytest.lun£¬ ÕâÀïµÄÁгöµÄÊÇ·ÖÇøÉ豸£¬ÎÒÔÚÉÏÃ潨Á¢ÁËasmÎļþϵͳ¡£ÒòΪÓÐÊý¾ÝÔÚÀïÃ棬ËùÒÔÎÒÓÃwrite=0Ö»²âÊ ......