SQL>alter session set tracefile_identifier='test_identifier'; Session altered. SQL>alter session set sql_trace=true; Session altered. SQL>select*from dual; D - X SQL>alter session set sql_trace=false; Session altered.
--鐢⊿ample錛?/span> select A.id,A.name from A sample block(20),B where A.id=B.id --鐢≧ownum錛?/span> select A.id,A.name from (select a.id,a.name from a where rownum<100) A,B where A.id=B.id
]]>ETL鏃跺厛disable澶栭敭綰︽潫鍐峫oad鏁版嵁http://www.tkk7.com/xichengmylove/archive/2008/01/15/175486.html緹界考娓愪赴緹界考娓愪赴Tue, 15 Jan 2008 08:12:00 GMThttp://www.tkk7.com/xichengmylove/archive/2008/01/15/175486.htmlhttp://www.tkk7.com/xichengmylove/comments/175486.htmlhttp://www.tkk7.com/xichengmylove/archive/2008/01/15/175486.html#Feedback4http://www.tkk7.com/xichengmylove/comments/commentRss/175486.htmlhttp://www.tkk7.com/xichengmylove/services/trackbacks/175486.htmlFlexibility for Data Loads and Identification of Integrity Violations You can disable integrity constraints temporarily so that large amounts of data can be loaded without the overhead of constraint checking. When the data load is complete,you can easily enable the integrity constraints, and you can automatically report any new rows that violate integrity constraints to a separate exceptions table.
鐪嬫潵oracle榪欑偣涓婂仛鐨勬瘮杈冨畬鍠勶紝榪樺彲浠ュ皢榪濆弽瀹屾暣鎬х害鏉熺殑鏁版嵁鑷姩璁板綍鍒頒竴涓猠xception琛ㄤ腑銆?
]]>鍒犻櫎閲嶅鏁版嵁鐨?縐嶆柟娉?/title>http://www.tkk7.com/xichengmylove/archive/2008/01/08/173544.html緹界考娓愪赴緹界考娓愪赴Tue, 08 Jan 2008 02:04:00 GMThttp://www.tkk7.com/xichengmylove/archive/2008/01/08/173544.htmlhttp://www.tkk7.com/xichengmylove/comments/173544.htmlhttp://www.tkk7.com/xichengmylove/archive/2008/01/08/173544.html#Feedback0http://www.tkk7.com/xichengmylove/comments/commentRss/173544.htmlhttp://www.tkk7.com/xichengmylove/services/trackbacks/173544.html浠婂ぉgoogle鍒嗘瀽鍑芥暟row_number()鐨勬椂鍊欏彂鐜扮殑錛岃寰楀緢濂斤細
琛╠emo鏄噸澶嶆嫹璐濊嚜dba_objects錛屾湁88涓囧乏鍙籌紝涓嶉噸澶嶇殑鏄?7323錛屾病鏈夌儲寮?br style="font-family: " />
鏂規硶涓錛歞elete from demo a where a.rowid <> (select max(rowid) from demo b where
b.object_id=a.object_id);
鑰楁椂錛氬嚑涓皬鏃朵互涓?
鏂規硶浜岋細 delete from demo where rowid in
(select rid from
(select rowid rid,row_number() over(partition by object_id order by rowid) rn
from demo)
where rn <> 1 );
鑰楁椂錛?0縐?br style="font-family: " />
鏂規硶涓夛細 create table demo2 as
select object_id,owner... from
(select demo.*,row_number() over(partition by object_id order by rowid) rn from demo)
where rn = 1;
truncate table demo; insert into demo select * from demo2; drop table demo2;
鍏辮楁椂錛?10縐掞紝閫傚悎澶ф暟鎹噺鐨勬儏鍐碉紝浜х敓鏇村皯鍥炴粴閲忥紱
]]>datastage涓璒rchadmin鍛戒護鐨勪嬌鐢紙杞級 http://www.tkk7.com/xichengmylove/archive/2007/08/08/135256.html緹界考娓愪赴緹界考娓愪赴Wed, 08 Aug 2007 07:37:00 GMThttp://www.tkk7.com/xichengmylove/archive/2007/08/08/135256.htmlhttp://www.tkk7.com/xichengmylove/comments/135256.htmlhttp://www.tkk7.com/xichengmylove/archive/2007/08/08/135256.html#Feedback2http://www.tkk7.com/xichengmylove/comments/commentRss/135256.htmlhttp://www.tkk7.com/xichengmylove/services/trackbacks/135256.htmlOrchadmin is a command line utility provided by datastage to research on data sets. The general callable format is : $orchadmin [options] [descriptor file]
1. Before using orchadmin, you should make sure that either the working directory or the $APT_ORCHHOME/etc contains the file “config.apt” OR
The environment variable $APT_CONFIG_FILE should be defined for your session. Orchadmin commands
The various commands available with orchadmin are 1. CHECK: $orchadmin check
Validates the configuration file contents like , accesibility of all nodes defined in the configuration file, scratch disk definitions and accesibility of all the nodes etc. Throws an error when config file is not found or not defined properly
2. COPY : $orchadmin copy Makes a complete copy of the datasets of source with new destination descriptor file name. Please not that
a. You cannot use UNIX cp command as it justs copies the config file to a new name. The data is not copied.
b. The new datasets will be arranged in the form of the config file that is in use but not according to the old confing file that was in use with the source.
3. DELETE : $orchadmin <> [-f -x] descriptorfiles…. The unix rm utility cannot be used to delete the datasets. The orchadmin delete or rm command should be used to delete one or more persistent data sets. -f options makes a force delete. If some nodes are not accesible then -f forces to delete the dataset partitions from accessible nodes and leave the other partitions in inaccesible nodes as orphans. -x forces to use the current config file to be used while deleting than the one stored in data set.
4. DESCRIBE: $orchadmin describe [options] descriptorfile.ds This is the single most important command. 1. Without any option lists the no.of.partitions, no.of.segments, valid segments, and preserve partitioning flag details of the persistent dataset. -c : Print the configuration file that is written in the dataset if any -p: Lists down the partition level information. -f: Lists down the file level information in each partition -e: List down the segment level information . -s: List down the meta-data schema of the information. -v: Lists all segemnts , valid or otherwise -l : Long listing. Equivalent to -f -p -s -v -e
5. DUMP: $orchadmin dump [options] descriptorfile.ds The dump command is used to dump(extract) the records from the dataset. Without any options the dump command lists down all the records starting from first record from first partition till last record in last partition. -delim ‘’ : Uses the given string as delimtor for fields instead of space. -field : Lists only the given field instead of all fields. -name : List all the values preceded by field name and a colon -n numrecs : List only the given number of records per partition. -p period(N) : Lists every Nth record from each partition starting from first record. -skip N: Skip the first N records from each partition. -x : Use the current system configuration file rather than the one stored in dataset.
6. TRUNCATE: $orchadmin truncate [options] descriptorfile.ds Without options deletes all the data(ie Segments) from the dataset. -f: Uses force truncate. Truncate accessible segments and leave the inaccesible ones. -x: Uses current system config file rather than the default one stored in the dataset. -n N: Leaves the first N segments in each partition and truncates the remaining.
7. HELP: $orchadmin -help OR $orchadmin -help Help manual about the usage of orchadmin or orchadmin commands