複寫預存程序 (Transact-SQL)

適用範圍: 是SQL Server (所有支援的版本) 是Azure SQL Database

依照文件說明,複寫系統預存程序可用來做為完成一次工作 (如實作複寫) 的方法,或供批次檔或指令碼使用的方法。

《SQL Server 線上叢書》提供了若干範例來說明如何利用 Transact-SQL 預存程序進行大部分常見複寫工作的程式設計。 如需詳細資訊,請參閱複寫系統預存程序概念

重要

只支援《SQL Server 線上叢書》中所說明的複寫預存程序。 文件所未說明的預存程序只適用於內部複寫元件,您不應該利用它們來管理複寫。

sp_add_agent_parameter (SQL transact-sql)
sp_add_agent_profile (SQL transact-sql)
sp_addarticle (Transact-SQL)
sp_adddistpublisher (Transact-SQL)
sp_adddistributiondb (Transact-SQL)
sp_adddistributor (Transact-SQL)
sp_adddynamicsnapshot_job (SQL transact-sql)
sp_addlogreader_agent (Transact-SQL)
sp_addmergealternatepublisher (SQL transact-sql)
sp_addmergearticle (SQL transact-sql)
sp_addmergefilter (Transact-SQL)
sp_addmergepartition (SQL transact-sql)
sp_addmergepublication (SQL transact-sql)
sp_addmergepullsubscription (SQL transact-sql)
sp_addmergepullsubscription_agent (Transact-SQL)
sp_addmergepushsubscription_agent (Transact-SQL)
sp_addmergesubscription (SQL transact-sql)
sp_addpublication (Transact-SQL)
sp_addpublication_snapshot (Transact-SQL)
sp_addpullsubscription (SQL transact-sql)
sp_addpullsubscription_agent (Transact-SQL)
sp_addpushsubscription_agent (Transact-SQL)
sp_addqreader_agent (Transact-SQL)
sp_addqueued_artinfo (SQL transact-sql)
sp_addscriptexec (SQL transact-sql)
sp_addsubscriber (Transact-SQL)
sp_addsubscriber_schedule (SQL transact-sql)
sp_addsubscription (SQL transact-sql)
sp_addsynctriggers (SQL transact-sql)
sp_addtabletocontents (SQL transact-sql)
sp_adjustpublisheridentityrange (Transact-SQL)
sp_article_validation (SQL transact-sql)
sp_articlecolumn (Transact-SQL)
sp_articlefilter (Transact-SQL)
sp_articleview (SQL transact-sql)
sp_attachsubscription (SQL transact-sql)
sp_browsemergesnapshotfolder (SQL transact-sql)
sp_browsereplcmds (SQL transact-sql)
sp_browsesnapshotfolder (SQL transact-sql)
sp_change_agent_parameter (SQL transact-sql)
sp_change_agent_profile (SQL transact-sql)
sp_change_subscription_properties (SQL transact-sql)
sp_changearticle (Transact-SQL)
sp_changearticlecolumndatatype (Transact-SQL)
sp_changedistpublisher (Transact-SQL)
sp_changedistributiondb (SQL transact-sql)
sp_changedistributor_password (SQL transact-sql)
sp_changedistributor_property (SQL transact-sql)
sp_changedynamicsnapshot_job (SQL transact-sql)
sp_changelogreader_agent (SQL transact-sql)
sp_changemergearticle (Transact-SQL)
sp_changemergefilter (Transact-SQL)
sp_changemergepublication (Transact-SQL)
sp_changemergepullsubscription (SQL transact-sql)
sp_changemergesubscription (SQL transact-sql)
sp_changepublication (Transact-SQL)
sp_changepublication_snapshot (SQL transact-sql)
sp_changeqreader_agent (SQL transact-sql)
sp_changereplicationserverpasswords (SQL transact-sql)
sp_changesubscriber (Transact-SQL)
sp_changesubscriber_schedule (SQL transact-sql)
sp_changesubscription (SQL transact-sql)
sp_changesubscriptiondtsinfo (SQL transact-sql)
sp_changesubstatus (SQL transact-sql)
sp_check_dynamic_filters (SQL transact-sql)
sp_check_for_sync_trigger (SQL transact-sql)
sp_check_join_filter (SQL transact-sql)
sp_check_subset_filter (SQL transact-sql)
sp_configure_peerconflictdetection (SQL transact-sql)
sp_copymergesnapshot (SQL transact-sql)
sp_copysnapshot (SQL transact-sql)
sp_copysubscription (SQL transact-sql)
sp_deletemergeconflictrow (SQL transact-sql)
sp_deletepeerrequesthistory (SQL transact-sql)
sp_deletetracertokenhistory (SQL transact-sql)
sp_drop_agent_parameter (SQL transact-sql)
sp_drop_agent_profile (SQL transact-sql)
sp_dropanonymousagent (SQL transact-sql)
sp_droparticle (Transact-SQL)
sp_dropdistpublisher (SQL transact-sql)
sp_dropdistributiondb (SQL transact-sql)
sp_dropdistributor (SQL transact-sql)
sp_dropdynamicsnapshot_job (SQL transact-sql)
sp_dropmergealternatepublisher (SQL transact-sql)
sp_dropmergearticle (Transact-SQL)
sp_dropmergefilter (Transact-SQL)
sp_dropmergepartition (SQL transact-sql)
sp_dropmergepublication (SQL transact-sql)
sp_dropmergepullsubscription (SQL transact-sql)
sp_dropmergesubscription (SQL transact-sql)
sp_droppublication (SQL transact-sql)
sp_droppullsubscription (SQL transact-sql)
sp_dropsubscriber (SQL transact-sql)
sp_dropsubscription (SQL transact-sql)
sp_dsninfo (Transact-SQL)
sp_enumcustomresolvers (Transact-SQL)
sp_enumdsn (SQL transact-sql)
sp_enumeratependingschemachanges (SQL transact-sql)
sp_expired_subscription_cleanup (SQL transact-sql)
sp_generatefilters (SQL transact-sql)
sp_get_distributor (Transact-SQL)
sp_get_redirected_publisher (SQL transact-sql)
sp_getagentparameterlist (SQL transact-sql)
sp_getdefaultdatatypemapping (SQL transact-sql)
sp_getmergedeletetype (SQL transact-sql)
sp_getqueuedrows (SQL transact-sql)
sp_getsubscriptiondtspackagename (SQL transact-sql)
sp_gettopologyinfo (SQL transact-sql)
sp_grant_publication_access (SQL transact-sql)
sp_help_agent_default (SQL transact-sql)
sp_help_agent_parameter (SQL transact-sql)
sp_help_agent_profile (SQL transact-sql)
sp_helparticle (Transact-SQL)
sp_helparticlecolumns (SQL transact-sql)

