如何建立replication?

Replication 的建立步驟 (主服務器Main Server) Connect to Server,Server name 要用當前服務器的名字,Authentication要用SQL Server Authentication,Login use sa,Password: PASSWORDissecret123 在作replication前,請check數據庫的SQL Server Agent是否啓動。 1. 打開數據庫,選擇Replication>Local Publication右鍵New Publication。隨後就Next。 2. 選擇Publication Database,default是marsdb。Click ‘Next’ button 3. 選擇Publication Type,select第二個(Transaction publication)。Click ‘Next’ button。 4. 選擇Articles,在Objects to publish這裏Click Tables這個選擇項的框框便可(由於我只對table進行publish)。Click ‘Next’ button。 5. Filter Table Rows,這裏是若是對全部表的行列進行,那麼不須要進行「Add」不然就直接Click ’Next’ button(咱們的是直接Next)。 6. Snapshot Agent,選擇第一個選項「Create a snapshot immediately…..」。 7. Agent Security,Click 」Security Settings」 button,在Snapshot Agent Security 頁面,選擇「Run under the SQL Server Agent service…..」這個選項。在Connect to the Publisher中選擇第二個「Using the following SQL Server login」 Login:sa Password: PASSWORDissecret123 Confirm Password: PASSWORDissecret123 Click Ok,返回Agent Security page,Click 」Next」 button。 8. Wizard Actions,click ‘Next’ button. 9. Complete the Wizard,keyin 「Publication name:」(這裏的名字用回以前那個就好)。Click ‘Finish’。 10. 主服務器的replication完成。 (子服務器Sub Server) Connect to Server,Server name 要用當前服務器的名字,Authentication要用SQL Server Authentication,Login use sa,Password: PASSWORDissecret123 在作replication前,請check數據庫的SQL Server Agent是否啓動。 1. 打開數據庫,選擇Replication>Local Subscriptions右鍵New Subscriptions。隨後就Next。 2. Publication page,選擇publisher,click Find SQL Server Publisher,選擇主服務器(Main Server)的名字,一選擇就會出現每一個輸入框都keyin好的,直接選擇Connect.若是沒有就請輸入Connect主服務器的登陸信息。隨後會出現Database and publications下有你建立好的主服務器的publication名字。 3. Distribution Agent Location,選擇push subscriptions(第一個)。Click next. 4. Subscribers,click next. 5. Distribution Agent Security page,Click 「….」這個button。會出現和主服務器同樣的安全登陸設置。這一點和主服務器同樣。 6. 完成了第5點,就continue Click 「Next」button,最後Click Finish button。等待完成 7. 最後返回主服務器檢查是否成功(查看狀態)
相關文章
相關標籤/搜索