exp/imp with sequential primary key table.

Hello

I have a general question about EXP/IMP a table with primary key sequence. I need exp rows in this table of 11g DB and their imp to 9i DB. This table is the same on 11g and 9i. Table 11g is updated daily. I want to import lines which are the only new records to 9i to expedite the process. As this main table of the key is sequential, I intend to export with where table_key > N, N is the max of last importing table_key and then proceed to import on this dump file. Don't you see any problem doing it this way?
Your expertise is greatly appreciated!

Hello

I have no problem at all.
If you do not forget to use the 9i export tool, then you should be OK
Also a full table export and import with ignore = Yes will ignore the records that violate the primary key and import only new records.
However, it is not a very clean way to do it.

Success!
FJFranken

Tags: Database

Similar Questions

  • Generate no sequential primary keys

    Is there a simple way to generate non sequential primary keys? For example, let's say I want to generate a user ID. I wish that all ID unique, but not strictly sequential.

    What you could do is pre-generated keys that distribute you randomly.
    for example
    fill a table with a sequence and assign a rowno to each generated key.

    Then, you use trunc (dbms_random (1, total_rows)) to select a line and use the sequence_no associated with this line and also to replace the key selected with the next sequence_value.
    This means that even if the same rowno is selected, he will have a different value whenever it is selected.

    In this way, you select pseudo random keys.
    Pre-generate more you the lines, more random data seem to be.

  • Another user changed the row with a primary key oracle.jbo.Key]

    I see many discussions about this error, but still cannot understand the difficulty that I need in my scenario.

    I am an Oracle Developer and completely new to ADF, please bear with me.

    I use JDeveloper 11.1.1.9.0

    My scenario:

    Creates an object editable view (UVO) with sub selects in the query, which is from several db tables.

    Creating a table using the UVO

    When I try to update a field in the table, and then click the validate, I get the error message:

    Another user changed the row with a primary key oracle.jbo.Key]

    Can someone explain in what scenarios I see this error and how do I solve this problem?

    Try the viewObject execution after validation and reQueryOnCommit set to true

    For details see - binary: a reason more for "Houston-25014: another user has modified the line containing oracle.jbo.Key primary key '

    Ashish

  • Update line programmatically with Composite primary keys

    Hi all

    I use JDeveloper 11.1.2.4.0,I want to update the program with two primary keys PK1_ID and PK2_ID line

    When I have a primary key I can do it by:

    /////////////////////////////////////////////////////

    Key = new key (new Object() {empid});

    Employees1ViewImpl vo = (Employees1ViewImpl) this.getEmployees1View1 ();

    Locate the line using key reference in the View object.

    Line k = vo.getRow (key);

    using this method, we can set the new FirstName

    k.setAttribute ("FirstName", "Vero");

    this.getDBTransaction () .commit ();

    ///////////////////////////////

    Is it possible to use the same code with more of primary key?




    Kind regards

    The key class contains an array of attributes that identify the line you're looking for. In your case, the key has two attributes

    Key = new key (new Object() {pkId1, pkId2});

    the rest of the method works as what.

    Timo

  • Problems with the primary key of the query string

    Moving from asp to php, to work with David Power's book: The Essential Guide to Dreamweaver CS4 with CSS, AJAX, and PHP.  Recycling of my brain, so starting from scratch in the learning process.

    Everything was going perfectly until I tried to add the primary key of a record in a query string.  I compared my code with the example code for the book, and everything matches.  When previewing the page in my browser and hover over the link which must pass the main code on the next page, the query string does not appear correctly.  It shows user_id = but no figure shows, as it is supposed to.  www.webpage.com/update_user.php?user_id=

    Here is my code: (Please note, <>have been removed, as I was unable to find a way view the code in the correct way here (copy/paste was doesn't work do not, nor insert syntax))

    ? PHP {?}

    ? PHP echo $row_listUser ['family_name'];? PHP echo $row_listUser ["FirstName"];?

    ? PHP echo $row_listUser ['username'];?       ? PHP echo $row_listUser ["admin_priv"];?

    a href = "update_user.php? user_id =? php echo $row_listUser ['user_id'];?" "Edit / has

    a href = "delete_user.php? user_id =? php echo $row_listUser ['user_id'];?" ' Delete / has

    ? PHP} while ($row_listUser = mysql_fetch_assoc ($listUser));?

    Any ideas that could help me understand why this part does not in particular would be greatly appreciated.  Writing to the database worked perfectly, I see that there are numbers in the database as user_id, and it is defined as my primary key in the configuration database.  Such a simple process that is causing me headaches!

    Thank you

    You have the code to request a copy in your folder:

    $query_listUser = 'SELECT user_id, username, first_name, family_name, admin_priv from users ORDER BY family_name ASC';

    $listUser = mysql_query ($query_listUser, $connSCFDIR) or die (mysql_error ());

    $row_listUser = mysql_fetch_assoc ($listUser);

    $totalRows_listUser = mysql_num_rows ($listUser);

    $query_listUser = 'SELECT username, first_name, family_name, admin_priv from users ORDER BY family_name ASC';

    $listUser = mysql_query ($query_listUser, $connSCFDIR) or die (mysql_error ());

    $row_listUser = mysql_fetch_assoc ($listUser);

    The $listUser table will contain the results of the second query, which does not include the field user_id. delete the redundant code.

  • Problem with the primary key and indexes

    Hi all

    I'm looking a mess on one of our main tables.
    One of the developers here added an index on 3 columns in the table, thinking that it would speed up (not noticing that it had not a PK).

    Subsequently another developer has noticed there do not have a primary on key. So they added a touch of primry on the single column.

    The problem is that now the index created on 3 columns is bein used as the primary key index. As when the primary key is created a new index was not created.

    Is there anyway to get rid of this index/change it correct?

    This table is related to many many other tables, so when we tried to remove the index we could not due to the primary key and foreign key violations with other tables.

    Thanks in advance

    Oracle, as you found, is quite capable to use a column enformce multi index a single column primary key, as long as the pk column is the leader in the index. This should not cause performance issues for a search of PK and if the three indexed columns are often selected only may benefit from these types of queries.

    The only way to change that now, would be to drop all CF, drop and add the PK constraint and then add all the FK constraints. A long time and potentially dangerous (if you miss to add back of the FKs) endeavour. Certainly not worth the risk in my opinion.

    John

  • Problem with the primary key

    Hi all
    I have a table with the same data repeat 2 times. I mean that the lines are depating twice. so now, I create a primary key for the table. He throws me an error saying voilation key primary. I'll give you the clear script.

    create table employee)
    ID VARCHAR2 (4 BYTE) NOT NULL,
    First name VARCHAR2 (10 BYTE),
    VARCHAR2 (10 BYTE) last_name,
    START_DATE DATE,
    End_date DATE,
    Number (8.2) of salary.
    City VARCHAR2 (10 BYTE),
    Description VARCHAR2 (15 BYTE)
    )


    insert into employee values ('01', 'Jason', 'Martin', to_date('19960725','YYYYMMDD'), to_date('20060725','YYYYMMDD'), 1234.56, 'Toronto', 'Program');
    insert into employee values ('02', "Alison", "Mathews', to_date('19760321','YYYYMMDD'), to_date('19860221','YYYYMMDD'), 6661.78, 'Vancouver', 'Tester');
    insert into employee values ('03', 'James', 'Smith', to_date('19781212','YYYYMMDD'), to_date('19900315','YYYYMMDD'), 6544.78, 'Vancouver', 'Tester');
    insert into employee values ('04', 'Celia', 'Rice', to_date('19821024','YYYYMMDD'), to_date('19990421','YYYYMMDD'), 2344.78, "Vancouver", "Manager");
    insert into employee values ('05', 'Robert', 'Black', to_date('19840115','YYYYMMDD'), to_date('19980808','YYYYMMDD'), 2334.78, 'Vancouver', 'Tester');
    insert into employee values ('07', 'David', 'Larry', to_date('19901231','YYYYMMDD'), to_date('19980212','YYYYMMDD'), 7897.78, 'New York', 'Manager');
    insert into employee values ('06', 'Linda', 'Green', to_date('19870730','YYYYMMDD'), to_date('19960104','YYYYMMDD'), 4322.78, 'New York', 'Tester');
    insert into employee values ('08', 'James', 'Cat', to_date('19960917','YYYYMMDD'), to_date('20020415','YYYYMMDD'), 1232.78, 'Vancouver', 'Tester')
    insert into employee values ('07', 'David', 'Larry', to_date('19901231','YYYYMMDD'), to_date('19980212','YYYYMMDD'), 7897.78, 'New York', 'Manager');
    insert into employee values ('06', 'Linda', 'Green', to_date('19870730','YYYYMMDD'), to_date('19960104','YYYYMMDD'), 4322.78, 'New York', 'Tester');


    The table is now with 10 columns

    ID FIRST_NAME LAST_NAME START_DAT END_DATE SALARY CITY DESCRIPTION
    ---- ---------- ---------- --------- --------- ---------- ---------- ---------------
    Jason Martin 25 July 96 01 25 July 06 1234.56 Toronto programmer
    02 Alison Mathews 21 March 76 February 21, 86 6661.78 Vancouver Tester
    03 James Smith December 12, 78 March 15, 90 6544.78 Vancouver Tester
    04 Celia rice 24 October 82 21 April 99 2344.78 Vancouver Manager
    Robert Black 05 January 15, 84 8 August 98 2334.78 Vancouver Tester
    Linda Green 06 July 30, 87 January 4, 96 4322.78 tester of New York
    Manager of New York 07 David Larry 31 December 90 February 12, 98 7897.78
    08 James Cat 17-AUG-96 April 15 02 1232.78 ester of Vancouver


    Create a primary key for the table

    "Employee to ALTER TABLE PRIMARY KEY (ID, First_Name, Last_Name, start_date, end_date,
    Salary, city, Description); »

    I get error voilation primary key

    IS IT POSSIBLE TO CREATE THE KEY PRIMARY ON THE TABLE WITH ON THE DELETION OF THE DATA?
    Is IT POSSIBLE CREATING PRIMARY KEY USING 'GROUP BY' FUNCTION or OTHER FUNCTIONS?

    Published by: user11872870 on September 23, 2010 17:41

    Primary key columns cannot contain NULL values. If you tried to create a primary key constraint, you will get an error like this:

    ERROR at line 1:
    ORA-01449: column contains NULL values: cannot alter to NOT NULL
    

    However, you can add a unique constraint by doing something like the following:

    ALTER TABLE test ADD CONSTRAINT test_unq UNIQUE (column1, column2);
    

    I still wonder why you take the approach you take. I have a vague feeling that're missing us the key pieces of information to recommend the correct solution.

  • MySQL Insert with autoincremented primary key

    I did not before MySQL.  I try and hit a roadblock soon enough.

    I would like to insert new records and have the auto-generated primary key / auto-increment.

    So, I have attached a few screenshots.  The first is a screenshot of the MySQL settings for the table that I'm writing.  The second is the Labview code that I threw as well as I am trying to run.

    The complete of the error I get is:

    > Database Connection.viADO error: 0x80004005
    Exception occurred in the Microsoft OLE DB provider for ODBC drivers: [MySQL] [ODBC 3.51 Driver] [mysqld - 5.7.11 - log] field 'techniciansID' didn't is not a default value to create a NI_Database_API.lvlib:Rec - Command.vi-> NI_Database_API.lvlib:Cmd Execute.vi-> NI_Database_API.lvlibData.vi B tools insert-> Connection.vi in the database

    I know that this error indicates that the techniciansID has no default value and he won't write because of it... but since it is an AutoIncrement field, it seems like it should work.

    Any help would be appreciated.  Thank you

    Thad

    Setting to 0 did not work, but I understand it.  For some reason any when I was refreshing my tables in MySQL server and using the "Forward Engineer" feature, the changes were not multiplication.  I had to drop the schema of the database (attached image) and then do an "engineer forward."  I made the changes, but the tables and the columns still had the attributes of origin... guess they cannot be updated by the script during execution.

    After doing this and the original settings I had (autoincremented primary key), the insert works in MySQL and Labview.

    Thanks for all the answers.  They made me think and check some things I didn't have before.

    -Thad

  • Oracle 11g: problem with disable primary key

    Hello
    I have this problem:

    I performed "EXECUTE IMMEDIATE"ALTER TABLE your table of KEY PRIMARY DISABLE";"

    This operation returns an error
    but when I did 'insert into table... ". »... Oracle returned ora-0001.

    The operations are in the same stored procedure, so in the same session.

    Database: Oracle 11.2.0.2

    How is that possible?
    All solutions?

    Thanks in advance.

    Best regards.
    Alessandro Zenoni

    Try to add 'DROP INDEX' to your disable command.

    not tested

    alter table xy disable primary key drop index
    
  • Large partition table with the primary key referenced by several child tables

    I tested this procedure and it works perfectly. Although when children tables refer to the key column, after execution of dbms_redefinition.finish_redef_table they all are referring to table exercised. In test I deal forced FK droped on tables children and recreated them. What could be the best way to do this in this scenario?

    Thanks for all comments/opinions!

    Are you sure? You should end up with the original FK constraint (disabled and renamed to have a prefix of $$ TMP) pointing to the staging table (which is of course the famous original table), and allowed a new constraint with the correct name, pointing to the new version of the table. so all you need to do to bring order to the top is to remove the constraint of renamed.

    This running-in of the SCOTT schema clearly indicates:

    create the table deptint in select * from dept where 1 = 2;

    exec dbms_redefinition.start_redef_table (user, 'dept', 'deptint')

    n number of var

    exec dbms_redefinition.copy_table_dependents (user, "dept', 'deptint', DBMS_REDEFINITION.") CONS_ORIG_PARAMS, TRUE, TRUE, TRUE, TRUE,: n)

    Print n

    exec dbms_redefinition.finish_redef_table (user, 'dept', 'deptint')

    Select CONSTRAINT_NAME, CONSTRAINT_TYPE, TABLE_NAME, user_constraints STATE;

  • EXP/IMP with NCLOB/BLOB

    Hi all

    I have to pass a schema from a database, to another recreated as the first (same name scheme, same rights, same tablespace, anyway) are both Oracle database 11.2.0.2 business 64-bit on linux 64. Is there any exam I have to take, given that the object with NCLOB and BLOB types... I tried export and it went ok with no problems, buy it will be any issue when I import it on the second database?

    All this is to change the server of the database of the physical now, it is a virtual (LMOS).

    Thanks for your help!

    Yes, it won't be problem in - expdp use impdp to NCLOB or BLOB data.

  • Need to create a new line in the table with the same data as the primary key, but new PK

    Hello gurus,

    I have a table with a column as a primary key, I need to create a new row in the table, but with the same data in one of the lines, but with different primary keys, focus a double row with key primary diferent...

    Any ideas of how it can be done without much complication?

    Thanks in advance for your answer.

    Agress,
    Karim idrissi

    user9970447 wrote:
    Hello gurus,

    I have a table with a column as a primary key, I need to create a new row in the table, but with the same data in one of the lines, but with different primary keys, focus a double row with key primary diferent...

    Any ideas of how it can be done without much complication?

    Thanks in advance for your answer.

    Agress,
    Karim idrissi

    something like

    insert into mytable values ('literal for new pk',
                                           select non-pk-1,
                                                    non-pk-2,
                                                    non-pk-n
                                           from mytable
                                           where pk-col = 'literal for existing pk')
    
  • Great advice table no primary key on the table.

    Dear gurus,

    Version: Oracle 11.2.0.3.0 running on Linux HAVE 6.

    I have a big standard table (400 million lines) which is a data dump, it was created with no primary key Yes crazy but it happens (very rare).  I have a few key columns indexed for the purpose of the motion, but I would like to know what are the options I have different indexing on a table to make it more efficient for running a query against it.

    Looking for simple opinion where further research.  I won't not give an example of the table structure - neither include the details, I'm looking for advice.

    Easy points for everyone.

    Thank you.

    Content

  • Adding primary keys with javascript.

    I have a database that has no metadata.

    We have the primary key definitions in an external system.

    The primary key information are easy to get.

    I want to update the relational model (and display) with the primary key information.

    Is it possible to update the primary key of infromation in the model of the relationship of Javascript?

    Hello

    You can try to settle for your use:

    // get table name
    tname = ...;
    //get pk name
    pkname = ....;
    table = model.getTableSet().getByName(tname);
    if(table !=n ull){
    index = table.createIndex();
    index.setName(pkname);
    index.setPK(true);
    // get column name - should iterate in case of multi column PK
    cname = ...;
    column = table.getElementByName(cname);
    if(column != null){
      index.add(column);
    }
    table.setDirty(true);
    }
    

    Philippe

  • exp/imp only a few records in the table

    Hello
    Exp/imp few records in my table during the activity level exp/imp table is possible?
    If so, what setting should I be using
    For example,.
    I have 10000 records in my narration of the table "TEST_TB".
    I have the dump full exp for the table.
    But I want to just imp only 50000 records from the same table in another schema.
    How would it be possible?
    Please suggest me on this

    Kind regards
    Faiz

    Hello

    It seems not possible to limit the number of rows that is imported, but it is possible to limit the number of rows exported with the query parameter, found examples
    http://www.orafaq.com/wiki/Import_Export_FAQ
    http://docs.Oracle.com/CD/B28359_01/server.111/b28319/exp_imp.htm#autoId52

    HtH
    Johan

Maybe you are looking for

  • NSDistributedLock

    I have some command line Interface (cli) applications that use a common resource of USB (CAN interface a komodo).  They both want to have access to the device, so I need a locking mechanism. each cli application is independent and is not related to t

  • Toshiba virtual Store account Reset - 20998

    Hello Please reset my account 20998.

  • Update on Satellite L850 HARD drive

    Hello I bought Toshiba Satellite L850-A846 already for several months and my hard is completely filledand the cause of the nature of my work, I can't buy an external hard So I wonder if I can replace my hard intern (640g) with (2 t)I don't know my mo

  • estimate the frequency of resonance sweeping the frequency of 100 Hz to 500 Hz

    Hello In fact, I need to make the open-loop system to vibrate the structure of 100 Hz to 500 Hz to find the resonant frequency. I tried to create the code that allows to operate (excited) structure and measure the fron of the sensor (capacitive senso

  • Error code 80070652

    Help, please.  I get the error code 80070652 when it receives windows updates and then some updates fail.  I also get a blue screen and restart when you try to download and install a new version of McAfee.