怎样进行数据复制,是表内、表间、数据库间、还是不同的SERVER之间?

解决方案 »

  1.   

    系统自带的复制存储过程: 
    sp_add_agent_parameter sp_enableagentoffload 
    sp_add_agent_profile sp_enumcustomresolvers 
    sp_addarticle sp_enumdsn 
    sp_adddistpublisher sp_enumfullsubscribers 
    sp_adddistributiondb sp_expired_subscription_cleanup 
    sp_adddistributor sp_generatefilters 
    sp_addmergealternatepublisher sp_getagentoffloadinfo 
    sp_addmergearticle sp_getmergedeletetype 
    sp_addmergefilter sp_get_distributor 
    sp_addmergepublication sp_getqueuedrows 
    sp_addmergepullsubscription sp_getsubscriptiondtspackagename 
    sp_addmergepullsubscription_agent sp_grant_publication_access 
    sp_addmergesubscription sp_help_agent_default 
    sp_addpublication sp_help_agent_parameter 
    sp_addpublication_snapshot sp_help_agent_profile 
    sp_addpublisher70 sp_helparticle 
    sp_addpullsubscription sp_helparticlecolumns 
    sp_addpullsubscription_agent sp_helparticledts 
    sp_addscriptexec sp_helpdistpublisher 
    sp_addsubscriber sp_helpdistributiondb 
    sp_addsubscriber_schedule sp_helpdistributor 
    sp_addsubscription sp_helpmergealternatepublisher 
    sp_addsynctriggers sp_helpmergearticle 
    sp_addtabletocontents sp_helpmergearticlecolumn 
    sp_adjustpublisheridentityrange sp_helpmergearticleconflicts 
    sp_article_validation sp_helpmergeconflictrows 
    sp_articlecolumn sp_helpmergedeleteconflictrows 
    sp_articlefilter sp_helpmergefilter 
    sp_articlesynctranprocs sp_helpmergepublication 
    sp_articleview  sp_helpmergepullsubscription 
    sp_attachsubscription sp_helpmergesubscription 
    sp_browsesnapshotfolder sp_helppublication 
    sp_browsemergesnapshotfolder sp_help_publication_access 
    sp_browsereplcmds sp_helppullsubscription 
    sp_change_agent_parameter sp_helpreplfailovermode 
    sp_change_agent_profile sp_helpreplicationdboption 
    sp_changearticle sp_helpreplicationoption 
    sp_changedistpublisher sp_helpsubscriberinfo 
    sp_changedistributiondb sp_helpsubscription 
    sp_changedistributor_password sp_ivindexhasnullcols 
    sp_changedistributor_property sp_helpsubscription_properties 
    sp_changemergearticle sp_link_publication 
    sp_changemergefilter sp_subscriptionvalidation 
    sp_changemergepublication sp_mergearticlecolumn 
    sp_changemergepullsubscription sp_mergecleanupmetadata 
    sp_changemergesubscription sp_mergedummyupdate 
    sp_changepublication sp_mergesubscription_cleanup 
    sp_changesubscriber sp_publication_validation 
    sp_changesubscriber_schedule sp_refreshsubscriptions 
    sp_changesubscriptiondtsinfo sp_reinitmergepullsubscription 
    sp_changesubstatus sp_reinitmergesubscription 
    sp_change_subscription_properties sp_reinitpullsubscription 
    sp_check_for_sync_trigger sp_reinitsubscription 
    sp_copymergesnapshot sp_removedbreplication 
    sp_copysnapshot sp_repladdcolumn 
    sp_copysubscription sp_replcmds 
    sp_deletemergeconflictrow sp_replcounters 
    sp_disableagentoffload sp_repldone 
    sp_drop_agent_parameter sp_repldropcolumn 
    sp_drop_agent_profile sp_replflush 
    sp_droparticle sp_replicationdboption 
    sp_dropanonymouseagent sp_replication_agent_checkup 
    sp_dropdistpublisher sp_replqueuemonitor 
    sp_dropdistributiondb sp_replsetoriginator 
    sp_dropmergealternatepublisher sp_replshowcmds 
    sp_dropdistributor sp_repltrans 
    sp_dropmergearticle sp_restoredbreplication 
    sp_dropmergefilter sp_revoke_publication_access 
      sp_scriptsubconflicttable 
    sp_dropmergepublication sp_script_synctran_commands 
    sp_dropmergepullsubscription sp_setreplfailovermode 
      sp_showrowreplicainfo 
    sp_dropmergesubscription sp_subscription_cleanup 
    sp_droppublication sp_table_validation 
    sp_droppullsubscription sp_update_agent_profile 
    sp_dropsubscriber sp_validatemergepublication 
    sp_dropsubscription sp_validatemergesubscription 
    sp_dsninfo sp_vupgrade_replication 
    sp_dumpparamcmd   
      

  2.   

    数据表之间的复制如果是两个数据表的结构一样的话,比较简单,一条sql解决,如果不同的话,恐怕得伤惊劳神,或许还会有不可能的把握。
    结构相同的话,可以这样:
    insert 目标表 select * from 原始表