Hello
Well first of all you should go to your odiparam.sh
file which inside of your folder.In this file you have to change the
following path
ODI_SECU_DRIVER=driver name that suits with ur database that used as Work
Rep.
ODI_SECU_URL=url of your work rep. database
ODI_SECU_USER=database user...
ODI_SECU_ENCODED_PASS=this is the encoded password of ur database
user....
ODI_SECU_WORK_REP=name of your work rep.
ODI_USER=SUPERVISOR
ODI_ENCODED_PASS=LELKIELGLJMDLKMGHEHJDBGBGFDGGH
ODI_JAVA_HOME= u should write the exact path of any JDK that is already
inside of your machine.... 5.1 or newer versions.
Here it is an example ::
ODI_SECU_DRIVER=oracle.jdbc.driver.OracleDriverODI_SECU_URL=jdbc:oracle:thin:@20.2.99.147:1521:DWXX
ODI_SECU_USER=mYusER
ODI_SECU_ENCODED_PASS=encoded_passODI_SECU_WORK_REP=myREP
ODI_USER=SUPERVISOR
ODI_ENCODED_PASS=LELKIELGLJMDLKMGHEHJDBGBGFDGGH
ODI_JAVA_HOME=/product/10g/db/jdk
your ODI_SECU_ENCODED_PASS should be look like
ODI_ENCODED_PASS... which is the encoded password of ODI for SUPERVISOR
29 Aralık 2013 Pazar
16 Aralık 2013 Pazartesi
Oracle - Clean Up duplicate keys
Case:
Assume that you have a table with duplicate ids , now you want to fix duplicate ids and want to make it all id values unique
Solution:
Step1: First collect a dataset for duplicate IDs
CREATE TABLE TMP AS
SELECT
ROWID DEST_ROWID ,
ID PREV_ID ,
( SELECT MAX( ID ) FROM TABLE_TEST S ) + ROWNUM NEW_ID
FROM TABLE_TEST
WHERE
ID IN
(
SELECT DISTINCT ID
FROM TABLE_TEST
GROUP BY ID
HAVING COUNT(1)>1
)
Step2: Now we have a table that contains DUPLICATE_IDs and ROWID value of our table ( which is useful for updates )
Step3: Assing PK to DEST_ROWID column on TMP table ( need for update )
Final Step:
UPDATE
(
SELECT A.ID TARGET_ID , B.NEW_ID UPD_ID
FROM
TABLE_TEST A , TMP B
WHERE
A.ROWID= B.DEST_ROWID
)
SET TARGET_ID = UPD_ID;
COMMIT;
Assume that you have a table with duplicate ids , now you want to fix duplicate ids and want to make it all id values unique
Solution:
Step1: First collect a dataset for duplicate IDs
CREATE TABLE TMP AS
SELECT
ROWID DEST_ROWID ,
ID PREV_ID ,
( SELECT MAX( ID ) FROM TABLE_TEST S ) + ROWNUM NEW_ID
FROM TABLE_TEST
WHERE
ID IN
(
SELECT DISTINCT ID
FROM TABLE_TEST
GROUP BY ID
HAVING COUNT(1)>1
)
Step2: Now we have a table that contains DUPLICATE_IDs and ROWID value of our table ( which is useful for updates )
Step3: Assing PK to DEST_ROWID column on TMP table ( need for update )
Final Step:
UPDATE
(
SELECT A.ID TARGET_ID , B.NEW_ID UPD_ID
FROM
TABLE_TEST A , TMP B
WHERE
A.ROWID= B.DEST_ROWID
)
SET TARGET_ID = UPD_ID;
COMMIT;
Kaydol:
Kayıtlar (Atom)