Stretch DatabaseStretch Database

適用於: 是SQL Server 2016 與更新版本 (僅限 Windows) 否Azure SQL Database 否Azure Synapse Analytics (SQL DW) 否平行處理資料倉儲APPLIES TO: yesSQL Server 2016 and later (Windows only) noAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

Stretch Database 以透明且安全的方式,將您的原始資料遷移到 Microsoft Azure 雲端。Stretch Database migrates your cold data transparently and securely to the Microsoft Azure cloud.

如果您想要立即開始使用 Stretch Database,請參閱 開始執行啟用資料庫的延展功能精靈dIf you just want to get started with Stretch Database right away, see Get started by running the Enable Database for Stretch Wizard.

Stretch Database 有什麼優勢?What are the benefits of Stretch Database?

Stretch Database 提供下列優點:Stretch Database provides the following benefits:

為冷資料提供符合成本效益的可用性Provides cost-effective availability for cold data
使用 SQL Server Stretch Database 以動態方式將暖交易資料和冷交易資料從 SQL Server 延展到 Microsoft Azure。Stretch warm and cold transactional data dynamically from SQL Server to Microsoft Azure with SQL Server Stretch Database. 與一般冷資料儲存區不同的是,您的資料會一直在線上而且可供查詢。Unlike typical cold data storage, your data is always online and available to query. 您可以提供較長的資料保留時間軸,而不需要為「客戶訂單記錄」之類的大型資料表砸下大筆花費。You can provide longer data retention timelines without breaking the bank for large tables like Customer Order History. 受益於低成本的 Azure,而不是調整昂貴的內部部署儲存體。Benefit from the low cost of Azure rather than scaling expensive, on-premises storage. 您可以在 Azure 入口網站選擇定價層並進行設定,以維持對定價及成本的控制。You choose the pricing tier and configure settings in the Azure Portal to maintain control over price and costs. 並可視需要擴大或縮減規模。Scale up or down as needed. 如需詳細資料,請瀏覽 SQL Server Stretch Database 定價Visit SQL Server Stretch Database Pricing for details.

不需要變更查詢或應用程式Doesn't require changes to queries or applications
無論您的 SQL Server 資料位於內部部署或已延展到雲端,都能平順地存取。Access your SQL Server data seamlessly regardless of whether it's on-premises or stretched to the cloud. 您可以設定原則來決定資料的儲存位置,並由 SQL Server 負責在背景處理資料的移動。You set the policy that determines where data is stored, and SQL Server handles the data movement in the background. 整個資料表都會一直在線上,而且可供查詢。The entire table is always online and queryable. 此外,因為資料位置對應用程式而言完全透明,所以 Stretch Database 不會要求對現有查詢或應用程式進行任何變更。And, Stretch Database doesn't require any changes to existing queries or applications - the location of the data is completely transparent to the application.

簡化內部部署資料維護Streamlines on-premises data maintenance
減少資料的內部部署維護與儲存。Reduce on-premises maintenance and storage for your data. 內部部署資料的備份會執行得更快,並在維護時間窗口內完成。Backups for your on-premises data run faster and finish within the maintenance window. 資料的雲端部分備份會自動執行。Backups for the cloud portion of your data run automatically. 您的內部部署儲存需求將大幅減少。Your on-premises storage needs are greatly reduced. Azure 儲存體的成本與加入內部部署 SSD 相比,可節省 80%。Azure storage can be 80% less expensive than adding to on-premises SSD.

即使在移轉期間也能保護您的資料安全Keeps your data secure even during migration
您可以安全地將最重要的應用程式延展到雲端,因此大可放心。Enjoy peace of mind as you stretch your most important applications securely to the cloud. SQL Server 的 Always Encrypted 可為移動中的資料提供加密。SQL Server's Always Encrypted provides encryption for your data in motion. 資料列層級安全性 (RLS) 及其他進階 SQL Server 安全性功能也可搭配 Stretch Database 運作,以保護您的資料。Row Level Security (RLS) and other advanced SQL Server security features also work with Stretch Database to protect your data.

Stretch Database 有何作用?What does Stretch Database do?

當您對 SQL Server 執行個體、資料庫或選取至少一個資料表啟用 Stretch Database 後,Stretch Database 就會在幕後將您的原始資料移轉到 Azure。After you enable Stretch Database for a SQL Server instance and a database, and select at least one table, Stretch Database silently begins to migrate your cold data to Azure.

  • 如果您將原始資料儲存在個別的資料表中,可以遷移整個資料表。If you store cold data in a separate table, you can migrate the entire table.

  • 若您的資料表同時包含作用及原始資料,您可以指定篩選函數,以選取要移轉的資料列。If your table contains both hot and cold data, you can specify a filter function to select the rows to migrate.

您不需要變更現有查詢及用戶端應用程式。You don't have to change existing queries and client apps. 即使在資料遷移期間,您仍然能夠順利存取本機和遠端資料。You continue to have seamless access to both local and remote data, even during data migration. 遠端查詢會有少量延遲,但您只會在查詢原始資料時遇到這樣的延遲。There is a small amount of latency for remote queries, but you only encounter this latency when you query the cold data.

