SQL SERVER replication Related stored procedures

Source: Internet
Author: User
Tags readable

Procedures for all types of replication
Process Description
Sp_addscriptexec Publishes a Microsoft SQL Server script (. sql file) to all subscribers to the publication.
Sp_adjustpublisheridentityrange Adjusts the identity range on the publication and re-assigns the new scope based on the thresholds on the publication.
Sp_changereplicationserverpasswords Change the storage password for the Microsoft Windows account or SQL server login that the replication agent uses when connecting to a server in the replication topology. Typically, you must change the password for each agent running on the server, even if they all use the same login or account. Use this stored procedure to change the password for a given SQL Server login or Windows account instance that is used by all replication agents running in the server.
Sp_removedbreplication Deletes all replicated objects from the database. This stored procedure is executed at the publisher's publication database or at the subscriber's subscription database. When executed at the publisher's publication database, the stored procedure attempts to delete the objects associated with the published database at the Distributor and at the Subscriber.
Sp_removedistpublisherdbreplication Deletes publishing metadata that is part of a specific publication at the Distributor.
Sp_replmonitorhelppublication Returns the current status information for one or more publications at the publisher.
Sp_replmonitorhelppublicationthresholds Returns a set of threshold metrics for a monitored publication.
Sp_replmonitorhelppublisher Returns the current status information for one or more publishers.
Sp_replmonitorhelpsubscription Returns the current status information for a subscription that is part of one or more publications at the publisher, and returns a row for each returned subscription.
Sp_table_validation Returns the number of rows or checksum information about a table or indexed view, or compares the provided number of rows or checksum information with a specified table or indexed view.

Procedures that apply to transactional replication
Process Description
Sp_article_validation Initiates a data validation request for the specified project.
Sp_marksubscriptionvalidation Marks the currently open transaction as a subscription-level validation transaction for the specified subscriber.
Sp_publication_validation Initiates an item validation request for the items in the specified publication.
Sp_browsereplcmds Returns a result set in the readable format of the copy command stored in the distribution database.
Sp_helppeerrequests Returns information about all status requests that are received by participants in a peer-copy topology, which are initiated by executing sp_requestpeerresponse on any published database in the topology .
Sp_helppeerresponses Returns all responses to a specific status request received from a contributor in the peer-to-peer replication topology, where the request was initiated by executing sp_requestpeerresponse on any published database in the topology .
Sp_requestpeerresponse When the process is executed from a node in the peer topology, the response from all other nodes in the topology is requested.
Sp_deletepeerrequesthistory Deletes the history of the publication status request in the peer-to-peer replication topology.
Sp_posttracertoken This procedure publishes the tracking token to the publisher's transaction log and begins the process of tracking the latency statistics. Information is logged when the following events occur: When a tracer token is written to the transaction log, when the Log Reader Agent picks up the tracer token, and when the Distribution Agent applies a tracer token.
Sp_helptracertokens Returns a row for each tracer token that is used to determine latency in the inserted publication.
Sp_helptracertokenhistory Returns the detailed latency information for the specified tracer token, returning one row for each subscriber.
Sp_deletetracertokenhistory Removes trace token records from the mstracer_tokens and mstracer_history system tables.
Sp_replcmds This procedure is used by the Log Reader Agent. This procedure returns information about the publication database where it was executed. Use this procedure to view transactions that are not currently distributed (keep transactions in the transaction log that have not yet been sent to the distributor).
Sp_replcounters Returns replication statistics for latency, throughput, and transaction counts for each published database.
Sp_repldone Updates the record of the last distributed transaction that identifies the server.
Sp_replflush For increased efficiency, the project definition is stored in the cache. This process is used by other replication stored procedures when modifying or deleting an item definition.
Sp_replshowcmds Returns the command for a transaction marked for replication in a readable format.
Sp_repltrans Returns a result set made up of all the transactions in the publication database's transaction log that are marked for replication, but are not marked as distributed.
Sp_setsubscriptionxactseqno Used to specify the log sequence number (LSN) of the next transaction to be applied by the Distribution Agent at the Subscriber, which causes the agent to skip the failed transaction.
Sp_helpsubscriptionerrors Returns all transactional replication errors for a given subscription.
Sp_replmonitorsubscriptionpendingcmds Returns the number of pending commands for a transactional publication subscription, and the estimated time required to process those commands.
Sp_replqueuemonitor Lists queue messages for queued updating subscriptions.

The process for merge replication
Process Description
Sp_showpendingchanges Returns a result set that shows the approximate number of changes awaiting replication.
Sp_showrowreplicainfo Displays information about the rows in the table that are used as items in merge replication.
Sp_enumeratependingschemachanges Returns a list of all pending schema changes. This stored procedure can be used with Sp_markpendingschemachange .
Sp_markpendingschemachange Enables an administrator to skip the selected pending schema changes so that the changes are no longer replicated.
Sp_addtabletocontents Inserts a reference to any row in the source table that is not currently in the tracking table into the merge tracking table.
Sp_deletemergeconflictrow Delete rows from the merge conflicts table.
Sp_helpmergearticleconflicts Returns a conflicting item in the publication.
Sp_helpmergeconflictrows Returns the rows in the specified conflict table.
Sp_helpmergedeleteconflictrows Returns information about the data rows that lost the delete conflict.
Sp_mergemetadataretentioncleanup In msmerge_genhistory,msmerge_contents and msmerge_tombstone The metadata is cleared manually in the system tables.
Sp_replmonitorhelpmergesession Returns information about a previous session for a given replication Merge Agent.
Sp_replmonitorhelpmergesessiondetail Returns item-level details about a specific replication Merge Agent session.
Sp_validatemergepublication Perform validation within the scope of the publication.
Sp_validatemergesubscription Performs validation on the specified subscription.

SQL SERVER replication Related stored procedures

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.