Final cleanup

If you have removed all Replication Agent objects from all the databases on a given primary data server by issuing pdb_xlog remove in each database in which you had issued pdb_xlog init, and you want to remove all the remnants of Replication Agent, use the following procedure to completely clean the primary data server.

StepsCleaning up all Replication Agent remnants from the primary data server

  1. Stop the Microsoft SQL Server service.

    1. From the Windows Control Panel, go to Administrative Tools | Services, and find the service named SQL Server (SERVER). Here SERVER is the name of your Microsoft SQL Server data server.

    2. Stop this service.

  2. Open a command window, and restart Microsoft SQL Server in single-user mode:

    "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe” -m -s instanceName
    

    Here, instanceName is the name of the Microsoft SQL Server instance.

  3. Make sure the Microsoft SQL Server SQL Browser service is running, and connect to the data server using the sqlcmd utility with -A option or using the Management Studio. Specify the server name as Admin:servername. Here, servername is the name of your data server.

  4. Remove the pds_username user if it has been created for Replication Agent:

    drop user pds_username
    
  5. Remove the special marking procedures from the mssqlsystemresource database:

    drop procedure marking_proc_name;
    
    drop procedure sp_SybSetLogforReplTable;
    
    drop procedure sp_SybSetLogforReplProc;
    
  6. Stop Microsoft SQL Server in single-user mode by shutting down the Windows service or by issuing the shutdown command with the sqlcmd utility.

  7. To undo the affects of the sybfilter driver on each of the log devices, remove the log path entry by editing the configuration file or by using the sybfilter manager console.

    For information on using the sybfilter manager console, see Appendix B, “Using the sybfilter driver.”

  8. Restart Microsoft SQL Server in multi-user mode (normal start).

    1. From Windows Control Panel, go to Administrative Tools | Services, and find the service named SQL Server (SERVER). Here, SERVER is the name of your Microsoft SQL Server data server.

    2. Start this service.