COPY FROM command on ORDIMAGE closes SQL-Plus !!

Hi, I4m using the following command:
COPY FROM user/pass@Oracle6 INSERT mytable USING SELECT * FROM mytable;
...but it always starts processing and closes the SQL-Plus without copying data ! The tables contains an ORDIMAGE column, I wonder if it can be causing the problem.
Thanks for any help.
Alexandre.

From the 9.0.1 doc.
Copies data from a query to a table in a local or remote database. COPY supports the following datatypes:
CHAR DATE LONG NUMBER VARCHAR2
The COPY command is not being enhanced to handle datatypes or features introduced with, or after Oracle8. The COPY command is likely to be made obsolete in a future release.

Similar Messages

  • Does SQL Developer have any way to run the SQL*PLUS COPY FROM command?

    set arraysize 100;
    set copycommit 100;
    COPY FROM SCOTT/TIGER@OtherDBinstance -
    CREATE COMPANY -
    USING SELECT * from COMPANY;

    Thanks. I have been using the create table ABC as select * from ABC@otherdb but this often runs into temp segment issues for very large tables. The SQL*PLUS version allows me to have the copy commit save after each xxxxx lines and this seems to be able to handle any size table. Can copy commit be used from SQL Developer?

  • How to insert arabic&english  from oracle clients like TOAD,SQL*PLUS

    Hi
    iam trying to insert arabic&english data from TOAD&SQLPLUS.
    if i try to insert arabic by copy and paste iam getting ???? and
    if i try to insert through my keyboard (after updating my system with regional
    settings) iam able to type some junk characters.
    I have installed Oracle 8.1.6 with characterset set to UTF8 and
    in my client NLS_LANG settings i have tried with different settings like:-
    AMERICAN_AMERICA.UTF8
    AMERICAN_AMERICA.AR8MSAWIN
    ARABIC_UNITED ARAB EMIRATES.UTF8
    ARABIC_UNITED ARAB EMIRATES.AR8MSWIN1256
    i have also updated INIT.ORA nls_language ='ARABIC'.
    but still iam getting same problem.
    any help in this appriciated.
    Thanks
    Srinivas

    Are you able to use Arabic with your Java VM in general? Or are you having problems specific to your database interactions? Sun provides an internationalized version of the JDK and also an "English only" version. Perhaps you have the English only version? I would recommend trying a simple Hello World app with your JVM first... I would also check your JDBC driver documentation and make sure there are no limitations there, and that your database is also setup for internationalization.
    It is certainly possible to use TopLink in internationalized environments as we have lots of customers doing this, so hopefully we can figure out what is wrong with your setup.
    - Don

  • Select from sys.all_ind_columns works in sql*plus but not in stored proc

    I'm writing a query to find duplicate rows in a temporary table which has no unique index defined before I insert the data into the real table. I'm trying to query the sys.all_ind_columns view for the target table which belongs to a different schema:
    SELECT column_name colnm
    FROM sys.all_ind_columns i
    WHERE i.table_owner = 'SUSDB'
    AND i.index_name LIKE '%LUK'
    AND i.table_name = &tbnm
    ORDER BY i.column_position;
    This works from my GUI interface and returns five rows but when I put it into a stored procedure I get now data returned. I have granted my userid SELECT ANY DICTIONARY authority. What else do I need?

    CREATE OR REPLACE FUNCTION bog_elsa2_leslie.diag_msg_1000_cursor(i_rept_inst IN VARCHAR2,
    i_rept_time_frame IN VARCHAR2,
    i_table_name IN VARCHAR2,
    i_column_name IN VARCHAR2,
    i_domain_table IN VARCHAR2,
    i_domain_column IN VARCHAR2,
    i_domain_code IN VARCHAR2,
    i_trace_flg IN NUMBER := 0)
    RETURN VARCHAR2 IS
    cursor_stg VARCHAR2(4000);
    || File name: diag_msg_1000_cursor.fnc
    || Created by: ELSA.LESLIE
    || Created on: 20071215 4:08:20 AM
    || Purpose: Build the string that will retrieve PRIKEY and CONTENTS
    || from the target table, university, time frame, submission
    || and table passed as parameters for the 1000 dignostic.
    || Diagnostic 1000:
    || Validate that the table's logical unique key constraint
    || is not violated.
    || In: ***
    || *** ALL INPUT VARIABLES MUST BE DECLARED EVEN IF THEY ARE
    || *** NOT USED IN THIS PARTICULAR FUNCTION BECAUSE THE
    || *** EDIT_ANY_TABLE PROCEDURE CALLS THE FUNCTION IN AN
    || *** EXECUTE IMMEDIATE STATEMENT THAT REQUIRES THE 'USING'
    || *** PHRASE BE PART OF THE CALLING PROGRAM RATHER THAN BEING
    || *** INCLUDED IN THE RETURNED CURSOR_STG.
    || ***
    || i_rept_inst = reporting institution (eg. UF, FSU)
    || i_rept_time_frame = reporting time frame (eg., 200608, 20062007)
    || i_table_name = target table to be edited (eg. BUILDINGS, ENROLLMENTS)
    || i_trace_flg is optional and is used for debugging (values: TRUE/FALSE)
    || [not used] i_column_name = eg. ALTER_YR, BASE_YR
    || [not used] i_domain_table = the name of the domain table containing valid values
    || [not used] (eg. DOMAIN_MAIN_VALUES, DOMAIN_UNIV)
    || [not used] i_domain_column = the name of the column in the domain table that
    || [not used] contains the valid values (eg. CODE, OPEID_CD)
    || [not used] i_domain_code = the 5-digit domain code (eg. 10021, 01045)
    || Out: cursor_stg = executable SQL to return error row information
    || Dependencies: Logical Unique Key for tables must be have the string 'LUK'
    || postpended to it's name.
    || Exceptions: none
    || Copyright: BOG 2007
    || ***************************************************
    || Modifications:
    || Userid - Date - Modification description
    -- Constants and special assignments
    rept_inst VARCHAR2(4) := upper(i_rept_inst);
    rept_time_frame VARCHAR2(8) := i_rept_time_frame;
    table_name VARCHAR2(30) := upper(i_table_name);
    column_name VARCHAR2(30) := upper(i_column_name);
    domain_table VARCHAR2(30) := upper(i_domain_table);
    domain_column VARCHAR2(30) := upper(i_domain_column);
    domain_code VARCHAR2(5) := upper(i_domain_code);
    trace_flg NUMBER := i_trace_flg;
    file_name VARCHAR2(100) := 'diag_msg_1000_cursor: ';
    unq_cols VARCHAR2(1000) := NULL;
    unq_contents VARCHAR2(4000) := NULL;
    unq_where VARCHAR2(4000) := NULL;
    -- Accounting of process n/a all contained in the for loop
    row_num NUMBER := 0;
    -- Object types - n/a
    -- Cursors
    CURSOR ix_cols_curr(tbnm VARCHAR2 := table_name) IS
    SELECT column_name colnm
    FROM sys.all_ind_columns i
    WHERE i.table_owner = 'SUSDB'
    AND i.index_name LIKE '%LUK'
    AND i.table_name = tbnm
    ORDER BY i.column_position;
    -- Cursor variables n/a
    -- errors and exceptions
    sql_code NUMBER;
    sql_errm VARCHAR2(255);
    BEGIN
    -- output trace information if requested
    IF trace_flg = 1
    THEN
    dbms_output.put_line(file_name || 'rept_inst = ' || rept_inst);
    dbms_output.put_line(file_name || 'rept_time_frame = ' || rept_time_frame);
    dbms_output.put_line(file_name || 'table_name = ' || table_name);
    dbms_output.put_line(file_name || 'column_name = ' || column_name);
    dbms_output.put_line(file_name || 'domain_table = ' || domain_table);
    dbms_output.put_line(file_name || 'domain_column = ' || domain_column);
    dbms_output.put_line(file_name || 'domain_code = ' || domain_code);
    END IF;
    -- ix_cols_loop builds a string of the columns contain in the
    -- logical unique key which is then later incorporated into the
    -- select cursor returned to the calling program.
    FOR this_col IN ix_cols_curr(table_name)
    LOOP
    <<ix_cols_loop>>
    -- output trace information if requested
    IF trace_flg = 1
    THEN
    row_num := ix_cols_curr%ROWCOUNT;
    dbms_output.put_line(file_name || 'row=' || row_num ||
    'column_name=' || this_col.colnm);
    END IF;
    IF unq_cols IS NOT NULL
    THEN
    unq_cols := unq_cols || ', ';
    unq_contents := unq_contents || ', ';
    END IF;
    unq_cols := unq_cols || this_col.colnm;
    unq_contents := unq_contents || q'[']' || this_col.colnm ||
    q'['=]' || this_col.colnm;
    unq_where := unq_where || 'AND tbl.' || this_col.colnm ||
    ' = dups.' || this_col.colnm;
    END LOOP ix_cols_loop;
    IF trace_flg = 1
    THEN
    dbms_output.put_line(file_name || 'unq_cols =' || unq_cols);
    dbms_output.put_line(file_name || 'unq_contents =' || unq_contents);
    dbms_output.put_line(file_name || 'unq_where =' || unq_where);
    END IF;
    cursor_stg := 'SELECT prikey, ' || unq_contents || ' AS contents ' ||
    'FROM univdb.' || table_name || ' tbl, (SELECT ' ||
    unq_cols || ', COUNT(*) FROM univdb.' || table_name ||
    q'[ WHERE rept_inst = ']' || rept_inst || q'[']' ||
    q'[AND rept_time_frame = ']' || rept_time_frame || q'[']' ||
    ' GROUP BY ' || unq_cols || ' HAVING COUNT(*) > 1) dups' ||
    q'[ WHERE tbl.rept_inst = ']' || rept_inst || q'[']' ||
    q'[ AND tbl.rept_time_frame = ']' || rept_time_frame ||
    q'[']' || unq_where;
    -- output trace information if requested
    IF trace_flg = 1
    THEN
    dbms_output.put_line(file_name || 'cursor_stg = ' || cursor_stg);
    END IF;
    RETURN(cursor_stg);
    EXCEPTION
    -- block exception
    WHEN OTHERS THEN
    sql_code := SQLCODE;
    sql_errm := SQLERRM;
    IF trace_flg = 1
    THEN
    dbms_output.put_line(file_name || ' ROW NUM ' || row_num || ' sql code ' ||
    sql_code || ' sql message ' || sql_errm);
    END IF;
    END diag_msg_1000_cursor;

  • Convert from NVARCHAR2 to Unicode in SQL Plus

    I need to convert from NVARCHAR2 column data to Unicode format in a query. How can I do this?

    I need to convert from NVARCHAR2 column data to Unicode format in a queryMaybe with convert:
    SQL> select convert(n'ABC', 'utf8') abc from dual;
    AB

    1 row selected.?

  • SQL*Plus - multiple commands

    Is there a way to execute multiple commands in a single sql*plus command file, e.g.
    select count(*) from table1
    select count(*) from table2
    The above gets a syntax error becuase of the multiple commands

    Hi,
    If you just want counts from two tables, you could try:
    select
    (select count(*) from table1) Count_Tab1,
    (select count(*) from table2) Count_Tab2
    from dual;
    Regards Robert

  • SQL Plus: retrieve the commands

    11g R2 (11.2.0.3) on Linux. At the SQL Plus prompt such as SQL>, I typed some commands, say, select from test;* Sometime I want to re-use the query, so I need to retype in select from test.* Is there a way to retrieve the earlier issued commands back?
    Also, I can not use the BACK arrow key. Suppose I want to insert or delete a character in the middle of the commandline, how can I move the cursor over the character?
    Thanks

    955300 wrote:
    11g R2 (11.2.0.3) on Linux. At the SQL Plus prompt such as SQL>, I typed some commands, say, select from test;* Sometime I want to re-use the query, so I need to retype in select from test.* Is there a way to retrieve the earlier issued commands back?Yes. The utility is called rlwrap. You use it to run sqlplus. I alias it. So in my +.bash_profile+, I will have the following line:
    alias sqlplus="rlwrap $ORACLE_HOME/sqlplus"It provides full command line recall (inside SQL*Plus) and command line editing.
    There is no rlwrap rpm available for installation AFAIK. I'm downloading the source code and doing a manual build and install for all the server installations I do (I do not use Oracle Linux or RHEL as a desktop o/s - think for my Ubuntu desktop it installed via an <i>apt-get</i>). For a manual source code build, you need to install a couple of development rpm's as I recall, such as the readline lib.

  • Connecting Oracle using SQL Plus in command window through LDAP settings?

    Hi
    Just like to know if it is possible to connect Oracle using SQL Plus with connection type as LDAP.
    Generally we connect to Oracle in cmd window as
    username/password@DBServiceName
    Similarly is it possible to connect Oracle using SQL plus cmd window using LDAP configuration settings.
    Eg:-
    If my LDAP server is oid:123:456
    Context is: cn=OracleContext,dc=abcdefgh,dc=com
    DBService is: xyz
    Regards
    jc

    Specify the -L command line option to SQL*Plus, i.e.:
    sqlplus -L username/password@db @blah.sql
    (this will prevent the second prompt for username/password if the initial login is unsuccessful for any reason, like an invalid password).

  • SQL Plus giving SP2-0024: Nothing to change error

    I'm just about to lose my mind.
    I'm running the following in SQL Plus -
    set echo off
    set feedback off
    set linesize 1000
    set sqlprompt ''
    spool c:\TEMP2\App_Eng1.csv replace
    Select A.OBJECTOWNERID||','||B.OBJECTVALUE1 from PSPROJECTITEM B, PSAEAPPLDEFN A
    Where B.PROJECTNAME = 'PRJ732075'
    and B.SOURCESTATUS = 2
    and B.TARGETSTATUS = 1
    and B.OBJECTVALUE2 = ' '
    and B.OBJECTTYPE=33
    and A.AE_APPLID = B.OBJECTVALUE1
    spool off
    and I get the following in return -
    SQL> set echo off
    SQL> set feedback off
    SQL> set linesize 1000
    SQL> set sqlprompt ''
    spool c:\TEMP2\App_Eng1.csv replace
    SP2-0024: Nothing to change.
    Select A.OBJECTOWNERID||','||B.OBJECTVALUE1 from PSPROJECTITEM B, PSAEAPPLDEFN A
    2 Where B.PROJECTNAME = 'PRJ732075'
    3 and B.SOURCESTATUS = 2
    4 and B.TARGETSTATUS = 1
    5 and B.OBJECTVALUE2 = ' '
    6 and B.OBJECTTYPE=33
    7 and A.AE_APPLID = B.OBJECTVALUE1
    8
    spool off
    SP2-0042: unknown command "off" - rest of line ignored.
    Why am I getting these errors?
    Also, when I clear the SQL, rerun the SQL and try to open the App_Eng1.csv file
    I get a window telling me the file is locked. The only way for me to unlock the file is to shutdown the SQL Plus window. Why is this?
    All I am trying to do is to download data from an Oracle table to an Excel spreadsheet. Is there a relatively easy way to do this using SQL Developer code or should I continue to fight with SQL Plus? I'm trying to automate a process so I don't want to use the manual steps like the DTS Import by Excel.
    Any help? Please?

    Thanks for the info. I have another issue. I'm not sure that my Spool Off command is being recognized. Here's the script I'm running -
    set echo off
    set feedback off
    set linesize 1000
    set sqlprompt ''
    SELECT COUNT(*) FROM PSPROJECTITEM;
    spool c:\TEMP2\App_Eng1.csv replace
    Select A.OBJECTOWNERID||','||B.OBJECTVALUE1
    from PSPROJECTITEM B, PSAEAPPLDEFN A
    Where B.PROJECTNAME = 'PRJ732075'
    and B.SOURCESTATUS = 2
    and B.TARGETSTATUS = 1
    and B.OBJECTVALUE2 = ' '
    and B.OBJECTTYPE=33
    and A.AE_APPLID = B.OBJECTVALUE1;
    spool off
    Most of the time the App_Eng1.csv file is telling me that it can't be opened because it's being used by another user, even after I close SQL Plus. I have to physically perform the Spool Off command from the menu. But even then the csv file is blank. Any ideas?

  • SQL*PLUS and PL/SQL

    HI !
    There is any way to run a command SQL*PLUS through a block pl/sql. For example to run the "copy from" command in a block pl/sql.
    Thanks for you time.

    APC wrote:
    No.
    SQL*Plus is an interactive, client-side tool. PL/SQL is a batch-oriented server side tool.I would make more distinction ...
    SQL*Plus is an interactive, client-side tool - a specialized command processor. PL/SQL is a batch-oriented server side programming language.
    >
    There are ways of doing the same sort of things in both languages, but they are different commands.
    Cheers, APC

  • Sql Plus Help! (the window remain open)

    I'm currently using sql plus to export data from oracle to text with spool command, in this way:
    sqlplus user/[email protected] @F:\pathtosql\query.sql (this line is in a bat file)
    where the file query.sql contain the spool comand
    spool F:\textfile.txt;
    set head on;
    set pagesize 0;
    set linesize 512;
    set trimspool on;
    set feedback off;
    set termout off;
    select field1, field2, ..., fieldn
    from table;
    spool off;
    exit;
    mi problem is when I run .bat (contining the sqlplus command) and for some reason the source database is not available the windows remain open requesting for a logon information, I want the windows close if are connection problem
    Can I do that with sqlplus
    Thanx

    Specify the -L command line option to SQL*Plus, i.e.:
    sqlplus -L username/password@db @blah.sql
    (this will prevent the second prompt for username/password if the initial login is unsuccessful for any reason, like an invalid password).

  • PLS-00201 error occurs when batching a stored procedure in SQL*Plus

    I have a batch file to run a stored procedure and spool the results to file. When I enter the commands manually in sql*plus the output works fine and my results are spooled to the output file. But when I run the same commands in the batched script I get an error.
    Any ideas?
    Stored Procedure:
    create or replace procedure MMP( p_cursor in out SYS_REFCURSOR)
    as
    begin
    open p_cursorfor select name, id from table;
    end;
    batch file 1:
    sqlplus -S user/pw@REPORTDV @sp_output_spooled.sql
    script file sp_output_spooled.sql
    Pasting these commands directly to the SQL*Plus command prompt spools the result set to file as expected.
    set colsep '|'
    set echo off
    set feedback off
    set termout off
    set heading off
    set linesize 9000
    set pagesize 0
    set trimspool on
    set headsep off
    spool output.TXT
    var rc refcursor
    execute MMP(:rc)
    print rc
    spool off
    exit
    The errors printed to output.TXT file after the batch is run and error occurs:
    BEGIN MMP(:rc); END;
    ERROR at line 1:
    ORA-06550: line 1, column 8:
    PLS-00201: identifier 'MMP' must be declared
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored
    ERROR:
    ORA-24338: statement handle not executed
    SP2-0625: Error printing variable "rc"

    Hi,
    Your code worked fine for me.
    Is MMP procedure owned by the same user that is running the batch file or does it have proper privileges and synonym?
    vr,
    Sudhakar

  • Request: enable use of sql*plus via Oracle Instant Client.

    hi,
    great project....
    I've just installed Raptor release 3 on top of oracle instant client, and it seems to be running fine. my sql*plus from the instant client functions from the command line, but the sql*plus menu item in the tools menu is grayed out.
    review of the help files say's that oracle_home must be set, but instant client does not need an oracle_home. (uses tns_admin instead).
    is there a work around for this? (other than loading the full oracle client w/ it's sql*plus)
    thanks
    GT

    The SQL*Plus menu item does not seem to be correctly detecting the current connection context. I'm filing this as a bug to be fixed before we ship. In the current version, however, you can enable the menu item by ensuring first that the connection is selected in the Connections navigator.
    When the menu is invoked, you will be prompted for the location of the SQL*Plus executable. On Windows, this should just be the path to sqlplus.exe (or sqlplusw.exe). On Unix platforms, you should include 'xterm' or an equivalent in order to ensure that SQL*Plus invokes in a window.
    - John
    Raptor Development Team

  • Which two are attributes of /SQL*Plus? (Choose two)

    A. /SQL*Plus commands cannot be abbreviated.
    B. /SQL*Plus commands are accesses from a browser.
    C. /SQL*Plus commands are used to manipulate data in tables.
    D. /SQL*Plus commands manipulate table definitions in the database.
    E. /SQL*Plus is the Oracle proprietary interface for executing SQL statements.

    What's "/SQL*Plus"? Did you mean iSQL*Plus? If so, maybe you could add,
    F. iSQL*Plus no longer exists in 11g

  • Spool size restriction on SQL*Plus

    Hi,
    I am trying to spool the data from a table to a text file. As the maximum buffer size for spool command is 1000000 in SQL*Plus I am getting BUFFER OVER FLOW error. I know the text file can be created using UTL_file package. Is there any other easy method to capture the data to text file like Spool.
    I need to capture nearly 10000 lines (each can have 500 characters).
    Thanks,
    Vengad

    You 'set termout off' before you execute your script for spooling. The buffer overflow error shows up if you want see the results on screen...
    By setting 'termout off' the results would not come on the screen.

Maybe you are looking for