RE: Tablespaces comparison

From: Mark W. Farnham <mwf_at_rsiz.com>
Date: Wed, 2 Apr 2008 14:56:28 -0400
Message-ID: <090401c894f3$4595ad20$1100a8c0@rsiz.com>


Now you could be asking a really interesting question, depending on what you mean by identical.

Consider for example that you set up two servers that are actually identical except for the server names and ip addresses. Then you create a database on each from identical scripts, and the scripts are run single threaded. Then the servers, with no user data yet, might still be identical.

Now let's consider that you pipe the data out of all applications through a fork that applies the sql changes to both servers. Variability in network actions and tie-breakers being what they are, while the logical contents should be the same, very likely the segment extent maps will drift apart and depending on what you mean the servers will no longer be "identical."

You also have the issue of how the underlying disk storage is constructed on each server. Just from the database, you can get down to blocks of files, but you can't see how the files are constructed on the underlying media.

Presumably you also don't mean that the precise contents are identical, even though in this example they should be, at least within the variability of a reasonably small time slice, because likely there is no synchronous commit between the two servers (although you could do that with two phase commit.)

But if you are indeed just talking about the schema structures and such, then you can pretty much get it from dba_objects, dba_segments, dba_extents, and dba_data_files. If you have user defined types, packages, procedures, and functions, you may want to dig a litter deeper. (Is a server the same if it has different program functions? I don't think so.)

If you're just comparing segments to tablespaces, you can dig up a copy of extmon somewhere and diff the text outputs. At least that will give you the differents in a reasonably nice semblance of order.

Regards,

mwf

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Zakai Kinan
Sent: Wednesday, April 02, 2008 1:49 PM
To: Mayen.Shah_at_lazard.com
Cc: oracle-l_at_freelists.org; oracle-l-bounce_at_freelists.org Subject: Re: Tablespaces comparison

Is there a better way to do this on two different servers that are supposed to be identical?

Thx

\ZK

<snip>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Apr 02 2008 - 13:56:28 CDT

Original text of this message