sp_helparticledts (SQL transact-sql)
sp_helpdatatypemap (SQL transact-sql)
sp_helpdistpublisher (Transact-SQL)
sp_helpdistributiondb (Transact-SQL)
sp_helpdistributor (Transact-SQL)
sp_helpdistributor_properties (SQL transact-sql)
sp_helpdynamicsnapshot_job (SQL transact-sql)
sp_helplogreader_agent (SQL transact-sql)
sp_helpmergealternatepublisher (SQL transact-sql)
sp_helpmergearticle (Transact-SQL)
sp_helpmergearticlecolumn (SQL transact-sql)
sp_helpmergearticleconflicts (SQL transact-sql)
sp_helpmergeconflictrows (SQL transact-sql)
sp_helpmergedeleteconflictrows (SQL transact-sql)
sp_helpmergefilter (SQL transact-sql)
sp_helpmergepartition (SQL transact-sql)
sp_helpmergepublication (Transact-SQL)
sp_helpmergepullsubscription (SQL transact-sql)
sp_helpmergesubscription (SQL transact-sql)
sp_help_peerconflictdetection (SQL transact-sql)
sp_helppeerrequests (SQL transact-sql)
sp_helppeerresponses (SQL transact-sql)
sp_helppublication (Transact-SQL)
sp_helppublication_snapshot (SQL transact-sql)
sp_helppullsubscription (SQL transact-sql)
sp_helpqreader_agent (SQL transact-sql)
sp_helpreplfailovermode (SQL transact-sql)
sp_helpreplicationdboption (Transact-SQL)
sp_helpreplicationoption (SQL transact-sql)
sp_helpsubscriberinfo (Transact-SQL)
sp_helpsubscription (SQL transact-sql)
sp_helpsubscription_properties (Transact-SQL)
sp_helpsubscriptionerrors (SQL transact-sql)
sp_helptracertokenhistory (SQL transact-sql)
sp_helptracertokens (SQL transact-sql)
sp_helpxactsetjob (SQL transact-sql)
sp_ivindexhasnullcols (SQL transact-sql)
sp_link_publication (Transact-SQL)
sp_lookupcustomresolver (SQL transact-sql)
sp_markpendingschemachange (SQL transact-sql)
sp_marksubscriptionvalidation (SQL transact-sql)
sp_mergearticlecolumn (Transact-SQL)
sp_mergecleanupmetadata (SQL transact-sql)
sp_mergedummyupdate (SQL transact-sql)
sp_mergemetadataretentioncleanup (SQL transact-sql)
sp_mergesubscription_cleanup (SQL transact-sql)
sp_MSchange_distribution_agent_properties (SQL transact-sql)
sp_MSchange_logreader_agent_properties (SQL transact-sql)
sp_MSchange_merge_agent_properties (SQL transact-sql)
sp_MSchange_snapshot_agent_properties (SQL transact-sql)
sp_posttracertoken (SQL transact-sql)
sp_publication_validation (SQL transact-sql)
sp_publisherproperty (SQL transact-sql)
sp_redirect_publisher (SQL transact-sql)
sp_refreshsubscriptions (SQL transact-sql)
sp_register_custom_scripting (SQL transact-sql)
sp_registercustomresolver (SQL transact-sql)
sp_reinitmergepullsubscription (SQL transact-sql)
sp_reinitmergesubscription (SQL transact-sql)
sp_reinitpullsubscription (SQL transact-sql)
sp_reinitsubscription (SQL transact-sql)
sp_removedbreplication (Transact-SQL)
sp_removedistpublisherdbreplication (SQL transact-sql)
sp_repladdcolumn (SQL transact-sql)
sp_replcmds (Transact-SQL)
sp_replcounters (SQL transact-sql)
sp_repldone (Transact-SQL)
sp_repldropcolumn (SQL transact-sql)
sp_replflush (SQL transact-sql)
sp_replication_agent_checkup (SQL transact-sql)
sp_replicationdboption (Transact-SQL)
sp_replmonitorchangepublicationthreshold (SQL transact-sql)
sp_replmonitorhelpmergesession (SQL transact-sql)
sp_replmonitorhelpmergesessiondetail (SQL transact-sql)
sp_replmonitorhelppublication (SQL transact-sql)
sp_replmonitorhelppublicationthresholds (SQL transact-sql)
sp_replmonitorhelppublisher (SQL transact-sql)
sp_replmonitorhelpsubscription (SQL transact-sql)
sp_replmonitorsubscriptionpendingcmds (SQL transact-sql)
sp_replqueuemonitor (SQL transact-sql)
sp_replrestart (SQL transact-sql)
sp_replsetoriginator (SQL transact-sql)
sp_replshowcmds (SQL transact-sql)
sp_repltrans (SQL transact-sql)
sp_requestpeerresponse (SQL transact-sql)
sp_requestpeertopologyinfo (SQL transact-sql)
sp_resetsnapshotdeliveryprogress (SQL transact-sql)
sp_restoredbreplication (SQL transact-sql)
sp_restoremergeidentityrange (SQL transact-sql)
sp_resyncmergesubscription (SQL transact-sql)
sp_revoke_publication_access (SQL transact-sql)
sp_schemafilter (SQL transact-sql)
sp_script_synctran_commands (SQL transact-sql)
sp_scriptdynamicupdproc (SQL transact-sql)
sp_scriptpublicationcustomprocs (SQL transact-sql)
sp_scriptsubconflicttable (SQL transact-sql)
sp_setdefaultdatatypemapping (SQL transact-sql)
sp_setreplfailovermode (SQL transact-sql)
sp_setsubscriptionxactseqno (SQL transact-sql)
sp_showpendingchanges (SQL transact-sql)
sp_showrowreplicainfo (SQL transact-sql)
sp_startpublication_snapshot (SQL transact-sql)
sp_subscription_cleanup (SQL transact-sql)
sp_table_validation (SQL transact-sql)
sp_unregister_custom_scripting (SQL transact-sql)
sp_unregistercustomresolver (SQL transact-sql)
sp_update_agent_profile (SQL transact-sql)
sp_validate_redirected_publisher (SQL transact-sql)
sp_validate_replica_hosts_as_publishers (SQL transact-sql)
sp_validatemergepublication (SQL transact-sql)
sp_validatemergesubscription (SQL transact-sql)
sp_vupgrade_mergeobjects (SQL transact-sql)
sp_vupgrade_replication (SQL transact-sql)

另請參閱

Replication Management Objects Concepts
複寫程式設計概念