Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2010
    Posts
    72

    Unanswered: replication status

    Hi,

    How to check whether a particular database has been setup for replication or not?

  2. #2
    Join Date
    Dec 2010
    Posts
    2
    Be allways carefull selecting/executing the following.

    1. Logon as 'sa' or with an account having 'sa_role'/'replication_role'.
    2. Execute the following command to detect if the database is setup for replication.

    select getdbrepstat()

    If '0' the db is NOT setup for replication.
    If '-2' the built-in function getdbrepstat() call failed.
    etc....

    For more info about repstatus etc.
    just take a look for the contents/text of the sybsystemprocs..sp_reptostandby procedure.


    An example : ( again be carefull )


    === Db setup to sp_reptostandby 'rep_prim_prod', 'ALL', etc...

    1> use rep_prim_prod
    2> go
    1> select getdbrepstat()
    2> go

    -----------
    2048

    === Db setup not replicating


    1> use sybsystemdb
    2> go
    1> select getdbrepstat()
    2> go

    -----------
    0


    gr,

    Jan

  3. #3
    Join Date
    Dec 2010
    Posts
    3
    There is a much easier way:

    sp_help_rep_agent <dbname>

    if rep agent shows as enabled it is set up for replication



    ************************ Digital Solutions International - Home

    Digital Solutions

Posting Permissions

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