Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Posts
    119

    Unanswered: Differentiating between two Schemas

    Hi,
    Is there anyway to differentiate between two schemas between two SQL server instances?

  2. #2
    Join Date
    Nov 2003
    Posts
    167
    Would depend on what you mean by "differentiating." While I haven't tried this with two instances on the same server, I've often created linked servers across two different servers so I can reference them with the linked server syntax. For instance - to find records in a prod table that don't exist in a dev table:

    Code:
    select       *
    from         [SERVER1].[DBNAME].[SCHEMA].[OBJECTNAME] x left outer join 
                 [SERVER2].[DBNAME].[SCHEMA].[OBJECTNAME]y on x.id=y.id
    where        y.id is null
    Last edited by onansalad; 12-12-11 at 11:58. Reason: code error
    Kit Lemmonds

  3. #3
    Join Date
    Nov 2011
    Posts
    8
    If you are looking for differences in schema definitions, I'd use a third party tool. The Red Gate SQLCompare is what I've used with good results. It will generate the scripting needed to sync the schemas, too.

Posting Permissions

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