Share via


Troubleshooting: Offline Replication Issues

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

This section addresses issues relating to the creation and use of offline publications for a team solution.

For information about specific error messages, see Error Messages.

Offline replication requirements and limitations

If you plan to enable your database for offline replication, the following are some schema restrictions:

  • Database schema cannot contain timestamp columns.

  • Avoid using database names that have the same starting characters followed by a space and a delineating word, such as “IssueTracking” and “IssueTracking Test.” This may cause problems when subscribing to and synchronizing team solution publications. To avoid this issue, do not use spaces, or ensure the characters before the space are unique.

  • Publication names cannot contain spaces at the beginning or end of the name. For example, “   IssuesOffline   ” will cause errors when you attempt to create the publication.

  • Stored procedures containing comments at the beginning will cause offline replication to fail. If you have problems with your stored procedures, remove the comments, and try again.

For additional information, see The Offline Replication Model.

Monitoring offline publications

If your team solution contains offline publications, you can monitor the publications using the Replication Monitor in SQL Server Enterprise Manager. The Replication Monitor is designed for viewing the status of replication agents and troubleshooting potential problems.

Whenever you create a new team solution using a template or create a new solution using the Team Solutions Manager, you should make sure your publications were initialized correctly using the Replication Monitor.

In addition, it is recommended you continue to monitor the state of your publications after the solution has been created. If users report problems with offline publications, use the Replication Monitor to help troubleshoot the problems.

For more information about how to monitor replication, see the SQL Server Enterprise Manager online Help and the SQL Server Books Online.

Problems creating publications

If you have trouble creating offline publications or if users have problems creating subscriptions to the publication, there are many places to begin troubleshooting. Try the following to correct the problem:

  • Make sure the tables are designed for offline use. For details, see Planning Offline Capabilities. For SQL Merge Replication to work, a row cannot be longer than 6,000 bytes. Keep in mind that the nvarchar datatype occupies two bytes per character.

  • Verify that all dependencies are included in the offline publication. For details about adding dependencies, see Specifying Database Objects for Offline Use.

  • Examine the permissions associated with the offline publication. If users have trouble creating subscriptions, verify that the user has the appropriate permissions to take the solution offline.

If you continue to have problems after verifying that your solution meets the requirements, consult the SQL Server Books Online for additional troubleshooting information.

Data loss when a user drops a subscription with unsynchronized changes

When the subscription is dropped, if the user has unsynchronized data in the offline database and a connection to the main server can be established, the unsynchronized data changes are synchronized automatically before removing the database.

If a connection to the main server cannot be established to synchronize the changes, however, the user receives the following message:

You have unsynchronized changes in your offline database. Do you want to delete the offline copy of your database?

If the user chooses Yes, the database is deleted, and all data is lost. If the user chooses No, then the offline database is not deleted. The only way to access the database, however, is through Access, OSQL, SQL Server Enterprise Manager, or some other tool that is able to query SQL databases.

In either case, the Web subscription is removed, and the user is no longer able to synchronize changes.