Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    2

    Unanswered: Comparing databases MS SQL2000/2005

    Hello,

    I am working on an application that will be used to compare databases on several servers. I need to compare tables, views, stored procedures, functions and triggers, but only those used for replication. Comparing tables is pretty easy, as sysmergearticles table contains objects with ids of every table used for replication, but it does not contain data about functions, stored procedures and views (all records in sysmergearticles have type = 10, which indicates that it's a table object). Where can I find data about them?

    Best regards,
    Przemek

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    All these objects and their metadata can be found in the system tables. Look them in in books online, starting with sys.procedures.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Jan 2009
    Posts
    2
    Hello,

    Thank you for your reply, but that's not exactly what I am looking for. All data on the objects are in the sysobjects table, eg. for stored procedures:
    select * from sysobjects where xtype = 'P' and category <> 2
    which returns all user-defined stored procedures. I just need to determine which of those are replicated. I also tried looking in sysmergeschemaarticles, which contains most of user-defined procedures, functions and views, but not all of them are displayed.

    Link to sysmergearticles description

    So, if I join sysobjects and sysmergeschemaarticles, will it return all replicated procedures, functions and views?

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Search for "Replication Tables" in Books Online.
    I suspect the table you want is MSreplication_objects.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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