If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > replication status

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-10, 10:55
regtha regtha is offline
Registered User
 
Join Date: Jan 2010
Posts: 72
replication status

Hi,

How to check whether a particular database has been setup for replication or not?
Reply With Quote
  #2 (permalink)  
Old 12-14-10, 06:49
JanSaveTran JanSaveTran is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 12-15-10, 14:09
DBExpert DBExpert is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 12-19-10, 09:49
sybanva sybanva is offline
Registered User
 
Join Date: Aug 2010
Location: India
Posts: 23
We can also check which databases are getting replicated ,
I am just adding in above post :

sp_help_rep_agent null,'process'

will provide the about the rep agent which are currently running in dataserver means databases which are getting replicated in your env.

This is one extension of sp_help_rep_agent command.

Hope this helps.

cheers!
__________________
Thanks,
sybanva
http://sybaseblog.com
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On