Íæ×ªOracle£¨5£©
||------- Êý¾Ý¿â¹ÜÀí -------||
//ÏÔʾ³õʼ»¯²ÎÊý
show parameter;
//Êý¾Ý¿â±íµÄÂß¼±¸·ÝÓë»Ö¸´
//µ¼³ö
1.µ¼³ö±í
exp userid=scott/tiger@ORCL tables=(emp) file=d:\e1.dmp
2.µ¼³öÆäËû·½°¸µÄ±í£¬Ê×ÏÈҪȷÈÏ×Ô¼ºÊÇsysdbaÉí·Ý
exp userid=system@919959ORCL tables=(scott.emp) file=d:\e1.dmp
3.µ¼³ö±í½á¹¹
exp userid=scott/tiger@ORCL tables=(emp) file=d:\e3.dmp rows=n
4.ʹÓÃÖ±½Óµ¼³ö·½Ê½(ЧÂÊ±ÈÆÕͨµ¼³ö·½Ê½¿ì)
exp userid=scott/tiger@ORCL tables=(emp,dept) file=d:\e4.dmp direct=y
5.µ¼³ö·½°¸
exp userid=scott/tiger@ORCL owner=scott file=d:\e5.dmp
6.µ¼³öÊý¾Ý¿â£¬¸ÃÓû§±ØÐëÊÇdba
exp userid=system/919959@ORCL full=y inctype=complete file=d:\e6.dmp
//µ¼Èë
1.µ¼Èë×Ô¼º±í
imp userid=scott/tiger@ORCL tables=(emp) file=d:\e1.dmp
2.µ¼Èë±íµ½ÆäËûÓû§
ÒªÇó¸ÃÓû§¾ßÓÐdbaȨÏÞ£¬»òÊÇimp_full_database
imp userid=system/919959@ORCL tables(emp) file=d:\e2.dmp touser=scott
3.µ¼Èë±íµÄ½á¹¹
imp userid=scott/tiger@ORCL tables=(emp) file=d:\e3.dmp rows=n
4.µ¼ÈëÊý¾Ý
imp userid=scott/tiger@ORCL tables=(emp) file=d:\e4.dmp ignore=y
||------- ±í¿Õ¼ä¹ÜÀí -------||
½¨±í¿Õ¼äÐèÒªdbaÓû§È¨ÏÞ
//½¨Á¢±í¿Õ¼ä
create tablespace sp001 datafile 'd:\data01.dbf' size 20m uniform size 128k
//ʹÓÃÊý¾Ý±í¿Õ¼ä
create table mypart(
deptno number(4),
dname varchar2(14),
loc varchar2(13)
) tablespace sp001;
//ʹ±í¿Õ¼äÍÑ»ú
alter tablespace sp001 offline;
//ʹ±í¿Õ¼äÁª»ú
alter tablespace sp001 online;
//Ö»¶Á±í¿Õ¼ä
alter tablespace sp001 read only;
//Ð޸ıí¿Õ¼äΪ¿É¶Á¿Éд
alter tablespace sp001 read write;
//ÏÔʾ±í¿Õ¼ä°üÀ¨À©µÄËùÓбí
select * from all_tables where tablespace_name='sp001';
//ÖªµÀ±íÃ÷£¬²é¿´¸Ã±íÊôÓÚÄĸö±í¿Õ¼ä
select tablespace_name ,table_name from user_tables where table_name='EMP';
//À©Õ¹±í¿Õ¼ä
1.Ôö¼ÓÊý¾ÝÎļþ
alter tablespace sp01 add datafile 'd:\sp01.dbf' size 20m;
2.Ôö¼ÓÊý¾ÝÎļþ´óС(ÕâÀïÐèҪעÒâµÄÊÇÊý¾ÝÎļþµÄ´óС²»Òª³¬¹ý500m)
alter database datafile 'd:\sp01.dbf' resize 20m;
3.ÉèÖÃÎļþµÄ×Ô¶¯Ôö³¤
alter tablespace datafile 'd:\sp
Ïà¹ØÎĵµ£º
OracleÉ󼯹¦ÄÜ
Ò»¡¢ É󼯷ÖÀࣺ
OracleÖÐÉó¼Æ×ÜÌåÉϿɷÖΪ“±ê×¼É󼯔ºÍ“ϸÁ£¶ÈÉ󼯔ºóÕßÒ²³ÆÎª“»ùÓÚÕþ²ßµÄÉ󼯔£¬ÔÚOracle10GÖ®ºó¹¦Äܵõ½ºÜ´óÔöÇ¿¡£ÆäÖбê×¼Éó¼Æ¿É·ÖΪÓû§¼¶Éó¼ÆºÍϵͳ¼¶É󼯡£Óû§¼¶Éó¼ÆÊÇÈκÎOracleÓû§¿ÉÉèÖõÄÉ󼯣¬Ö÷ÒªÊÇÓû§Õë¶Ô×Ô¼º´´½¨ ......
in ÊǰÑÍâ±íºÍÄÚ±í×÷hash Á¬½Ó£¬¶øexistsÊǶÔÍâ±í×÷loopÑ»·£¬Ã¿´ÎloopÑ»·ÔÙ¶ÔÄÚ±í½øÐвéѯ¡£
Ò»Ö±ÒÔÀ´ÈÏΪexists±ÈinЧÂʸߵÄ˵·¨ÊDz»×¼È·µÄ¡£
Èç¹û²éѯµÄÁ½¸ö±í´óСÏ൱£¬ÄÇôÓÃinºÍexists²î±ð²»´ó¡£
in ÊǰÑÍâ±íºÍÄÚ±í×÷hash Á¬½Ó£¬¶øexistsÊǶÔÍâ±í×÷loopÑ»·£¬Ã¿´ÎloopÑ»·ÔÙ¶ÔÄÚ±í½øÐвéѯ¡£
Ò»Ö ......
RAW£¬ÀàËÆÓÚCHAR£¬ÉùÃ÷·½Ê½RAW(L)£¬LΪ³¤¶È£¬ÒÔ×Ö½ÚΪµ¥Î»£¬×÷ΪÊý¾Ý¿âÁÐ×î´ó2000£¬×÷Ϊ±äÁ¿×î´ó32767×Ö½Ú¡£
LONG RAW£¬ÀàËÆÓÚLONG£¬×÷ΪÊý¾Ý¿âÁÐ×î´ó´æ´¢2G×Ö½ÚµÄÊý¾Ý£¬×÷Ϊ±äÁ¿×î´ó32760×Ö½Ú
²åÈërawÊý¾Ý²Ù×÷:
¡¡¡¡insert into raw_test values (1, ......
to_date()Óë24Ð¡Ê±ÖÆ±íʾ·¨¼°mm·ÖÖÓµÄÏÔʾ£º
Ò»¡¢ÔÚʹÓÃOracleµÄto_dateº¯ÊýÀ´×öÈÕÆÚת»»Ê±£¬ºÜ¶àJava³ÌÐòÔ±Ò²Ðí»áÖ±½ÓµÄ²ÉÓÓyyyy-MM-dd
HH:mm:ss”µÄ¸ñʽ×÷Ϊ¸ñʽ½øÐÐת»»£¬µ«ÊÇÔÚOracleÖлáÒýÆð´íÎ󣺓ORA 01810 ¸ñʽ´úÂë³öÏÖÁ½´Î”¡£
È磺select to_date('2005-01-01 13:14:20','yyyy-MM-d ......
create or replace trigger InsertEdcTerminal
after INSERT on edc_terminal
FOR EACH ROW
DECLARE
merchantId char(15);
terminalId char(8);
uservalue char(6) ;
updatedate char(8);
updatetime char(6);
v_cardtype Merchant_Card.Card_Type%TYPE;
v_cardstate merchant_card.card_stat%TYPE;
v_banktyp ......