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

Similar Messages

  • 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.

  • 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

  • SQL*Plus 'Copy' command and LONG datatypes

    Hi. I'm using Oracle 9.2.0.5 and wanna copy LONG to LONG without using an Interface in VB or any other programming language.
    Some of the fields (plain text) are greater than 32 Kb, and I tried the SQL*Plus 'Copy' command, without success.
    (For compatibility reasons I can't convert LONG to CLOB, I need to copy LONG to LONG)
    This is the example I'm working with:
    Table Source_LONG (ID number, DATA long)
    Table Destination_LONG (ID number, DATA long)
    The SQL*Plus command: (connected from test_database@environment)
    set long 100000
    copy from test_database/test_database@environment insert destination_long (id,data)
    I tried using both FROM and TO, but same results.
    The fields are copied into destination_long, but they are
    truncated at 32768 bytes, even with the LONG variable set to 100000. Any ideas ?
    Thanks.

    I'm working with 2 similar tables with this structure:
    SOURCE_LONG (ID number, DATA long)
    DESTINATION_LONG (ID number, DATA long)
    SOURCE_LONG contains two rows:
    ID DATA
    1 hello
    3 ....text bigger than 32kb...
    I tried your solution and it insert 2 rows, but only the ID is filled. The DATA is empty in both cases :-(
    insert into destination_long(id,data) (select id,to_lob(data) from source_long);

  • 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 ?

  • Query Program ! use this for your query's like SQLPlus , copy-paste and run

    H!
    Like the Subject Title:
    If you have PHP and Oracle then you can use this if you are learning the query's or you don't wanna use SQLPlus.
    BTW this is my first script, but it works fine here.
    //the code
    <?//made by [email protected]
    IF($_SERVER['REQUEST_METHOD'] == 'POST' AND isset($_POST['username']) AND isset($_POST['password'])) {
    //gebruik het juiste dll bestand.
    dl("php_oci8.dll");
    define("USERNAME",$username);
    define("PASSWORD",$password);
    $conn      = OCILogon(USERNAME,PASSWORD);
    $sql      = stripslashes($sql);
    IF($btnRollback){
         ocirollback($conn);
         echo "Rollback done !";
    IF($btnCommit){
    ocicommit($conn);
    echo "Committed !";
    IF($btnVersion){
         echo OCIServerVersion($conn);
    IF($btnSql){
    $stmt      = OCIParse($conn,$sql);
    IF(OCIExecute($stmt) === TRUE){
              $msg = "The Query was oke !";
    if (OCIStatementType($stmt) == "SELECT") {
         $ncols     = OCINumCols($stmt);
         echo "<table width=\"100%\" border=\"1\" cellspacing=\"1\" cellpadding=\"0\" bordercolor=\"#FFFFFF\" bordercolorlight=\"#FFFFFF\" bordercolordark=\"#FFFFFF\">\n";
         echo "<tr>\n";
         for($i=1;$i<=$ncols;$i++){
         $column_name[$i] = OCIColumnName($stmt,$i);     //tabel kopjes
              $column_type[$i] = OCIColumnType($stmt,$i);     //extra info
    $column_size[$i] = OCIColumnSize($stmt,$i);      //extra info
              echo "<td class=\"row\"><b>$column_name[$i]</b></td>\n";
         echo "</tr>\n";
         while(OCIFetch($stmt)){
         echo "<tr>\n";
              for($i=1;$i<=$ncols;$i++){
         $column_value[$i] = OCIResult($stmt,$i);
                   echo "<td class=\"row\">$column_value[$i]</td>\n";               
         echo "</tr>\n";
         //extra info
         echo "<tr>\n";
         for($i=1;$i<=$ncols;$i++){
              echo "<td class=\"row\"><i>$column_type[$i] $column_size[$i]</i></td>\n";
         echo "</tr>\n";
         echo "</table>\n";
         OCIFreeStatement($stmt);
    OCILogoff($conn);
    ?>
    <style type="text/css">
    <!--
    .row { 
         background-color: #EEEEEE;
         border: #000000;
         border-style: solid;
         border-top-width: 1px;
         border-right-width: 1px;
         border-bottom-width: 1px;
         border-left-width: 1px;
         font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt;
    -->
    </style>
    <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="submit">
    <hr>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="37%">
    <textarea name="sql" cols="60" rows="10"><?echo $sql;?></textarea>
    </td>
    <td width="63%" valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="12%">Username:</td>
    <td width="88%">
    <input type="text" name="username" value="<?echo $username;?>">
    </td>
    </tr>
    <tr>
    <td width="12%">Password:</td>
    <td width="88%">
    <input type="password" name="password" value="<?echo $password;?>">
    </td>
    </tr>
    <tr>
    <td width="12%"> </td>
    <td width="88%"> </td>
    </tr>
    <tr>
    <td width="12%">
    <input type="submit" name="btnSql" value="Sql">
    </td>
    <td width="88%">
    <input type="submit" name="btnCommit" value="Commit">
    <input type="submit" name="btnRollback" value="Rollback">
    <input type="submit" name="btnVersion" value="Version">
    </td>
    </tr>
    </table>
    <?echo $msg;?> </td>
    </tr>
    </table>
    <br>
    <font face="Verdana, Arial, Helvetica, sans-serif" size="1">don't use ;</font>
    </form>

    But your script is not outputing the result of the query. So how do we view the returned resultset.

  • SQLPlus COPY error: ORA-03114: not connected to ORACLE

    This is what I'm trying to do:
    I'm logged into an Oracle 8.1.6 database on a Windows 2000 Professional box and trying to copy data and tables from an Oracle 7.3.4 database on an HP/UX box.
    I log into my 8.1.6 SQLPlus as:
    scott/tiger@testdb
    Then I run the following:
    SQL> set copycommit 1
    SQL> set arraysize 1000
    SQL> copy from user/user1@devp1 -
    create reps_t -
    using -
    select * from reps_tThis is my error:
    ORA-03114: not connected to ORACLE
    Can someone give me a better understand how SQLPlus COPY works and give me an idea how to locate the problems.
    Thanks,
    Laith E.H.
    null

    I think this combination user/user1@devp1
    is not ok.
    U can get good material about copy command
    from technet itself. Just search for Copy

  • Save A Copy Command

    I've got an indesign files which is over 200MB, I used the "save a copy" command and the file size has reduced to 70MB, can anyone tell me why that happens? Thanking you!

    > which you could have used Undo to step backwards with...
    Not part of the file.
    Saving a 200 MB or larger file, especially over a network, can take a while and force you to pause, maybe up to a minute, when saving. Not only is that annoying, it's a disincentive to sae, which can be much worse than annoying. So InDesign saves your changes to the file, which are usually a very small amount of data relative to the file size. Save As when you're done with the file to get he size down.

  • 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

  • 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.

  • [svn:bz-trunk] 21277: Added ds-console source to package-oem and removed copy command for datavisualization .swc which doesn't exist in the specified location.

    Revision: 21277
    Revision: 21277
    Author:   [email protected]
    Date:     2011-05-18 11:35:28 -0700 (Wed, 18 May 2011)
    Log Message:
    Added ds-console source to package-oem and removed copy command for datavisualization.swc which doesn't exist in the specified location. I do not find it in the most recent package-oem.zip neither
    Modified Paths:
        blazeds/trunk/build.xml

    Gusar wrote:No, it's not. I have actually seen cases where software rendering gave a higher glxgears score than hardware rendering (and no, it wasn't about vsync). Of course, with *actual* apps on the same machine, software rendering sucked compared to hardware rendering.
    Please do not jump to conclusions and make assumptions here like 'when will people finally get it??'.  I never said it was a benchmark.  I have also seen many examples of where it's results do not go with conventional performance.  I have a Radeon 9000 that goes faster on glxgears than a Geforce FX 5600 running Nouveau.  Which is the faster card?  The FX by miles.  It is not a benchmark as it can not be compared between configurations.  What I know is that on this individual system, from prior experience over many years when 3D acceleration is working glxgears gets between 300 and 400 fps.  When it is not working it gets less than 10.  That is a fact but does not mean it is benchmarkable.  Yes, a Quake 3 timedemo (I have these numbers too and they very much correlate to glxgears performance for this system given just how slow it is) would be a benchmark but when it runs less than 0.1fps and even the 2D rendering means that navigating the menu is impossible, there just isn't the time to find out.  Hence if playing around with drivers on this system I would use glxgears to check that 3D acceleration is working but not to benchmark.  Glxinfo does not give you all this evidence.
    But to clarify, I wouldn't use glxgears as a benchmark, benchmarking is different and I do a lot of that too.

  • How to using sqlplus to connect and run command ?

    Hello,i have a small problem please help me
    I want to use sqlplus to connect and run command
    for example : sqlplus test/test@DB select sysdate from dual ;
    and then it will show data (sysdate) to screen
    what should i do ?
    Thanks

    kenshin19xx wrote:
    Hello,i have a small problem please help me
    I want to use sqlplus to connect and run command
    for example : sqlplus test/test@DB select sysdate from dual ;
    and then it will show data (sysdate) to screen
    what should i do ?
    Thanks
    bcm@bcm-laptop:~$ echo "select sysdate from dual ;" > now.sql
    bcm@bcm-laptop:~$ sqlplus user1/user1 @now
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 14 20:41:33 2011
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SYSDATE
    2011-12-14 20:41:33

  • Best way to replicate a directory share to a new Windows 2012 serv, keeping all permissions and timestamps the same?

    We have a legacy Windows 2008 R2 server, with a single network share on it, that was acting as a primary file share.   Inside the network share are about a dozen different folders (with subfolders) all with different permissions applied to them at the
    folder and file level.   
    I want to migrate/copy this entire directory structure to a new Windows 2012 Standard server, keeping all the timestamps, permissions, etc. exactly as they are on the old directory structure.  Both servers are part of the same single Windows 2008 R2
    domain.
    What would the best practice method for achieving this?  Using XCopy?   If so, what syntax would I want to use with the command to make sure I don't lose any permissions or change any data and timestamps during the migration?

    Hi 
    I recommend you use robocopy to accomplish it.
    Technet Guide for robocopy command:http://technet.microsoft.com/en-us/library/cc733145(v=ws.10).aspx
    Microsoft RoboCopy GUI tool. Tool
    link: http://www.myitforum.com/articles/15/view.asp?id=9433
    Note: Its always good test in test environment, before applying it to production servers
    Regards, Ravikumar P

  • 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

Maybe you are looking for

  • Stopped toll out of windows phone 7.8

    Hi...., I have seen on Nokia support site that there was a never firmware version available for all the previous generation of lumia ..... Now I heard that Microsoft has stopped rollout of 7.8 update ... But why ....please tell us ????? On the Nokia

  • Editing after Upgrading to Snow Leopard

    After upgrading to Snow Leopard, I get the following message whenever I try to edit a picture-including those that have been edited before: "Unreadable Files: The following files could not be imported. (The file is in the iPhoto Library)" At the bott

  • Operations on files with java

    Lo there, I am writing java application that writes web pages, but when i need to update the informaiton in files once the information is update in the database, to do this i want to delete all ".HTML" files in a folder and then re-create them... I a

  • How to change the Forms and Reports's NLS_LANG character set on OAS

    Hi, I'm having problems with the OAS10g's actual character set, when displaying a report made with Reports Builder 10g who has the letter "ñ" it displays "ñ " with a blank space at the final so i need to change this character set for one that suits t

  • Why won't my mail app on my iphone5 run

    One day I hit mail icon and mail wouldn't come up.......any ideas why or how to fix?