The problem is that I am getting an "ORA-01008: not all variables bound"
error on tables with a LONG column. On tables without a LONG column,
everything works fine. The documentation states that this error is caused
by an SQL statement containing substitution variables being executed without
all variables bound. But I don't understand why the error occurs only on
tables with LONG columns. It seems to me that if a variable is unbound, the
error would occur on all tables.
Here is the script. It is run from SQL*Plus 3.3.4.0.0 connected to an
Oracle Lite 3.0.6.2.6 database. It prompts for the username, password, and
connect string of the target Oracle 7 database. The table names and
structures in both databases are identical:
SET LONG 2000000000
SET LONGCHUNKSIZE 1000
--
-- Get username/password for server
--
CLEAR SCREEN
PROMPT Enter the following information for the SERVER database:
ACCEPT un PROMPT 'User Name: '
ACCEPT pw PROMPT 'Password: ' HIDE
ACCEPT cs PROMPT 'Connect String: '
--
-- Process each table
--
COPY TO &un/&pw@&cs INSERT table_1 USING SELECT * from table_1
COPY TO &un/&pw@&cs INSERT table_2 USING SELECT * from table_2
etc... There are 14 tables in all, 2 of which contain LONG columns.
As mentioned above, this script works fine for tables without a LONG column,
but gives the ORA-01008 error for tables with a LONG column. Thanks in
advance for your help and suggestions.
Todd Owers
to...@gcr1.com
Hope that helps.
Bhanu-
on the remote database try
set copycommit 1 - copycommit tells SQL*Plus how many batches should be
committed at one time
set arraysize 500 -- This determines the number of records that will be
retrieved in each "batch". Adjust this number as necessary.
then run your coy scripts on your local database
COPY TO &un/&pw@&cs INSERT table_1 USING SELECT * from table_1
COPY TO &un/&pw@&cs INSERT table_2 USING SELECT * from table_2
hope this helps
- Thomas Bartos
This being the case, however, I would have expected to receive the
"ORA-00997: illegal use of LONG datatype" error, instead of the ORA-01008.
Thanks to all who replied.
Todd
Todd Owers wrote in message <72agf6$eqo$1...@nntp.gulfsouth.verio.net>...
> [snip]
>The problem is that I am getting an "ORA-01008: not all variables bound"
>error on tables with a LONG column. On tables without a LONG column,
>everything works fine.
> [snip]
>Here is the script.
> [snip]
>COPY TO &un/&pw@&cs INSERT table_1 USING SELECT * from table_1
>COPY TO &un/&pw@&cs INSERT table_2 USING SELECT * from table_2
You are wrong. COPY command does not insert ... select.
It uses two different connections and makes select in the first
and insert in the second. It works with LONG columns. But
it does not work with LONG RAW columns.
I made FREE utility Table Copy which works in the similar way but
supports LANG RAW:
Andrew Protasov
Thanks to all who responded.
Todd
Todd Owers wrote in message <72agf6$eqo$1...@nntp.gulfsouth.verio.net>...
[snip]
>The problem is that I am getting an "ORA-01008: not all variables bound"
>error on tables with a LONG column. On tables without a LONG column,
>everything works fine.
[snip]
>Here is the script.
[snip]
>
>SET LONG 2000000000
>SET LONGCHUNKSIZE 1000
>--