info using sysarticles and syspublications

  • Is there a way to get the below information by joining sysarticles and syspublications

    Get Transactional replication details (publisher name, Publication, table, sp_names, filters) for below servers (tables are sysarticles, syspublications)

  • myukas - Tuesday, December 5, 2017 8:49 AM

    Is there a way to get the below information by joining sysarticles and syspublications

    Get Transactional replication details (publisher name, Publication, table, sp_names, filters) for below servers (tables are sysarticles, syspublications)

    What "below servers" are you talking about?

  • sorry no specific i have someone that wants to know the publisher name,publication, tables , sp_names and filters
    i was guessing i have to join sysarticles and syspublications to get this when i run in the publication database but not sure if i am correct or how to do it really

  • I don't have replication running so I have no data to look at to see how these tables may be related.  Nothing jumps out at me looking at the description of the tables in Books Online.

  • i feel the same way but the person i am working for insist it does
    is there a way to get this using one or two queries

  • I can't help since I have nothing to look at to see what relationships may exist.  I can't solve a problem in a vacuum.

  • that is ok maybe someone else will jump on this is what i was trying to do

    select del_cmd,filter,filter_clause,ins_cmd,name, upd_cmd,upd_scripting_proc from sysarticles
     
    del_cmd              filter      filter_clause       ins_cmd               name    upd_cmd             upd_scripting_proc
    CALL [sp_MSdel_dboBilling_Authorities]              0              NULL     CALL [sp_MSins_dboBilling_Authorities]                Billing_Authorities           SCALL [sp_MSupd_dboBilling_Authorities]          NULL
    CALL [sp_MSdel_dboBilling_Cycles]        0              NULL     CALL [sp_MSins_dboBilling_Cycles]         Billing_Cycles     SCALL [sp_MSupd_dboBilling_Cycles] NULL
    CALL [sp_MSdel_dboBilling_Trans]          0              NULL     CALL [sp_MSins_dboBilling_Trans]          Billing_Trans       SCALL [sp_MSupd_dboBilling_Trans]   NULL
    CALL [sp_MSdel_dboConfig_Addr]         0              NULL     CALL [sp_MSins_dboConfig_Addr]          Config_Addr      SCALL [sp_MSupd_dboConfig_Addr]  NULL
    CALL [sp_MSdel_dboConfig_Bank]         0              NULL     CALL [sp_MSins_dboConfig_Bank]          Config_Bank      SCALL [sp_MSupd_dboConfig_Bank]  NULL
    CALL [sp_MSdel_dboConfig_Cancel]      0              NULL     CALL [sp_MSins_dboConfig_Cancel]       Config_Cancel   SCALL [sp_MSupd_dboConfig_Cancel]               NULL

  • This sounds like an interview or homework question. If you are looking for details, why not use SSMS to get your replication details for the server?

    In terms of the questions:Get Transactional replication details (publisher name, Publication, table, sp_names, filters)

    Publisher name. This is the instance name, so where you are running the items.  You should know how to get this. If you need the publication name, which I'm guessing is publication, then you can check the page for syspublications to get some information.  Sysarticles will include information about the various tables and any filtering.

    There is more information on replication in our Stairway to Replication.

  • myukas - Tuesday, December 5, 2017 9:49 AM

    that is ok maybe someone else will jump on this is what i was trying to do

    select del_cmd,filter,filter_clause,ins_cmd,name, upd_cmd,upd_scripting_proc from sysarticles
     
    del_cmd              filter      filter_clause       ins_cmd               name    upd_cmd             upd_scripting_proc
    CALL [sp_MSdel_dboBilling_Authorities]              0              NULL     CALL [sp_MSins_dboBilling_Authorities]                Billing_Authorities           SCALL [sp_MSupd_dboBilling_Authorities]          NULL
    CALL [sp_MSdel_dboBilling_Cycles]        0              NULL     CALL [sp_MSins_dboBilling_Cycles]         Billing_Cycles     SCALL [sp_MSupd_dboBilling_Cycles] NULL
    CALL [sp_MSdel_dboBilling_Trans]          0              NULL     CALL [sp_MSins_dboBilling_Trans]          Billing_Trans       SCALL [sp_MSupd_dboBilling_Trans]   NULL
    CALL [sp_MSdel_dboConfig_Addr]         0              NULL     CALL [sp_MSins_dboConfig_Addr]          Config_Addr      SCALL [sp_MSupd_dboConfig_Addr]  NULL
    CALL [sp_MSdel_dboConfig_Bank]         0              NULL     CALL [sp_MSins_dboConfig_Bank]          Config_Bank      SCALL [sp_MSupd_dboConfig_Bank]  NULL
    CALL [sp_MSdel_dboConfig_Cancel]      0              NULL     CALL [sp_MSins_dboConfig_Cancel]       Config_Cancel   SCALL [sp_MSupd_dboConfig_Cancel]               NULL

    you got most of it from sysarticles. Publisher name will be servername (@@servername) that you are running query on and publication name you can get from syspublications by joining sysarticles and syspublications  on pubid.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply