記一次SQL server 2005 到SQL server 2008 資料庫遷移

來源:互聯網
上載者:User

標籤:database   sql   dba   資料庫   sql server   

    最近周末完成了一個從SQL server 2005升級到SQL server 2008的升級遷移,其實質是一個伺服器遷移的過程。比較複雜的是這個伺服器上的複製關係,自身既作為發行伺服器,又作為訂閱伺服器,因此整個遷移同時需保證這些複製關係依舊可用。這個主伺服器是供ERP使用,涉及到的模組也比較相對多,因此從遷移到驗證整個過程還是比較長。記下本文以示慶賀。

 

一、主要的步驟
    1、檢查現有資料庫的備份完整性(含發布及訂閱資料庫)及存在的複製關係  
    2、停止原伺服器所有服務(含agent),複製所有需要遷移的資料檔案到新伺服器
    3、匯出原伺服器上的發布對象
    4、將資料庫附加到新伺服器
    5、建立/配置散發者
    6、新伺服器發布文章(3份)
    7、在新伺服器上刪除之前的訂閱
    8、在發行伺服器TK456/KSERP上重新初始化指向新伺服器的訂閱

 

二、遷移過程中碰到的錯誤及解決辦法
    在新環境配置好了複製之後,收到如下錯誤提示:
    Invalid column name ‘originator_id’. (Microsoft SQL Server, Error: 207)
    Create replication fails on database which is migrated from SQL Server 2005 with error

    -- Author : Leshami
    -- Blog   : http://blog.csdn.net/leshami

    Error:

    ADDITIONAL INFORMATION:
    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
    ——————————
    Invalid column name ‘originator_id’. (Microsoft SQL Server, Error: 207)

    解決方案
    Resolution:
    1.  Add originator_id  column to syspublications table in publication db. Run below query in your publication DB.

        ALTER TABLE dbo.syspublications ADD [originator_id] [int] NULL;

    2. Add a column originator_id  into the view dbo.syspublications inside distribution database

    3. Add a originator_id  column into IHpublications table in distribution database

 

三、現場花絮

 

記一次SQL server 2005 到SQL server 2008 資料庫遷移

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.