Recently, I am requested to migrate the current Sybase data server to a new Sybase data server (let's say, from pub1 to pub2). To do this, I need to rebuild all the RepAgents which have been set up previously in pub1. Is there any primary data server I would need to set in the RSSD? Because I could see when I run the command 'connect' without any option, it will connect to (pub1.repserver) instead of (pub2.repserver). Is there any configuration required on the RSSD to make it (pub2.repserver)? Also, I actually have setup one RepAgent (pub2.db_lotte), the setup process using rs_init was successful, but seems the RepAgent connection is down after the setup process (admin who_is_down), the connection couldn't bring up and no error is captured in the replication log.

Appreciate if anyone could help.


1 Answer 1


You're going to need to provide more details on what you mean by 'migrate the current Sybase data server', eg, are you moving the dataserver? are you copying the dataserver? something else?

Also, there's generally nothing to do directly in the RSSD. All commands should be issued either in the PDB, the PRS/RRS, and/or the RDB.

Generally speaking ...

If a database has been copied from elsewhere (eg, dump and load), you'll want to make sure the old repagent info is discarded and the old secondary trunc pt is removed, eg:

use new_db
-- in case repagent is running:
exec sp_stop_rep_agent 'new_db'
-- discard repagent config settings
exec sp_config_rep_agent 'new_db','disable'
-- in case sp_config_rep_agent didn't remove 2nd tp:
dbcc settrunc('ltm','ignore')

At this point you then use rs_init to add 'new_db' as a a new database/connection to the desired PRS.

NOTE: If 'new_db' is to be the active db in a WS setup, make sure the logical connection has been created before running rs_init.

Once you've added 'new_db' to the replication domain you'll need to continue with normal replication setup, eg:

  • make sure RDB(s) is added to the replication domain (if not already a member)
  • add route(s) to RRS (as needed)
  • setup repdefs/subs
  • assign any custom/modified classes to the DSI connections
  • 'migrate the current Sybase data server' --> what I mean is moving the dataserver. Previously, all my repdefs/subs are pointing to the dataserver (pub1), now I have been told that pub2 is my new dataserver as the old dataserver (pub1) will not be using anymore in future. So, I need to resetup all the RepAgents/repdefs/subs that pointing to pub2 instead of pub1. The new RepAgent (pub2.lotte) that I have setup yesterday seems not working, I got the message 'The Replication Agent thread for database 'lotte' is not currently running.' What can I do for this?
    – Tittus
    Nov 10, 2017 at 2:50
  • 1) there's no official way to move/rename a dataserver (or database) in SRS, so the official method would be to setup a new set of databases/connections, repdefs and subs, then once the old dataserver/databases are no longer in use then tear down that part of the replication domain; 2) without a lot more details of how you populated pub2.lotte and how you setup the repagent, I'm going to assume instead that you did a dump-n-load and you need to reconfigure the repagent details in the new pub2.lotte database, or perhaps rs_init generated an error when you added pub2.lotte
    – markp-fuso
    Nov 10, 2017 at 8:16
  • I setup this new RepAgent (pub2.lotte) using rs_init, I have not created any Repdefs/subs under pub2.lotte yet. Also, I don't see any error messages are generated after the RepAgent setup completed yesterday. I got this message 'The Replication Agent thread for database 'lotte' is not currently running' when I am trying to restart the RepAgent this morning. > connect to pub2.lotte > go Gateway connection to 'pub2.lotte' is created. > sp_stop_rep_agent lotte > go The Replication Agent thread for database 'lotte' is not currently running.
    – Tittus
    Nov 10, 2017 at 9:30
  • ok, so sp_stop_rep_agent says repagent isn't running, does sp_help_rep_agent and sp_who confirm repagent isn't running? does sp_start_rep_agent start the repagent (and if not, any errors in the SRS and/or ASE errorlogs)? I would also suggest connecting directly to the PDB via isql ... don't use the connect command so as to eliminate any potential issues with the gateway
    – markp-fuso
    Nov 10, 2017 at 13:17
  • Checked sp_help_rep_agent and sp_who via isql, found there are 2 outputs in sp_who, one with the status 'sleeping' and cmd is 'NETWORK HANDLER', another one with the staus 'running' and cmd is 'INSERT'. Is that means that the RepAgent is running? On the other hand, the output of sp_help_rep_agent with configuration, I found the 'auto_start' column contains the value 'false'. Is these information says that the RepAgent is not working? Sorry, I'm new to this replication server.
    – Tittus
    Nov 13, 2017 at 3:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.