搭配 SQL Database 使用每一租用戶一個資料庫模式的多租用戶 SaaS 應用程式簡介Introduction to a multitenant SaaS app that uses the database-per-tenant pattern with SQL Database

Wingtip SaaS 應用程式是一個範例多租用戶應用程式。The Wingtip SaaS application is a sample multitenant app. 此應用程式使用每一租用戶一個資料庫的 SaaS 應用程式模式來服務多個租用戶。The app uses the database-per-tenant SaaS application pattern to service multiple tenants. 此應用程式藉由使用數個 SaaS 設計和管理模式,展示支援 SaaS 案例的 Azure SQL Database 功能。The app showcases features of Azure SQL Database that enable SaaS scenarios by using several SaaS design and management patterns. 為了快速啟動並執行,Wingtip SaaS 應用程式會在五分鐘內完成部署。To quickly get up and running, the Wingtip SaaS app deploys in less than five minutes.

WingtipTicketsSaaS-DbPerTenant GitHub 存放庫可取得應用程式原始程式碼和管理指令碼。Application source code and management scripts are available in the WingtipTicketsSaaS-DbPerTenant GitHub repo. 開始之前,請先參閱一般指引,了解有關下載 Wingtip Tickets 管理指令碼並將其解除封鎖的步驟。Before you start, see the general guidance for steps to download and unblock the Wingtip Tickets management scripts.

應用程式架構Application architecture

Wingtip SaaS 應用程式會使用每一租用戶一個資料庫的模型。The Wingtip SaaS app uses the database-per-tenant model. 它會使用 SQL 彈性集區來發揮最高效率。It uses SQL elastic pools to maximize efficiency. 若要將租用戶佈建和對應至其資料,則會使用目錄資料庫。For provisioning and mapping tenants to their data, a catalog database is used. 核心 Wingtip SaaS 應用程式會使用具有三個範例租用戶的集區,再加上目錄資料庫。The core Wingtip SaaS application uses a pool with three sample tenants, plus the catalog database. 目錄和租用戶伺服器已透過 DNS 別名進行佈建。The catalog and tenant servers have been provisioned with DNS aliases. 這些別名會用來為 Wingtip 應用程式使用的作用中資源維護參考。These aliases are used to maintain a reference to the active resources used by the Wingtip application. 這些別名會更新為指向災害復原教學課程中的復原資源。These aliases are updated to point to recovery resources in the disaster recovery tutorials. 在完成許多 Wingtip SaaS 教學課程之後,初始部署就會擁有附加元件。Completing many of the Wingtip SaaS tutorials results in add-ons to the initial deployment. 導入的附加元件包括分析資料戶和跨資料庫結構描述管理等。Add-ons such as analytic databases and cross-database schema management are introduced.

Wingtip SaaS 架構

在進行教學課程及搭配應用程式運作的過程中,請將焦點放在 SaaS 模式上,因為它們與資料層相關。As you go through the tutorials and work with the app, focus on the SaaS patterns as they relate to the data tier. 換句話說,就是著重於資料層,而不要過度分析應用程式本身。In other words, focus on the data tier, and don't overanalyze the app itself. 了解這些 SaaS 模式的實作方式是在應用程式中實作這些模式的關鍵。Understanding the implementation of these SaaS patterns is key to implementing these patterns in your applications. 此外,也請考慮針對您特定的業務需求進行任何必要的修改。Also consider any necessary modifications for your specific business requirements.

SQL Database Wingtip SaaS 教學課程SQL Database Wingtip SaaS tutorials

部署應用程式之後,請瀏覽下列以初始部署為基礎的教學課程。After you deploy the app, explore the following tutorials that build on the initial deployment. 這些教學課程會探索常見的 SaaS 模式,這些模式會利用 SQL Database、「Azure SQL 資料倉儲」及其他 Azure 服務的內建功能。These tutorials explore common SaaS patterns that take advantage of built-in features of SQL Database, Azure SQL Data Warehouse, and other Azure services. 教學課程包括 PowerShell 指令碼及詳細的說明。Tutorials include PowerShell scripts with detailed explanations. 這些說明可讓您更容易了解及在您應用程式中實作相同的 SaaS 管理模式。The explanations simplify understanding and implementation of the same SaaS management patterns in your applications.

教學課程Tutorial 描述Description
SQL Database 多租用戶 SaaS 應用程式範例的指引和祕訣Guidance and tips for the SQL Database multitenant SaaS app example 下載並執行 PowerShell 指令碼,以準備應用程式的組件。Download and run PowerShell scripts to prepare parts of the application.
部署及探索 Wingtip SaaS 應用程式Deploy and explore the Wingtip SaaS application 使用您的 Azure 訂用帳戶來部署及探索 Wingtip SaaS 應用程式。Deploy and explore the Wingtip SaaS application with your Azure subscription.
佈建租用戶並在目錄中註冊Provision and catalog tenants 了解應用程式如何使用目錄資料庫來連線至租用戶,以及目錄如何將租用戶對應至其資料。Learn how the application connects to tenants by using a catalog database, and how the catalog maps tenants to their data.
監視及管理效能Monitor and manage performance 了解如何使用 SQL Database 的監視功能,以及設定超過效能閾值時的警示。Learn how to use monitoring features of SQL Database and set alerts when performance thresholds are exceeded.
使用 Azure 監視器記錄檔監視Monitor with Azure Monitor logs 了解如何使用Azure 監視器記錄來監視大量資源的多個集區。Learn how to use Azure Monitor logs to monitor large amounts of resources across multiple pools.
還原單一租用戶Restore a single tenant 了解如何將租用戶資料庫還原到先前的時間點。Learn how to restore a tenant database to a prior point in time. 此外,也了解如何還原到平行資料庫,這會讓現有的租用戶資料庫維持上線狀態。Also learn how to restore to a parallel database, which leaves the existing tenant database online.
管理租用戶資料庫結構描述Manage tenant database schema 了解如何更新結構描述,以及更新跨所有租用戶資料庫的參考資料。Learn how to update schema and update reference data across all tenant databases.
執行跨租用戶分散式查詢Run cross-tenant distributed queries 建立臨機操作分析資料庫,並跨所有租用戶執行即時分散式的查詢。Create an ad hoc analytics database, and run real-time distributed queries across all tenants.
根據擷取的租用戶資料執行分析Run analytics on extracted tenant data 將租用戶資料擷取到分析資料庫或資料倉儲中,以便執行離線分析查詢。Extract tenant data into an analytics database or data warehouse for offline analytics queries.

後續步驟Next steps