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: Copying to a test database

Re: Copying to a test database

From: DET <none_at_i_hate_spammers.com>
Date: Mon, 21 Sep 1998 08:34:03 -0700
Message-ID: <6u5reu$nee@netaxs.com>


You can create a link to the test database from within the live database, or you can create a link to the live database from within the test database (my preference).

For instance, in the test db:

create public database link link.to.live.db using 'entry.in.tnsnames.ora';

or

create database link link.to.live.db connect to user.id.on.live.db identified by user.password using 'entry.in.tnsnames.ora';

The first example creates a link that connects you to the live db using whatever user id you are logged in as on the test database. The second example forces the connection to be made as a specific user id. But in this case, the link is only available to whatever user id created it (i.e. it isn's a public synonym).

Once you've done this, you can copy over files using something like

insert into tablename ( select * from tablename_at_link.to.live.db );

DENNIS WILLIAMS wrote in message
<01bde34c$20d39a00$f96916ac_at_williams-dennis>...
>I am setting up some test databases and my users have asked me to move all
>the data from production. Someone told me that you could simply copy the
>Oracle files to the test instance, but they didn't know the specifics of
>how this was accomplished. Has anyone done this? What are the restrictions
>- must I copy the entire instance, or is there a way to do a datafile at a
>time?
>
>Dennis Williams
>DBA
>Lifetouch, Inc.
>612-826-5543
>dwilliams_at_lifetouch.com
Received on Mon Sep 21 1998 - 10:34:03 CDT

Original text of this message

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