toad for oracle(µ¼Èëµ¼³öʵÀý)
Àý£º
create user his identified by his default tablespace users temporary tablespace temp;
grant connect,resource,dba to his;
create tablespace his
logging
datafile 'd:\oracle\product\10.2.0\oradata\zjxsh\his.ora' size 100M extent
management local segment space management auto;
exp his/ny@ny file=d:\0706ny full=y
exp his/his@xshis file=d:\0724xshis full=y
imp his/his@zjxshis file=d:\0724xshis.DMP fromuser=(his£¬chk£¬emr£¬fee£¬inv£¬med£¬opr£¬dig)touser=(his£¬chk£¬emr£¬fee£¬inv£¬med£¬opr£¬dig) ignore=y
imp his/his@zjxsh file=d:\0724xshis.DMP fromuser=his touser=his ignore=y
imp chk/chk@zjxsh file=d:\0724xshis.DMP fromuser=chk touser=chk ignore=y
imp emr/emr@zjxsh file=d:\0724xshis.DMP fromuser=emr touser=emr ignore=y
imp fee/fee@zjxsh file=d:\0724xshis.DMP fromuser=fee touser=fee ignore=y
imp inv/inv@zjxsh file=d:\0724xshis.DMP fromuser=inv touser=inv ignore=y
imp med/med@zjxsh file=d:\0724xshis.DMP fromuser=med touser=med ignore=y
imp opr/opr@zjxsh file=d:\0724xshis.DMP fromuser=opr touser=opr ignore=y
imp dig/dig@zjxsh file=d:\0724xshis.DMP fromuser=dig touser=dig ignore=y
imp mat/mat@zjxsh file=d:\0724xshis.DMP fromuser=mat touser=mat ignore=y
imp pas/pas@zjxsh file=d:\0724xshis.DMP fromuser=pas touser=pas ignore=y
create table name2 as select * from name1;
insert into name3 select * from name2;(*±íʾ±í×ֶΣ¬°´Ë³Ðò²åÈë)
ÓÐʱºòÎÒÃÇ»áÓöµ½ÕâÑùµÄÇé¿ö£¬ÏÖÓеÄÊý¾Ý¿âÒª´ÓÒ»¸ö»úÆ÷תÒƵ½ÁíÍâÒ»¸ö»úÆ÷ÉÏ£¬Ò»°ãÎÒÃÇ»áʹÓõ¼³ö£¬µ¼Èë¡£µ«ÊÇÈç¹ûÊý¾Ý¿âµÄÊý¾Ý·Ç³£¶à£¬Êý¾ÝÎļþ³ß´çºÜ´ó£¬ÄÇôÔÚµ¼³öµ¼ÈëµÄ¹ý³Ì¾ÍºÜ¿ÉÄÜ»á³öÏÖÎÊÌ⣬²¢ÇÒÂþ³¤µÄ¹ý³ÌÒ²ÊÇÎÒÃÇÎÞ·¨ÈÝÈ̵ġ£ ÔÚÕâÖÖÇé¿öÏ£¬ÎÒÃÇ¿ÉÒÔ¼òµ¥µØʹÓòÙ×÷ϵͳµÄcopyÃüÁֱ½Ó½øÐÐÊý¾Ý¿âµÄתÒÆ¡£ÒÔÏÂʾÀý¾ùÔÚRedhat Fedora Core 1ÉϵÄOracle9.2.0.1ÖвÙ×÷£¬ÆäËü²Ù×÷ϵͳºÍOracle°æ±¾Í¬ÑùÊÊÓ᣼ÙÉèÎÒÃǵÄÊý¾Ý¿âÔÚ·þÎñÆ÷AÉÏ£¬$ORACLE_BASEÊÇ/oracle£¬$ORACLE_HOMEÊÇ /oracle/prodUCt/9.2.0¡£ÏÖÔÚÎÒÃÇÒª½«´ËÊý¾Ý¿âתÒƵ½·þÎñÆ÷BÉÏ£¬²¢ÇÒеÄ$ORACLE_BASEÊÇ/u01/oracle£¬$ ORACLE_HOMEÊÇ/u01/oracle/product/9.2.0¡£SIDÊÇoraLinux¡£
²Ù×÷²½ÖèÈçÏ£º
Ïà¹ØÎĵµ£º
Ò»¡¢ÔÚPLSQLÖд´½¨±í£º
create table HWQY.TEST
(
CARNO VARCHAR2(30),
CARINFOID NUMBER
)
¶þ¡¢ÔÚPLSQLÖд´½¨´æ´¢¹ý³Ì£º
create or replace procedure pro_test
AS
carinfo_id number;
BEGIN
select s_CarInfoID.nextval into carinfo_id
from dual;
insert into test(test ......
ΪÁËÈ·¶¨±í¿Õ¼äÖаüº¬ÄÇЩÄÚÈÝ£¬ÔËÐУº
select owner,segment_name,segment_type
from dba_segments
where tablespace_name='<name of tablespace>'
²éѯ±í¿Õ¼ä°üº¬¶àÉÙÊý¾ÝÎļþ¡£
select file_name, tablespace_name
from dba_data_files
where tablespace_name ='<name of t ......
OracleÊý¾Ý¿âÓÐÈýÖÖ±ê×¼µÄ±¸·Ý·½·¨£¬ËüÃÇ·Ö±ðÊǵ¼³ö£¯µ¼È루EXP/IMP£©¡¢Èȱ¸·ÝºÍÀ䱸·Ý¡£µ¼³ö±¸¼þÊÇÒ»ÖÖÂß¼±¸·Ý£¬À䱸·ÝºÍÈȱ¸·ÝÊÇÎïÀí±¸·Ý¡£
Ò»¡¢ µ¼³ö£¯µ¼È루Export£¯Import£©
ÀûÓÃExport¿É½«Êý¾Ý´ÓÊý¾Ý¿âÖÐÌáÈ¡³öÀ´£¬ÀûÓÃImportÔò¿É½«ÌáÈ¡³öÀ´µÄÊý¾ÝËͻص½OracleÊý¾Ý¿âÖÐÈ¥¡£
£±¡¢ ¼òµ¥µ¼³öÊý¾Ý£¨Export£©ºÍµ¼ ......
10gÊý¾Ý¿â½éÉÜ£º¿ÉÒÔʹÓøü¶àеÄoptimizer hintsÀ´¿ØÖÆÓÅ»¯ÐÐΪ¡£ÏÖÔÚÈÃÎÒÃÇ¿ìËÙ½âÎöÒ»ÏÂÕâЩǿ´óµÄÐÂhints:
spread_min_analysis
ʹÓÃÕâÒ»hint£¬Äã¿ÉÒÔºöÂÔһЩ¹ØÓÚÈçÏêϸµÄ¹ØϵÒÀÀµÍ¼·ÖÎöµÈµç×Ó±í¸ñµÄ±àÒëʱ¼äÓÅ»¯¹æÔò¡£ÆäËûµÄһЩÓÅ»¯£¬Èç´´½¨¹ýÂËÒÔÓÐÑ¡ÔñÐԵĶ¨Î»µç×Ó±í¸ñ·ÃÎʽṹ²¢ÏÞÖÆÐÞ¶©¹æÔòµÈ£¬µÃµ ......
1¡¢¶à¹¤Áª»úÖØ×÷ÈÕÖ¾Îļþ
¡¡¡¡Ã¿¸öÊý¾Ý¿âʵÀý¶¼ÓÐÆä×Ô¼ºµÄÁª»úÖØ×÷ÈÕÖ¾×飬ÔÚ²Ù×÷Êý¾Ý¿âʱ£¬OracleÊ×ÏȽ«Êý¾Ý¿âµÄÈ«²¿¸Ä±ä±£´æÔÚÖØ×÷ÈÕÖ¾»º³åÇøÖУ¬ËæºóÈÕÖ¾¼Ç¼Æ÷½ø³Ì£¨LGWR£©½«Êý¾Ý´Óϵͳ¹²ÓÃÇøSGA£¨System Global Area£©µÄÖØ×÷ÈÕÖ¾»º³åÇøдÈëÁª»úÖØ×÷ÈÕÖ¾Îļþ£¬ÔÚ´ÅÅ̱ÀÀ£»òʵÀýʧ°Üʱ£¬¿ÉÒÔͨ¹ýÓëÖ®Ïà¹ØµÄÁª»úÖØ×÷ÈÕÖ¾ ......