Copy a SQL Binary Large Object (BLOB) from one database to another

15 pts.
Tags:
Binary Large Object
BLOB
SQL
SQL Database Transfer
Is there  a way to find out the name of a Blob stored in a database. I am trying the code below and apparently the name is not correct.

SQL> Declare   2   tpsr Blob;   3   spsr blob;   4  Begin   5   Select '8502' into tpsr from ca90joetmp.spec_form_psr where spec_form_id = '90710';   6   Select '8502' into tpsr from specdev_mst.spec_form_psr where spec_form_id = '29401';   7   DBMS_LOB.COPY (tpsr,spsr,600000,1,1);   8       9  end;  10  / Declare * ERROR at line 1: ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275 ORA-06512: at "SYS.DBMS_LOB", line 420 ORA-06512: at line 7



Software/Hardware used:
Oracle 10g

Answer Wiki

Thanks. We'll let you know when a new response is added.

I don’t know what you are trying to do. I suppose it is some kind of test.

Also, I don’t see much relation between the question title and the code you posted.

<b>You are getting the error because your source blob is null.</b>

I would recommend taking a look at this:

<a href=”http://soft.buaa.edu.cn/oracle/bookshelf/oreilly/bipack/ch08_03.htm”>DBMS_LOB Interface</a>

But I think you are completely new to PL/SQL. If that is true, I think you should start learning the basics before trying to manipulate blobs.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following