Copy command in Sqlplus

I am using 8.1.6 and 8.1.7, but the copy command does not seem to work on either cases, the sqlplus just crash, did you guys have the similar problem? Is it a bug in oracle or there is some parameter I need to set up correctly?
Your help is highly appreciated.

it works i tried
null

Similar Messages

  • Copy command of SQLPLUS is failing

    Oracle Version 8i.
    When trying to use the copy command -in SQLPLUS- to copy the data from one database to the other, I am encountering the following error.
    Error: SP2-0027: Input is too long (> 2499 characters) - line ignored
    Reason for using the copy command is: Allows me to set commit points as against Insert into ... select * from command.
    The table, I am copying has lot of columns and the number of characters in the script are more than 3000.
    Where is the restriction of 2499 characters set? Is there a way to alter this?
    Thanks
    null

    You can export the table(s) and import into your database.

  • Oracle Copy command

    Hi,
    I was hoping someone might be able to help me out with a question/issue I have when using the copy command in SQLPlus. The scenario entails moving specific columns from a table in DB A to a new table in DB B (DB B is on a completely different server). When I use the copy from to create select command I am finding that the column sizes are being increased by a factor of 4. So in my source table I have a column which is VARCHAR2(15 CHAR), yet after the copy command is complete the target table has the same column as VARCHAR2(60 CHAR).
    Does anyone know how I can get copy to keep the column sizes the same? i.e. VARCHAR2(15 CHAR) in source, VARCHAR2(15 CHAR) at target.
    I have tried pre-creating the tables which the correct sizes and then using insert in the copy command, however it errors out when it thinks the size has been exceeded.
    Thanks in advance

    Hope this pastes ok:
    Target System:
    desc s_addr_per
    Name Null Type
    ROW_ID NOT NULL VARCHAR2(60 CHAR)
    CREATED NOT NULL DATE
    CREATED_BY NOT NULL VARCHAR2(60 CHAR)
    LAST_UPD NOT NULL DATE
    Source System:
    desc siebel.s_addr_per
    Name Null Type
    ROW_ID NOT NULL VARCHAR2(15 CHAR)
    CREATED NOT NULL DATE
    CREATED_BY NOT NULL VARCHAR2(15 CHAR)
    LAST_UPD NOT NULL DATE
    Note : this is a only the first couple of columns in the table

  • Help in copy command

    Hi
    Can i use parallel and append hint in while inserting data through copy command in sqlplus?
    My databse version is
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
    PL/SQL Release 9.2.0.4.0 - Production
    CORE 9.2.0.3.0 Production
    TNS for IBM/AIX RISC System/6000: Version 9.2.0.4.0 - Production
    NLSRTL Version 9.2.0.4.0 - Production
    Thanks in advance.

    Why don't you check this link ->
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/apb.htm
    Regards.
    Satyaki De.

  • SQLplus COPY command and datatypes

    I have a view, schema1.myview:
    col1 VARCHAR2(10),
    col2 VARCHAR2(10),
    col3 NUMBER,
    col4 VARCHAR2(10)Then, using SQLplus, connected as schema2:
    COPY FROM schema1/password@mydb REPLACE myview USING SELECT * FROM myviewThe resulting table schema2.myview:
    col1 VARCHAR2(10),
    col2 VARCHAR2(10),
    col3 INTEGER,
    col4 VARCHAR2(10)Col3 has been converted from NUMBER to INTEGER and I'm losing precision. My goal is to copy this data from one schema to the other; SQLplus's COPY command seemed easy but I'm open to other possibilities that can be easily scripted.

    Thank you for your response, Sundar.
    I may try enumerating the columns at a future time, but doing so in a script is awkward, especially if source views and tables and their columns change.
    I'm not sure if a database link is what I'm wanting, as both source and target are in the same database.
    I had considered synonyms, but I don't seem to have the necessary permissions to do so.

  • SQLPLUS COPY COMMAND and TIMESTAMPS

    I am copying data from production to a database warehouse. We had used insert into at one point but switched to the SQLPLUS COPY command as it increased our performance by almost over 50%. We recently added a table that has a TIMESTAMP. I understand this datatype isnt supported by COPY. Is there anything that I can use other than going back to the INSERT statement through a DB link?
    Thanks,
    Scott

    Hi,
    Just refer to Data Pump
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_overview.htm#sthref22

  • Problem with sqlplus copy command

    When I try to use the SQLPlus Copy command (with Append or Insert action) with a 8.1.7 source DB and a 9.2.0.4 destination DB, I receive the "CPY0006: Select list has more columns than destination table" error.
    The tables are identical in both DBs so I am confused.
    Just to make sure the tables were identical, I then used the Copy command with the Create option and used a new table name.
    That worked, however if I then try to use the Copy with an Insert or Append action against the table I just created, I get the error again.
    I am using SQLPlus 8.1.6.0.0
    Output from SQL*Plus:
    NTEG> SET COPYCOMMIT 40;
    NTEG> SET ARRAYSIZE 1000;
    NTEG> COPY FROM xxxxx/xxxxx@nteg -
    TO xxxxx/xxxxx@DEV -
    INSERT sysadm.PS_ANIMAL_TBL -
    USING select * FROM sysadm.PS_ANIMAL_TBLArray fetch/bind size is 1000. (arraysize is 1000)
    Will commit after every 40 array binds. (copycommit is 40)
    Maximum long size is 80. (long is 80)
    CPY0006: Select list has more columns than destination table
    Descr from both DBs
    NTEG> descr ps_animal_tbl
    Name
    ANIMAL_CD
    DESCR50
    DESCRSHORT
    DEV> descr ps_animal_tbl;
    Name
    ANIMAL_CD
    DESCR50
    DESCRSHORT

    SQL> help copy
    COPY
    COPY copies data from a query to a table in a local or remote
    database.
    COPY {FROM database | TO database | FROM database TO database}
    APPEND destination_table
    [(column, column, column, ...)] USING query
    where database has the following syntax:
    username[password]@connect_identifier
    SQL>
    Joel P�rez

  • Sqlplus copy command

    Am trying to use copy command (copy data from table in old db to table in new db); am coming up with ERROR:
    ORA--3929306: Message -3929306 not found; product=RDBMS; facility=ORA and I cannot find any information on this error. The search function in this forum wasn't working either...

    can you tell the syntax you are using ?

  • COPY command in SQL*Plus 8.1.6 returns ORA-65535

    The COPY command in the windows version of SqlPlus (SQLPLUSW) does not work any more. I get the following error
    << Array fetch/bind size is 5. (arraysize is 5)
    Will commit after every array bind. (copycommit is 1)
    Maximum long size is 80. (long is 80)
    ERROR:
    ORA-65535: Message 65535 not found; product=RDBMS; facility=ORA >>
    Interestingly, I can run the same COPY command successfully if I use SQLPLUS.exe ( the command line version ). No error & it completes the copy.
    I recently changed my Oracle client from 7.3 to v8.1.6.
    I had not encountered this problem with the same command in v7.3.

    You may have run into bug 1504702. As a workaround you will need to use command line, as you've already figured out. I don't think a patch is available for Windows yet, although there is for Solaris (in the 8.1.7.4 patch set).
    Alison

  • How to configure host copy command inside EM Console

    hi,
    I want to copy a file from one server to my production server. i found that through host copy command its is possiable in command prompt.but when i configure host copy command inside em console it is not working. i am getting following error
    ORA-06550: line ORA-06550: line 3, column 6: PLS-00103: Encountered the symbol "COPY" when expecting one of the following: := . ( @ % ; , column :
    Any solution for this
    Edited by: mithun on Jun 16, 2011 2:36 AM

    mithun wrote:
    hi,
    I want to copy a file from one server to my production server. i found that through host copy command its is possiable in command prompt.but when i configure host copy command inside em console it is not working. i am getting following error
    ORA-06550: line ORA-06550: line 3, column 6: PLS-00103: Encountered the symbol "COPY" when expecting one of the following: := . ( @ % ; , column :
    Any solution for this
    Edited by: mithun on Jun 16, 2011 2:36 AMThis makes no sense whatsoever.
    Now, as for your original question, there is not "host copy" command. Not in sqlpus, not in em.
    What you are doing in sqlplus is the sqlplus command "host". That is a sqlplus command, documented in the SQLPlus Reference. The sqlplus command "host" takes an argument of an os command (in your case, the OS command is "copy") and creates a sub-process to ask the os to execute that command.
    I can't even imagine what you are referring to when you say "when i configure host copy command inside em console". Can you explain in more detail?

  • GPF in SQL*PLUS Copy Command?

    Hello,
    I'm getting a GPF and crash of SQL*Plus when I use the copy command. Seems like I used to be able to make it work if I tried logging on to the source database before the copy, but now even that won't work. I issue the command, it looks out over the modem for the remote database, then the GPF occurs.
    copy from me/[email protected] to me/me@LocalDB -
    insert ARRG_BNDRY_OBJECT -
    using -
    SELECT * FROM ARRG_BNDRY_OBJECT WHERE ARRG_BNDRY_KEY IN -
    (80169);
    Ideas?
    Thanks,
    Dale

    You might also want to try the same command using SQL*Plus command line (DOS version). If you haven't used it before, enter SQLPLUS at the command prompt, eg:
    c:\sqlplus
    Alison

  • COPY command not working SQL Commands editor

    Hi All,
    I want to have a simple 'one-button-solution' for copying few tables from an external DB into the database where my Apex application is running.
    When I issue the following from the sqlplus command line I get the following output:
    SQL> COPY FROM schema/password@tnsnames_sid TO schema/password@tnsnames_sid REPLACE TABLE_TEST USING select * from TABLE_FOREIGN;
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    Table TABLE_TEST dropped.
    Table TABLE_TEST created.
    2 rows selected from schema@tnsnames_sid.
    2 rows inserted into TABLE_TEST.
    2 rows committed into TABLE_TEST at schema@tnsnames_sid.
    SQL>
    However, if I try exactly the same command from within the Apex 'SQL Commands' editor, I get the following error message:
    ORA-00900: invalid SQL statement
    NOTE that the reason I use COPY command is to overcome problems with LONG datatype which arise when doing simply CREATE TABLE AS.... with dblink.
    In anycase, how can I make this work from within the 'SQL Commands' editor (and therefore in a button process).
    Regards,
    Pawel.

    Hi Harman,
    yes, this is a known issue.
    It's fixed with NW04 SPS 13.
    Regards Matthias Röbig-Landau

  • COPY command replacement

    Given that the COPY command is now deprecated (and clearly documented in 10gR2 - sqlplus user's guide that it will be obsoleted in future releases of SQL*Plus, will there be any replacement command in sqlplus?
    We were planning to use it to implement for our simulation model - but given it is deprecated and does not support new data types, we are forced to look for alternatives. What are the alternatives for a local area network or copying data between two oracle accounts using different tablespaces on the same db server?
    Pro*C/Direct Path Load,
    expdp/impdp,
    copy over dblink and then recreate the constraints and indexes,
    which one will be faster, should be used based on the following?
    What we want to do is to checkpoint (save) historical game data, and if required/necessary, be able to bring back the data from a saved game checkpoint X, where X can be any number (checkpoint 4 or 20, etc). We also want to hold onto the saved game checkpoint files so that we can take it to another place for after action review purposes.
    Any input is appreciated.
    regards.

    copying data between two oracle accounts using different tablespaces on the same db server?For this I would grant SELECT on the table to be copied to the target Oracle account and use CREATE TABLE ... AS SELECT ... and recreate constraints and indexes.

  • Sql copy command

    Hello to all,
    I am copying tables from one database to another. both are 9.2.0.4 on solaris 8 o/s. Received this error but the copy was successful. Is this something i should be worried about?
    issued this command from sqlplus logged into the host:
    copy from saturn/xxxx@prod to saturn/xxx@pprd2 create scrrtst_prod using select * from scrrtst;
    received this msg:
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    SQLRCN in cpytbl failed: -1075
    Table SCRRTST_PROD created.
    45 rows selected from saturn@prod.
    45 rows inserted into SCRRTST_PROD.
    45 rows committed into SCRRTST_PROD at saturn@pprd2.
    Any suggestions?
    Thanks!

    You may have run into bug 1504702. As a workaround you will need to use command line, as you've already figured out. I don't think a patch is available for Windows yet, although there is for Solaris (in the 8.1.7.4 patch set).
    Alison

  • SHOW commands in SQLPlus

    Where can I find a list / explanation of the SHOW commands in SQLPlus?
    Thanks,

    Hi,
    Also, try this cool glogin script from Chris Foot to show the instance name in your SQL*Plus promt:
    COLUMN file_name FORMAT a44
    COLUMN tablespace_name FORMAT a20
    COLUMN owner FORMAT a15
    COLUMN segment_name FORMAT a20
    set lines 132
    set pages 100
    set termout off
    col dbname new_value prompt_dbname
    select instance_name dbname from v$instance;
    set sqlprompt "&&prompt_dbname> "
    set termout on
    set time on
    Here are the set options:
    APPI[NFO]ON
    Application info for performance monitor (see DBMS_APPLICATION_INFO)
    ARRAY[SIZE] {15|n}
    Fetch size (1 to 5000) the number of rows that will be retrieved in one go.
    AUTO[COMMIT] OFF|n}
    Autocommit commits after each SQL command or PL/SQL block
    AUTOP[RINT] OFF
    Automatic PRINTing of bind variables.(see PRINT)
    AUTORECOVERY ON
    Configure the RECOVER command to automatically apply
    archived redo log files during recovery - without any user confirmation.
    AUTOT[RACE] OFF} [EXP[LAIN]] [STAT[ISTICS]]
    Display a trace report for SELECT, INSERT, UPDATE or DELETE statements
    EXPLAIN shows the query execution path by performing an EXPLAIN PLAN.
    STATISTICS displays SQL statement statistics.
    Using ON or TRACEONLY with no explicit options defaults to EXPLAIN STATISTICS
    BLO[CKTERMINATOR] {.|c|OFF|ON}
    Set the non-alphanumeric character used to end PL/SQL blocks to c
    CMDS[EP] {;|c|OFF|ON}
    Change or enable command separator - default is a semicolon (;)
    COLSEP { |text}
    The text to be printed between SELECTed columns normally a space.
    COM[PATIBILITY] {V5|V6|V7|V8|NATIVE}
    Version of oracle - see also init.ora COMPATIBILITY=
    You can set this back by up to 2 major versions e.g. Ora 9 supports 8 and 7
    CON[CAT] {.|c|OFF|ON}
    termination character for substitution variable reference
    default is a period.
    COPYC[OMMIT] {0|n}
    The COPY command will fetch n batches of data between commits.
    (n= 0 to 5000) the size of each fetch=ARRAYSIZE.
    If COPYCOMMIT = 0, COPY will commit just once - at the end.
    COPYTYPECHECK OFF
    Suppres the comparison of datatypes while inserting or appending to DB2
    DEF[INE] {&|c|OFF|ON}
    c = the char used to prefix substitution variables.
    ON or OFF controls whether to replace substitution variables with their values.
    (this overrides SET SCAN)
    DESCRIBE [DEPTH {1|n|ALL}][LINENUM {ON|OFF}][INDENT {ON|OFF}]
    Sets the depth of the level to which you can recursively describe an object
    (1 to 50) see the DESCRIBE command
    ECHO OFF
    Display commands as they are executed
    EMB[EDDED] OFF
    OFF = report printing will start at the top of a new page.
    ON = report printing may begin anywhere on a page.
    ESC[APE] {\|c|OFF|ON}
    Defines the escape character. OFF undefines. ON enables.
    FEED[BACK] {6|n|OFF|ON}
    Display the number of records returned (when rows > n )
    OFF (or n=0) turns the display off
    ON sets n=1
    FLAGGER OFF|FULL}
    Checks to make sure that SQL statements conform to the ANSI/ISO SQL92 standard.
    non-standard constructs are flagged as errors and displayed
    See also ALTER SESSION SET FLAGGER.
    FLU[SH] OFF
    Buffer display output (OS)
    (no longer used in Oracle 9)
    HEA[DING] OFF
    print column headings
    HEADS[EP] {||c|OFF|ON}
    Define the heading separator character (used to divide a column heading onto > one line.)
    OFF will actually print the heading separator char
    see also: COLUMN command
    INSTANCE [instance_path|LOCAL]
    Change the default instance for your session, this command may only be issued when
    not already connected and requires Net8
    LIN[ESIZE] {150|n}
    Width of a line (before wrapping to the next line)
    Earlier versions default to 80, Oracle 9 is 150
    LOBOF[FSET] n
    Starting position from which CLOB and NCLOB data is retrieved and displayed
    LOGSOURCE [pathname]
    Change the location from which archive logs are retrieved during recovery
    normally taken from LOG_ARCHIVE_DEST
    LONG {80|n}
    Set the maximum width (in chars) for displaying and copying LONG values.
    LONGC[HUNKSIZE] {80|n}
    Set the fetch size (in chars) for retrieving LONG values.
    MARK[UP] HTML ON
    [HEAD text] [BODY text] [TABLE text]
    [ENTMAP {ON|OFF}][SPOOL {ON|OFF}]
    [PRE[FORMAT] ON]
    Output HTML text, which is the output used by iSQL*Plus.
    NEWP[AGE] {1|n} NULL text
    The number of blank lines between the top of each page and the top title.
    0 = a formfeed between pages.
    NULL text
    Replace a null value with 'text'
    The NULL clause of the COLUMN command will override this for a given column.
    NUMF[ORMAT] format
    The default number format.
    see COLUMN FORMAT.
    NUM[WIDTH] {10|n}
    The default width for displaying numbers.
    PAGES[IZE] {14|n}
    The height of the page - number of lines.
    0 will suppress all headings, page breaks, titles
    PAU[SE] OFF
    press [Return] after each page
    enclose text in single quotes
    RECSEP {WR[APPED]|EA[CH]|OFF}
    Print a single line of the RECSEPCHAR between each record.
    WRAPPED = print only for wrapped lines
    EACH=print for every row
    RECSEPCHAR {_|c}
    Define the RECSEPCHAR character, default= ' '
    SCAN OFF
    OFF = disable substitution variables and parameters
    SERVEROUT[PUT] OFF [SIZE n] [FOR[MAT] {WRA[PPED]|WOR[D_WRAPPED]|TRU[NCATED]}]
    whether to display the output of stored procedures (or PL/SQL blocks)
    i.e., DBMS_OUTPUT.PUT_LINE
    SIZE = buffer size (2000-1,000,000) bytes
    SHOW[MODE] OFF
    Display old and new settings of a system variable
    SPA[CE] {1|n}
    The number of spaces between columns in output (1-10)
    SQLBL[ANKLINES] ON
    Allow blank lines within an SQL command. reverts to OFF after the curent command/block.
    SQLC[ASE] {MIX[ED]|LO[WER]|UP[PER]}
    Convert the case of SQL commands and PL/SQL blocks
    (but not the SQL buffer itself)
    SQLPLUSCOMPAT[IBILITY] {x.y[.z]}
    Set the behavior or output format of VARIABLE to that of the
    release or version specified by x.y[.z].
    SQLCO[NTINUE] {> |text}
    Continuation prompt (used when a command is continued on an additional line using a hyphen -)
    SQLN[UMBER] OFF
    Set the prompt for the second and subsequent lines of a command or PL/SQL block.
    ON = set the SQL prompt = the line number.
    OFF = set the SQL prompt = SQLPROMPT.
    SQLPRE[FIX] {#|c}
    set a non-alphanumeric prefix char for immediately executing one line of SQL (#)
    SQLP[ROMPT] {SQL>|text}
    Set the command prompt.
    SQLT[ERMINATOR] {;|c|OFF|ON}|
    Set the char used to end and execute SQL commands to c.
    OFF disables the command terminator - use an empty line instead.
    ON resets the terminator to the default semicolon (;).
    SUF[FIX] SQL
    Default file extension for SQL scripts
    TAB OFF
    Format white space in terminal output.
    OFF = use spaces to format white space.
    ON = use the TAB char.
    Note this does not apply to spooled output files.
    The default is system-dependent. Enter SHOW TAB to see the default value.
    TERM[OUT] OFF
    OFF suppresses the display of output from a command file
    ON displays the output.
    TERMOUT OFF does not affect the output from commands entered interactively.
    TI[ME] OFF
    Display the time at the command prompt.
    TIMI[NG] OFF
    ON = display timing statistics for each SQL command or PL/SQL block run.
    OFF = suppress timing statistics
    TRIM[OUT] OFF
    Display trailing blanks at the end of each line.
    ON = remove blanks, improving performance
    OFF = display blanks.
    This does not affect spooled output.
    SQL*Plus ignores TRIMOUT ON unless you set TAB ON.
    TRIMS[POOL] ON
    Allows trailing blanks at the end of each spooled line.
    This does not affect terminal output.
    UND[ERLINE] {-|c|ON|OFF}
    Set the char used to underline column headings to c.
    VER[IFY] OFF
    ON = list the text of a command before and after replacing substitution variables with values.
    OFF = dont display the command.
    WRA[P] OFF
    Controls whether to truncate or wrap the display of long lines.
    OFF = truncate
    ON = wrap to the next line
    The COLUMN command (WRAPPED and TRUNCATED clause) can override this for specific columns.

Maybe you are looking for