Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Copy tables accross.

Re: Copy tables accross.

From: Howard J. Rogers <howardjr_at_www.com>
Date: Wed, 15 Nov 2000 11:32:53 +1100
Message-ID: <3a11d9e7@news.iprimus.com.au>

Comments below.
HJR

--
---------------------------------------------------------------------------
Opinions expressed are my own, and not those of Oracle Corporation
Oracle DBA Resources:               http://www.geocities.com/howardjr2000
---------------------------------------------------------------------------


"Uwe Schneider" <us_at_webde-ag.de> wrote in message
news:3A117489.255B82C6_at_webde-ag.de...

> Florent wrote:
> >
> > Hi all.
> >
> > I hope you can help me with this problem. I am writing an application
> > that connects to an oracle database using ODBC.
> > I now need to have 2 databases one for test and one for production.
> > How can I copy from one database to the other?
> > I know the export/import function but I don't know the exact syntax to
> > use and I need to transfer everything, the data, the structure, the
> > indexes, the users etc.
> >
> > Can any one send me the syntax for the export/import function. And
> > would importing a database create the schema or do I have to create it
> > before I do the import.
> > what else do i need to do before i import the data?
> > I am using SQL plus.
> >
>
> 1. login on the source machine
> 2. (sourcehost) > exp full=yes
> 3. copy expdat.dmp to the target host by OS utils
> 4. login on the target machine with a fresh RDBMS (same version!)
> 5. (targethost) > imp full=y
>
> On the target db you have to prepare the tablespaces before importing.
> Users and all objects are created automatically.
>
>
Not actually true. The very first set of commands in the dump file is a whole bunch of 'create tablespace xxx...' statements, so a full import *can* actually do that for you. The only problem is that the full path to the datafiles associated with those tablespaces is also included -and of course you can't edit those paths. Still, if this is a different server, it's possible that the old paths are perfectly legitimate. Still, I guess for a quiet life most people do indeed create their tablespaces by hand first. Regrettably, it's important to make sure you name the tablespaces *exactly* the same as in the source database, otherwise the entire set of database objects are liable to end up being created in the SYSTEM tablespace. Oooops. Regards HJR
> Uwe
>
> --
> Uwe Schneider - WEB.DE AG - Amalienbadstr. 41 - 76227 Karlsruhe
> F&E / Database Technologies - Tel. (+49) 721 94329 832
> "In a world without walls and fences, who needs windows and gates?"
Received on Tue Nov 14 2000 - 18:32:53 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US