Blog PostsStatistics Feedback About Login  


Go

Blog Selection


Follow-up on comparing two Oracle schemas
4
Dimitri Gielis 25-AUG-2010 20:55

Over 4 years ago I wrote a blog post about software that helps you to compare two Oracle schemas. That post is accessed a lot and I still get questions about it, so I decided to write a follow up on that post as things change over time.

Comparing two Oracle schemas is still something I have to do regularly, e.g. if I want to compare a development, test and production instance after a deployment of an application.

Alongside Oracle Application Express (APEX), I use Oracle SQL Developer daily. They have a built-in Database Diff tool which works, but I tend to use other tools as well, as it’s hard with SQL Developer to see exactly what has changed. We built our own tool in APEX that compares schemas based on dbms_metadata, which we use when we have access only through the APEX interface. But when I can run things from my own system, I like to use Schema Compare for Oracle.

The people of Red Gate wrote a nice post on how to use their software, with screenshots and steps you can follow, so I won't repeat that. Instead I’m going to compare it against the Diff Tool built into SQL Developer.

Simplicity

The older I get, the more I can appreciate user-friendly software. That is something I try to do in the software I write myself, follow the KISS principle = keep it simple stupid.

For me software has to look good, ’be easy to use and do what it’s intended to do in an efficient way. If I want to compare two schemas I just want to follow a couple of steps:
1. Select my source and target database
2. Select the schema(s) I want to compare
3. Optional - select what exactly it should compare (tables, packages etc.)
4. Get an overview of the results
5. Produce synchronization scripts

Schema Compare for Oracle (SCfO)

Here’s how it works in Schema Compare for Oracle.

When you open Schema Compare you have to create or open a project.


It asks you for the source and target database you want to connect to and which schema you want to compare. An advantage in SCfO is that you can compare multiple schemas at once.
Another thing I found interesting was the option to compare against a Snapshot. You basically take a “picture” of your schema at a certain moment in time and compare against that. Very handy when you can’t access both schemas from the same location. Or if you develop applications and want to generate upgrade scripts, I see the use of snapshots too.

But let’s get further with the normal schema compare.

In SCfO you don’t select the objects first, you just hit the Compare Now button and SCfO starts to compare the whole schema directly. At first I thought, I don’t really want you to do that as you are doing a lot of work for nothing, but the more I used the tool, the more I appreciated it. To start a comparison is very easy and quick...

One thing I found handy as well is the Options tab, which allows you to define if the tool needs to ignore white spaces, storage clauses etc.


When we are happy with the options, we click the Compare Now button and we get a screen with the progress.


Once it’s finished you have a complete overview of the differences in both schemas.


I like this screen a lot as it has many more functionalities than you would first imagine. The filter (find box) is very handy to find some specific objects quickly. You can also sort by different things and just from the way it looks it is so easy to understand what is different in which schema and database! But the nicest thing is when you click on a row where there are differences. It shows you both versions and highlights the differences. No need for an extra tool or text editor to get that information out. It’s just there.


If you want to create an upgrade script or make both schemas equal you just have to use the Synchronization Wizard...

The wizard asks you what it has to do and generates a script for you or automatically synchronizes both schemas based on the objects you selected.


I think Schema Compare for Oracle does it really well. So let’s compare it to the comparison tools that come with Oracle SQL Developer.

Oracle SQL Developer

In SQL Developer you go to Tools - Database Diff.

The first time it will tell you it’s using Oracle Change Management, a payable option of the Oracle database, and you have to acknowledge you have a proper license to use that.


Next, it will pop up with a screen that allows you to select a source and destination connection and immediately asks you what objects you want to compare.


Clicking on Next shows you a screen where you can select the individual objects.
You can view all objects at once, or change the select-list to only see tables, sequences and select the objects that way. This might be a good thing to do if you have many objects!


Once you click Finish it will compare the objects and present you the result in a Diff Report.


You can click on the green SQL button and it will generate the script for you based on the differences you selected.

So it’s rather straightforward to compare two Oracle schemas in SQL Developer, but there are some things I would prefer a bit different.

This is my wish list:
1. Not be forced to have the Change Management license for your Oracle database. The price depends your Oracle Database license, but it can be high if you just want to compare two schemas through SQL Developer.
2. Be able to compare multiple schemas at the same time.
3. Get a cleaner Diff Report, which allows me to add filters to it and allows me to see what exactly is different between the two versions. At the moment I just see a count there, when I click on the row. I get the script to generate that version, but I couldn’t find a way to see exactly the source and target and compare them side-by-side.

Point 3 is my biggest issue and that is why I searched for something else that made my life easier and finally came across Schema Compare for Oracle. Although Red Gate created a Windows only version of Schema Compare for Oracle, so as a Mac user I need to run it through a VM, I find it worthwhile to do it. The interface of SCfO is very clean, it’s easy to use and it gives me most features I’m searching for. There is even a SQL Developer plugin for SCfO (search for Schema Compare for Oracle in the SQL Developer Plugin repository).

So is Schema Compare perfect and is it better in every aspect than the Diff Tool in SQL Developer? Almost, but not completely. SQL Developer supports the comparison of Materialized Views (and their logs) and Database links, which SCfO doesn’t do in the release I tested (1.3).The version of SQL Developer I used was 2.1. I’m not sure the Diff Tool in SQL Developer 3 (which will be released in a few weeks/months) will be different...

Happy comparison!
Show Comments (0)

Standard Screen Design Patterns
4
Scott Spendolini 25-AUG-2010 07:48

Very cool article, outlining some common & simple screen design patterns - for both web and desktop applications.  Be sure to check out the 2010 Update as well.

I always tell students in our training classes that they should not try to re-invent the design patterns used in most applications - especially since they are database developers and not graphic designers.  Users have come to expect specific things to be in specific places - login/logout in the upper left/right, a site map of sorts at the bottom of each page, tabs for navigation, etc.  Deviating from that expectation will likely create more confusion than anything else, and should be avoided at all costs.
Show Comments (0)

Google Goggles
4
Bradley Brown 24-AUG-2010 22:50

If you're interested in a very cool app from Google, check out Google Goggles!  This app allows you to take a picture of about anything and it finds the item so you can get more information or purchase the item.  In fact, you can barcodes for an app and it pops right up in the market! 

For example, this image will take you right purchasing Goggles:

Google Goggles
And if you want to purchase my Local Events app, you can scan this image (right from the screen):


Local Events

Show Comments (0)

149 Apps and Counting
4
Bradley Brown 24-AUG-2010 22:13

I've continued to work on my Android App library in my spare time.  I've been very happy with the results so far.  None of my apps are "killer apps" yet.  On average each app sells about 1 copy a day.  In other words, my revenue is about $150 per day.  Some apps haven't sold a single copy and others have sold a number of copies.  Not many of apps are over 50 sales overall.  To generate revenue reaching $1M a year (seems like a nice goal), I'd need to get my count up to about 4,000 apps...or...I need a killer app.

I think I'll strive for a killer app instead of the 4,000 app route.  My apps pull data from Yahoo, Google and a variety of other sources.  Yahoo has great content about events, places, and the like.  Google Base is Google's XML database.  It's a great repository of data about everything from reference articles, product reviews, company reviews, services offered, travel packages, vacation rentals, vehicles for sale, housing information (rentals and for sale), jobs, local products, household products, personal ads, product catalogs, products, course schedules, events, activities and more!  It's all great content, but how do people find my apps?  How do I drive people to my apps?  All fun challenges to try to solve.

I'm currently working on designing a number of killer apps.  I know they could be huge in the marketplace.  When I get them created and available in the market, you'll be the first to know.
Show Comments (0)

OOW Advice
4
Scott Spendolini 24-AUG-2010 17:31

Jeff Smith offers up some excellent advice for those traveling to OOW 2010.

As a more-than-I-can-count-time attendee of OOW, here's a few additions to his list:

  • Don't eat dinner anywhere near Moscone.  
    Sure, it's easy, especially after a long day or sessions, but most of San Francisco's best restaurants are not adjacent to Moscone.  Head to North Beach or the Marina instead.
  • Attend a session or sessions on something that you have never heard of.
    You don't know what you don't know...
  • Talk to strangers.
    As Jeff said, this is one of the best places to network.  If you don't talk, then you may as well catch the sessions online.  No where else will there be as many people with similar technical interests than OOW.
  • Don't jaywalk.  Seriously.
    The SFPD was giving out jaywalking tickets around Moscone the last couple of years, and I know a couple people who were "lucky" enough to get them.  Not fun.
  • Come early or leave late.  
    Take a day to explore not just San Francisco, but the surrounding area.  Often, airlines will give you a better rate if you have a Saturday night stay included in your ticket.  See if your company travel policy allows for reimbursing your hotel Saturday night if you can get a fare that makes the overall cost of the trip less.
  • Download TripAdvisor or Yelp to your smartphone.
    Either of these sites offer decent opinions of local restaurants and the like, and it's handy to have when you get a recommendation from a concierge.
  • Visit the Union Square Hyatt's Grandviews Lounge
    For a drink, dinner of only for the view.  Try to get there around sunset - you won't be disappointed!

Show Comments (0)

Oracle's Broken Links
4
Scott Wesley 24-AUG-2010 12:01

It seems that like me, people like Tim Hall are finding some of the changes regarding the amalgamation of sites within Oracle a little frustrating.

I've noticed many of the comments within OTN contain links to pages that just aren't there any more.

This OTN entry here mentions a vital link to
http://www.oracle.com/technology/products/database/application_express/howtos/how_to_create_custom_popups.html
which unfortunately redirects to the Oracle Apex overview page
http://www.oracle.com/technetwork/developer-tools/apex/overview/index.html

In an effort to find the contents of this page, I used my friend Google. I took a key part of the URL and used a special search facility that Google has:
inurl:how_to_create_custom_popups

This gave me three results

  1. The original document, which still redirects to the overview page. However, if you click the cached link next the described URL, you can open Google's cached version of the page - which should usually suffice.
  2. Some Xmarks widget, which didn't help me - but I do recommend Xmarks, by the way.
  3. A Japanese hosted version of this page. Google offered to translate it for me, which worked very well. This also solved my problem.

So until Oracle gets up to speed with all the older links, perhaps give the inurl: search option a go.

ScottWE

ps - congrats to Tim for his recent induction into the OakTable Network.
Show Comments (0)

Less is More
4
Scott Spendolini 24-AUG-2010 08:39

Spent a few minutes yesterday building my schedule for OOW.  Lots of sessions, and unfortunately, some of the good ones are already booked.  That didn't matter, as there were plenty more to choose from.

There's not a whole lot of APEX sessions this year - or at least ones that I have not already seen.  Thus, I'm going to focus more on other database technologies, such as security & performance.  Lots of sessions under that category.

My only gripe is that the Schedule Builder UI needs a major overhaul.  First off, you need a 30" monitor just to view all of the content on one screen - especially when you have the Advanced Search option enabled.   Also, I kept getting a "Search Timeout" error when I tried to search for sessions.  The only way to resolve this is to log out and log back in again.  Such basic functionality for a database conference should NEVER break, at least in my opinion...

The Schedule Builder also tries to use a lot of Ajax-type controls; lots of popup boxes and asynchronous stuff going on.  Maybe it works better in IE, but in Safari, it's a bit clunky.

This is part of the danger of using jQuery or similar Ajax-based technologies - without thorough testing on multiple browsers, the user experience may vary greatly.  This can often be mitigated when building applications that are used internally, as most organizations can lock down which browsers are allowed.  However, this is obviously not the case on the public Internet.