Stretch Database 可確保在遷移期間發生錯誤時,也不會有任何資料遺失。Stretch Database ensures that no data is lost if a failure occurs during migration. 此外,它還有重試邏輯可處理移轉期間可能發生的連線問題。It also has retry logic to handle connection issues that may occur during migration. 動態管理檢視則能提供移轉的狀態。A dynamic management view provides the status of migration.

您可以暫停資料遷移 ,以對本機伺服器的問題進行疑難排解,或將可用的網路頻寬最大化。You can pause data migration to troubleshoot problems on the local server or to maximize the available network bandwidth.

Stretch Database 概觀Stretch database overview

Stretch Database 適合您嗎?Is Stretch Database for you?

如果您可以進行下列陳述式,Stretch Database 就能協助您滿足需求並解決問題。If you can make the following statements, Stretch Database may help to meet your requirements and solve your problems.

如果您是決策者If you're a decision maker 如果您是 DBAIf you're a DBA
我必須長期保留交易資料。I have to keep transactional data for a long time. 我的資料表大小逐漸失控。The size of my tables is getting out of control.
我有時需要查詢原始資料。Sometimes I have to query the cold data. 我的使用者表示他們想要存取原始資料,但很少會用到。My users say that they want access to cold data, but they only rarely use it.
我有不想更新的應用程式,包括較舊的應用程式。I have apps, including older apps, that I don't want to update. 我必須持續購買及新增更多儲存體。I have to keep buying and adding more storage.
我想要找到節省儲存成本的方法。I want to find a way to save money on storage. 我無法在 SLA 內備份或還原這類大型資料表。I can't backup or restore such large tables within the SLA.

何種資料庫和資料表是 Stretch Database 的適用對象?What kind of databases and tables are candidates for Stretch Database?

Stretch Database 以包含大量原始資料的交易資料庫為目標,而這些資料通常儲存在少量資料表中。Stretch Database targets transactional databases with large amounts of cold data, typically stored in a small number of tables. 這些資料表可能包含十億個以上的資料列。These tables may contain more than a billion rows.

如果您使用 SQL ServerSQL Server的時態表功能,請使用 Stretch Database 將所有或一部分相關記錄資料表遷移到 Azure 符合成本效益的儲存體。If you use the temporal table feature of SQL ServerSQL Server, use Stretch Database to migrate all or part of the associated history table to cost-effective storage in Azure. 如需詳細資訊,請參閱 管理系統設定版本之時態表中的歷程記錄資料保留For more info, see Manage Retention of Historical Data in System-Versioned Temporal Tables.

使用 SQL Server 2016 Upgrade Advisor 的 Stretch Database Advisor 功能來識別適用於 Stretch Database 的資料庫和資料表。Use Stretch Database Advisor, a feature of SQL Server 2016 Upgrade Advisor, to identify databases and tables for Stretch Database. 如需詳細資訊,請參閱 執行 Stretch Database Advisor 以識別 Stretch Database 的資料庫和資料表For more info, see Identify databases and tables for Stretch Database by running Stretch Database Advisor. 若要深入了解潛在的封鎖問題,請參閱 Stretch Database 的介面區限制和封鎖問題To learn more about potential blocking issues, see Limitations for Stretch Database.

試用 Stretch DatabaseTest drive Stretch Database

透過 AdventureWorks 範例資料庫試用 Stretch Database。Test drive Stretch Database with the AdventureWorks sample database. 若要取得 AdventureWorks 範例資料庫,至少要從 這裡To get the AdventureWorks sample database, download at least the database file and the samples and scripts file from here. 將範例資料庫還原到 SQL Server 2016 的執行個體後,請將範例檔案解壓縮,然後從 Stretch DB 資料夾開啟 Stretch DB 範例檔案。After you restore the sample database to an instance of SQL Server 2016, unzip the samples file and open the Stretch DB Samples file from the Stretch DB folder. 執行此檔案中的指令碼,以檢查您的資料在啟用 Stretch Database 前後所使用的空間,進而追蹤資料遷移的進度,並確認您可在資料遷移期間和遷移後繼續查詢現有資料和插入新資料。Run the scripts in this file to check the space used by your data before and after you enable Stretch Database, to track the progress of data migration, and to confirm that you can continue to query existing data and insert new data both during and after data migration.

後續步驟Next step

識別屬於 Stretch Database 對象的資料庫和資料表。Identify databases and tables that are candidates for Stretch Database. 下載並執行 Data Migration Assistant,以識別可用於 Stretch Database 的資料庫與資料表。Download the Data Migration Assistant and run an Assessment to identify databases and tables that are candidates for Stretch Database. 如需詳細資訊,請參閱 執行 Stretch Database Advisor 以識別 Stretch Database 的資料庫和資料表For more info, see Identify databases and tables for Stretch Database by running Stretch Database Advisor.