Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I really enjoy your site. You have a lot of helpful and friendly experts who contribute so willingly. Thank you for past (and future) technical advice..."

Geography

Where in the world do Tek-Tips members come from?
thermidor (Programmer)
9 Jun 09 17:42
What is the best tool and/or technique to compare between a Dev and a Production DB? I need to migrate objects from Dev to Prod, but I only want to move objects that have changed.

TIA,
Sven
carp (MIS)
9 Jun 09 18:10
The best method I have found is to set up a DB link from one database to the other, then compare their definitions in the data dictionary.

If your Dev DB is a clone of your Prod DB, then you can look at things like the last DDL date.  If that does not work for you, then for tables, you may want to compare the contents of dba_tab_columns.  For code objects, I use dba_source.

An example might be as follows (assumes you are running this from your Dev DB):

CODE

SELECT d.line dev_line, p.line prod_line,
       d.text dev_text, p.text prod_text
FROM dba_source d
   FULL OUTER JOIN dba_source@PROD p
   ON d.line = p.line
      AND d.owner = p.owner
      AND d.name = p.name
      AND d.type = p.type
WHERE d.name = 'MY_PACKAGE'
  AND d.owner = 'ME'
  AND d.type = 'PACKAGE BODY'
  AND (d.text != p.text
       OR d.text IS NULL
       OR p.text IS NULL);

If no rows are returned, then the objects are identical.
Turkbear (TechnicalUser)
9 Jun 09 20:38
Hi,
There is this:

http://mac.softpedia.com/get/Developer-Tools/oracompare.shtml

Also see if something like T.O.A.D. can do that as well...

http://www.toadsoft.com/toad_oracle.htm

profile

To Paraphrase:"The Help you get is proportional to the Help you give.."

Thargy (TechnicalUser)
10 Jun 09 3:14
sql developer has a schema comparison tool, which will do what you want.

TOAD also has such a tool, and automatically generates a script to make one schema the same as the other.

I'm not sufficiently familiar with sql developer to know if it too can produce such a script, but since it's free, I suggest you download a copy and have a look.

Regards

T

thermidor (Programmer)
10 Jun 09 9:04
Thanks all for the great info!

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close