Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!uunet!munnari.oz.au!uhccux!larned From: larned@uhccux.uhcc.Hawaii.Edu (Paul Larned) Newsgroups: comp.databases Subject: Re: Duplicated tuples problem (Oracle/SQL) Summary: possible solution to duplication problem when reinitializing Oracle database Message-ID: <10827@uhccux.uhcc.Hawaii.Edu> Date: 4 Jan 91 21:37:04 GMT References: <772@keele.keele.ac.uk> <775@keele.keele.ac.uk> Organization: University of Hawaii Lines: 34 >Indeed. Spot on. Let me describe the scenario, as there may be a clever >way of solving a specific problem which does not have a general solution. >Our DBA, who has only been a DBA for a few months, was given the task of >enlarging the storage space for our DB. Having looked in the DB manuals, >he decided that the easiest/safest way to do this would be to export all >the tables and their associated data, and then replace the old DB with a >new and larger version. >When setting up the new DB, he included all the system tables and data. >He then imported the old tables and data. This meant that some of the >system tuples were loaded twice. So when doing, for example, a 'help' >each help topic appears twice. At this point our DBA asked for help. He >spent three days going through the process above, and does not wish to do >so again. So I posted the query here, as it seemed like an interesting >problem. I have also run into this problem attempting to enlarge the database. I found that the problem was due to the order in which they asked you to run catalog.ora and perform your dataimport. If you run catalog.ora first, as they suggest, you will create the system tables and insert the data. Then, when you do your data import, those tuples will be appended a second time. If, however, you import your data first, the system tables will be established. Then, when catalog.ora runs, it first deletes the system table if it finds it, then recreates it. In this way, you get all the system tables, but withough duplicate tuples. I would suggest that you start over and reinitialize. It's easier than trying to find all the duplicates. Paul Larned HI State Dept. of Health larned@uhccux.uhcc.hawaii.edu