雖然 Microsoft Entra ID 是 Azure Active Directory(Azure AD)的新名稱,但為了防止破壞現有的環境,Azure AD 仍會保留在某些硬式編碼元素中,例如 UI 字段、連線提供者、錯誤碼和 Cmdlet。 在本文中,這兩個名稱是可互換的。
命令列說明
若要檢視 Azure Data Studio 命令列介面的概觀,請在 Azure Data Studio 中開啟終端機 (檢視 > 終端機) 或開啟命令提示字元並輸入 azuredatastudio --help。 輸出包含命令列選項的版本、使用範例和清單,如節錄範例中所示:
輸出
Azure Data Studio 1.48.1
Usage: azuredatastudio.exe [options][paths...]
To read output from another program, append '-' (e.g. 'echo Hello World | azuredatastudio.exe -')
Options
<vscode options>
-h --help Print usage.
--aad Use Azure Active Directory authentication, this option is
deprecated - use 'authenticationType' instead.
-A --applicationName Supports providing applicationName
that will be used for connection profile app name.
-T --authenticationType Provide authentication mode to be
used. Accepted values: AzureMFA, SqlLogin, Integrated, etc.
-c --command <command-name> Name of command to run, accepted
values: connect, openConnectionDialog
-Z --connectionProperties Supports providing advanced connection properties that
providers support. Value must be a json object containing
key-value pairs in format: '{"key1":"value1"}'
-D --database <database> Name of database
-E --integrated Use Integrated authentication,
this option is deprecated - use 'authenticationType' instead.
-P --provider Connection provider to use, e.g. MSSQL, PGSQL, etc.
-S --server <server> Name of target server or host name.
--showDashboard Whether or not to show dashboard on connection, false by default.
-U --user <user-name> User name/email address
從命令列啟動
可以從命令列啟動 Azure Data Studio,以快速開啟檔案、資料夾或專案。 通常,可在資料夾的內容中開啟 Azure Data Studio。 從開啟的終端機或命令提示字元,瀏覽至您的專案資料夾並輸入 azuredatastudio。
使用查詢編輯器啟動
有時,當您開啟 Azure Data Studio 時,可能會想要在查詢編輯器中開啟指令碼。 可以提供檔案路徑,使用現有指令碼來啟動 Azure Data Studio:
Bash
azuredatastudio .\samplescript.sql
使用 URI 啟動
可以使用 URL 格式從瀏覽器啟動 Azure Data Studio,在啟動時快速建立連接,或開啟連接對話框,選擇性地在查詢編輯器中開啟指令碼。 使用 URI 進行啟動的支援格式為: