連線至伺服器Connecting to servers

本文說明如何使用資料模型化和管理應用程式 (例如 SQL Server Management Studio (SSMS) 或 SQL Server Data Tools (SSDT)) 來連接到伺服器。This article describes connecting to a server by using data modeling and management applications like SQL Server Management Studio (SSMS) or SQL Server Data Tools (SSDT). 或是使用用戶端報表應用程式,例如 Microsoft Excel、Power BI Desktop 或自訂應用程式。Or, with client reporting applications like Microsoft Excel, Power BI Desktop, or custom applications. 連到 Azure Analysis Services 的連線會使用 HTTPS。Connections to Azure Analysis Services use HTTPS.

用戶端程式庫Client libraries

取得最新的用戶端程式庫Get the latest Client libraries

所有連到伺服器的連線 (不論是哪一種類型) 都需要已更新的 AMO、ADOMD.NET 及 OLEDB 用戶端程式庫,才能連接到 Analysis Services 伺服器並與其銜接。All connections to a server, regardless of type, require updated AMO, ADOMD.NET, and OLEDB client libraries to connect to and interface with an Analysis Services server. 針對 SSMS、SSDT、Excel 2016 與更新版本及 Power BI,最新的用戶端程式庫會隨著每月的發行版本一起安裝或更新。For SSMS, SSDT, Excel 2016 and later, and Power BI, the latest client libraries are installed or updated with monthly releases. 不過,在某些情況下,應用程式的版本可能不會是最新的。However, in some cases, it's possible an application may not have the latest. 例如,當原則延遲更新,或 Office 365 更新是在「順延通道」上時。For example, when policies delay updates, or Office 365 updates are on the Deferred Channel.

伺服器名稱Server name

當您在 Azure 中建立 Analysis Services 伺服器時,您可以指定唯一的名稱和要建立伺服器的區域。When you create an Analysis Services server in Azure, you specify a unique name and the region where the server is to be created. 在連線中指定伺服器名稱時,伺服器命名配置為:When specifying the server name in a connection, the server naming scheme is:

<protocol>://<region>/<servername>

其中 protocol 是字串 asazure,region 是伺服器建立位置的 Uri (例如 westus.asazure.windows.net),而 servername 則是該區域內您唯一伺服器的名稱。Where protocol is string asazure, region is the Uri where the server was created (for example, westus.asazure.windows.net) and servername is the name of your unique server within the region.

取得伺服器名稱Get the server name

在 [Azure 入口網站] > 伺服器 > [概觀] > [伺服器名稱] 中,複製整個伺服器名稱。In Azure portal > server > Overview > Server name, copy the entire server name. 如果您組織中的其他使用者也會連線到這部伺服器,您可以將此伺服器名稱告訴他們。If other users in your organization are connecting to this server too, you can share this server name with them. 指定伺服器名稱時,必須使用完整路徑。When specifying a server name, the entire path must be used.

在 Azure 中取得伺服器名稱

注意

美國東部 2 區域的通訊協定是aspaaseastus2The protocol for East US 2 region is aspaaseastus2.

連接字串Connection string

使用表格式物件模型連線至 Azure Analysis Services 時,請使用下列連接字串格式:When connecting to Azure Analysis Services using the Tabular Object Model, use the following connection string formats:

整合型 Azure Active Directory 驗證Integrated Azure Active Directory authentication

整合型驗證會挑選 Azure Active Directory 認證快取 (若有的話)。Integrated authentication picks up the Azure Active Directory credential cache if available. 如果沒有,則會顯示 Azure 登入視窗。If not, the Azure login window is shown.

"Provider=MSOLAP;Data Source=<Azure AS instance name>;"
以使用者名稱與密碼進行的 Azure Active Directory 驗證Azure Active Directory authentication with username and password
"Provider=MSOLAP;Data Source=<Azure AS instance name>;User ID=<user name>;Password=<password>;Persist Security Info=True; Impersonation Level=Impersonate;";
Windows 驗證 (整合式安全性)Windows authentication (Integrated security)

請使用執行目前程序的 Windows 帳戶。Use the Windows account running the current process.

"Provider=MSOLAP;Data Source=<Azure AS instance name>; Integrated Security=SSPI;Persist Security Info=True;"

使用 .odc 檔案進行連接Connect using an .odc file

在使用舊版 Excel 的情況下,使用者可以使用「Office 資料連線」(.odc) 檔案來連接到 Azure Analysis Services 伺服器。With older versions of Excel, users can connect to an Azure Analysis Services server by using an Office Data Connection (.odc) file. 若要深入了解,請參閱建立 Office 資料連線 (.odc) 檔案To learn more, see Create an Office Data Connection (.odc) file.

後續步驟Next steps

使用 Excel 進行連接 Connect with Excel
使用 Power BI 進行連接 Connect with Power BI
管理您的伺服器Manage your server