ORACLE BLOB Datatype

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
thirupri
Premium Member
Premium Member
Posts: 40
Joined: Wed Sep 17, 2003 3:41 am
Location: Saudi Arabia
Contact:

ORACLE BLOB Datatype

Post by thirupri »

Dear Gurus,
I am trying to transfer a set of data to one column in oracle with the data type blob. When I define as a longvarchar I am getting oracle error message. So any one can help me how to handle this BLOB Data type.

Our Current version is 7.1

Thanks with Regards,

Thiruma Valavan
Best Regards,
Thiruma Valavan
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

I do believe you can't move BLOBS using the Oracle OCI and regular DML. But I could be wrong.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
thirupri
Premium Member
Premium Member
Posts: 40
Joined: Wed Sep 17, 2003 3:41 am
Location: Saudi Arabia
Contact:

Post by thirupri »

Actually, I changed the column to Varchar with size of 2000 and I tried to transfer the data by concatenate the set of data. But I need the beter way for handling this. If any done please share your ideas.
Best Regards,
Thiruma Valavan
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Change the datatype to LongVarchar and you should be able to move the data using OCI stage. I have done it successfully in the past on 7.5. Not sure on 7.1 though.

What happens when you try to import the table defintion of that particular table through Manager or Desingner? How does the datatype come into DataStage? The default was set to LongVarchar with a Length of 4000 for me when I tried to import it through Manager. Did you try doing that? Also, what is the error message you are getting?
Kris

Where's the "Any" key?-Homer Simpson
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Oracle's VARCHAR2(4000) is the maximum, so you're limiting yourself to the first 4000 characters selecting and inserting. It's BLOB, so that means you're corrupting your data, since BLOB means BINARY LARGE OBJECT, the first 4000 characters of binary data is useless.

Proceed at your own risk.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
thirupri
Premium Member
Premium Member
Posts: 40
Joined: Wed Sep 17, 2003 3:41 am
Location: Saudi Arabia
Contact:

Post by thirupri »

Hi Krish,

Thanks for you tips. When I imported the structure for this table, it came as LongVarChar but with out limit. When I put the structure for the Oracle9i stage. It gives me a error. I think 7.5 is good to handle this. Let me check with our vendor for this new version.

Thanks,
Best Regards,
Thiruma Valavan
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

I do apologize for giving a wrong suggestion. :oops:

I gave the suggestion assuming the datatype as CLOB instead of BLOB. Ken's post made me re-read the post again.
Kris

Where's the "Any" key?-Homer Simpson
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

thirupri wrote:It gives me a error.
Any particular error? Or are you keeping that a secret?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply