Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Quick and dirty way to compare table contents

Re: Quick and dirty way to compare table contents

From: stephen booth <stephenbooth.uk_at_gmail.com>
Date: Sat, 25 Feb 2006 23:56:17 +0000
Message-ID: <687bf9c40602251556q3f9567c8h@mail.gmail.com>


On 22/02/06, Bobak, Mark <Mark.Bobak_at_il.proquest.com> wrote:
>
> I think you need to have a conversation with your boss that goes something
> like this:
>
> "Hey boss, you can ask me to do something, or you can tell me how to do
> it....but you can't do both!" ;-)

I'm inclined to agree, although I know that sometimes it's just not possible.

>
> Ok, here's an actual attempt to answer your question:
> Spool contents of table to a file, compute md5 sum.
> Spool contents of other table to file, compute md5 sum.
> Compare md5 sums.
>

Could do that, there's plenty of utils out there (many of them free downloads) for calculating checksums. If your boss wants something programatic looking you can always encapsulate the calls to SQL*Plus to spool the files, the calls to the checksum generator and the check to see their they're the same into a shell script or even a PERL script. I do think that using diff would be better, checksums, by their nature, aren't 100% reliable as it's possble (but unlikley) that two different sources can give the same result.

You say, in an earlier mail, there's no database link. Can you create one? Even just for the duration of the script (create, do the check, drop)? That way you could use the minus set operator.

Stephen

--
It's better to ask a silly question than to make a silly assumption.

http://stephensorablog.blogspot.com/
--
http://www.freelists.org/webpage/oracle-l
Received on Sat Feb 25 2006 - 17:56:17 CST

Original text of this message

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