DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: dba_constraints script

  1. #1
    Join Date
    Oct 2000
    Posts
    449

    dba_constraints script

    Hello DBAs:

    I have a production system with all constraints required on the system and want to duplicate the effort in Development system.

    I am looking for a script that can extract code "alter table" statements from Production. I am looking for only Primary and Foreign key constraints and not Check and not null constraints..

    I am looking into dba_constraints and dba_cons_cols to achieve this, but if anyone has more ideas, would appreciate it..

    Thanks, ST2000

    ~

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    version of oracle?

    dbms_metadata might help you if on 9i

  3. #3
    Join Date
    Oct 2000
    Posts
    449
    I am on 8i and I need a script to extract data..

    Thanks, ST2000

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    use export/import

  5. #5
    Join Date
    Oct 2000
    Posts
    449
    Pando, I want to know what are the constraints that are not existing in DEV but exists in Production.. Also there could be some tables in production that are not in dev and vice-versa..

    Thanks, ST2000

  6. #6
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    create db link between them and compare

  7. #7
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    Go www.google.com and serach and download a nifty tool called oracompare.com.It does exactly what you are asking for.

    regards
    Hrishy

  8. #8
    Join Date
    Oct 2000
    Posts
    449
    Pando.. I am NOT only looking for the script to compare betn the Prod and Dev.

    I will create DB links in the process.. DB Links only gives me access to the other database from one environment and with a select, I can list the differences between the tables, I can use outer join, but i am looking for a script to generate "alter table add constraints" from selecting from the 2 databases.... (select statement concatinating with alter ....)

    Thanks, ST2000

  9. #9
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    Sanjay G.
    Oracle Certified Professional 8i, 9i.

    "The degree of normality in a database is inversely proportional to that of its DBA"

  10. #10
    Join Date
    Oct 2000
    Posts
    449
    Thanks Sanjay.. This script is all in one.. I shall start on this..

    ST2000

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width