RE: Constraints problem

2002-08-27 Thread Richard Huntley
Title: RE: Constraints problem





You can simply export, then import the tables...making sure you use fromuser/touser,ignore=y,rows=n
Since the table is already there and rows=n, the table will not be rebuilt and the constraints will
be added, but you have to make sure that ignore=y or the import will fail stating the object already exists.



-Original Message-
From: Karthikeyan S [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 24, 2002 7:13 AM
To: Multiple recipients of list ORACLE-L
Subject: Constraints problem



Hi, 


I had to copy a set of tables with data from one schema into another. 
I did this by using "create table  as select * from master_schema.table_name; 
But the constraints ( primary key, foreign key  etc)  are not created in the test schema. 
Is there any way to implement all the constraints (in the master_schema) into the test schema? 
    
Thanks in advance. 


regards,
Karthik 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Karthikeyan S
  INET: [EMAIL PROTECTED]


Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California    -- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).





Re: Constraints problem

2002-08-24 Thread Dale

Hi

> I had to copy a set of tables with data from one schema into another.
> I did this by using "create table  as select * from
master_schema.table_name;
> But the constraints ( primary key, foreign key  etc)  are not created in
the test schema.
> Is there any way to implement all the constraints (in the master_schema)
into the test schema?

Grab the freeware DBATool. It can generate schema DDL scripts and can easily
generate the recreation scripts for all dependent objects on a table
(indexes, fk constraints, synonyms etc). The DBATool is specifically
designed to create test schemas and allows you to manipulate the schema DDL
in useful ways (fold many tablespaces into a smaller number, strip off or
modify extent and storage clauses etc).

DBATool: http://www.DataBee.com

Regards
Dale Edgar
Net 2000 Ltd.
[EMAIL PROTECTED]



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).