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: Recipe for test DB

Re: Recipe for test DB

From: Jerry Gitomer <jgitomer_at_hbsrx.com>
Date: Thu, 26 Aug 1999 10:01:22 -0400
Message-ID: <7q3id9$12e$1@autumn.news.rcn.net>


Hi Richard,

My comments are inline

Richard D Core wrote in message ...
>I want to create a smaller version of my production DB for
testing some
>middleware.
>
>I have a full export of my production db (and a user export).
>
>Can I use crdb<newsid> scripts to create a small db then Import
into it?

Yes.
>
>What are the exact steps?

  1. Create the database -- Use the crdb<newsid< script for this
  2. Create the tablespaces -- Base it on the script you used for your production data base Modify the names and sizes of the datafiles. Modify the default storage clauses for each tablespace Leave everything else the same so that you won't have to make changes in code when you move from test to production.
  3. Create the tables -- Use the script that you used to create the tables in the production system (Assumption -- you are using the default storage sizes from the tablespaces -- if not change the storage clause in each create table and create index statement)
  4. Create a database link from your test to your production data base
  5. Load the tables -- you can use export and import but they assume you are loading everything. I prefer to create a test database using the following syntax:

    For tables that are to copied in full:

        CREATE TABLE table_name AS SELECT * FROM table_name_at_production_database_name;

    For tables for which you only want a subset

        CREATE TABLE table_name AS SELECT * FROM table_name_at_production_database_name

        WHERE condition;

>My process fails to give me any user tables and data.

    Mine does, just created a test database and started populating it last week. ;-)
>
>I found some rather complicated tech notes on the Oracle
Metalink site, but
>can't seem to end up with a working DB with the tables and data
I want in
>it.

>
>Rich

Regards
Jerry Gitomer Received on Thu Aug 26 1999 - 09:01:22 CDT

Original text of this message

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