While the Advanced Search is more sophisticated and allows you to search by day, for instance, there is no Google-like interface to search all fields for a specific string.  There are two text fields - Speaker/Company & Free Text - that each search different parts of the content.  But if you're searching for a string, the system will AND these two fields together, producing a different set of results than you may expect.

It seems like too much attention was paid to adding features vs. thinking of a logical design for this site.  Some common things - such as the aforementioned Google-like search, a weekly view of the agenda, and a map of where each session takes place - all seem to be left out.

Hopefully this tool will be enhanced for future events and be made simpler and better at the same time.


Show Comments (0)

Who's next? Will it be Informatica?
4
Bradley Brown 23-AUG-2010 16:12

I posted the opportunity to be a part of the poll for Oracle futures and the results are now in - check them out at:

http://www.softwareadvice.com/articles/enterprise/oracle-mergers-acquisitions-whos-next-1080310/

Very interesting!!!!
Show Comments (0)

Customize the APEX Workspace Login Page
4
Peter Raganitsch 23-AUG-2010 08:26

One nagging thing about APEX occurs often to me. It’s the inability to customize the Workspace Login Page. In APEX Instances within corporations you may want to display your own Logo or some custom text explaining your developers what to do and what not. Some lines of javascript and jQuery to the rescue, i build a nice
Show Comments (0)

Patches
4
Iloon Ellen 23-AUG-2010 04:37

Application express
--------------------
For application express 4.0

For 3.2.1 or earlier installed

See: Joel Kallman his blog for details

Apex Listener
---------------
Apex Listener

Stand alone feature included.
Show Comments (0)

 1 2 3 4 5 6 7 8 9 10 








 
 
Blog Roll
  • APEXtras
  • Ahcene Bourouis
  • Andy Tulley
  • Anja Hildebrandt
  • Anthony Rayner
  • Anton Nielsen
  • Apex Blog
  • Apex dbe pl
  • Ben Burrell (Munky)
  • Bernard Fischer-Wasels
  • Bradley Brown
  • Carl Backstrom
  • Carsten Cerny
  • Carston Czarski
  • Christian Rokitta
  • Christopher Beck
  • Dan Durbaca
  • Dan Mcghan
  • David Njoku
  • David Peake
  • Denes Kubicek
  • Dietmar Aust
  • Dimitri Gielis
  • Dirk McComsey
  • Doug Gault
  • Douwe Pieter van den Bos
  • Duncan Mein
  • E-Dba
  • Eric Boissonneault
  • Evgeny Timoshinin
  • German APEX Community
  • Håvard Kristiansen
  • IAdvise
  • Ilmar Kerm
  • Iloon Ellen
  • Insum
  • Jason Aughenbaugh
  • Jason M.
  • Jason Straub
  • Jean-Phillipe Pinte
  • Jeff Holoman
  • Jeffrey Kemp
  • Joel Kallman
  • John Scott
  • Jon Trostheim
  • Jornica
  • João Oliveira
  • Kristian Jones
  • Learco Brizzi
  • Louis-Guillaume Carrier-Bédard
  • Marc Sewtz
  • Mark Lancaster
  • Martin B. Nielsen
  • Martin Giffy D'Souza
  • Matt Ball
  • Matt Nolan
  • Niels de Bruijn
  • Niels de Bruijn
  • Noel Portugal
  • Oracle Nerd
  • Oracle Quirks
  • Oradude
  • PL/GMaps
  • Patrick Wolf
  • Paul Brookes
  • Paulo Vale
  • Pawel Barut
  • Peter De Boer
  • Peter Manchev
  • Peter Raganitsch
  • Przemek Staniszewski
  • RCI
  • Roel Hartman
  • Rutger de Ruiter
  • Sara Blair
  • Sathish Kumar
  • Scott Spendolini
  • Scott Wesley
  • Stew Stryker
  • Sujay Dutta
  • Sumnertech Blog
  • Tobias Arnhold
  • Tyler Muth
  • Unknown APEX
  • Wei Zheng

    © Created and Hosted by Apex Evangelists