bin/smo/zh-hant/Microsoft.SqlServer.Management.PSSnapins.dll-Help.xml

<?xml version="1.0" encoding="utf-8"?>
 
<helpItems xmlns="http://msh" schema="maml">
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Add-SqlAvailabilityDatabase</command:name><maml:description><maml:para>將一個或多個主要資料庫或是一個或多個次要資料庫加入或聯結至 InputObject 或 Path 參數中指定的可用性群組。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Add</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Add-SqlAvailabilityDatabase Cmdlet 會將一個或多個主要資料庫或是一個或多個次要資料庫加入或聯結至 InputObject 或 Path 參數中指定的可用性群組。
</maml:para><maml:para>若要將一個或多個資料庫加入至可用性群組,請在裝載主要複本的伺服器執行個體上執行這個 Cmdlet,並且指定一個或多個本機使用者資料庫。
</maml:para><maml:para>若要將次要資料庫聯結至可用性群組,請在裝載次要複本的伺服器執行個體上手動準備次要資料庫,然後在裝載次要複本的伺服器執行個體上執行這個 Cmdlet。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-SqlAvailabilityDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>指定要加入或聯結至 Path 或 InputObject 參數中指定之可用性群組的一個或多個使用者資料庫陣列。這些資料庫必須位於 SQL Server 的本機執行個體上。請注意,給定的資料庫只能屬於一個可用性群組。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>您要加入或聯結資料庫之目標可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>指定要加入或聯結至 Path 或 InputObject 參數中指定之可用性群組的一個或多個使用者資料庫陣列。這些資料庫必須位於 SQL Server 的本機執行個體上。請注意,給定的資料庫只能屬於一個可用性群組。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>指定要加入或聯結至 Path 或 InputObject 參數中指定之可用性群組的一個或多個使用者資料庫陣列。這些資料庫必須位於 SQL Server 的本機執行個體上。請注意,給定的資料庫只能屬於一個可用性群組。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>您要加入或聯結資料庫之目標可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
-------------------------- EXAMPLE 1 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Add-SqlAvailabilityDatabase -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAG -Database "MyDatabase"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將資料庫 'MyDatabase' 加入至可用性群組 'MyAG'。此命令 (必須在可用性群組的主要伺服器執行個體上執行) 不會準備次要資料庫以進行資料同步處理。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
-------------------------- EXAMPLE 2 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Add-SqlAvailabilityDatabase -Path SQLSERVER:\SQL\SecondaryServer\InstanceName\AvailabilityGroups\MyAG -Database "MyDatabase"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將次要資料庫 'MyDatabase' 聯結至裝載次要複本之其中一個伺服器執行個體上的可用性群組 'MyAG'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
-------------------------- EXAMPLE 3 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$DatabaseBackupFile = "\\share\backups\MyDatabase.bak"
$LogBackupFile = "\\share\backups\MyDatabase.trn"
$MyAgPrimaryPath = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg"
$MyAgSecondaryPath = "SQLSERVER:\SQL\SecondaryServer\InstanceName\AvailabilityGroups\MyAg"
 
Backup-SqlDatabase -Database "MyDatabase" -BackupFile $DatabaseBackupFile -ServerInstance "PrimaryServer\InstanceName"
Backup-SqlDatabase -Database "MyDatabase" -BackupFile $LogBackupFile -ServerInstance "PrimaryServer\InstanceName" -BackupAction 'Log'
Restore-SqlDatabase -Database "MyDatabase" -BackupFile $DatabaseBackupFile -ServerInstance "SecondaryServer\InstanceName" -NoRecovery
Restore-SqlDatabase -Database "MyDatabase" -BackupFile $LogBackupFile -ServerInstance "SecondaryServer\InstanceName" -RestoreAction 'Log' -NoRecovery
 
Add-SqlAvailabilityDatabase -Path $MyAgPrimaryPath -Database "MyDatabase"
Add-SqlAvailabilityDatabase -Path $MyAgSecondaryPath -Database "MyDatabase"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會示範下列完整程序:根據裝載可用性群組之主要複本的伺服器執行個體上的資料庫準備次要資料庫、將資料庫加入至可用性群組 (做為主要資料庫),然後將次要資料庫聯結至可用性群組。首先,此範例會備份資料庫及其交易記錄。然後,此範例會將資料庫和記錄備份還原至裝載次要複本的伺服器執行個體。此範例會呼叫 Add-SqlAvailabilityDatabase 兩次:第一次是針對主要複本呼叫,以便將資料庫加入至可用性群組,然後再針對次要複本呼叫,以便將該複本的次要資料庫聯結至可用性群組。如果您有多個次要複本,請還原並聯結每個次要複本的次要資料庫。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
-------------------------- EXAMPLE 4 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Add-SqlAvailabilityDatabase -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAG -Database "MyDatabase" -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 指令碼,這個指令碼會將資料庫 'MyDatabase' 加入至可用性群組 'MyAG'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Adding a Database to an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: Joining a Secondary Replica to an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: Specifying the Endpoint URL for an Availability Replica (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Add-SqlAvailabilityGroupListenerStaticIp</command:name><maml:description><maml:para>將靜態 IP 位址加入至現有的可用性群組接聽程式組態。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Add</command:verb><command:noun>SqlAvailabilityGroupListenerStaticIp</command:noun><dev:version /></command:details><maml:description><maml:para>Add-SqlAvailabilityGroupListenerStaticIp Cmdlet 會將靜態 IP 位址加入至現有的可用性群組接聽程式組態。可接受 AvailabilityGroupListener、路徑和靜態 IP 位址做為參數。IP 位址可以是包含子網路的 IPv4 位址或 IPv6 位址。這個 Cmdlet 只能在裝載主要複本的伺服器執行個體上執行。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-SqlAvailabilityGroupListenerStaticIp</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組接聽程式的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>要加入至可用性群組接聽程式的靜態 IP 位址。這個引數應該是字串清單。每個字串都可以是採用斜線標記法的 IPv4 位址和子網路遮罩 (例如 192.168.1.1/255.255.255.0) 或 IPv6 位址。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlAvailabilityGroupListenerStaticIp</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>您要加入 IP 位址之目標接聽程式的 AvailabilityGroupListener 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>要加入至可用性群組接聽程式的靜態 IP 位址。這個引數應該是字串清單。每個字串都可以是採用斜線標記法的 IPv4 位址和子網路遮罩 (例如 192.168.1.1/255.255.255.0) 或 IPv6 位址。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>您要加入 IP 位址之目標接聽程式的 AvailabilityGroupListener 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組接聽程式的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>要加入至可用性群組接聽程式的靜態 IP 位址。這個引數應該是字串清單。每個字串都可以是採用斜線標記法的 IPv4 位址和子網路遮罩 (例如 192.168.1.1/255.255.255.0) 或 IPv6 位址。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 1 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$path = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener"
Add-SqlAvailabilityGroupListenerStaticIp -Path $path -StaticIp "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會將靜態 IPv4 位址加入至可用性群組 'MyAg' 的可用性群組接聽程式 'MyListener'。這個 IPv4 位址會做為子網路 255.255.252.0 之接聽程式的虛擬 IP 位址。如果可用性群組跨越多個子網路,您就應該將每個子網路的靜態 IP 位址加入至接聽程式。Add-SqlAvailabilityGroupListenerStaticIp 命令必須在裝載主要複本的伺服器執行個體上執行。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 2 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$path = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener"
Add-SqlAvailabilityGroupListenerStaticIp -Path $path -StaticIp "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將靜態 IPv6 位址加入至可用性群組 'MyAg' 的接聽程式 'MyListener'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 3 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$path = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener"
Add-SqlAvailabilityGroupListenerStaticIp -Path $path -StaticIp "192.168.0.1/255.255.255.0" -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 指令碼,這個指令碼會將靜態 IPv4 位址加入至可用性群組 'MyAg' 的接聽程式 'MyListener'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Add-SqlFirewallRule</command:name><maml:description><maml:para>加入 Windows 防火牆規則,以允許特定 SQL Server 執行個體的連線。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Add</command:verb><command:noun>SqlFirewallRule</command:noun><dev:version /></command:details><maml:description><maml:para>加入 Windows 防火牆規則,以允許指定 SQL Server 執行個體的連線。</maml:para><maml:para>SQL Server 雲端配接器必須在主控 SQL Server 執行個體的電腦上執行及存取。</maml:para><maml:para>這個 Cmdlet 支援下列作業模式:</maml:para><maml:para>1.透過指定執行個體 PowerShell 路徑。</maml:para><maml:para>2.透過指定伺服器物件。</maml:para><maml:para>3.透過指定目標 SQL Server 執行個體的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標 SQL Server 執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標 SQL Server 執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Add-SqlFirewallRule  -Credential $credential -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para>此命令會將 Windows 防火牆規則加入電腦 'Computer',以允許此電腦上的 SQL Server 'Instance' 之執行個體的連線。目前的工作目錄會用來決定應該進行作業的伺服器執行個體。系統會自動接受目標電腦的自我簽署憑證,而不提示使用者。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and adds Windows Firewall rules to allow connections for each one of them. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName" | Add-SqlFirewallRule  -Credential $credential -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Backup-SqlDatabase</command:name><maml:description><maml:para>Backup-SqlDatabase Cmdlet 會在 SQL Server 資料庫上執行備份作業。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Backup</command:verb><command:noun>SqlDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Backup-SqlDatabase Cmdlet 會在 SQL Server 資料庫上執行備份作業。這包括完整資料庫備份、交易記錄備份和資料庫檔案備份。這個 Cmdlet 是依照 Microsoft.SqlServer.Management.Smo.Backup 類別建立的。此類別的參數通常會對應至該 Smo 物件的屬性。
</maml:para><maml:para>這個 Cmdlet 支援四種作業模式,可備份伺服器執行個體上具有指定名稱的資料庫。
</maml:para><maml:para>1.將伺服器執行個體的路徑傳遞給 -Path 參數,並將資料庫名稱傳遞給 -Database 參數。
</maml:para><maml:para>2.將 Smo.Server 物件傳遞給 -InputObject 參數 (直接或透過管線),並將資料庫名稱傳遞給 -Database 參數。
</maml:para><maml:para>3.將伺服器執行個體的名稱傳遞給 -ServerInstance 參數,並將資料庫名稱傳遞給 -Database 參數。
</maml:para><maml:para>4.將 Smo.Database 物件傳遞給 -DatabaseObject 參數 (直接或透過管線)。
</maml:para><maml:para>根據預設,此 Cmdlet 會執行完整資料庫備份。您可以透過指定 -BackupAction 參數,設定備份的類型。
</maml:para><maml:para>根據預設,備份檔案會以 "databasename.bak" (完整及/或檔案備份) 和 "databasename.trn" (記錄備份) 的名稱儲存在預設伺服器備份位置中。
</maml:para><maml:para>您可以透過指定 -BackupFile 參數,設定備份檔案的位置和檔案名稱。請使用 BackupFile 參數指定備份檔案的完整檔名,這個完整檔名包含檔案的位置和檔案名稱。
</maml:para><maml:para>請使用 BackupContainer 參數設定備份檔案的位置。在本例中,備份檔案的名稱是自動產生的。BackupContainer 參數僅用來指定備份檔案的位置。如需詳細資訊,請參閱 BackupContainer 參數說明。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要備份的資料庫名稱。-Database 無法搭配 -DatabaseObject 參數使用。當
</maml:para><maml:para>您指定了 -Database 參數時,也必須指定 -Path、-InputObject 或 -ServerInstance 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>備份檔案的位置和名稱。這是選擇性參數。如果未指定,備份就會以 "databasename.bak" (完整及檔案備份) 或 "databasename.trn" (記錄備份) 的名稱儲存在伺服器的預設備份位置中。這個參數無法搭配 BackupDevice 或 BackupContainer 參數使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要執行的備份作業類型。有效的選項包括:Database、Files 或 Log,如下所示:
</maml:para><maml:para>Database:備份資料庫中的所有資料檔案。
</maml:para><maml:para>Files:備份指定的資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:備份交易記錄。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>儲存備份的資料夾或位置,這可以是磁碟上的資料夾或 Windows Azure Blob 容器的 URL。在指定的執行個體中備份多個資料庫時,這個參數可能會很有用。這個參數無法搭配 BackupDevice 參數使用。BackupContainer 參數無法搭配 BackupFile 參數使用。
</maml:para><maml:para>注意:用來指定位置的路徑結尾必須是正斜線 (/)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>備份組的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>備份組的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在備份作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>備份作業的壓縮選項。選項包括 Default、On 和 Off。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>備份為只複製備份。只複製備份不會影響您定期排程之傳統備份的一般順序。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>一個或多個要備份的資料庫檔案。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>備份作業的目標資料庫檔案群組。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>備份作業的加密選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>備份組到期且不再將備份資料視為有效的日期和時間。只能用於儲存在磁碟或磁帶裝置上的備份資料。超過到期日的備份組可以由更新的備份覆寫。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>在備份作業的第一個步驟格式化磁帶。不適用於磁碟備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>執行差異備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化與備份作業相關聯的裝置。覆寫媒體上的任何現有備份組,而且這個備份會成為媒體上的第一個備份組。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>記錄備份的截斷行為。選項包括 TruncateOnly、NoTruncate 或 Truncate。根據預設,這個選項會設定為 Truncate。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含備份組之媒體的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定鏡像備份所使用之 BackupDeviceList 物件的陣列。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不備份記錄檔的尾端。還原時,資料庫會處於還原狀態。如果未設定,則會備份記錄檔的尾端。只適用於 -BackupAction 參數設定為 Log 的情況。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當備份完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟或 URL 備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>如果已設定,就會輸出執行備份的 Smo Backup 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行備份作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的備份作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的備份作業。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>必須經過多少天之後,才能覆寫備份組。只能用於儲存在磁碟或磁帶裝置上的備份資料。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>略過讀取磁帶標頭。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential 物件會儲存驗證資訊。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。這個參數不能搭配 Disk 或 Tape 使用。您可以提供 SQL Server 認證名稱或透過管線傳遞物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>恢復檔案的名稱,用來儲存復原期間回復的未認可交易。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟或 URL 備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>資料庫物件。系統將在此資料庫上執行備份作業。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>備份檔案的位置和名稱。這是選擇性參數。如果未指定,備份就會以 "databasename.bak" (完整及檔案備份) 或 "databasename.trn" (記錄備份) 的名稱儲存在伺服器的預設備份位置中。這個參數無法搭配 BackupDevice 或 BackupContainer 參數使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要執行的備份作業類型。有效的選項包括:Database、Files 或 Log,如下所示:
</maml:para><maml:para>Database:備份資料庫中的所有資料檔案。
</maml:para><maml:para>Files:備份指定的資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:備份交易記錄。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>儲存備份的資料夾或位置,這可以是磁碟上的資料夾或 Windows Azure Blob 容器的 URL。在指定的執行個體中備份多個資料庫時,這個參數可能會很有用。這個參數無法搭配 BackupDevice 參數使用。BackupContainer 參數無法搭配 BackupFile 參數使用。
</maml:para><maml:para>注意:用來指定位置的路徑結尾必須是正斜線 (/)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>備份組的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>備份組的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在備份作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>備份作業的壓縮選項。選項包括 Default、On 和 Off。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>備份為只複製備份。只複製備份不會影響您定期排程之傳統備份的一般順序。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>一個或多個要備份的資料庫檔案。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>備份作業的目標資料庫檔案群組。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>備份作業的加密選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>備份組到期且不再將備份資料視為有效的日期和時間。只能用於儲存在磁碟或磁帶裝置上的備份資料。超過到期日的備份組可以由更新的備份覆寫。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>在備份作業的第一個步驟格式化磁帶。不適用於磁碟備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>執行差異備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化與備份作業相關聯的裝置。覆寫媒體上的任何現有備份組,而且這個備份會成為媒體上的第一個備份組。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>記錄備份的截斷行為。選項包括 TruncateOnly、NoTruncate 或 Truncate。根據預設,這個選項會設定為 Truncate。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含備份組之媒體的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定鏡像備份所使用之 BackupDeviceList 物件的陣列。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不備份記錄檔的尾端。還原時,資料庫會處於還原狀態。如果未設定,則會備份記錄檔的尾端。只適用於 -BackupAction 參數設定為 Log 的情況。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當備份完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟或 URL 備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>如果已設定,就會輸出執行備份的 Smo Backup 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的備份作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的備份作業。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>必須經過多少天之後,才能覆寫備份組。只能用於儲存在磁碟或磁帶裝置上的備份資料。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>略過讀取磁帶標頭。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential 物件會儲存驗證資訊。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。這個參數不能搭配 Disk 或 Tape 使用。您可以提供 SQL Server 認證名稱或透過管線傳遞物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>恢復檔案的名稱,用來儲存復原期間回復的未認可交易。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟或 URL 備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要備份的資料庫名稱。-Database 無法搭配 -DatabaseObject 參數使用。當
</maml:para><maml:para>您指定了 -Database 參數時,也必須指定 -Path、-InputObject 或 -ServerInstance 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>備份檔案的位置和名稱。這是選擇性參數。如果未指定,備份就會以 "databasename.bak" (完整及檔案備份) 或 "databasename.trn" (記錄備份) 的名稱儲存在伺服器的預設備份位置中。這個參數無法搭配 BackupDevice 或 BackupContainer 參數使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要執行的備份作業類型。有效的選項包括:Database、Files 或 Log,如下所示:
</maml:para><maml:para>Database:備份資料庫中的所有資料檔案。
</maml:para><maml:para>Files:備份指定的資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:備份交易記錄。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>儲存備份的資料夾或位置,這可以是磁碟上的資料夾或 Windows Azure Blob 容器的 URL。在指定的執行個體中備份多個資料庫時,這個參數可能會很有用。這個參數無法搭配 BackupDevice 參數使用。BackupContainer 參數無法搭配 BackupFile 參數使用。
</maml:para><maml:para>注意:用來指定位置的路徑結尾必須是正斜線 (/)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>備份組的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>備份組的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在備份作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>備份作業的壓縮選項。選項包括 Default、On 和 Off。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在逾時失敗之前要等候伺服器連接的秒數。逾時值必須是介於 0 到 65534 之間的整數。如果指定了 0,連接嘗試就不會逾時。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>備份為只複製備份。只複製備份不會影響您定期排程之傳統備份的一般順序。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>PSCredential 物件,用來指定有權執行此作業之 SQL Server 登入的認證。
 
這不是用來儲存驗證資訊 (在存取 SQL Server 的外部資源時,SQL Server 會在內部使用此資訊) 的 SQL Credential 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>一個或多個要備份的資料庫檔案。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>備份作業的目標資料庫檔案群組。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>備份作業的加密選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>備份組到期且不再將備份資料視為有效的日期和時間。只能用於儲存在磁碟或磁帶裝置上的備份資料。超過到期日的備份組可以由更新的備份覆寫。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>在備份作業的第一個步驟格式化磁帶。不適用於磁碟備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>執行差異備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化與備份作業相關聯的裝置。覆寫媒體上的任何現有備份組,而且這個備份會成為媒體上的第一個備份組。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>記錄備份的截斷行為。選項包括 TruncateOnly、NoTruncate 或 Truncate。根據預設,這個選項會設定為 Truncate。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含備份組之媒體的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定鏡像備份所使用之 BackupDeviceList 物件的陣列。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不備份記錄檔的尾端。還原時,資料庫會處於還原狀態。如果未設定,則會備份記錄檔的尾端。只適用於 -BackupAction 參數設定為 Log 的情況。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當備份完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟或 URL 備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>如果已設定,就會輸出執行備份的 Smo Backup 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的備份作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的備份作業。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>必須經過多少天之後,才能覆寫備份組。只能用於儲存在磁碟或磁帶裝置上的備份資料。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>略過讀取磁帶標頭。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential 物件會儲存驗證資訊。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。這個參數不能搭配 Disk 或 Tape 使用。您可以提供 SQL Server 認證名稱或透過管線傳遞物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>恢復檔案的名稱,用來儲存復原期間回復的未認可交易。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟或 URL 備份。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 執行個體的名稱。這個伺服器執行個體會成為備份作業的目標。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要備份的資料庫名稱。-Database 無法搭配 -DatabaseObject 參數使用。當
</maml:para><maml:para>您指定了 -Database 參數時,也必須指定 -Path、-InputObject 或 -ServerInstance 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>備份檔案的位置和名稱。這是選擇性參數。如果未指定,備份就會以 "databasename.bak" (完整及檔案備份) 或 "databasename.trn" (記錄備份) 的名稱儲存在伺服器的預設備份位置中。這個參數無法搭配 BackupDevice 或 BackupContainer 參數使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要執行的備份作業類型。有效的選項包括:Database、Files 或 Log,如下所示:
</maml:para><maml:para>Database:備份資料庫中的所有資料檔案。
</maml:para><maml:para>Files:備份指定的資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:備份交易記錄。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>儲存備份的資料夾或位置,這可以是磁碟上的資料夾或 Windows Azure Blob 容器的 URL。在指定的執行個體中備份多個資料庫時,這個參數可能會很有用。這個參數無法搭配 BackupDevice 參數使用。BackupContainer 參數無法搭配 BackupFile 參數使用。
</maml:para><maml:para>注意:用來指定位置的路徑結尾必須是正斜線 (/)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>備份組的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>備份組的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在備份作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>備份作業的壓縮選項。選項包括 Default、On 和 Off。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>備份為只複製備份。只複製備份不會影響您定期排程之傳統備份的一般順序。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>一個或多個要備份的資料庫檔案。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>備份作業的目標資料庫檔案群組。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>備份作業的加密選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>備份組到期且不再將備份資料視為有效的日期和時間。只能用於儲存在磁碟或磁帶裝置上的備份資料。超過到期日的備份組可以由更新的備份覆寫。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>在備份作業的第一個步驟格式化磁帶。不適用於磁碟備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>執行差異備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化與備份作業相關聯的裝置。覆寫媒體上的任何現有備份組,而且這個備份會成為媒體上的第一個備份組。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>記錄備份的截斷行為。選項包括 TruncateOnly、NoTruncate 或 Truncate。根據預設,這個選項會設定為 Truncate。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含備份組之媒體的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定鏡像備份所使用之 BackupDeviceList 物件的陣列。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不備份記錄檔的尾端。還原時,資料庫會處於還原狀態。如果未設定,則會備份記錄檔的尾端。只適用於 -BackupAction 參數設定為 Log 的情況。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當備份完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟或 URL 備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>如果已設定,就會輸出執行備份的 Smo Backup 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的備份作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的備份作業。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>必須經過多少天之後,才能覆寫備份組。只能用於儲存在磁碟或磁帶裝置上的備份資料。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>略過讀取磁帶標頭。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential 物件會儲存驗證資訊。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。這個參數不能搭配 Disk 或 Tape 使用。您可以提供 SQL Server 認證名稱或透過管線傳遞物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>恢復檔案的名稱,用來儲存復原期間回復的未認可交易。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟或 URL 備份。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該進行備份之位置的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>備份檔案的位置和名稱。這是選擇性參數。如果未指定,備份就會以 "databasename.bak" (完整及檔案備份) 或 "databasename.trn" (記錄備份) 的名稱儲存在伺服器的預設備份位置中。這個參數無法搭配 BackupDevice 或 BackupContainer 參數使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要執行的備份作業類型。有效的選項包括:Database、Files 或 Log,如下所示:
</maml:para><maml:para>Database:備份資料庫中的所有資料檔案。
</maml:para><maml:para>Files:備份指定的資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:備份交易記錄。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>儲存備份的資料夾或位置,這可以是磁碟上的資料夾或 Windows Azure Blob 容器的 URL。在指定的執行個體中備份多個資料庫時,這個參數可能會很有用。這個參數無法搭配 BackupDevice 參數使用。BackupContainer 參數無法搭配 BackupFile 參數使用。
</maml:para><maml:para>注意:用來指定位置的路徑結尾必須是正斜線 (/)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>備份組的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>備份組的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在備份作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>備份作業的壓縮選項。選項包括 Default、On 和 Off。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>備份為只複製備份。只複製備份不會影響您定期排程之傳統備份的一般順序。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>一個或多個要備份的資料庫檔案。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>備份作業的目標資料庫檔案群組。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>備份作業的加密選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>備份組到期且不再將備份資料視為有效的日期和時間。只能用於儲存在磁碟或磁帶裝置上的備份資料。超過到期日的備份組可以由更新的備份覆寫。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>在備份作業的第一個步驟格式化磁帶。不適用於磁碟備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>執行差異備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化與備份作業相關聯的裝置。覆寫媒體上的任何現有備份組,而且這個備份會成為媒體上的第一個備份組。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>記錄備份的截斷行為。選項包括 TruncateOnly、NoTruncate 或 Truncate。根據預設,這個選項會設定為 Truncate。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含備份組之媒體的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定鏡像備份所使用之 BackupDeviceList 物件的陣列。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不備份記錄檔的尾端。還原時,資料庫會處於還原狀態。如果未設定,則會備份記錄檔的尾端。只適用於 -BackupAction 參數設定為 Log 的情況。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當備份完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟或 URL 備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>如果已設定,就會輸出執行備份的 Smo Backup 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的備份作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的備份作業。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>必須經過多少天之後,才能覆寫備份組。只能用於儲存在磁碟或磁帶裝置上的備份資料。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>略過讀取磁帶標頭。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential 物件會儲存驗證資訊。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。這個參數不能搭配 Disk 或 Tape 使用。您可以提供 SQL Server 認證名稱或透過管線傳遞物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>恢復檔案的名稱,用來儲存復原期間回復的未認可交易。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟或 URL 備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要執行的備份作業類型。有效的選項包括:Database、Files 或 Log,如下所示:
</maml:para><maml:para>Database:備份資料庫中的所有資料檔案。
</maml:para><maml:para>Files:備份指定的資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:備份交易記錄。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue><dev:type><maml:name>BackupActionType</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.BackupActionType.Database</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>儲存備份的資料夾或位置,這可以是磁碟上的資料夾或 Windows Azure Blob 容器的 URL。在指定的執行個體中備份多個資料庫時,這個參數可能會很有用。這個參數無法搭配 BackupDevice 參數使用。BackupContainer 參數無法搭配 BackupFile 參數使用。
</maml:para><maml:para>注意:用來指定位置的路徑結尾必須是正斜線 (/)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue><dev:type><maml:name>BackupDeviceItem[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>備份檔案的位置和名稱。這是選擇性參數。如果未指定,備份就會以 "databasename.bak" (完整及檔案備份) 或 "databasename.trn" (記錄備份) 的名稱儲存在伺服器的預設備份位置中。這個參數無法搭配 BackupDevice 或 BackupContainer 參數使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>備份組的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>備份組的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在備份作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>備份作業的壓縮選項。選項包括 Default、On 和 Off。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue><dev:type><maml:name>BackupCompressionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.BackupCompressionOptions.Default</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在逾時失敗之前要等候伺服器連接的秒數。逾時值必須是介於 0 到 65534 之間的整數。如果指定了 0,連接嘗試就不會逾時。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>備份為只複製備份。只複製備份不會影響您定期排程之傳統備份的一般順序。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>PSCredential 物件,用來指定有權執行此作業之 SQL Server 登入的認證。
 
這不是用來儲存驗證資訊 (在存取 SQL Server 的外部資源時,SQL Server 會在內部使用此資訊) 的 SQL Credential 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要備份的資料庫名稱。-Database 無法搭配 -DatabaseObject 參數使用。當
</maml:para><maml:para>您指定了 -Database 參數時,也必須指定 -Path、-InputObject 或 -ServerInstance 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>一個或多個要備份的資料庫檔案。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>備份作業的目標資料庫檔案群組。只能在 BackupAction 屬性設定為 Files 時使用。當 BackupAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>資料庫物件。系統將在此資料庫上執行備份作業。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue><dev:type><maml:name>Database</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>備份作業的加密選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue><dev:type><maml:name>BackupEncryptionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>備份組到期且不再將備份資料視為有效的日期和時間。只能用於儲存在磁碟或磁帶裝置上的備份資料。超過到期日的備份組可以由更新的備份覆寫。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue><dev:type><maml:name>DateTime</maml:name><maml:uri /></dev:type><dev:defaultValue>System.DateTime.MinValue</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>在備份作業的第一個步驟格式化磁帶。不適用於磁碟備份。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>執行差異備份。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化與備份作業相關聯的裝置。覆寫媒體上的任何現有備份組,而且這個備份會成為媒體上的第一個備份組。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該進行備份之位置的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>記錄備份的截斷行為。選項包括 TruncateOnly、NoTruncate 或 Truncate。根據預設,這個選項會設定為 Truncate。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue><dev:type><maml:name>BackupTruncateLogType</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.BackupTruncateLogType.Truncate</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含備份組之媒體的選擇性描述。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定鏡像備份所使用之 BackupDeviceList 物件的陣列。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue><dev:type><maml:name>BackupDeviceList[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不備份記錄檔的尾端。還原時,資料庫會處於還原狀態。如果未設定,則會備份記錄檔的尾端。只適用於 -BackupAction 參數設定為 Log 的情況。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當備份完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟或 URL 備份。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>如果已設定,就會輸出執行備份的 Smo Backup 物件。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行備份作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的備份作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的備份作業。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>必須經過多少天之後,才能覆寫備份組。只能用於儲存在磁碟或磁帶裝置上的備份資料。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>-1</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 執行個體的名稱。這個伺服器執行個體會成為備份作業的目標。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>略過讀取磁帶標頭。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential 物件會儲存驗證資訊。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。這個參數不能搭配 Disk 或 Tape 使用。您可以提供 SQL Server 認證名稱或透過管線傳遞物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>恢復檔案的名稱,用來儲存復原期間回復的未認可交易。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟或 URL 備份。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
參考應該進行備份作業之 SQL Server 執行個體的 SMO.Server 物件。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
-------------------------- EXAMPLE 1 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在伺服器執行個體 'Computer\Instance' 的預設備份位置建立資料庫 'MyDB' 的完整資料庫備份。備份檔案將命名為 'MyDB.bak'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 2 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;cd SQLSERVER:\SQL\Computer\Instance
Backup-SqlDatabase -Database MyDB
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在伺服器執行個體 'Computer\Instance' 的預設備份位置建立資料庫 'MyDB' 的完整資料庫備份。目前的工作目錄會用來決定應該進行備份的伺服器執行個體。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 3 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupAction Log
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在伺服器執行個體 'Computer\Instance' 的預設備份位置建立資料庫 'MyDB' 之交易記錄的備份。備份檔案會命名為 'MyDB.trn'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 4 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -Credential (Get-Credential sa)
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會使用 sa SQL Server 登入來建立資料庫 'MyDB' 的完整資料庫備份。此命令將提示您輸入密碼以完成 SQL Server 驗證。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 5 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile \\share\folder\MyDB.bak
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將資料庫 'MyDB' 的完整資料庫備份建立至檔案 '\\share\folder\MyDB.bak'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 6 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\SQL\Computer\Instance\Databases | Backup-SqlDatabase
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將伺服器執行個體 'Computer\Instance' 上的所有資料庫都備份至預設備份位置。備份檔案會命名為 '&lt;database name&gt;.bak'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 7 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;cd SQLSERVER:\SQL\Computer\Instance\Databases
foreach($database in (Get-ChildItem))
{
$dbName = $database.Name
Backup-SqlDatabase -Database $dbName -BackupFile "\\share\folder\$dbName.bak"
}
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此指令碼會在共用 '\\share\folder' 中建立伺服器執行個體 'Computer\Instance' 上每個資料庫的完整備份。備份檔案會命名為 '&lt;database name&gt;.bak'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 8 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupAction Files -DatabaseFileGroup "FileGroup1","FileGroup2"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會建立次要檔案群組 'FileGroup1' 和 'FileGroup2' 中每個檔案的完整檔案備份。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 9 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -Incremental
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在伺服器執行個體 'Computer\Instance' 的預設備份位置建立資料庫 'MyDB' 的差異備份。備份檔案會命名為 'MyDB.bak'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 10 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$tapeDevice = New-Object Microsoft.Sqlserver.Management.Smo.BackupDeviceItem("\\.\tape0", "Tape")
Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupDevice $tapeDevice
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在磁帶裝置 '\\.\tape0' 上建立資料庫 'MyDB' 的完整備份。為了表示這個裝置,此命令會建構 Microsoft.Sqlserver.Management.Smo.BackupDeviceItem 的執行個體。該建構函式可接受兩個引數:備份裝置的名稱 ('\\.\tape0') 以及備份裝置的類型 ('Tape')。這個 BackupDeviceItem 物件會傳遞給 Backup-SqlDatabase Cmdlet 的 -BackupDevice 參數。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 11 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Backup-SqlDatabase –ServerInstance Computer\Instance –Database –MyDB -BackupContainer "https://storageaccountname.blob.core.windows.net/containername" -SqlCredential "SQLCredentialName"
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在 Windows Azure Blob 儲存體服務上建立資料庫 'MyDB' 的完整備份。此命令會使用 BackupContainer 指定 Windows Azure Blob 容器的位置 (URL),而且備份檔案的名稱是自動產生的。SqlCredential 參數是用來指定用於儲存驗證資訊之 SQL Server 認證的名稱。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 12 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Backup-SqlDatabase –ServerInstance Computer\Instance –Database –MyDB -BackupFile "https://storageaccountname.blob.core.windows.net/containername/MyDB.bak" -SqlCredential "SQLCredentialName"
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在 Windows Azure Blob 儲存體服務上建立資料庫 'MyDB' 的完整備份。此命令會使用 BackupFile 參數指定備份檔案的位置 (URL) 和名稱。SqlCredential 參數是用來指定 SQL Server 認證的名稱。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 13 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\SQL\Computer\Instance\Databases | Backup-SqlDatabase –BackupContainer "https://storageaccountname.blob.core.windows.net/containername" -SqlCredential "SQLCredentialName"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會使用 BackupContainer 參數,將伺服器執行個體 'Computer\Instance' 上的所有資料庫都備份至 Windows Azure Blob 儲存體服務位置。備份檔案的名稱是自動產生的。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 14 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$encryptionOption = New-SqlBackupEncryptionOption -Algorithm Aes256 -EncryptorType ServerCertificate -EncryptorName "BackupCert"
</dev:code><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance . -Database "db1" -BackupFile "db1.bak" -CompressionOption On -EncryptionOption $encryptionOption
 
</dev:code><dev:remarks><maml:para>此範例會建立加密選項,然後將它當做 Backup-SqlDatabase 的參數值使用,以建立加密備份。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Disable-SqlAlwaysOn</command:name><maml:description><maml:para>在 Path、InputObject 或 ServerInstance 參數所指定的 SQL Server 執行個體上停用 AlwaysOn 可用性群組功能。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Disable</command:verb><command:noun>SqlAlwaysOn</command:noun><dev:version /></command:details><maml:description><maml:para>Disable-SqlAlwaysOn Cmdlet 會在 SQL Server 執行個體上停用 AlwaysOn 可用性群組功能。如果您在 SQL Server 服務執行時停用 AlwaysOn 可用性群組,就必須重新啟動 Database Engine 服務,才能完成變更。除非您指定 -Force 參數,否則此 Cmdlet 會詢問您是否想要重新啟動服務。如果取消,就不會進行任何作業。
</maml:para><maml:para>如果 AlwaysOn 可用性群組已經停用,這個 Cmdlet 就不會執行任何動作。
</maml:para><maml:para>這個 Cmdlet 可以針對遠端服務執行。您必須擁有系統管理員權限,才能執行這個 Cmdlet。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>有權在指定之 SQL Server 執行個體上改變 AlwaysOn 設定的 Windows 認證。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force,即可強制 Cmdlet 在未經使用者確認的情況下繼續進行。提供此參數的目的是要讓您建構指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>系統不會提示使用者重新啟動 SQL Server 服務。您必須手動重新啟動 SQL Server 服務,才能讓變更生效。設定此參數時,系統會忽略 -Force。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Disable-SqlAlwaysOn</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該停用 AlwaysOn 可用性群組設定之 SQL Server 執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>有權在指定之 SQL Server 執行個體上改變 AlwaysOn 設定的 Windows 認證。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force,即可強制 Cmdlet 在未經使用者確認的情況下繼續進行。提供此參數的目的是要讓您建構指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>系統不會提示使用者重新啟動 SQL Server 服務。您必須手動重新啟動 SQL Server 服務,才能讓變更生效。設定此參數時,系統會忽略 -Force。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Disable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>有權在指定之 SQL Server 執行個體上改變 AlwaysOn 設定的 Windows 認證。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force,即可強制 Cmdlet 在未經使用者確認的情況下繼續進行。提供此參數的目的是要讓您建構指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>系統不會提示使用者重新啟動 SQL Server 服務。您必須手動重新啟動 SQL Server 服務,才能讓變更生效。設定此參數時,系統會忽略 -Force。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>要停用 AlwaysOn 之 SQL Server 執行個體的名稱。此格式應該是 MACHINENAME\INSTANCE。可搭配 -Credential 參數使用,以變更遠端伺服器的 AlwaysOn 設定。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>有權在指定之 SQL Server 執行個體上改變 AlwaysOn 設定的 Windows 認證。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force,即可強制 Cmdlet 在未經使用者確認的情況下繼續進行。提供此參數的目的是要讓您建構指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該停用 AlwaysOn 可用性群組設定之 SQL Server 執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue><dev:type><maml:name>Server</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>系統不會提示使用者重新啟動 SQL Server 服務。您必須手動重新啟動 SQL Server 服務,才能讓變更生效。設定此參數時,系統會忽略 -Force。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>False</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>要停用 AlwaysOn 之 SQL Server 執行個體的名稱。此格式應該是 MACHINENAME\INSTANCE。可搭配 -Credential 參數使用,以變更遠端伺服器的 AlwaysOn 設定。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
參考應該停用 AlwaysOn 之 SQL Server 執行個體的 SMO.Server 物件。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>False</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Disable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在位於指定路徑的 SQL Server 執行個體上停用 AlwaysOn 可用性群組。此命令需要重新啟動伺服器執行個體,而且系統將提示您確認重新啟動。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Disable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -Force
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在位於指定路徑的 SQL Server 執行個體上停用 AlwaysOn 可用性群組。-Force 選項會導致伺服器執行個體在不提示您確認的情況下重新啟動。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Disable-SqlAlwaysOn -ServerInstance Computer\Instance
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在名為 'Computer\Instance' 的 SQL Server 執行個體上停用 AlwaysOn 可用性群組。此命令需要重新啟動執行個體,而且系統將提示您確認重新啟動。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 4 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Disable-SqlAlwaysOn -ServerInstance Computer\Instance -Credential (Get-Credential DOMAIN\Username)
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會使用 Windows 驗證,在名為 'Computer\Instance' 的 SQL Server 執行個體上停用 AlwaysOn 可用性群組。系統將提示您輸入指定帳戶 'DOMAIN\Username' 的密碼。這項變更需要重新啟動執行個體,而且系統也將提示您確認重新啟動。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 5 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Disable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -NoServiceRestart
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在位於指定路徑的 SQL Server 執行個體上停用 AlwaysOn 可用性群組,但是不會重新啟動執行個體。在您手動重新啟動此伺服器執行個體之前,變更將不會生效。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Enable-SqlAlwaysOn</command:name><maml:description><maml:para>在 Path、InputObject 或 ServerInstance 參數所指定的 SQL Server 執行個體上啟用 AlwaysOn 可用性群組功能。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Enable</command:verb><command:noun>SqlAlwaysOn</command:noun><dev:version /></command:details><maml:description><maml:para>Enable-SqlAlwaysOn Cmdlet 會在 SQL Server 執行個體上啟用 AlwaysOn。如果您在 SQL Server 服務執行時啟用 AlwaysOn 可用性群組,就必須重新啟動 Database Engine 服務,才能完成變更。除非您指定 -Force 參數,否則此 Cmdlet 會詢問您是否想要重新啟動服務。如果取消,就不會進行任何作業。
</maml:para><maml:para>如果 AlwaysOn 可用性群組已經啟用,這個 Cmdlet 就不會執行任何動作。
</maml:para><maml:para>這個 Cmdlet 可以針對遠端服務執行。您必須擁有系統管理員權限,才能執行這個 Cmdlet。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Enable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>您想要啟用 AlwaysOn 之 SQL Server 執行個體的名稱。此格式應該是 MACHINENAME\INSTANCE。可搭配 -Credential 參數一起使用,以變更遠端伺服器的 AlwaysOn 設定。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force,即可強制 Cmdlet 在未經使用者確認的情況下繼續進行。提供此參數的目的是要讓您建構指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>系統不會提示使用者重新啟動 SQL Server 服務。您必須手動重新啟動 SQL Server 服務,才能讓變更生效。設定此參數時,系統會忽略 -Force。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Enable-SqlAlwaysOn</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該啟用 AlwaysOn 可用性群組設定之 SQL Server 執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>您想要啟用 AlwaysOn 之 SQL Server 執行個體的名稱。此格式應該是 MACHINENAME\INSTANCE。可搭配 -Credential 參數一起使用,以變更遠端伺服器的 AlwaysOn 設定。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force,即可強制 Cmdlet 在未經使用者確認的情況下繼續進行。提供此參數的目的是要讓您建構指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>系統不會提示使用者重新啟動 SQL Server 服務。您必須手動重新啟動 SQL Server 服務,才能讓變更生效。設定此參數時,系統會忽略 -Force。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Enable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>您想要啟用 AlwaysOn 之 SQL Server 執行個體的名稱。此格式應該是 MACHINENAME\INSTANCE。可搭配 -Credential 參數一起使用,以變更遠端伺服器的 AlwaysOn 設定。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force,即可強制 Cmdlet 在未經使用者確認的情況下繼續進行。提供此參數的目的是要讓您建構指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>系統不會提示使用者重新啟動 SQL Server 服務。您必須手動重新啟動 SQL Server 服務,才能讓變更生效。設定此參數時,系統會忽略 -Force。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>要啟用 AlwaysOn 之 SQL Server 執行個體的名稱。此格式應該是 MACHINENAME\INSTANCE。可搭配 -Credential 參數使用,以變更遠端伺服器的 AlwaysOn 設定。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>您想要啟用 AlwaysOn 之 SQL Server 執行個體的名稱。此格式應該是 MACHINENAME\INSTANCE。可搭配 -Credential 參數一起使用,以變更遠端伺服器的 AlwaysOn 設定。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force,即可強制 Cmdlet 在未經使用者確認的情況下繼續進行。提供此參數的目的是要讓您建構指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該啟用 AlwaysOn 可用性群組設定之 SQL Server 執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue><dev:type><maml:name>Server</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>系統不會提示使用者重新啟動 SQL Server 服務。您必須手動重新啟動 SQL Server 服務,才能讓變更生效。設定此參數時,系統會忽略 -Force。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>False</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>要啟用 AlwaysOn 之 SQL Server 執行個體的名稱。此格式應該是 MACHINENAME\INSTANCE。可搭配 -Credential 參數使用,以變更遠端伺服器的 AlwaysOn 設定。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
參考應該啟用 AlwaysOn 之 SQL Server 執行個體的 SMO.Server 物件。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Enable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在位於指定路徑的 SQL Server 執行個體上啟用 AlwaysOn 可用性群組。這項變更需要重新啟動執行個體,而且系統將提示您確認重新啟動。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Enable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -Force
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在位於指定路徑的 SQL Server 執行個體上啟用 AlwaysOn 可用性群組。-Force 選項會導致伺服器執行個體在不提示您確認的情況下重新啟動。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Enable-SqlAlwaysOn -ServerInstance Computer\Instance
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在名為 'Computer\Instance' 的 SQL Server 執行個體上啟用 AlwaysOn 可用性群組。這項變更需要重新啟動執行個體,而且系統將提示您確認重新啟動。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 4 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Enable-SqlAlwaysOn -ServerInstance Computer\Instance -Credential (Get-Credential DOMAIN\Username)
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會使用 Windows 驗證,在名為 'Computer\Instance' 的 SQL Server 執行個體上啟用 AlwaysOn 可用性群組。系統將提示您輸入指定帳戶的密碼。這項變更需要重新啟動執行個體,而且系統也將提示您確認重新啟動。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 5 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Enable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -NoServiceRestart
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在位於指定路徑的 SQL Server 執行個體上啟用 AlwaysOn 可用性群組,但是不會重新啟動執行個體。在您手動重新啟動此伺服器執行個體之前,變更將不會生效。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlCredential</command:name><maml:description><maml:para>傳回 SQL 認證物件。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>Get-SqlCredential 會傳回 SQL 認證物件。
</maml:para><maml:para>這個 Cmdlet 支援下列作業模式,傳回 SQL 認證名稱:
 
1.藉由指定 SQL 認證的名稱和執行個體的路徑。
 
2.藉由指定 SQL Credential 和伺服器物件的名稱。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>認證的名稱
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會使用目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>認證的名稱
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>認證所在的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>認證所在的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>認證的名稱
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會使用目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
-------------------------- EXAMPLE 1 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-SqlCredential –Name "mycredential"
 
 
</dev:code><dev:remarks><maml:para>此命令會傳回認證物件。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;
</dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlDatabase</command:name><maml:description><maml:para>針對存在於目標 SQL Server 執行個體中的每個資料庫,傳回 SQL Database 物件。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>針對存在於目標 SQL Server 執行個體中的每個資料庫,傳回 SQL Database 物件。如果提供資料庫名稱,則此 Cmdlet 僅會傳回該特定資料庫物件。</maml:para><maml:para>這個 Cmdlet 支援下列傳回 SQL Database 物件的作業模式:</maml:para><maml:para>1.透過指定執行個體 PowerShell 路徑。</maml:para><maml:para>2.透過指定伺服器物件。</maml:para><maml:para>3.透過指定目標 SQL Server 執行個體的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlDatabase</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要擷取的資料庫名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>產生執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlDatabase</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要擷取的資料庫名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="3" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在逾時失敗之前要等候 SQL Server 連線的秒數。逾時值必須是介於 0 到 65534 之間的整數。如果指定了 0,連線嘗試就不會逾時。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>產生執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlDatabase</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要擷取的資料庫名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>產生執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在逾時失敗之前要等候 SQL Server 連線的秒數。逾時值必須是介於 0 到 65534 之間的整數。如果指定了 0,連線嘗試就不會逾時。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要擷取的資料庫名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>產生執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="3" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Get-SqlDatabase -Name "DbName" -Credential $sqlCredential;
 
</dev:code><dev:remarks><maml:para>此命令會針對伺服器執行個體 'Computer\Instance' 的 'DbName' 資料庫,傳回資料庫物件。目前的工作目錄會用來決定應該進行作業的伺服器執行個體。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and returns all the databases that are present in the instances.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName " MachineName" | Get-SqlDatabase -Credential $sqlCredential;
 
</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlInstance</command:name><maml:description><maml:para>針對存在於目標電腦中的每個 SQL Server 執行個體,傳回 SQL 執行個體物件。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlInstance</command:noun><dev:version /></command:details><maml:description><maml:para>針對存在於目標電腦中的每個 SQL Server 執行個體,傳回 SQL 執行個體物件。如果提供 SQL Server 執行個體名稱,此 Cmdlet 僅會傳回該特定 SQL Server 執行個體。</maml:para><maml:para>SQL Server 雲端配接器必須在主控 SQL Server 執行個體的電腦上執行及存取。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>MachineName</maml:name><maml:description><maml:para>目標電腦的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>當您想擷取目標電腦上的特定 SQL Server 執行個體時,SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>MachineName</maml:name><maml:description><maml:para>目標電腦的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>當您想擷取目標電腦上的特定 SQL Server 執行個體時,SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName " MachineName" -Name "InstanceName" -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para>此命令會擷取 'MachineName' 電腦上的 SQL Server 執行個體 'InstanceName'。系統會自動接受目標電腦的自我簽署憑證,而不提示使用者。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName" -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlSmartAdmin</command:name><maml:description><maml:para>取得或擷取 SQL Smart Admin 物件及其屬性。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlSmartAdmin</command:noun><dev:version /></command:details><maml:description><maml:para>Get-SqlSmartAdmin Cmdlet 會取得 SQL Smart Admin 物件。Smart Admin 物件包括 SQL Server Managed Backup 到 Windows Azure 的組態設定。這個 Cmdlet 支援下列傳回物件的作業模式:
 
 1 使用 –name 參數傳遞伺服器執行個體的名稱。若是預設執行個體,僅指定電腦名稱即可。若是具名執行個體,請使用 'computername\instancename'。
 
 2.傳遞 SQL Server 執行個體到 -Path 參數的路徑。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>SQL Server 執行個體名稱的格式為:'Computer\Instance'</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 執行個體的名稱。若是預設執行個體,只要指定電腦名稱:"MyComputer"。若是具名執行個體,請使用 "ComputerName\InstanceName" 這樣的格式。–name 參數和 –ServerInstance 都可以指定執行個體的名稱,但 –ServerInstance 也可接受伺服器執行個體名稱的管線輸入,或 SqInstanceInfo 物件。可使用 Get-SqlInstances Cmdlet 擷取 SqlInstanceInfo 物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlSmartAdmin</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>Server 物件的執行個體</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>SQL Server 執行個體名稱的格式為:'Computer\Instance'</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 執行個體的名稱。若是預設執行個體,只要指定電腦名稱:"MyComputer"。若是具名執行個體,請使用 "ComputerName\InstanceName" 這樣的格式。–name 參數和 –ServerInstance 都可以指定執行個體的名稱,但 –ServerInstance 也可接受伺服器執行個體名稱的管線輸入,或 SqInstanceInfo 物件。可使用 Get-SqlInstances Cmdlet 擷取 SqlInstanceInfo 物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>SQL Server 執行個體名稱的格式為:'Computer\Instance'</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 執行個體的名稱。若是預設執行個體,只要指定電腦名稱:"MyComputer"。若是具名執行個體,請使用 "ComputerName\InstanceName" 這樣的格式。–name 參數和 –ServerInstance 都可以指定執行個體的名稱,但 –ServerInstance 也可接受伺服器執行個體名稱的管線輸入,或 SqInstanceInfo 物件。可使用 Get-SqlInstances Cmdlet 擷取 SqlInstanceInfo 物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>Server 物件的執行個體</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>SQL Server 執行個體名稱的格式為:'Computer\Instance'</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 執行個體的名稱。若是預設執行個體,只要指定電腦名稱:"MyComputer"。若是具名執行個體,請使用 "ComputerName\InstanceName" 這樣的格式。–name 參數和 –ServerInstance 都可以指定執行個體的名稱,但 –ServerInstance 也可接受伺服器執行個體名稱的管線輸入,或 SqInstanceInfo 物件。可使用 Get-SqlInstances Cmdlet 擷取 SqlInstanceInfo 物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
-------------------------- EXAMPLE 1 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance
 Get-SqlSmartAdmin
Following is a list of the properties returned by the above command :
BackupEnabled : Shows whether backup is enabled at the instance level.
BackupRetentionPeriodInDays: Displays the number of days for retaining backup files.
CredentialName: Name of the SQL Credential used to authenticate to the Windows Azure storage account.
MasterSwitch: Shows whether the master switch is turned on or off.
Parent: Name of the instance of SQL Server.
Urn: The path of the Smart Admin object.
Properties: list of all the properties including the above.
</dev:code><dev:remarks><maml:para>此命令會擷取具名 SQL Server 執行個體 'MyInstance' 的 smart admin 物件屬性。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 2 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Get-SqlSmartAdmin -name “computer\MyInstance”
</dev:code><dev:remarks><maml:para>此命令會使用 -serverName 參數擷取 smart admin 物件屬性。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Invoke-PolicyEvaluation</command:name><maml:description><maml:para>針對目標集評估一個或多個 SQL Server 原則式管理原則,並報告此集合的符合層級,或讓此集合符合原則。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Invoke</command:verb><command:noun>PolicyEvaluation</command:noun><dev:version /></command:details><maml:description><maml:para>針對名為目標集的一組 SQL Server 物件評估一個或多個原則式管理原則。這些原則會指定與 SQL Server 物件相關聯之各種屬性的允許值,例如建立資料庫名稱或定序的網站標準。當 Invoke-PolicyEvaluation 以 Check 模式執行時,它會報告目標集中物件的目前屬性是否符合原則定義中的規則。如果目標集中物件的屬性不符合原則,就不會重新設定這些物件。在 Configure 模式中,Invoke-PolicyEvaluation 會重新設定目標集中不符合原則定義的任何物件。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-PolicyEvaluation</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="1" aliases=""><maml:name>Policy</maml:name><maml:description><maml:para>指定一個或多個要評估的原則。原則可以儲存在 SQL Server Database Engine 的執行個體中,也可以儲存成匯出的 XML 檔案。若為儲存在 Database Engine 執行個體中的原則,請使用以 SQLSERVER:\SQLPolicy 資料夾為基礎的路徑來指定原則的位置。若為儲存成 XML 檔案的原則,請使用檔案系統路徑來指定原則的位置。
</maml:para><maml:para>-Policy 可以接受指定一個或多個要評估之原則名稱的字串。如果字串中僅指定了檔案或原則名稱,Invoke-PolicyEvaluation 就會使用目前路徑的設定。若為儲存在 Database Engine 執行個體中的原則,請使用原則名稱,例如 "Database Status" 或 "SQLSERVER:\SQLPolicy\MyComputer\DEFAULT\Policies\Database Status"。若為匯出成 XML 檔案的原則,請使用檔案的名稱,例如 "Database Status.xml" 或 "C:\MyPolicyFolder\Database Status.xml"。
</maml:para><maml:para>-Policy 可以接受一組 FileInfo 物件,例如針對包含匯出 XML 原則之資料夾執行的 Get-ChildItem Cmdlet 傳送輸出。-Policy 也可以接受一組 Policy 物件,例如針對 SQLSERVER:\SQLPolicy 路徑執行之 Get-ChildItem 的傳送輸出。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation 只報告目標集的符合狀態 (Check),還是也會將目標集重新設定為符合原則 (Configure)。
</maml:para><maml:para>Check - 使用登入帳戶的認證來報告目標集的符合狀態,但不重新設定任何物件。
</maml:para><maml:para>CheckSqlScriptAsProxy - 使用 ##MS_PolicyTSQLExecutionLogin## Proxy 帳戶認證來執行檢查報表。
</maml:para><maml:para>Configure - 重新設定不符合原則的目標集物件,並且報告結果狀態。Invoke-PolicyEvaluation 只會重新設定可設定且具決定性的屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AdHocPolicyEvaluationMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputXml</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation Cmdlet 會使用「服務模組化語言交換格式」(Service Modeling Language Interchange Format,SML-IF) 結構描述來產生 XML 格式的報表。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetExpression</maml:name><maml:description><maml:para>指定傳回定義目標集之物件清單的查詢。這些查詢會指定為節點以 '/' 字元分隔的字串。每個節點的格式都是 ObjectType[Filter]。ObjectType 是 SQL Server 管理物件 (SMO) 物件模型的其中一個物件,而 Filter 是針對位於該節點之特定物件進行篩選的運算式。這些節點必須遵循 SMO 物件的階層。例如,下列查詢運算式會傳回 AdventureWorks 範例資料庫:"Server[@Name='MyComputer']/Database[@Name='AdventureWorks']"。
</maml:para><maml:para>如果已指定 -TargetExpression,請勿指定 -TargetObject。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetServerName</maml:name><maml:description><maml:para>指定包含目標集的 Database Engine 執行個體。您可以指定包含 Microsoft.SqlServer.Management.Sfc.Sdk.SQLStoreConnection 物件的變數。您也可以指定符合 System.Data.SqlClient.SQLConnection 類別之 ConnectionString 屬性所使用之規則的字串。這些字串包括使用 System.Data.SqlClient.SqlConnectionStringBuilder 類別所建立的字串。根據預設,Invoke-PolicyEvaluation 會使用 Windows 驗證來連接。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Invoke-PolicyEvaluation</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="1" aliases=""><maml:name>Policy</maml:name><maml:description><maml:para>指定一個或多個要評估的原則。原則可以儲存在 SQL Server Database Engine 的執行個體中,也可以儲存成匯出的 XML 檔案。若為儲存在 Database Engine 執行個體中的原則,請使用以 SQLSERVER:\SQLPolicy 資料夾為基礎的路徑來指定原則的位置。若為儲存成 XML 檔案的原則,請使用檔案系統路徑來指定原則的位置。
</maml:para><maml:para>-Policy 可以接受指定一個或多個要評估之原則名稱的字串。如果字串中僅指定了檔案或原則名稱,Invoke-PolicyEvaluation 就會使用目前路徑的設定。若為儲存在 Database Engine 執行個體中的原則,請使用原則名稱,例如 "Database Status" 或 "SQLSERVER:\SQLPolicy\MyComputer\DEFAULT\Policies\Database Status"。若為匯出成 XML 檔案的原則,請使用檔案的名稱,例如 "Database Status.xml" 或 "C:\MyPolicyFolder\Database Status.xml"。
</maml:para><maml:para>-Policy 可以接受一組 FileInfo 物件,例如針對包含匯出 XML 原則之資料夾執行的 Get-ChildItem Cmdlet 傳送輸出。-Policy 也可以接受一組 Policy 物件,例如針對 SQLSERVER:\SQLPolicy 路徑執行之 Get-ChildItem 的傳送輸出。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation 只報告目標集的符合狀態 (Check),還是也會將目標集重新設定為符合原則 (Configure)。
</maml:para><maml:para>Check - 使用登入帳戶的認證來報告目標集的符合狀態,但不重新設定任何物件。
</maml:para><maml:para>CheckSqlScriptAsProxy - 使用 ##MS_PolicyTSQLExecutionLogin## Proxy 帳戶認證來執行檢查報表。
</maml:para><maml:para>Configure - 重新設定不符合原則的目標集物件,並且報告結果狀態。Invoke-PolicyEvaluation 只會重新設定可設定且具決定性的屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AdHocPolicyEvaluationMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputXml</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation Cmdlet 會使用「服務模組化語言交換格式」(Service Modeling Language Interchange Format,SML-IF) 結構描述來產生 XML 格式的報表。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetObjects</maml:name><maml:description><maml:para>指定一個 PSObject 或 PSObject 的陣列,其中定義要據以評估原則的 SQL Server 物件集。若要連接到 SQL Server Analysis Services 的執行個體,請針對 -TargetObject 指定 Microsoft.AnalysisServices.Server 物件。
</maml:para><maml:para>如果已指定 -TargetObject,請勿指定 -TargetExpression。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">PSObject[]</command:parameterValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation 只報告目標集的符合狀態 (Check),還是也會將目標集重新設定為符合原則 (Configure)。
</maml:para><maml:para>Check - 使用登入帳戶的認證來報告目標集的符合狀態,但不重新設定任何物件。
</maml:para><maml:para>CheckSqlScriptAsProxy - 使用 ##MS_PolicyTSQLExecutionLogin## Proxy 帳戶認證來執行檢查報表。
</maml:para><maml:para>Configure - 重新設定不符合原則的目標集物件,並且報告結果狀態。Invoke-PolicyEvaluation 只會重新設定可設定且具決定性的屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AdHocPolicyEvaluationMode</command:parameterValue><dev:type><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputXml</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation Cmdlet 會使用「服務模組化語言交換格式」(Service Modeling Language Interchange Format,SML-IF) 結構描述來產生 XML 格式的報表。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="1" aliases=""><maml:name>Policy</maml:name><maml:description><maml:para>指定一個或多個要評估的原則。原則可以儲存在 SQL Server Database Engine 的執行個體中,也可以儲存成匯出的 XML 檔案。若為儲存在 Database Engine 執行個體中的原則,請使用以 SQLSERVER:\SQLPolicy 資料夾為基礎的路徑來指定原則的位置。若為儲存成 XML 檔案的原則,請使用檔案系統路徑來指定原則的位置。
</maml:para><maml:para>-Policy 可以接受指定一個或多個要評估之原則名稱的字串。如果字串中僅指定了檔案或原則名稱,Invoke-PolicyEvaluation 就會使用目前路徑的設定。若為儲存在 Database Engine 執行個體中的原則,請使用原則名稱,例如 "Database Status" 或 "SQLSERVER:\SQLPolicy\MyComputer\DEFAULT\Policies\Database Status"。若為匯出成 XML 檔案的原則,請使用檔案的名稱,例如 "Database Status.xml" 或 "C:\MyPolicyFolder\Database Status.xml"。
</maml:para><maml:para>-Policy 可以接受一組 FileInfo 物件,例如針對包含匯出 XML 原則之資料夾執行的 Get-ChildItem Cmdlet 傳送輸出。-Policy 也可以接受一組 Policy 物件,例如針對 SQLSERVER:\SQLPolicy 路徑執行之 Get-ChildItem 的傳送輸出。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetExpression</maml:name><maml:description><maml:para>指定傳回定義目標集之物件清單的查詢。這些查詢會指定為節點以 '/' 字元分隔的字串。每個節點的格式都是 ObjectType[Filter]。ObjectType 是 SQL Server 管理物件 (SMO) 物件模型的其中一個物件,而 Filter 是針對位於該節點之特定物件進行篩選的運算式。這些節點必須遵循 SMO 物件的階層。例如,下列查詢運算式會傳回 AdventureWorks 範例資料庫:"Server[@Name='MyComputer']/Database[@Name='AdventureWorks']"。
</maml:para><maml:para>如果已指定 -TargetExpression,請勿指定 -TargetObject。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetObjects</maml:name><maml:description><maml:para>指定一個 PSObject 或 PSObject 的陣列,其中定義要據以評估原則的 SQL Server 物件集。若要連接到 SQL Server Analysis Services 的執行個體,請針對 -TargetObject 指定 Microsoft.AnalysisServices.Server 物件。
</maml:para><maml:para>如果已指定 -TargetObject,請勿指定 -TargetExpression。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">PSObject[]</command:parameterValue><dev:type><maml:name>PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetServerName</maml:name><maml:description><maml:para>指定包含目標集的 Database Engine 執行個體。您可以指定包含 Microsoft.SqlServer.Management.Sfc.Sdk.SQLStoreConnection 物件的變數。您也可以指定符合 System.Data.SqlClient.SQLConnection 類別之 ConnectionString 屬性所使用之規則的字串。這些字串包括使用 System.Data.SqlClient.SqlConnectionStringBuilder 類別所建立的字串。根據預設,Invoke-PolicyEvaluation 會使用 Windows 驗證來連接。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 1 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server"
sl "%PRODUCTVERSION%\Tools\Policies\DatabaseEngine\1033"
Invoke-PolicyEvaluation -Policy "Trustworthy Database.xml" -TargetServer "MYCOMPUTER"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>針對指定電腦的預設執行個體評估原則。您可以從 XML 檔案讀取原則並且使用 Windows 驗證來連接。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 2 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server"
sl "%PRODUCTVERSION%\Tools\Policies\DatabaseEngine\1033"
gci "Database Status.xml", "Trustworthy Database.xml" | Invoke-PolicyEvaluation -TargetServer "MYCOMPUTER"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>使用 Get-Childitem,從資料夾中的 XML 檔案讀取兩個原則,然後將它們傳送至 Invoke-PolicyEvaluation。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 3 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server"
sl "%PRODUCTVERSION%\Tools\Policies\DatabaseEngine\1033"
Invoke-PolicyEvaluation -Policy "Database Status.xml" -TargetServer "MYCOMPUTER" -OutputXML &gt; C:\MyReportFolder\MyReport.xml
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>使用「服務模組化語言交換格式」(Services Modeling Language Interchange Format,SML-IF) 結構描述來格式化原則評估的輸出,然後將輸出重新導向至檔案。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 4 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl SQLSERVER:\SQLPolicy\MYCOMPUTER\DEFAULT\Policies
gci | Where-Object { $_.PolicyCategory -eq "Microsoft Best Practices: Maintenance" } | Invoke-PolicyEvaluation -TargetServer "MYCOMPUTER"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>設定 SQL Server 原則存放區的目前路徑。您可以使用 Get-ChildItem 來讀取所有原則,並且使用 Where-Object 針對 PolicyCategory 屬性設定為 "Microsoft Best Practices: Maintenance" 的原則進行篩選。然後,將篩選的原則集傳送至 Invoke-PolicyEvaluation。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 5 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server"
sl "%PRODUCTVERSION%\Tools\Policies\DatabaseEngine\1033"
$conn = New-Object Microsoft.SqlServer.Management.Sdk.Sfc.SqlStoreConnection("server='MYCOMPUTER';Trusted_Connection=True")
Invoke-PolicyEvaluation -Policy "Database Status.xml" -TargetServer $conn
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>如何使用 Sfc.SqlStoreConnection 物件來指定目標伺服器。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 6 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server\%PRODUCTVERSION%"
sl "tools\Policies\analysisservices\1033"
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices")
$SSASsvr = new-object Microsoft.AnalysisServices.Server
$SSASsvr.Connect("Data Source=localhost")
Invoke-PolicyEvaluation 'Surface Area Configuration for Analysis Services Features.xml' -TargetObject $SSASsvr
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>如何載入 SQL Server Analysis Services 組件,然後建立本機電腦上預設執行個體的連接,並且執行 Analysis Services 介面區組態原則。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 7 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server"
sl "120\Tools\Policies\DatabaseEngine\1033"
Invoke-PolicyEvaluation "Database Status.xml" -TargetServer "MYCOMPUTER" -TargetExpression "Server[@Name='MYCOMPUTER']/Database[@Name='AdventureWorks2014']"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>使用 -TargetExpression 查詢運算式來指定針對 AdventureWorks2014 範例資料庫評估 Database Status 原則。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 8 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Policies\ReportingServices\1033"
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Dmf.Adapters")
$SSRSsvr = new-object Microsoft.SqlServer.Management.Adapters.RSContainer('MyComputer')
Invoke-PolicyEvaluation -Policy "Surface Area Configuration for Reporting Services 2008 Features.xml" -TargetObject $SSRSsvr
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>如何載入 SQL Server Reporting Services 組件,然後建立本機電腦上預設執行個體的連接,並且執行 Reporting Services 介面區組態原則。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Using the Invoke-PolicyEvaluation cmdlet</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Invoke-Sqlcmd</command:name><maml:description><maml:para>執行內含陳述式來自 SQL Server sqlcmd 公用程式所支援之語言 (Transact-SQL 和 XQuery) 與命令的指令碼。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Invoke</command:verb><command:noun>Sqlcmd</command:noun><dev:version /></command:details><maml:description><maml:para>執行包含 SQL Server sqlcmd 公用程式所支援之語言與命令的指令碼。支援的語言為 Transact-SQL 以及 Database Engine 所支援的 XQuery 語法。Invoke-Sqlcmd 也接受 sqlcmd 所支援的許多命令,例如 GO 和 QUIT。Invoke-Sqlcmd 可接受 sqlcmd 指令碼變數,例如 SQLCMDUSER。根據預設,Invoke-Sqlcmd 不會設定 sqlcmd 指令碼變數。
</maml:para><maml:para>Invoke-Sqlcmd 不支援主要與互動式指令碼編輯有關的 sqlcmd 命令。不支援的命令包括 :!!、:connect、:error、:out、:ed、:list、:listvar、:reset、:perftrace 和 :serverlist。
</maml:para><maml:para>指令碼傳回的第一個結果集會顯示成格式化資料表。如果第一個結果集之後的其他結果集與第一個結果集具有不同的資料行清單,則不會顯示這些結果集。如果第一個結果集之後的其他結果集具有相同的資料行清單,其資料列就會附加至包含第一個結果集所傳回之資料列的格式化資料表。
</maml:para><maml:para>除非您使用 PowerShell -Verbose 參數,否則 Invoke-Sqlcmd 不會傳回 SQL Server 訊息輸出,例如 PRINT 陳述式的輸出。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-Sqlcmd</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Query</maml:name><maml:description><maml:para>指定一個或多個要執行的查詢。這些查詢可以是 Transact-SQL 或 XQuery 陳述式,或是 sqlcmd 命令。您可以指定多個以分號隔開的查詢。請勿指定 sqlcmd GO 分隔符號。請逸出字串中包含的任何雙引號。您可以考慮使用括號識別碼 (例如 [MyTable]) 而非引號識別碼 (例如 "MyTable")。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AbortOnError</maml:name><maml:description><maml:para>指定如果 Invoke-Sqlcmd 遇到錯誤,Invoke-Sqlcmd 就會停止執行並將錯誤層級傳回給 PowerShell ERRORLEVEL 變數。如果錯誤的嚴重性高於 10,傳回的錯誤層級就是 1;如果錯誤的嚴重性為 10 以下,錯誤層級則為 0。如果同時指定了 -ErrorLevel,只有當錯誤訊息嚴重性也等於或高於針對 -ErrorLevel 指定的值時,Invoke-Sqlcmd 才會傳回 1。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>指定如果 Invoke-Sqlcmd 無法成功連接到 Database Engine 的執行個體,則 Invoke-Sqlcmd 逾時的秒數。逾時值必須是介於 0 到 65534 之間的整數。如果指定了 0,連接嘗試就不會逾時。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>指定資料庫名稱的字元字串。Invoke-Sqlcmd 會連接到 -ServerInstance 中指定之執行個體內的這個資料庫。
</maml:para><maml:para>如果未指定 -Database,使用的資料庫就會取決於目前路徑是否同時指定 SQLSERVER:\SQL 資料夾和資料庫名稱。如果路徑同時指定了 SQL 資料夾和資料庫名稱,Invoke-Sqlcmd 就會連接到路徑中指定的資料庫。如果路徑不是以 SQL 資料夾為基礎,或者路徑不包含資料庫名稱,Invoke-Sqlcmd 就會連接到目前登入識別碼的預設資料庫。如果您指定了 -IgnoreProviderContext 參數,Invoke-Sqlcmd 就不會考慮目前路徑中指定的任何資料庫,而是連接到目前登入識別碼所定義的預設資料庫。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DedicatedAdministratorConnection</maml:name><maml:description><maml:para>使用專用管理員連接 (DAC) 來連接到 Database Engine 的執行個體。DAC 可讓系統管理員用來進行一些動作,例如疑難排解不接受新標準連接的執行個體。此執行個體必須設定為支援 DAC。如果未啟用 DAC,Invoke-Sqlcmd 就會報告錯誤並停止執行。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableCommands</maml:name><maml:description><maml:para>在批次檔中執行時,關閉可能危及安全性的一些 sqlcmd 功能。它會防止 PowerShell 變數傳入至 Invoke-Sqlcmd 指令碼。SQLCMDINI 指令碼變數中指定的啟動指令碼不會執行。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableVariables</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 會忽略 sqlcmd 指令碼變數。當指令碼所包含的許多 INSERT 陳述式可能含有與變數 (例如 $(variable_name)) 相同格式的字串時,這就很有用。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptConnection</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 是否會使用安全通訊端層 (SSL) 加密來連接到 -ServerInstance 中指定的 Database Engine 執行個體。如果指定了 TRUE,就會使用 SSL 加密。如果指定了 FALSE,就不會使用加密。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ErrorLevel</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 只會顯示嚴重性層級等於或高於指定值的錯誤訊息。如果未指定 -ErrorLevel 或設定為 0,則會顯示所有錯誤訊息。Database Engine 錯誤嚴重性的範圍介於 1 到 24 之間。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HostName</maml:name><maml:description><maml:para>指定工作站名稱。工作站名稱是由 sp_who 系統預存程序所回報,而且位於 sys.processes 目錄檢視的 hostname 資料行中。如果未指定 HostName,預設值就是執行 Invoke-Sqlcmd 的電腦名稱。HostName 可用來識別不同的 Invoke-Sqlcmd 工作階段。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IgnoreProviderContext</maml:name><maml:description><maml:para>Invoke-Sqlcmd 會忽略目前 SQLSERVER:\SQL 路徑所建立的資料庫內容。如果未指定 -Database 參數,Invoke-Sqlcmd 就會使用目前登入識別碼或 Windows 帳戶的預設資料庫。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IncludeSqlUserErrors</maml:name><maml:description><maml:para>會導向 Invoke-Sqlcmd 以傳回預設在其他情況下忽略的 SQL 使用者指令碼錯誤。如果指定這個參數,Invoke-Sqlcmd 會符合 sqlcmd 公用程式的預設行為。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>InputFile</maml:name><maml:description><maml:para>指定要當做 Invoke-Sqlcmd 之查詢輸入使用的檔案。此檔案可以包含 Transact-SQL 陳述式、XQuery 陳述式以及 sqlcmd 命令和指令碼變數。請指定檔案的完整路徑。檔案路徑或檔案名稱中不允許使用空格。
</maml:para><maml:para>建議您只執行來自信任來源的指令碼。請利用適當的 NTFS 權限來確保所有輸入指令碼的安全。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxBinaryLength</maml:name><maml:description><maml:para>指定針對具有二進位字串資料類型 (例如 binary 和 varbinary) 之資料行傳回的最大位元組數目。預設值是 1,024 個位元組。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxCharLength</maml:name><maml:description><maml:para>指定針對具有字元或 Unicode 資料類型 (例如 char、nchar、varchar 和 nvarchar) 之資料行傳回的最大字元數目。預設值是 4,000 個字元。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NewPassword</maml:name><maml:description><maml:para>指定 SQL Server 驗證登入識別碼的新密碼。Invoke-Sqlcmd 會變更密碼,然後結束。此外,您也必須指定 -Username 和 -Password,其中 -Password 會指定登入的目前密碼。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputSqlErrors</maml:name><maml:description><maml:para>指定錯誤訊息是否會顯示在 Invoke-Sqlcmd 輸出中。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Password</maml:name><maml:description><maml:para>指定 -Username 中指定之 SQL Server 驗證登入識別碼的密碼。密碼會區分大小寫。盡可能使用 Windows 驗證。請勿使用空白密碼,盡可能使用增強式密碼。如需詳細資訊,請參閱《SQL Server 線上叢書》中的<增強式密碼>。
</maml:para><maml:para>安全性注意事項:如果您輸入 -Password 後面接著密碼,任何能夠見到您的監視器的人,都能夠看見密碼。如果您在 .ps1 指令碼中編寫 -Password 後面接著密碼,任何讀取指令碼檔案的人都將看見密碼。請將適當的 NTFS 權限指派給此檔案,防止其他使用者讀取此檔案。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>QueryTimeout</maml:name><maml:description><maml:para>指定查詢逾時之前的秒數。如果沒有指定逾時值,查詢就不會逾時。逾時必須是介於 1 到 65535 之間的整數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>指定 Database Engine 執行個體名稱的字元字串或 SMO Server 物件。若是預設執行個體,只要指定電腦名稱:"MyComputer"。若是具名執行個體,請使用 "ComputerName\InstanceName" 這樣的格式。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SeverityLevel</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 傳回給 ERRORLEVEL PowerShell 變數之錯誤訊息嚴重性層級的下限。Invoke-Sqlcmd 會從它所執行之查詢產生的錯誤訊息傳回最高嚴重性層級,但前提是嚴重性等於或高於 -SeverityLevel。如果未指定 -SeverityLevel 或設定為 0,Invoke-Sqlcmd 就會將 0 傳回給 ERRORLEVEL。Database Engine 錯誤訊息嚴重性層級的範圍介於 1 到 24 之間。Invoke-Sqlcmd 不會針對嚴重性為 10 的參考用訊息報告嚴重性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SuppressProviderContextWarning</maml:name><maml:description><maml:para>隱藏 Invoke-Sqlcmd 已使用目前 SQLSERVER:\SQL 路徑設定中之資料庫內容來建立 Cmdlet 之資料庫內容的警告。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Username</maml:name><maml:description><maml:para>指定用於建立 Database Engine 執行個體之 SQL Server 驗證連接的登入識別碼。您必須使用 -Password 來指定密碼。如果未指定 -Username 和 -Password,Invoke-Sqlcmd 就會嘗試使用執行 PowerShell 工作階段的 Windows 帳戶來進行 Windows 驗證連接。
</maml:para><maml:para>盡可能使用 Windows 驗證。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Variable</maml:name><maml:description><maml:para>建立用於 sqlcmd 指令碼的 sqlcmd 指令碼變數,並且設定變數的值。您可以使用 PowerShell 陣列來指定多個變數及其值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AbortOnError</maml:name><maml:description><maml:para>指定如果 Invoke-Sqlcmd 遇到錯誤,Invoke-Sqlcmd 就會停止執行並將錯誤層級傳回給 PowerShell ERRORLEVEL 變數。如果錯誤的嚴重性高於 10,傳回的錯誤層級就是 1;如果錯誤的嚴重性為 10 以下,錯誤層級則為 0。如果同時指定了 -ErrorLevel,只有當錯誤訊息嚴重性也等於或高於針對 -ErrorLevel 指定的值時,Invoke-Sqlcmd 才會傳回 1。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>指定如果 Invoke-Sqlcmd 無法成功連接到 Database Engine 的執行個體,則 Invoke-Sqlcmd 逾時的秒數。逾時值必須是介於 0 到 65534 之間的整數。如果指定了 0,連接嘗試就不會逾時。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>指定資料庫名稱的字元字串。Invoke-Sqlcmd 會連接到 -ServerInstance 中指定之執行個體內的這個資料庫。
</maml:para><maml:para>如果未指定 -Database,使用的資料庫就會取決於目前路徑是否同時指定 SQLSERVER:\SQL 資料夾和資料庫名稱。如果路徑同時指定了 SQL 資料夾和資料庫名稱,Invoke-Sqlcmd 就會連接到路徑中指定的資料庫。如果路徑不是以 SQL 資料夾為基礎,或者路徑不包含資料庫名稱,Invoke-Sqlcmd 就會連接到目前登入識別碼的預設資料庫。如果您指定了 -IgnoreProviderContext 參數,Invoke-Sqlcmd 就不會考慮目前路徑中指定的任何資料庫,而是連接到目前登入識別碼所定義的預設資料庫。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DedicatedAdministratorConnection</maml:name><maml:description><maml:para>使用專用管理員連接 (DAC) 來連接到 Database Engine 的執行個體。DAC 可讓系統管理員用來進行一些動作,例如疑難排解不接受新標準連接的執行個體。此執行個體必須設定為支援 DAC。如果未啟用 DAC,Invoke-Sqlcmd 就會報告錯誤並停止執行。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableCommands</maml:name><maml:description><maml:para>在批次檔中執行時,關閉可能危及安全性的一些 sqlcmd 功能。它會防止 PowerShell 變數傳入至 Invoke-Sqlcmd 指令碼。SQLCMDINI 指令碼變數中指定的啟動指令碼不會執行。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableVariables</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 會忽略 sqlcmd 指令碼變數。當指令碼所包含的許多 INSERT 陳述式可能含有與變數 (例如 $(variable_name)) 相同格式的字串時,這就很有用。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptConnection</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 是否會使用安全通訊端層 (SSL) 加密來連接到 -ServerInstance 中指定的 Database Engine 執行個體。如果指定了 TRUE,就會使用 SSL 加密。如果指定了 FALSE,就不會使用加密。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ErrorLevel</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 只會顯示嚴重性層級等於或高於指定值的錯誤訊息。如果未指定 -ErrorLevel 或設定為 0,則會顯示所有錯誤訊息。Database Engine 錯誤嚴重性的範圍介於 1 到 24 之間。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HostName</maml:name><maml:description><maml:para>指定工作站名稱。工作站名稱是由 sp_who 系統預存程序所回報,而且位於 sys.processes 目錄檢視的 hostname 資料行中。如果未指定 HostName,預設值就是執行 Invoke-Sqlcmd 的電腦名稱。HostName 可用來識別不同的 Invoke-Sqlcmd 工作階段。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IgnoreProviderContext</maml:name><maml:description><maml:para>Invoke-Sqlcmd 會忽略目前 SQLSERVER:\SQL 路徑所建立的資料庫內容。如果未指定 -Database 參數,Invoke-Sqlcmd 就會使用目前登入識別碼或 Windows 帳戶的預設資料庫。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IncludeSqlUserErrors</maml:name><maml:description><maml:para>會導向 Invoke-Sqlcmd 以傳回預設在其他情況下忽略的 SQL 使用者指令碼錯誤。如果指定這個參數,Invoke-Sqlcmd 會符合 sqlcmd 公用程式的預設行為。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>InputFile</maml:name><maml:description><maml:para>指定要當做 Invoke-Sqlcmd 之查詢輸入使用的檔案。此檔案可以包含 Transact-SQL 陳述式、XQuery 陳述式以及 sqlcmd 命令和指令碼變數。請指定檔案的完整路徑。檔案路徑或檔案名稱中不允許使用空格。
</maml:para><maml:para>建議您只執行來自信任來源的指令碼。請利用適當的 NTFS 權限來確保所有輸入指令碼的安全。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxBinaryLength</maml:name><maml:description><maml:para>指定針對具有二進位字串資料類型 (例如 binary 和 varbinary) 之資料行傳回的最大位元組數目。預設值是 1,024 個位元組。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxCharLength</maml:name><maml:description><maml:para>指定針對具有字元或 Unicode 資料類型 (例如 char、nchar、varchar 和 nvarchar) 之資料行傳回的最大字元數目。預設值是 4,000 個字元。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NewPassword</maml:name><maml:description><maml:para>指定 SQL Server 驗證登入識別碼的新密碼。Invoke-Sqlcmd 會變更密碼,然後結束。此外,您也必須指定 -Username 和 -Password,其中 -Password 會指定登入的目前密碼。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputSqlErrors</maml:name><maml:description><maml:para>指定錯誤訊息是否會顯示在 Invoke-Sqlcmd 輸出中。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue><dev:type><maml:name>Boolean</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Password</maml:name><maml:description><maml:para>指定 -Username 中指定之 SQL Server 驗證登入識別碼的密碼。密碼會區分大小寫。盡可能使用 Windows 驗證。請勿使用空白密碼,盡可能使用增強式密碼。如需詳細資訊,請參閱《SQL Server 線上叢書》中的<增強式密碼>。
</maml:para><maml:para>安全性注意事項:如果您輸入 -Password 後面接著密碼,任何能夠見到您的監視器的人,都能夠看見密碼。如果您在 .ps1 指令碼中編寫 -Password 後面接著密碼,任何讀取指令碼檔案的人都將看見密碼。請將適當的 NTFS 權限指派給此檔案,防止其他使用者讀取此檔案。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Query</maml:name><maml:description><maml:para>指定一個或多個要執行的查詢。這些查詢可以是 Transact-SQL 或 XQuery 陳述式,或是 sqlcmd 命令。您可以指定多個以分號隔開的查詢。請勿指定 sqlcmd GO 分隔符號。請逸出字串中包含的任何雙引號。您可以考慮使用括號識別碼 (例如 [MyTable]) 而非引號識別碼 (例如 "MyTable")。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>QueryTimeout</maml:name><maml:description><maml:para>指定查詢逾時之前的秒數。如果沒有指定逾時值,查詢就不會逾時。逾時必須是介於 1 到 65535 之間的整數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>指定 Database Engine 執行個體名稱的字元字串或 SMO Server 物件。若是預設執行個體,只要指定電腦名稱:"MyComputer"。若是具名執行個體,請使用 "ComputerName\InstanceName" 這樣的格式。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SeverityLevel</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 傳回給 ERRORLEVEL PowerShell 變數之錯誤訊息嚴重性層級的下限。Invoke-Sqlcmd 會從它所執行之查詢產生的錯誤訊息傳回最高嚴重性層級,但前提是嚴重性等於或高於 -SeverityLevel。如果未指定 -SeverityLevel 或設定為 0,Invoke-Sqlcmd 就會將 0 傳回給 ERRORLEVEL。Database Engine 錯誤訊息嚴重性層級的範圍介於 1 到 24 之間。Invoke-Sqlcmd 不會針對嚴重性為 10 的參考用訊息報告嚴重性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SuppressProviderContextWarning</maml:name><maml:description><maml:para>隱藏 Invoke-Sqlcmd 已使用目前 SQLSERVER:\SQL 路徑設定中之資料庫內容來建立 Cmdlet 之資料庫內容的警告。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Username</maml:name><maml:description><maml:para>指定用於建立 Database Engine 執行個體之 SQL Server 驗證連接的登入識別碼。您必須使用 -Password 來指定密碼。如果未指定 -Username 和 -Password,Invoke-Sqlcmd 就會嘗試使用執行 PowerShell 工作階段的 Windows 帳戶來進行 Windows 驗證連接。
</maml:para><maml:para>盡可能使用 Windows 驗證。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Variable</maml:name><maml:description><maml:para>建立用於 sqlcmd 指令碼的 sqlcmd 指令碼變數,並且設定變數的值。您可以使用 PowerShell 陣列來指定多個變數及其值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>PSObject</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Formatted table</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Invoke-Sqlcmd -Query "SELECT GETDATE() AS TimeOfQuery;" -ServerInstance "MyComputer\MyInstance"
 
TimeOfQuery
-----------
5/13/2010 8:49:43 PM
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會連接到電腦上的 Database Engine 具名執行個體並且執行基本 Transact-SQL 指令碼。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Invoke-Sqlcmd -InputFile "C:\MyFolder\TestSqlCmd.sql" | Out-File -filePath "C:\MyFolder\TestSqlCmd.rpt"
 
Output sent to TestSqlCmd.rpt.
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會讀取包含 Transact-SQL 陳述式和 sqlcmd 命令的檔案、執行此檔案並且將輸出寫入另一個檔案。請利用適當的 NTFS 權限來確保所有輸出檔案的安全。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$MyArray = "MYVAR1='String1'", "MYVAR2='String2'"
Invoke-Sqlcmd -Query "SELECT `$(MYVAR1) AS Var1, `$(MYVAR2) AS Var2;" -Variable $MyArray
 
Var1 Var2
---- ----
String1 String2
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會使用字元字串的陣列當做 -Variable 參數的輸入。此陣列會定義多個 sqlcmd 變數。在 SELECT 陳述中,識別 sqlcmd 變數的 $ 符號會使用反勾號 (`) 字元來逸出。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 4 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-Location SQLSERVER:\SQL\MyComputer\MyInstance
Invoke-Sqlcmd -Query "SELECT SERVERPROPERTY('MachineName') AS ComputerName;" -ServerInstance (Get-Item .)
 
WARNING: Using provider context. Server = MyComputer
 
ComputerName
------------
MyComputer
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會使用 Set-Location 來導覽至 Database Engine 執行個體的 SQL Server PowerShell 提供者路徑。然後,此範例會使用 Get-Item 來擷取 SMO Server 物件,以便當做 Invoke-Sqlcmd 的 -ServerInstance 參數使用。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 5 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Invoke-Sqlcmd -Query "PRINT N'abc'" -Verbose
 
VERBOSE: abc
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會使用 PowerShell -Verbose 參數來傳回 PRINT 命令的訊息輸出。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 6 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-Location SQLSERVER:\SQL\MyComputer\DEFAULT\Databases\AdventureWorks2014
Invoke-Sqlcmd "SELECT DB_NAME() AS DatabaseName;"
 
WARNING: Using provider context. Server = MyComputer, Database = AdventureWorks2014.
 
DatabaseName
------------
AdventureWorks2014
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會使用位置字串來提供 -Query 參數的輸入。它也會示範 Invoke-Sqlcmd 如何使用目前路徑來設定 AdventureWorks2014 的資料庫內容。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Transact-SQL Reference</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: sqlcmd Utility</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: XQuery Reference</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Join-SqlAvailabilityGroup</command:name><maml:description><maml:para>將 InputObject 或 Path 參數中指定的可用性複本聯結至 Name 參數所指定的可用性群組。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Join</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>Join-SqlAvailabilityGroup Cmdlet 會將本機次要複本聯結至 Name 參數中指定的可用性群組。這個 Cmdlet 只能在裝載尚未聯結至可用性群組之次要複本的 SQL Server 執行個體上執行。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Join-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>可用性群組的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>裝載要聯結至可用性群組之次要複本的 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Join-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>可用性群組的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>裝載次要複本之 SQL Server 執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>裝載次要複本之 SQL Server 執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue><dev:type><maml:name>Server</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>可用性群組的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>裝載要聯結至可用性群組之次要複本的 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
要聯結至可用性群組的可用性複本。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><maml:alertSet><maml:title /><maml:alert><maml:para>您必須在伺服器執行個體上啟用高可用性資料復原服務,而且 Path 所指定的可用性複本必須存在。
</maml:para></maml:alert><maml:alert></maml:alert></maml:alertSet><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Join-SqlAvailabilityGroup -Path SQLSERVER:\SQL\SecondaryServer\InstanceName -Name 'MyAg'
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將位於指定路徑之伺服器執行個體所裝載的次要複本聯結至名為 'MyAg' 的可用性群組。這個伺服器執行個體必須裝載這個可用性群組中的次要複本。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Join-SqlAvailabilityGroup -Path SQLSERVER:\SQL\SecondaryServer\InstanceName -Name 'MyAg' -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 指令碼,這個指令碼會將位於指定路徑之伺服器執行個體所裝載的次要複本聯結至名為 'MyAg' 的可用性群組。這個伺服器執行個體必須裝載這個可用性群組中的次要複本。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Joining a Secondary Replica to an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlAvailabilityGroup</command:name><maml:description><maml:para>在即將裝載初始主要複本的伺服器執行個體上建立可用性群組。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>New-SqlAvailabilityGroup Cmdlet 會建立可用性群組。InputObject 或 Path 參數所指定的伺服器執行個體將會裝載初始主要複本。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要建立的可用性群組名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>即將裝載可用性群組之初始主要複本的 SQL Server 執行個體的路徑。如果指定的路徑不存在,則會擲回錯誤。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性群組的自動備份喜好設定。有效的選項包括:
</maml:para><maml:para>Primary:指定備份一定要在主要複本上進行。這通常是因為使用者需要在次要複本上執行備份時無法使用的功能,例如差異備份。
</maml:para><maml:para>SecondaryOnly:指定絕對不能在主要複本上執行備份。如果主要複本是唯一的線上複本,就不會進行備份。
</maml:para><maml:para>Secondary:指定除非主要複本是唯一的線上複本,否則備份會在次要複本上進行。然後,備份會在主要複本上進行。
</maml:para><maml:para>None:此選項會指定使用者在選擇要執行備份的複本時,不想要將主要/次要狀態納入考量。只考慮 BackupPriority 以及上線/已連接狀態等因素。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>使用完整復原模式但不使用 AUTO_CLOSE 之本機讀寫使用者資料庫的清單。這些資料庫不能屬於另一個可用性群組,而且不得設定為資料庫鏡像。此參數不得為 Null 或空白。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>決定可用性群組的自動容錯移轉行為。有效的選項包括:
</maml:para><maml:para>OnServerDown:SQL Server 服務停止時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnServerUnresponsive:滿足任何狀況的較低值,而且 SQL Server 服務連接到叢集且超過 "HealthCheckTimeout" 臨界值,或者目前位於主要角色中的可用性複本處於失敗狀態時,便容錯移轉或重新啟動 (請參閱 HealthCheckTimeout 參數)。
</maml:para><maml:para>OnCriticalServerError:滿足任何狀況的較低值,而且發生內部嚴重伺服器錯誤 (記憶體不足的狀況、嚴重的寫入存取違規或傾印過多) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnModerateServerError:滿足任何狀況的較低值,而且發生一般伺服器錯誤 (持續的記憶體不足狀況) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnAnyQualifiedFailureConditions:滿足任何狀況的較低值,而且發生限定失敗狀況 (引擎工作者執行緒已耗盡、偵測到無法解決的死結) 時,便容錯移轉或重新啟動。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>將沒有回應的伺服器宣告為狀況不良之前經過的時間長度。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityReplica</maml:name><maml:description><maml:para>您想要包含在新可用性群組中之每個可用性複本的 AvailabilityReplica 物件。此參數可以是巢狀的,但是不得為空白或 Null。
</maml:para><maml:para>提示:若要建立 AvailabilityReplica 物件,請使用 New-SqlAvailabilityReplica Cmdlet 搭配 AsTemplate 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">AvailabilityReplica[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要建立的可用性群組名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>裝載主要複本之執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性群組的自動備份喜好設定。有效的選項包括:
</maml:para><maml:para>Primary:指定備份一定要在主要複本上進行。這通常是因為使用者需要在次要複本上執行備份時無法使用的功能,例如差異備份。
</maml:para><maml:para>SecondaryOnly:指定絕對不能在主要複本上執行備份。如果主要複本是唯一的線上複本,就不會進行備份。
</maml:para><maml:para>Secondary:指定除非主要複本是唯一的線上複本,否則備份會在次要複本上進行。然後,備份會在主要複本上進行。
</maml:para><maml:para>None:此選項會指定使用者在選擇要執行備份的複本時,不想要將主要/次要狀態納入考量。只考慮 BackupPriority 以及上線/已連接狀態等因素。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>使用完整復原模式但不使用 AUTO_CLOSE 之本機讀寫使用者資料庫的清單。這些資料庫不能屬於另一個可用性群組,而且不得設定為資料庫鏡像。此參數不得為 Null 或空白。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>決定可用性群組的自動容錯移轉行為。有效的選項包括:
</maml:para><maml:para>OnServerDown:SQL Server 服務停止時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnServerUnresponsive:滿足任何狀況的較低值,而且 SQL Server 服務連接到叢集且超過 "HealthCheckTimeout" 臨界值,或者目前位於主要角色中的可用性複本處於失敗狀態時,便容錯移轉或重新啟動 (請參閱 HealthCheckTimeout 參數)。
</maml:para><maml:para>OnCriticalServerError:滿足任何狀況的較低值,而且發生內部嚴重伺服器錯誤 (記憶體不足的狀況、嚴重的寫入存取違規或傾印過多) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnModerateServerError:滿足任何狀況的較低值,而且發生一般伺服器錯誤 (持續的記憶體不足狀況) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnAnyQualifiedFailureConditions:滿足任何狀況的較低值,而且發生限定失敗狀況 (引擎工作者執行緒已耗盡、偵測到無法解決的死結) 時,便容錯移轉或重新啟動。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>將沒有回應的伺服器宣告為狀況不良之前經過的時間長度。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityReplica</maml:name><maml:description><maml:para>您想要包含在新可用性群組中之每個可用性複本的 AvailabilityReplica 物件。此參數可以是巢狀的,但是不得為空白或 Null。
</maml:para><maml:para>提示:若要建立 AvailabilityReplica 物件,請使用 New-SqlAvailabilityReplica Cmdlet 搭配 AsTemplate 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">AvailabilityReplica[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性群組的自動備份喜好設定。有效的選項包括:
</maml:para><maml:para>Primary:指定備份一定要在主要複本上進行。這通常是因為使用者需要在次要複本上執行備份時無法使用的功能,例如差異備份。
</maml:para><maml:para>SecondaryOnly:指定絕對不能在主要複本上執行備份。如果主要複本是唯一的線上複本,就不會進行備份。
</maml:para><maml:para>Secondary:指定除非主要複本是唯一的線上複本,否則備份會在次要複本上進行。然後,備份會在主要複本上進行。
</maml:para><maml:para>None:此選項會指定使用者在選擇要執行備份的複本時,不想要將主要/次要狀態納入考量。只考慮 BackupPriority 以及上線/已連接狀態等因素。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue><dev:type><maml:name>AvailabilityGroupAutomatedBackupPreference</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityReplica</maml:name><maml:description><maml:para>您想要包含在新可用性群組中之每個可用性複本的 AvailabilityReplica 物件。此參數可以是巢狀的,但是不得為空白或 Null。
</maml:para><maml:para>提示:若要建立 AvailabilityReplica 物件,請使用 New-SqlAvailabilityReplica Cmdlet 搭配 AsTemplate 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">AvailabilityReplica[]</command:parameterValue><dev:type><maml:name>AvailabilityReplica[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>使用完整復原模式但不使用 AUTO_CLOSE 之本機讀寫使用者資料庫的清單。這些資料庫不能屬於另一個可用性群組,而且不得設定為資料庫鏡像。此參數不得為 Null 或空白。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>決定可用性群組的自動容錯移轉行為。有效的選項包括:
</maml:para><maml:para>OnServerDown:SQL Server 服務停止時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnServerUnresponsive:滿足任何狀況的較低值,而且 SQL Server 服務連接到叢集且超過 "HealthCheckTimeout" 臨界值,或者目前位於主要角色中的可用性複本處於失敗狀態時,便容錯移轉或重新啟動 (請參閱 HealthCheckTimeout 參數)。
</maml:para><maml:para>OnCriticalServerError:滿足任何狀況的較低值,而且發生內部嚴重伺服器錯誤 (記憶體不足的狀況、嚴重的寫入存取違規或傾印過多) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnModerateServerError:滿足任何狀況的較低值,而且發生一般伺服器錯誤 (持續的記憶體不足狀況) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnAnyQualifiedFailureConditions:滿足任何狀況的較低值,而且發生限定失敗狀況 (引擎工作者執行緒已耗盡、偵測到無法解決的死結) 時,便容錯移轉或重新啟動。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue><dev:type><maml:name>AvailabilityGroupFailureConditionLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>將沒有回應的伺服器宣告為狀況不良之前經過的時間長度。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>裝載主要複本之執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要建立的可用性群組名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>即將裝載可用性群組之初始主要複本的 SQL Server 執行個體的路徑。如果指定的路徑不存在,則會擲回錯誤。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
指定包含主要複本的伺服器執行個體。
</maml:para><maml:para>
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
包含可用性群組的新 Power Shell 物件。
 
 
</maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$primaryServer = Get-Item "SQLSERVER:\SQL\PrimaryServer\InstanceName"
$secondaryServer = Get-Item "SQLSERVER:\SQL\SecondaryServer\InstanceName"
 
$primaryReplica = New-SqlAvailabilityReplica `
-Name "PrimaryServer\InstanceName" `
-EndpointUrl "TCP://PrimaryServer.domain:5022" `
-FailoverMode "Automatic" `
-AvailabilityMode "SynchronousCommit" `
-AsTemplate `
-Version ($primaryServer.Version)
 
# Create the initial secondary replica
$secondaryReplica = New-SqlAvailabilityReplica `
-Name "SecondaryServer\InstanceName" `
-EndpointUrl "TCP://SecondaryServer.domain:5022" `
-FailoverMode "Automatic" `
-AvailabilityMode "SynchronousCommit" `
-AsTemplate `
-Version ($secondaryServer.Version)
 
# Create the Availability Group.
New-SqlAvailabilityGroup -InputObject $primaryServer -Name MyAG -AvailabilityReplica ($primaryReplica, $secondaryReplica) -Database @("MyDatabase1","MyDatabase2")
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會建立包含兩個可用性複本和兩個資料庫 ('MyDatabase1' 和 'MyDatabase2') 的新可用性群組 'MyAG'。首先,此範例會使用 New-SqlAvailabilityReplica Cmdlet 來建立兩個複本 ('$primaryReplica' 和 '$secondaryReplica') 的記憶體中表示法。這些複本會設定為使用同步認可的可用性模式搭配自動容錯移轉。其資料庫鏡像端點會使用通訊埠 5022。然後,此範例會使用 New-SqlAvailabilityGroup Cmdlet 來建立可用性群組。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Creating an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: "HADR" Prerequisites and Restrictions</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: Specifying the Endpoint URL for an Availability Replica (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlAvailabilityGroupListener</command:name><maml:description><maml:para>建立新的可用性群組接聽程式,並將其附加至現有的可用性群組。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlAvailabilityGroupListener</command:noun><dev:version /></command:details><maml:description><maml:para>New-SqlAvailabilityGroupListener Cmdlet 會建立新的可用性群組接聽程式,並將其附加至可用性群組。它可接受識別可用性群組和 IP 位址的參數。這個 Cmdlet 只能在裝載主要複本的伺服器執行個體上執行。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlAvailabilityGroupListener</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>接聽程式的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。新的接聽程式將會附加至此路徑所指定的可用性群組。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DhcpSubnet</maml:name><maml:description><maml:para>指定接聽程式應該在引數所指定的子網路上使用 DHCP。此引數應該是採用斜線標記法的 IPv4 位址和子網路遮罩,例如 192.168.0.1\255.255.255.0。
</maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>接聽程式將用來接聽連接的通訊埠。預設通訊埠是 TCP 通訊埠 1433。如果您有安全性考量,我們建議您使用不同的通訊埠編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>指定應該使用引數所指定的靜態 IP 位址來設定接聽程式。這個引數應該是字串清單。其中每個字串都可以是採用斜線標記法的 IPv4 位址和子網路遮罩或 IPv6 位址。
</maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityGroupListener</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>接聽程式的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該附加接聽程式之目標可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DhcpSubnet</maml:name><maml:description><maml:para>指定接聽程式應該在引數所指定的子網路上使用 DHCP。此引數應該是採用斜線標記法的 IPv4 位址和子網路遮罩,例如 192.168.0.1\255.255.255.0。
</maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>接聽程式將用來接聽連接的通訊埠。預設通訊埠是 TCP 通訊埠 1433。如果您有安全性考量,我們建議您使用不同的通訊埠編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>指定應該使用引數所指定的靜態 IP 位址來設定接聽程式。這個引數應該是字串清單。其中每個字串都可以是採用斜線標記法的 IPv4 位址和子網路遮罩或 IPv6 位址。
</maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DhcpSubnet</maml:name><maml:description><maml:para>指定接聽程式應該在引數所指定的子網路上使用 DHCP。此引數應該是採用斜線標記法的 IPv4 位址和子網路遮罩,例如 192.168.0.1\255.255.255.0。
</maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該附加接聽程式之目標可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>接聽程式的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。新的接聽程式將會附加至此路徑所指定的可用性群組。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>接聽程式將用來接聽連接的通訊埠。預設通訊埠是 TCP 通訊埠 1433。如果您有安全性考量,我們建議您使用不同的通訊埠編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>65535 </dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>指定應該使用引數所指定的靜態 IP 位址來設定接聽程式。這個引數應該是字串清單。其中每個字串都可以是採用斜線標記法的 IPv4 位址和子網路遮罩或 IPv6 位址。
</maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥選項。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 1 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlAvailabilityGroupListener -Name MyListener -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會針對可用性群組 'MyAg' 建立名為 'MyListener' 的可用性群組接聽程式。這個接聽程式將使用 DHCP 來取得虛擬 IP 位址。此命令必須在裝載主要複本的伺服器執行個體上執行。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 2 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlAvailabilityGroupListener -Name MyListener -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg -Port 1434
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會針對可用性群組 'MyAg' 建立名為 'MyListener' 的可用性群組接聽程式。這個接聽程式將使用 DHCP 來取得虛擬 IP 位址,並且接聽通訊埠 1434 的連接。此命令必須在裝載主要複本的伺服器執行個體上執行。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 3 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlAvailabilityGroupListener -Name MyListener -DhcpSubnet '192.169.0.1/255.255.252.0' -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會針對可用性群組 'MyAg' 建立名為 'MyListener' 的可用性群組接聽程式。這個接聽程式將在指定的子網路上使用 DHCP 來取得虛擬 IP 位址。此命令必須在裝載主要複本的伺服器執行個體上執行。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 4 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlAvailabilityGroupListener -Name MyListener -StaticIp '192.168.3.1/255.255.252.0' -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會針對可用性群組 'MyAg' 建立名為 'MyListener' 的可用性群組接聽程式。這個接聽程式將使用傳遞給 -StaticIp 參數的 IPv4 位址做為其虛擬 IP 位址。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 5 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlAvailabilityGroupListener -Name MyListener -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 指令碼,這個指令碼會針對可用性群組 'MyAg' 建立名為 'MyListener' 的可用性群組接聽程式。此命令實際上不會建立接聽程式。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlAvailabilityReplica</command:name><maml:description><maml:para>建立可用性複本。這個 Cmdlet 必須在裝載主要可用性複本的伺服器執行個體上執行。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>New-SqlAvailabilityReplica Cmdlet 會建立可用性複本。這個 Cmdlet 必須在裝載主要複本的 SQL Server 執行個體上執行。
</maml:para><maml:para>AsTemplate、InputObject 和 Path 參數會互斥。
</maml:para><maml:para>若要在建立新的可用性群組之前建立 AvailabilityReplica 物件,請使用 AsTemplate 參數。
</maml:para><maml:para>將複本加入至現有的可用性群組時,請使用 InputObject 或 Path 參數來指定可用性群組的路徑。如果未指定任何參數,就會使用目前的路徑。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>新可用性複本的名稱。請使用 computer\instance 格式來指定此名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。新的複本將會屬於位於此路徑的可用性群組。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此選項是 0..100 範圍內的整數,而且表示執行備份之複本的所需優先權。系統會從在線上而且可用的複本集中選擇優先權最高的複本來執行備份。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>主要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowReadWriteConnections:允取讀取/寫入連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>次要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowNoConnections:不允許連接
</maml:para><maml:para>AllowReadIntentConnectionsOnly:只允許讀取意圖的連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>路由至複本進行唯讀連接時要使用的連接完整網域名稱 (FQDN) 和通訊埠。例如:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>複本伺服器名稱的排序清單,這些名稱表示透過此可用性複本重新導向唯讀連接時供連接導向器使用的探查順序。這適用於可用性複本為可用性群組之目前主要複本的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>將連接視為失敗之前,在主要複本與這個複本之間等候回應的秒數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>指出複本為同步認可或非同步認可模式。它可以是 Null。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>資料庫鏡像端點的 URL。此 URL 是採用 TCP://system-address:port 格式的 TCP 位址。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>可以是 Automatic 或 Manual。它可以是 Null。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>新可用性複本的名稱。請使用 computer\instance 格式來指定此名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AsTemplate</maml:name><maml:description><maml:para>您想要在記憶體中建立暫存 AvailabilityReplica 物件之新可用性複本的路徑。請使用 AsTemplate 來建立您計畫包含在新可用性群組中的每個新可用性複本。然後,透過執行 New-SqlAvailabilityGroup Cmdlet,建立可用性群組,並且將 AvailabilityReplica 物件指定為 AvailabilityReplica 參數的值。
</maml:para><maml:para>當您指定了 AsTemplate 時,系統會忽略 InputObject 和 Path 參數。
</maml:para><maml:para>指定 AsTemplate 時,您必須將 SQL Server 版本傳遞給 Version 參數,否則目前的工作階段就必須具有執行個體的使用中連接。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此選項是 0..100 範圍內的整數,而且表示執行備份之複本的所需優先權。系統會從在線上而且可用的複本集中選擇優先權最高的複本來執行備份。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>主要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowReadWriteConnections:允取讀取/寫入連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>次要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowNoConnections:不允許連接
</maml:para><maml:para>AllowReadIntentConnectionsOnly:只允許讀取意圖的連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>路由至複本進行唯讀連接時要使用的連接完整網域名稱 (FQDN) 和通訊埠。例如:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>複本伺服器名稱的排序清單,這些名稱表示透過此可用性複本重新導向唯讀連接時供連接導向器使用的探查順序。這適用於可用性複本為可用性群組之目前主要複本的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>將連接視為失敗之前,在主要複本與這個複本之間等候回應的秒數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Version</maml:name><maml:description><maml:para>指定 SQL Server 版本。只有在指定 AsTemplate 時,這個參數才有用。系統會在具有這個版本的伺服器上,以設計模式建立範本物件。
</maml:para><maml:para>您可以視需要將 Version 指定為整數或字串。例如: -Version %PRODUCT_MAJOR_VER%, 或 -Version "%PRODUCT_MAJOR_VER%.0.0"
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerVersion</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>指出複本為同步認可或非同步認可模式。它可以是 Null。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>資料庫鏡像端點的 URL。此 URL 是採用 TCP://system-address:port 格式的 TCP 位址。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>可以是 Automatic 或 Manual。它可以是 Null。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>新可用性複本的名稱。請使用 computer\instance 格式來指定此名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>新複本所屬之可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此選項是 0..100 範圍內的整數,而且表示執行備份之複本的所需優先權。系統會從在線上而且可用的複本集中選擇優先權最高的複本來執行備份。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>主要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowReadWriteConnections:允取讀取/寫入連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>次要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowNoConnections:不允許連接
</maml:para><maml:para>AllowReadIntentConnectionsOnly:只允許讀取意圖的連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>路由至複本進行唯讀連接時要使用的連接完整網域名稱 (FQDN) 和通訊埠。例如:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>複本伺服器名稱的排序清單,這些名稱表示透過此可用性複本重新導向唯讀連接時供連接導向器使用的探查順序。這適用於可用性複本為可用性群組之目前主要複本的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>將連接視為失敗之前,在主要複本與這個複本之間等候回應的秒數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>指出複本為同步認可或非同步認可模式。它可以是 Null。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>資料庫鏡像端點的 URL。此 URL 是採用 TCP://system-address:port 格式的 TCP 位址。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>可以是 Automatic 或 Manual。它可以是 Null。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AsTemplate</maml:name><maml:description><maml:para>您想要在記憶體中建立暫存 AvailabilityReplica 物件之新可用性複本的路徑。請使用 AsTemplate 來建立您計畫包含在新可用性群組中的每個新可用性複本。然後,透過執行 New-SqlAvailabilityGroup Cmdlet,建立可用性群組,並且將 AvailabilityReplica 物件指定為 AvailabilityReplica 參數的值。
</maml:para><maml:para>當您指定了 AsTemplate 時,系統會忽略 InputObject 和 Path 參數。
</maml:para><maml:para>指定 AsTemplate 時,您必須將 SQL Server 版本傳遞給 Version 參數,否則目前的工作階段就必須具有執行個體的使用中連接。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>0</dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>指出複本為同步認可或非同步認可模式。它可以是 Null。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaAvailabilityMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此選項是 0..100 範圍內的整數,而且表示執行備份之複本的所需優先權。系統會從在線上而且可用的複本集中選擇優先權最高的複本來執行備份。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>主要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowReadWriteConnections:允取讀取/寫入連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInPrimaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>次要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowNoConnections:不允許連接
</maml:para><maml:para>AllowReadIntentConnectionsOnly:只允許讀取意圖的連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInSecondaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>資料庫鏡像端點的 URL。此 URL 是採用 TCP://system-address:port 格式的 TCP 位址。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>可以是 Automatic 或 Manual。它可以是 Null。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaFailoverMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>新複本所屬之可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>新可用性複本的名稱。請使用 computer\instance 格式來指定此名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。新的複本將會屬於位於此路徑的可用性群組。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>路由至複本進行唯讀連接時要使用的連接完整網域名稱 (FQDN) 和通訊埠。例如:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>複本伺服器名稱的排序清單,這些名稱表示透過此可用性複本重新導向唯讀連接時供連接導向器使用的探查順序。這適用於可用性複本為可用性群組之目前主要複本的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>將連接視為失敗之前,在主要複本與這個複本之間等候回應的秒數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Version</maml:name><maml:description><maml:para>指定 SQL Server 版本。只有在指定 AsTemplate 時,這個參數才有用。系統會在具有這個版本的伺服器上,以設計模式建立範本物件。
</maml:para><maml:para>您可以視需要將 Version 指定為整數或字串。例如: -Version %PRODUCT_MAJOR_VER%, 或 -Version "%PRODUCT_MAJOR_VER%.0.0"
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerVersion</command:parameterValue><dev:type><maml:name>ServerVersion</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
指定複本的可用性群組。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
包含新建立之可用性複本的 Power Shell 物件。
 
 
</maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$serverObject = (Get-Item SQLSERVER:\Sql\PrimaryServer\InstanceName)
$serverVersion = $serverObject.Version
$endpointURL = "TCP://PrimaryServerName.domain.com:5022"
$failoverMode = "Automatic"
$availabilityMode = "SynchronousCommit"
New-SqlAvailabilityReplica -Name PrimaryServer\Instance -EndpointUrl $endpointURL -FailoverMode $failoverMode -AvailabilityMode $availabilityMode -AsTemplate -Version $serverVersion
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會建立可用性複本的記憶體中表示法。伺服器不會認可任何變更。此複本應該傳遞給 New-SqlAvailabilityGroup Cmdlet 的 AvailabilityReplica 參數。此複本將會使用位於指定 URL 的資料庫鏡像端點,與可用性群組中的其他複本進行通訊。此複本支援自動容錯移轉和同步認可的可用性模式。-AsTemplate 和 -Version 參數是建構記憶體中表示法的必要參數。-Version 參數會指定將裝載此複本之伺服器執行個體的版本。版本號碼必須是 11。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$serverObject = (Get-Item SQLSERVER:\Sql\PrimaryServer\InstanceName)
$serverVersion = $serverObject.Version
$endpointURL = "TCP://PrimaryServerName.domain.com:5022"
$failoverMode = "Manual"
$availabilityMode = "AsynchronousCommit"
New-SqlAvailabilityReplica -Name SecondaryServer\Instance -EndpointUrl $endpointURL -FailoverMode $failoverMode -AvailabilityMode $availabilityMode -AsTemplate -Version $serverVersion
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會建立可用性複本的記憶體中表示法。伺服器不會認可任何變更。此複本應該傳遞給 New-SqlAvailabilityGroup Cmdlet 的 AvailabilityReplica 參數。此複本將會使用位於指定 URL 的端點,與可用性群組中的其他複本進行通訊。此複本支援手動容錯移轉和非同步認可的可用性模式。-AsTemplate 和 -Version 參數是建構記憶體中表示法的必要參數。-Version 參數會指定將裝載此複本之伺服器執行個體的版本。版本號碼必須是 11。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$agPath = "SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg"
$endpointURL = "TCP://PrimaryServerName.domain.com:5022"
$failoverMode = "Manual"
$availabilityMode = "AsynchronousCommit"
$secondaryReadMode = "AllowAllConnections"
New-SqlAvailabilityReplica -Name SecondaryServer\Instance -EndpointUrl $endpointURL -FailoverMode $failoverMode -AvailabilityMode $availabilityMode -ConnectionModeInSecondaryRole $secondaryReadMode -Path $agPath
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會將可用性複本加入至名為 'MyAg' 的現有可用性群組。此複本支援手動容錯移轉和非同步認可的可用性模式。在次要角色中,此複本將支援讀取連接,可讓您將唯讀處理卸載至此複本。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Specifying the Endpoint URL for an Availability Replica (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlBackupEncryptionOption</command:name><maml:description><maml:para>定義 Backup-SqlDatabase Cmdlet 或 Set-SqlSmartAdmin Cmdlet 的加密選項。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlBackupEncryptionOption</command:noun><dev:version /></command:details><maml:description><maml:para></maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlBackupEncryptionOption</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Algorithm</maml:name><maml:description><maml:para>加密演算法。可能的值為:AES128、AES192、AES256 和 TripleDes。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorName</maml:name><maml:description><maml:para>伺服器憑證或伺服器非對稱金鑰的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorType</maml:name><maml:description><maml:para>加密程式類型。可能的值為 ServerCertificate 和 ServerAsymmetricKey。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptorType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoEncryption</maml:name><maml:description><maml:para>指定停用加密。這個參數不能搭配任何其他參數使用。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Algorithm</maml:name><maml:description><maml:para>加密演算法。可能的值為:AES128、AES192、AES256 和 TripleDes。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionAlgorithm</command:parameterValue><dev:type><maml:name>BackupEncryptionAlgorithm</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorName</maml:name><maml:description><maml:para>伺服器憑證或伺服器非對稱金鑰的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorType</maml:name><maml:description><maml:para>加密程式類型。可能的值為 ServerCertificate 和 ServerAsymmetricKey。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptorType</command:parameterValue><dev:type><maml:name>BackupEncryptorType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoEncryption</maml:name><maml:description><maml:para>指定停用加密。這個參數不能搭配任何其他參數使用。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.BackupEncryptionOptions</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>用來當做 Backup-SqlDatabase 和 Set-SqlSmartAdmin 之 –EncryptionOption 參數的輸入。</maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
-------------------------- EXAMPLE 1 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$encryptionOption = New-SqlBackupEncryptionOption -Algorithm Aes256 -EncryptorType ServerCertificate -EncryptorName "BackupCert"
</dev:code><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance . -Database "db1" -BackupFile "db1.bak" -CompressionOption On -EncryptionOption $encryptionOption
 
</dev:code><dev:remarks><maml:para>此範例會建立加密選項,然後將它當做 Backup-SqlDatabase 的參數值使用,以建立加密備份。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlCredential</command:name><maml:description><maml:para>建立新的 SQL Server Credential 物件。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>New-SqlCredential Cmdlet 會建立新的 SQL Server Credential 物件。SQL Server Credential 物件可用來儲存驗證資訊。您必須使用 SQL Server 認證才能將資料備份至 Windows Azure 儲存體服務或從中還原,SQL Server 認證可用來儲存 Windows Azure 儲存體服務帳戶名稱和存取金鑰資訊。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>認證的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會使用目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ProviderName</maml:name><maml:description><maml:para>密碼編譯提供者名稱。指定 Enterprise Key Management (EKM) 提供者的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>使用者或帳戶的密碼。如果是 Windows Azure 儲存體服務驗證,這個參數就是儲存體帳戶存取金鑰值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>使用者或帳戶的名稱。如果是 Windows Azure 儲存體服務驗證,這個參數就是 Windows Azure 儲存體帳戶的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>認證的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>Server 物件,您必須在這個位置建立認證。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ProviderName</maml:name><maml:description><maml:para>密碼編譯提供者名稱。指定 Enterprise Key Management (EKM) 提供者的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>使用者或帳戶的密碼。如果是 Windows Azure 儲存體服務驗證,這個參數就是儲存體帳戶存取金鑰值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>使用者或帳戶的名稱。如果是 Windows Azure 儲存體服務驗證,這個參數就是 Windows Azure 儲存體帳戶的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>使用者或帳戶的名稱。如果是 Windows Azure 儲存體服務驗證,這個參數就是 Windows Azure 儲存體帳戶的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>Server 物件,您必須在這個位置建立認證。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>認證的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會使用目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ProviderName</maml:name><maml:description><maml:para>密碼編譯提供者名稱。指定 Enterprise Key Management (EKM) 提供者的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>使用者或帳戶的密碼。如果是 Windows Azure 儲存體服務驗證,這個參數就是儲存體帳戶存取金鑰值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue><dev:type><maml:name>SecureString</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
-------------------------- EXAMPLE 1 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt; cd SQLServer:\SQL\Computer\Instance
$storageAccount = “myWindowsAzureStorageAccount”
$storageKey = “&lt;storage account access key value&gt;”
New-SqlCredential – name “mysqlcredential” –Identity $storageAccount –secret $storageKey
 
 
</dev:code><dev:remarks><maml:para>此命令會在目前的 SQL Server 執行個體中建立 SQL Credential "mysqlcredential"。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
-------------------------- EXAMPLE 2 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;#cd to computer level
cd sqlserver:\sql\computer
$storageAccount = “myWindowsAzureStorageAccount”
$storageKey = “&lt;storage account access key value&gt;”
$secureString = convertto-securestring $storageKey -asplaintext -force
# get the list of instances
$instances = Get-childitem
#pipe the instances to new-sqlcredentail cmdlet to create SQL credential
$instances | new-sqlcredential -Name “mysqlcredential” -Identity storageAccount -Secret $secureString
 
 
 
</dev:code><dev:remarks><maml:para>此命令會針對所有 SQL Server 執行個體建立 SQL Credential "mysqlcredential"。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlHADREndpoint</command:name><maml:description><maml:para>在 SQL Server 執行個體上建立資料庫鏡像端點。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlHADREndpoint</command:noun><dev:version /></command:details><maml:description><maml:para>New-SqlHadrndpoint Cmdlet 會在指定的 SQL Server 執行個體上建立資料庫鏡像端點。裝載任何可用性群組之可用性複本的每個伺服器執行個體都需要這個端點。每個伺服器執行個體只能有一個資料庫鏡像端點。如果伺服器執行個體已經擁有資料庫鏡像端點,請使用現有的端點。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlHADREndpoint</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要建立的端點名稱。這是強制參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>要建立端點之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端點所使用的驗證順序和類型。選項包括 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的選項需要憑證,您也必須設定 -Certificate 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端點應該用來驗證連接的憑證名稱。遠端點必須有一個特定憑證,該憑證含有符合指定憑證之私密金鑰的公開金鑰。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端點的加密選項。選項包括 Disabled、Supported 或 Required。Required 是預設值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端點所使用的加密格式。選項包括 Aes、AesRC4、None、RC4 和 RC4Aes。根據預設,端點將使用 Aes 加密。
</maml:para><maml:para>注意:只有 RC4 演算法支援回溯相容性。只有在資料庫相容性層級為 90 或 100 時,才能使用 RC4 或 RC4_128 加密新資料 (不建議使用)。請改用較新的演算法,例如其中一個 AES 演算法。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端點將接聽的 IP 位址。預設值為 ALL,表示接聽程式會接受任何有效 IP 位址的連接。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端點擁有者的登入。根據預設,這是目前登入。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端點將用來接聽連接的 TCP 通訊埠。預設通訊埠是 5022。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlHADREndpoint</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要建立的端點名稱。這是強制參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該建立端點之 SQL Server 執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端點所使用的驗證順序和類型。選項包括 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的選項需要憑證,您也必須設定 -Certificate 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端點應該用來驗證連接的憑證名稱。遠端點必須有一個特定憑證,該憑證含有符合指定憑證之私密金鑰的公開金鑰。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端點的加密選項。選項包括 Disabled、Supported 或 Required。Required 是預設值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端點所使用的加密格式。選項包括 Aes、AesRC4、None、RC4 和 RC4Aes。根據預設,端點將使用 Aes 加密。
</maml:para><maml:para>注意:只有 RC4 演算法支援回溯相容性。只有在資料庫相容性層級為 90 或 100 時,才能使用 RC4 或 RC4_128 加密新資料 (不建議使用)。請改用較新的演算法,例如其中一個 AES 演算法。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端點將接聽的 IP 位址。預設值為 ALL,表示接聽程式會接受任何有效 IP 位址的連接。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端點擁有者的登入。根據預設,這是目前登入。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端點將用來接聽連接的 TCP 通訊埠。預設通訊埠是 5022。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端點所使用的驗證順序和類型。選項包括 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的選項需要憑證,您也必須設定 -Certificate 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue><dev:type><maml:name>EndpointAuthenticationOrder</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthenticationOrder.Negotiate</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端點應該用來驗證連接的憑證名稱。遠端點必須有一個特定憑證,該憑證含有符合指定憑證之私密金鑰的公開金鑰。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端點的加密選項。選項包括 Disabled、Supported 或 Required。Required 是預設值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue><dev:type><maml:name>EndpointEncryption</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthentication.Required</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端點所使用的加密格式。選項包括 Aes、AesRC4、None、RC4 和 RC4Aes。根據預設,端點將使用 Aes 加密。
</maml:para><maml:para>注意:只有 RC4 演算法支援回溯相容性。只有在資料庫相容性層級為 90 或 100 時,才能使用 RC4 或 RC4_128 加密新資料 (不建議使用)。請改用較新的演算法,例如其中一個 AES 演算法。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue><dev:type><maml:name>EndpointEncryptionAlgorithm</maml:name><maml:uri /></dev:type><dev:defaultValue>RC4</dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該建立端點之 SQL Server 執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端點將接聽的 IP 位址。預設值為 ALL,表示接聽程式會接受任何有效 IP 位址的連接。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue><dev:type><maml:name>IPAddress</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要建立的端點名稱。這是強制參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端點擁有者的登入。根據預設,這是目前登入。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>要建立端點之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端點將用來接聽連接的 TCP 通訊埠。預設通訊埠是 5022。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>5022</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
此參數會指定要建立端點的伺服器執行個體。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>SMO.Endpoint</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name MyEndpoint
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在位於指定路徑的伺服器執行個體上建立名為 'MyEndpoint' 的資料庫鏡像端點。此端點會使用預設通訊埠 5022。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name EndpointName -Port 4022 -EncryptionAlgorithm 'Aes' -Encryption 'Required'
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在位於指定路徑的伺服器執行個體上建立名為 'MyEndpoint' 的資料庫鏡像端點。此端點會接聽通訊埠 4022。此端點會使用 AES 演算法進行加密,並且要求連接使用加密。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name EndpointName -AuthenticationOrder 'Certificate' -Certificate 'MyCertificate'
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會在位於指定路徑的伺服器執行個體上建立名為 'MyEndpoint' 的資料庫鏡像端點。此端點會使用名為 'MyCertificate' 的憑證來驗證連接。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 4 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name MyEndpoint -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 指令碼,這個指令碼會在位於指定路徑的伺服器執行個體上建立名為 'MyEndpoint' 的資料庫鏡像端點。此命令實際上不會建立端點。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlAvailabilityDatabase</command:name><maml:description><maml:para>從可用性群組中移除 InputObject 或 Path 參數所指定的可用性資料庫。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Remove-SqlAvailabilityDatabase Cmdlet 會從可用性群組中移除 InputObject 或 Path 參數所指定的可用性資料庫。如果在裝載主要複本的伺服器執行個體上執行,這個 Cmdlet 就會從可用性群組中移除主要資料庫及所有對應的次要資料庫。如果在裝載次要複本的伺服器執行個體上執行,這個 Cmdlet 只會從可用性群組中移除本機次要資料庫。這個次要資料庫將不再聯結至可用性群組,但是資料庫的其他複本會繼續保持聯結狀態。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性資料庫的路徑。這是強制參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要移除之可用性資料庫的 AvailabilityDatabase 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要移除之可用性資料庫的 AvailabilityDatabase 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性資料庫的路徑。這是強制參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
指定要移除的可用性資料庫。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\PrimaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會從名為 'MyAg' 的可用性群組中移除可用性資料庫 'MyDatabase'。因為此命令是在裝載主要複本的伺服器執行個體上執行,所以系統會從可用性群組中移除主要資料庫及其所有對應的次要資料庫。系統將不再針對任何次要複本的這個資料庫進行資料同步處理。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\PrimaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases | Remove-SqlAvailabilityDatabase
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會從名為 'MyAg' 的可用性群組中移除所有可用性資料庫。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\SecondaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會從伺服器執行個體 'SecondaryComputer\Instance' 所裝載的次要複本中移除次要資料庫 'MyDatabase'。已移除之次要資料庫的資料同步處理會停止。此命令不會影響主要資料庫或任何其他次要資料庫。
</maml:para><maml:para>注意:若要在這個次要資料庫上重新啟動資料同步處理,請在相同的伺服器執行個體上使用 Add-SqlAvailabilityDatabase Cmdlet,將次要資料庫聯結至可用性群組。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 4 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\PrimaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 命令,這個命令會從可用性群組 'MyAg' 中移除可用性資料庫 'MyDatabase'。此命令實際上不會移除可用性資料庫。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlAvailabilityGroup</command:name><maml:description><maml:para>移除 InputObject 或 Path 參數所指定的可用性群組。
 
 
 
 
 
 
 
                    </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>Remove-SqlAvailabilityGroup Cmdlet 會移除 InputObject 或 Path 參數所指定的可用性群組。這個 Cmdlet 可以移除已部分建立的可用性群組。在擁有可用性群組之正確安全性認證的 WSFC 節點上,此 Cmdlet 可以在已啟用 AlwaysOn 可用性群組的任何 SQL Server 執行個體上執行。如果執行此 Cmdlet 的執行個體未啟用 AlwaysOn 可用性群組,或者 Path 參數所指定的可用性群組不存在,則會擲回錯誤。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。這是強制參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要移除之可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要移除之可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。這是強制參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 1 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會移除名為 'MyAg' 的可用性群組。此命令可以在裝載可用性群組之可用性複本的任何伺服器執行個體上執行。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 2 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups | Remove-SqlAvailabilityGroup
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會移除包含伺服器執行個體 'Computer\Instance' 所裝載之可用性複本的所有可用性群組。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 3 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 指令碼,這個指令碼會移除名為 'MyAg' 的可用性群組。此命令實際上不會移除可用性群組。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: DROP AVAILABILITY GROUP (Transact-SQL)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlAvailabilityReplica</command:name><maml:description><maml:para>移除 InputObject 或 Path 參數所指定的次要可用性複本。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>Remove-SqlAvailabilityGroup Cmdlet 會移除 InputObject 或 Path 參數所指定的次要複本。這個 Cmdlet 只能在裝載主要複本的伺服器執行個體上執行。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性複本的路徑。這是強制參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該移除之複本的 AvailabilityReplica 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該移除之複本的 AvailabilityReplica 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性複本的路徑。這是強制參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
要移除的可用性複本。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityReplica -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會從名為 'MyAg' 的可用性群組中移除名為 'MyReplica' 的可用性複本。此命令必須在裝載可用性群組之主要複本的伺服器執行個體上執行。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityReplica -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 指令碼,這個指令碼會從名為 'MyAg' 的可用性群組中移除名為 'MyReplica' 的可用性複本。此命令實際上不會移除複本。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Deleting an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlCredential</command:name><maml:description><maml:para>刪除 SQL Credential 物件。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>Remove-SqlCredential Cmdlet 會刪除 SQL Server 認證物件。這個 Cmdlet 支援下列兩種作業模式:
 
1.藉由使用 –path 參數指定內含認證名稱的認證路徑或位置。
 
2.藉由使用 –InputObject 參數將 Smo.Credential 物件傳遞給物件。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlCredential</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行此作業之 Credential 的路徑。例如:SQLSERVER:\SQL\Computer\Instance\Credentials\Credential
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>輸入認證物件。您可以使用 Get-SqlCredential Cmdlet 取得這個物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>輸入認證物件。您可以使用 Get-SqlCredential Cmdlet 取得這個物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行此作業之 Credential 的路徑。例如:SQLSERVER:\SQL\Computer\Instance\Credentials\Credential
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
-------------------------- EXAMPLE 1 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Remove-SqlCredential -Path SQLSERVER:\SQL\Computer\Instance\Credentials\MySqlCredential
 
 
</dev:code><dev:remarks><maml:para>此命令會使用 –path 參數中指定的路徑來刪除 SQL Credential 'MySqlCredential'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
-------------------------- EXAMPLE 2 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;The command retrieves the credential object from the Get-Credential cmdlet and then pipes it to the Remove-Sql Credential cmdlet to delete the SQL Credential ‘MySqlCredential’.
PS C:\&gt;$cred = Get-SqlCredential -Name MySqlCredential
$cred | Remove-SqlCredential
 
 
</dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlFirewallRule</command:name><maml:description><maml:para>停用可允許特定 SQL Server 執行個體連線的 Windows 防火牆規則。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlFirewallRule</command:noun><dev:version /></command:details><maml:description><maml:para>停用可允許特定 SQL Server 執行個體連線的 Windows 防火牆規則。</maml:para><maml:para>SQL Server 雲端配接器必須在主控 SQL Server 執行個體的電腦上執行及存取。</maml:para><maml:para>這個 Cmdlet 支援下列作業模式:</maml:para><maml:para>1.透過指定執行個體 PowerShell 路徑。</maml:para><maml:para>2.透過指定伺服器物件。</maml:para><maml:para>3.透過指定目標 SQL Server 執行個體的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Remove-SqlFirewallRule -Credential $credential -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para>此命令會停用電腦 'Computer' 上的 Windows 防火牆規則,以封鎖此電腦上的 SQL Server 'Instance' 之執行個體的連線。目前的工作目錄會用來決定應該進行作業的伺服器執行個體。系統會自動接受目標電腦的自我簽署憑證,而不提示使用者。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and disables the Windows Firewall rules to block connections to each one of them. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName" | Remove-SqlFirewallRule -Credential $credential -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Restore-SqlDatabase</command:name><maml:description><maml:para>還原所有或部分資料庫或交易記錄檔記錄的備份。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Restore</command:verb><command:noun>SqlDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Restore-SqlDatabase Cmdlet 會在 SQL Server 資料庫上執行還原作業。這包括完整資料庫還原、交易記錄還原和資料庫檔案還原。這個 Cmdlet 是依照 Microsoft.SqlServer.Management.Smo.Restore 類別建立的。此類別的參數通常會對應至該 Smo 物件的屬性。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要還原之資料庫的名稱。無法搭配 -DatabaseObject 參數使用。
</maml:para><maml:para>當您使用了 -Database 參數時,也必須指定 -Path、-InputObject 或 -ServerInstance 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>儲存備份檔案的位置。這是選擇性參數。如果未指定,系統就會在伺服器的預設備份位置中搜尋 "databasename.trn" (記錄還原) 或 "databasename.bak" (所有其他還原類型) 的名稱。這個參數無法搭配 BackupDevice 參數使用。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數或 BackupDevice 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶裝置,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在還原作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>在還原作業後刪除可疑頁面資料表。如果未設定,就不會針對可疑頁面資料表採取任何動作。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>還原作業的目標資料庫檔案。只能在 RestoreAction 屬性設定為 Files 時使用。當 RestoreAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>還原作業的目標資料庫檔案群組。只能在 RestoreAction 屬性設定為 Files 時使用。當 RestoreAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>用來識別備份媒體上目標備份組的索引編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>保留複寫組態。如果未設定,還原作業會忽略複寫組態。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別特定媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>資料庫會還原成還原狀態。不會進行回復。可以還原其他備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當還原完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟還原。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>要還原的頁面位址。只有在 -RestoreAction 設定為 OnlinePage 時才有用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>還原作業為部分還原。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>輸出用來執行備份作業的 Smo Backup 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行還原作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會使用目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>Smo.Relocate 檔案物件的清單。每個物件都包含邏輯備份檔案名稱以及實體檔案系統位置。還原作業會將還原的資料庫移入目標伺服器上的指定實體位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>建立資料庫的新映像。以相同名稱覆寫任何現有的資料庫。未設定時,如果已有該名稱的資料庫存在,還原作業將會失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的還原作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的還原作業。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>應該執行的還原作業類型。有效的選項包括 Database、Files、Log、OnlinePage 和 OnlineFiles。
</maml:para><maml:para>Database:還原資料庫。
</maml:para><maml:para>Files:還原一個或多個資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:還原交易記錄。
</maml:para><maml:para>OnlinePage:在資料庫仍供其他使用者使用時,於線上還原資料頁面。
</maml:para><maml:para>OnlineFiles:在資料庫仍供其他使用者使用時,還原一個或多個資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>將還原資料庫的資料庫存取權限定為 db_owner 固定資料庫角色以及 dbcreator 和系統管理員 (sysadmin) 固定伺服器角色。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用來儲存 Windows Azure Blob 儲存體服務之驗證資訊的 SQL Server Credential。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。如果您要從 Windows Azure Blob 儲存體服務 (URL) 還原,就需要這個參數。這個參數不能搭配 Disk 或 Tape 使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>恢復檔案的名稱,此檔案是 SQL Server 執行個體之映像策略的一部分。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>指定要與 StopAtMarkName 參數指定之標示名稱搭配使用的日期,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>在標示的交易之後停止復原。與 StopAtMarkAfterDate 參數搭配使用,以便決定復原作業的停止點。復原包括含有標示的交易。如果未設定 StopAtMarkAfterDate 值,復原會停在含有指定名稱的第一個標示。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>指定要與 StopBeforeMarkName 搭配使用的日期,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>在標示的交易之前停止復原。與 StopBeforeMarkAfterDate 搭配使用,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>資料庫記錄還原的端點。只適用於 -RestoreAction 參數設定為 Log 的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要還原之資料庫的名稱。無法搭配 -DatabaseObject 參數使用。
</maml:para><maml:para>當您使用了 -Database 參數時,也必須指定 -Path、-InputObject 或 -ServerInstance 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>儲存備份檔案的位置。這是選擇性參數。如果未指定,系統就會在伺服器的預設備份位置中搜尋 "databasename.trn" (記錄還原) 或 "databasename.bak" (所有其他還原類型) 的名稱。這個參數無法搭配 BackupDevice 參數使用。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數或 BackupDevice 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶裝置,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在還原作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>在還原作業後刪除可疑頁面資料表。如果未設定,就不會針對可疑頁面資料表採取任何動作。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在逾時失敗之前要等候伺服器連接的秒數。逾時值必須是介於 0 到 65534 之間的整數。如果指定了 0,連接嘗試就不會逾時。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>PSCredential 物件,其中指定有權執行此作業之 SQL Server 登入的認證。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>還原作業的目標資料庫檔案。只能在 RestoreAction 屬性設定為 Files 時使用。當 RestoreAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>還原作業的目標資料庫檔案群組。只能在 RestoreAction 屬性設定為 Files 時使用。當 RestoreAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>用來識別備份媒體上目標備份組的索引編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>保留複寫組態。如果未設定,還原作業會忽略複寫組態。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別特定媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>資料庫會還原成還原狀態。不會進行回復。可以還原其他備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當還原完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟還原。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>要還原的頁面位址。只有在 -RestoreAction 設定為 OnlinePage 時才有用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>還原作業為部分還原。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>輸出用來執行備份作業的 Smo Backup 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>Smo.Relocate 檔案物件的清單。每個物件都包含邏輯備份檔案名稱以及實體檔案系統位置。還原作業會將還原的資料庫移入目標伺服器上的指定實體位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>建立資料庫的新映像。以相同名稱覆寫任何現有的資料庫。未設定時,如果已有該名稱的資料庫存在,還原作業將會失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的還原作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的還原作業。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>應該執行的還原作業類型。有效的選項包括 Database、Files、Log、OnlinePage 和 OnlineFiles。
</maml:para><maml:para>Database:還原資料庫。
</maml:para><maml:para>Files:還原一個或多個資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:還原交易記錄。
</maml:para><maml:para>OnlinePage:在資料庫仍供其他使用者使用時,於線上還原資料頁面。
</maml:para><maml:para>OnlineFiles:在資料庫仍供其他使用者使用時,還原一個或多個資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>將還原資料庫的資料庫存取權限定為 db_owner 固定資料庫角色以及 dbcreator 和系統管理員 (sysadmin) 固定伺服器角色。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用來儲存 Windows Azure Blob 儲存體服務之驗證資訊的 SQL Server Credential。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。如果您要從 Windows Azure Blob 儲存體服務 (URL) 還原,就需要這個參數。這個參數不能搭配 Disk 或 Tape 使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>恢復檔案的名稱,此檔案是 SQL Server 執行個體之映像策略的一部分。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>指定要與 StopAtMarkName 參數指定之標示名稱搭配使用的日期,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>在標示的交易之後停止復原。與 StopAtMarkAfterDate 參數搭配使用,以便決定復原作業的停止點。復原包括含有標示的交易。如果未設定 StopAtMarkAfterDate 值,復原會停在含有指定名稱的第一個標示。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>指定要與 StopBeforeMarkName 搭配使用的日期,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>在標示的交易之前停止復原。與 StopBeforeMarkAfterDate 搭配使用,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>資料庫記錄還原的端點。只適用於 -RestoreAction 參數設定為 Log 的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟備份。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 執行個體的名稱。這個伺服器執行個體會成為還原作業的目標。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要還原之資料庫的名稱。無法搭配 -DatabaseObject 參數使用。
</maml:para><maml:para>當您使用了 -Database 參數時,也必須指定 -Path、-InputObject 或 -ServerInstance 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>儲存備份檔案的位置。這是選擇性參數。如果未指定,系統就會在伺服器的預設備份位置中搜尋 "databasename.trn" (記錄還原) 或 "databasename.bak" (所有其他還原類型) 的名稱。這個參數無法搭配 BackupDevice 參數使用。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數或 BackupDevice 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶裝置,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在還原作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>在還原作業後刪除可疑頁面資料表。如果未設定,就不會針對可疑頁面資料表採取任何動作。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>還原作業的目標資料庫檔案。只能在 RestoreAction 屬性設定為 Files 時使用。當 RestoreAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>還原作業的目標資料庫檔案群組。只能在 RestoreAction 屬性設定為 Files 時使用。當 RestoreAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>用來識別備份媒體上目標備份組的索引編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>保留複寫組態。如果未設定,還原作業會忽略複寫組態。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別特定媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>資料庫會還原成還原狀態。不會進行回復。可以還原其他備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當還原完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟還原。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>要還原的頁面位址。只有在 -RestoreAction 設定為 OnlinePage 時才有用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>還原作業為部分還原。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>輸出用來執行備份作業的 Smo Backup 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>Smo.Relocate 檔案物件的清單。每個物件都包含邏輯備份檔案名稱以及實體檔案系統位置。還原作業會將還原的資料庫移入目標伺服器上的指定實體位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>建立資料庫的新映像。以相同名稱覆寫任何現有的資料庫。未設定時,如果已有該名稱的資料庫存在,還原作業將會失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的還原作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的還原作業。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>應該執行的還原作業類型。有效的選項包括 Database、Files、Log、OnlinePage 和 OnlineFiles。
</maml:para><maml:para>Database:還原資料庫。
</maml:para><maml:para>Files:還原一個或多個資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:還原交易記錄。
</maml:para><maml:para>OnlinePage:在資料庫仍供其他使用者使用時,於線上還原資料頁面。
</maml:para><maml:para>OnlineFiles:在資料庫仍供其他使用者使用時,還原一個或多個資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>將還原資料庫的資料庫存取權限定為 db_owner 固定資料庫角色以及 dbcreator 和系統管理員 (sysadmin) 固定伺服器角色。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用來儲存 Windows Azure Blob 儲存體服務之驗證資訊的 SQL Server Credential。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。如果您要從 Windows Azure Blob 儲存體服務 (URL) 還原,就需要這個參數。這個參數不能搭配 Disk 或 Tape 使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>恢復檔案的名稱,此檔案是 SQL Server 執行個體之映像策略的一部分。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>指定要與 StopAtMarkName 參數指定之標示名稱搭配使用的日期,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>在標示的交易之後停止復原。與 StopAtMarkAfterDate 參數搭配使用,以便決定復原作業的停止點。復原包括含有標示的交易。如果未設定 StopAtMarkAfterDate 值,復原會停在含有指定名稱的第一個標示。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>指定要與 StopBeforeMarkName 搭配使用的日期,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>在標示的交易之前停止復原。與 StopBeforeMarkAfterDate 搭配使用,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>資料庫記錄還原的端點。只適用於 -RestoreAction 參數設定為 Log 的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟備份。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該進行還原之 SQL Server 執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>資料庫物件。還原作業會將備份還原至這個資料庫。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>儲存備份檔案的位置。這是選擇性參數。如果未指定,系統就會在伺服器的預設備份位置中搜尋 "databasename.trn" (記錄還原) 或 "databasename.bak" (所有其他還原類型) 的名稱。這個參數無法搭配 BackupDevice 參數使用。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數或 BackupDevice 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶裝置,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在還原作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>在還原作業後刪除可疑頁面資料表。如果未設定,就不會針對可疑頁面資料表採取任何動作。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>還原作業的目標資料庫檔案。只能在 RestoreAction 屬性設定為 Files 時使用。當 RestoreAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>還原作業的目標資料庫檔案群組。只能在 RestoreAction 屬性設定為 Files 時使用。當 RestoreAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>用來識別備份媒體上目標備份組的索引編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>保留複寫組態。如果未設定,還原作業會忽略複寫組態。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別特定媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>資料庫會還原成還原狀態。不會進行回復。可以還原其他備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當還原完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟還原。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>要還原的頁面位址。只有在 -RestoreAction 設定為 OnlinePage 時才有用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>還原作業為部分還原。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>輸出用來執行備份作業的 Smo Backup 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>Smo.Relocate 檔案物件的清單。每個物件都包含邏輯備份檔案名稱以及實體檔案系統位置。還原作業會將還原的資料庫移入目標伺服器上的指定實體位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>建立資料庫的新映像。以相同名稱覆寫任何現有的資料庫。未設定時,如果已有該名稱的資料庫存在,還原作業將會失敗。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的還原作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的還原作業。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>應該執行的還原作業類型。有效的選項包括 Database、Files、Log、OnlinePage 和 OnlineFiles。
</maml:para><maml:para>Database:還原資料庫。
</maml:para><maml:para>Files:還原一個或多個資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:還原交易記錄。
</maml:para><maml:para>OnlinePage:在資料庫仍供其他使用者使用時,於線上還原資料頁面。
</maml:para><maml:para>OnlineFiles:在資料庫仍供其他使用者使用時,還原一個或多個資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>將還原資料庫的資料庫存取權限定為 db_owner 固定資料庫角色以及 dbcreator 和系統管理員 (sysadmin) 固定伺服器角色。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用來儲存 Windows Azure Blob 儲存體服務之驗證資訊的 SQL Server Credential。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。如果您要從 Windows Azure Blob 儲存體服務 (URL) 還原,就需要這個參數。這個參數不能搭配 Disk 或 Tape 使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>恢復檔案的名稱,此檔案是 SQL Server 執行個體之映像策略的一部分。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>指定要與 StopAtMarkName 參數指定之標示名稱搭配使用的日期,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>在標示的交易之後停止復原。與 StopAtMarkAfterDate 參數搭配使用,以便決定復原作業的停止點。復原包括含有標示的交易。如果未設定 StopAtMarkAfterDate 值,復原會停在含有指定名稱的第一個標示。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>指定要與 StopBeforeMarkName 搭配使用的日期,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>在標示的交易之前停止復原。與 StopBeforeMarkAfterDate 搭配使用,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>資料庫記錄還原的端點。只適用於 -RestoreAction 參數設定為 Log 的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟備份。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>儲存備份的裝置。這個參數無法搭配 BackupFile 參數使用。如果您要備份至磁帶裝置,請使用此參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue><dev:type><maml:name>BackupDeviceItem[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>儲存備份檔案的位置。這是選擇性參數。如果未指定,系統就會在伺服器的預設備份位置中搜尋 "databasename.trn" (記錄還原) 或 "databasename.bak" (所有其他還原類型) 的名稱。這個參數無法搭配 BackupDevice 參數使用。如果您要備份至 Windows Azure Blob 儲存體服務 (URL),就需要這個參數或 BackupDevice 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>備份的實體區塊大小 (以位元組為單位)。支援的大小為 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 位元組。磁帶裝置的預設值為 65536,其他裝置則為 512。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>要用於備份作業的 I/O 緩衝區總數。您可以指定任何正整數。使用許多緩衝區時,可能會因為 Sqlservr.exe 處理序中的虛擬位址空間不足而造成「記憶體不足」錯誤。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在還原作業期間計算總和檢查碼值。如果未設定,則不會計算總和檢查碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>在還原作業後刪除可疑頁面資料表。如果未設定,就不會針對可疑頁面資料表採取任何動作。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在逾時失敗之前要等候伺服器連接的秒數。逾時值必須是介於 0 到 65534 之間的整數。如果指定了 0,連接嘗試就不會逾時。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>作業會在發生總和檢查碼錯誤時繼續進行。如果未設定,則作業會在總和檢查碼錯誤之後失敗。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>PSCredential 物件,其中指定有權執行此作業之 SQL Server 登入的認證。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要還原之資料庫的名稱。無法搭配 -DatabaseObject 參數使用。
</maml:para><maml:para>當您使用了 -Database 參數時,也必須指定 -Path、-InputObject 或 -ServerInstance 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>還原作業的目標資料庫檔案。只能在 RestoreAction 屬性設定為 Files 時使用。當 RestoreAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>還原作業的目標資料庫檔案群組。只能在 RestoreAction 屬性設定為 Files 時使用。當 RestoreAction 參數設定為 Files 時,您就必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>資料庫物件。還原作業會將備份還原至這個資料庫。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue><dev:type><maml:name>Database</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>用來識別備份媒體上目標備份組的索引編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該進行還原之 SQL Server 執行個體的 Server 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>保留複寫組態。如果未設定,還原作業會忽略複寫組態。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在備份媒體與 SQL Server 執行個體之間傳送的最大位元組數目。可能的值是 65536 個位元組 (64 KB) 的倍數,最多 4194304 個位元組 (4 MB)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用來識別特定媒體集的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>資料庫會還原成還原狀態。不會進行回復。可以還原其他備份。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>當還原完成時,在結束位置讓磁帶機保持開啟狀態。如果未設定,就會在作業完成之後倒轉磁帶。不適用於磁碟還原。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>要還原的頁面位址。只有在 -RestoreAction 設定為 OnlinePage 時才有用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue><dev:type><maml:name>Int64[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>還原作業為部分還原。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>輸出用來執行備份作業的 Smo Backup 物件。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行還原作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會使用目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>Smo.Relocate 檔案物件的清單。每個物件都包含邏輯備份檔案名稱以及實體檔案系統位置。還原作業會將還原的資料庫移入目標伺服器上的指定實體位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue><dev:type><maml:name>RelocateFile[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>建立資料庫的新映像。以相同名稱覆寫任何現有的資料庫。未設定時,如果已有該名稱的資料庫存在,還原作業將會失敗。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>繼續處理部分完成的還原作業。如果未設定 (預設值),此 Cmdlet 就會在備份組的開頭重新啟動中斷的還原作業。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>應該執行的還原作業類型。有效的選項包括 Database、Files、Log、OnlinePage 和 OnlineFiles。
</maml:para><maml:para>Database:還原資料庫。
</maml:para><maml:para>Files:還原一個或多個資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para><maml:para>Log:還原交易記錄。
</maml:para><maml:para>OnlinePage:在資料庫仍供其他使用者使用時,於線上還原資料頁面。
</maml:para><maml:para>OnlineFiles:在資料庫仍供其他使用者使用時,還原一個或多個資料檔案。這個選項需要設定 DatabaseFile 或 DatabaseFileGroup 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue><dev:type><maml:name>RestoreActionType</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.RestoreActionType.Database</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>將還原資料庫的資料庫存取權限定為 db_owner 固定資料庫角色以及 dbcreator 和系統管理員 (sysadmin) 固定伺服器角色。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 執行個體的名稱。這個伺服器執行個體會成為還原作業的目標。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用來儲存 Windows Azure Blob 儲存體服務之驗證資訊的 SQL Server Credential。儲存的驗證資訊包含 Windows Azure 儲存體帳戶名稱和相關的存取金鑰值。如果您要從 Windows Azure Blob 儲存體服務 (URL) 還原,就需要這個參數。這個參數不能搭配 Disk 或 Tape 使用。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>恢復檔案的名稱,此檔案是 SQL Server 執行個體之映像策略的一部分。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>指定要與 StopAtMarkName 參數指定之標示名稱搭配使用的日期,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>在標示的交易之後停止復原。與 StopAtMarkAfterDate 參數搭配使用,以便決定復原作業的停止點。復原包括含有標示的交易。如果未設定 StopAtMarkAfterDate 值,復原會停在含有指定名稱的第一個標示。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>指定要與 StopBeforeMarkName 搭配使用的日期,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>在標示的交易之前停止復原。與 StopBeforeMarkAfterDate 搭配使用,以便決定復原作業的停止點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>資料庫記錄還原的端點。只適用於 -RestoreAction 參數設定為 Log 的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>在作業完成時倒轉並卸載磁帶裝置。如果未設定,則不會嘗試倒轉並卸載磁帶媒體。不適用於磁碟備份。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Smo.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
參考應該進行還原作業之 SQL Server 執行個體的 SMO.Server 物件。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
-------------------------- EXAMPLE 1 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.bak"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將完整資料庫 'MyDB' 從檔案 '\\share\folder\MyDB.bak' 還原至伺服器執行個體 'Computer\Instance'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 2 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RestoreAction Log
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將資料庫 'MyDB' 的交易記錄從檔案 '\\share\folder\MyDB.trn' 還原至伺服器執行個體 'Computer\Instance'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 3 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.bak" -Credential (Get-Credential sa)
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會使用 sa SQL 登入,將完整資料庫 'MyDB' 從檔案 '\\share\folder\MyDB.trn' 還原至伺服器執行個體 'Computer\Instance'。此命令將提示您輸入密碼以完成 SQL 驗證。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 4 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RestoreAction Log -NoRecovery
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會使用 NORECOVERY 選項,將資料庫 'MyDB' 的交易記錄從檔案 '\\share\folder\MyDB.trn' 還原至伺服器執行個體 'Computer\Instance'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 5 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RestoreAction Log -ToPointInTime "Nov 11, 2011 11:11 AM"
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會還原資料庫 'MyDB' 的交易記錄,還原範圍截至傳遞給 -ToPointInTime 參數的日期 'Nov 11, 2011 11:11 AM' 為止。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 6 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$RelocateData = New-Object Microsoft.SqlServer.Management.Smo.RelocateFile("MyDB_Data", "c:\MySQLServer\MyDB.mdf")
$RelocateLog = New-Object Microsoft.SqlServer.Management.Smo.RelocateFile("MyDB_Log", "c:\MySQLServer\MyDB.ldf")
Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RelocateFile @($RelocateData,$RelocateLog)
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會將完整資料庫 'MyDB' 還原至伺服器執行個體 'Computer\Instance',並且重新放置資料和記錄檔。此範例會針對要移動的每個檔案建構 Microsoft.SqlServer.Management.Smo.RelocateFile 的執行個體:'$RelocateData' 和 '$RelocateLog'。每個建構函式都可接受兩個引數:檔案的邏輯名稱以及將在目標伺服器上放置檔案的實體位置。這些 RelocateFile 物件會傳遞給 Restore-SqlDatabase Cmdlet 的 -RelocateFile 參數。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 7 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$tapeDevice = New-Object Microsoft.Sqlserver.Management.Smo.BackupDeviceItem("\\.\tape0", "Tape")
Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupDevice $tapeDevice
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會將資料庫 'MyDB' 從名為 '\\.\tape0' 的磁帶裝置還原至伺服器執行個體 'Computer\Instance'。為了表示這個裝置,此範例會建構 Microsoft.Sqlserver.Management.Smo.BackupDeviceItem 的執行個體。該建構函式可接受兩個引數:備份裝置的名稱 ('\\.\tape0') 以及備份裝置的類型 ('Tape')。然後,這個 BackupDeviceItem 物件會傳遞給 Restore-SqlDatabase Cmdlet 的 -BackupDevice 參數。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
-------------------------- EXAMPLE 8 --------------------------
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "https://mystorageaccountname.blob.core.windows.net/container/MyDB.bak" https://mystorageaccountname.blob.core.windows.net/container/MyDB.bak" -SqlCredential "mySqlCredential"
 
</dev:code><dev:remarks><maml:para>此命令會將完整資料庫 'MyDB' 從 Windows Azure Blob 儲存體服務上的檔案還原至伺服器執行個體 'computer\Instance'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Resume-SqlAvailabilityDatabase</command:name><maml:description><maml:para>繼續進行可用性資料庫的資料移動。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Resume</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Resume-SqlAvailabilityDatabase Cmdlet 會繼續進行可用性資料庫的資料移動。繼續進行主要資料庫時,就會繼續進行對應次要資料庫的資料移動。繼續進行特定次要資料庫時,只會繼續進行該資料庫的資料移動。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Resume-SqlAvailabilityDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性資料庫的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Resume-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要繼續進行資料移動之主要或次要資料庫的 AvailabilityDatabase 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要繼續進行資料移動之主要或次要資料庫的 AvailabilityDatabase 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性資料庫的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>SQL Server Books Online: Resuming a Database in an Availability Group (SQL Server)</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 1 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Resume-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會針對可用性群組 'MyAg' 中的可用性資料庫 'MyDatabase' 繼續進行資料同步處理。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 2 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;dir SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\AgName\AvailabilityDatabases | Resume-SqlAvailabilityDatabase
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會針對伺服器執行個體 'Computer\Instance' 上可用性群組 'MyAg' 中的所有可用性資料庫繼續進行資料同步處理。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 3 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Resume-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 指令碼,這個指令碼會針對伺服器執行個體 'Computer\Instance' 上可用性群組 'MyAg' 中的可用性資料庫 'MyDatabase' 繼續進行資料同步處理。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAuthenticationMode</command:name><maml:description><maml:para>設定目標 SQL Server 執行個體的驗證模式。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAuthenticationMode</command:noun><dev:version /></command:details><maml:description><maml:para>設定目標 SQL Server 執行個體的驗證模式。</maml:para><maml:para>SQL Server 雲端配接器必須在主控 SQL Server 執行個體的電腦上執行及存取。</maml:para><maml:para>這個 Cmdlet 支援下列作業模式:</maml:para><maml:para>1.透過指定執行個體 PowerShell 路徑。</maml:para><maml:para>2.透過指定伺服器物件。</maml:para><maml:para>3.透過指定目標 SQL Server 執行個體的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAuthenticationMode</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>在目標 SQL Server 執行個體上設定的驗證模式。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>啟用「混合模式」驗證時,在目標 SQL Server 執行個體上建立的系統管理員認證。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>必要時,強制重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>避免重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAuthenticationMode</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>在目標 SQL Server 執行個體上設定的驗證模式。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>啟用「混合模式」驗證時,在目標 SQL Server 執行個體上建立的系統管理員認證。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>必要時,強制重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>避免重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAuthenticationMode</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>在目標 SQL Server 執行個體上設定的驗證模式。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>啟用「混合模式」驗證時,在目標 SQL Server 執行個體上建立的系統管理員認證。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>必要時,強制重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>避免重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>必要時,強制重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>在目標 SQL Server 執行個體上設定的驗證模式。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue><dev:type><maml:name>ServerLoginMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>避免重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>啟用「混合模式」驗證時,在目標 SQL Server 執行個體上建立的系統管理員認證。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Set-SqlAuthenticationMode -Credential $credential  Integrated -ForceServiceRestart  -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para>此命令會將伺服器執行個體 'Computer\Instance' 的驗證模式設定為 'Integrated'。目前的工作目錄會用來決定應該進行作業的伺服器執行個體。SQL Server 服務將會自動重新啟動,而不提示使用者。系統會自動接受目標電腦的自我簽署憑證,而不提示使用者。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and configures the authentication mode to ‘Mixed’, with the provided SQL credentials for each one of them. The SQL Server service will not be restarted automatically. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName" | Set-SqlAuthenticationMode -Credential $credential -Mode Mixed -SqlCredential $sqlCredential -NoServiceRestart  -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAvailabilityGroup</command:name><maml:description><maml:para>這個 Cmdlet 會修改現有可用性群組的設定。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>Set-SqlAvailabilityGroup Cmdlet 會修改現有可用性群組的 AutomatedBackupPreference、FailureConditionLevel 和 HealthCheckTimeout 設定。這個 Cmdlet 只能在裝載主要複本的伺服器執行個體上執行。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAvailabilityGroup</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性群組的自動備份喜好設定。有效的選項包括:
</maml:para><maml:para>Primary:指定備份一定要在主要複本上進行,不論其所在位置為何。這通常是因為使用者需要在次要複本上執行備份時無法使用的功能,例如差異備份。
</maml:para><maml:para>SecondaryOnly:指定絕對不能在主要複本上執行備份。如果主要複本是唯一的線上複本,就不會進行備份。
</maml:para><maml:para>Secondary:指定除非主要複本是唯一的線上複本,否則備份會在次要複本上進行。然後,備份會在主要複本上進行。
</maml:para><maml:para>None:此選項會指定您在選擇要執行備份的複本時,不想要將主要/次要狀態納入考量。只考慮 BackupPriority 以及上線/已連接狀態等因素。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>決定可用性群組的自動容錯移轉行為。有效的選項包括:
</maml:para><maml:para>OnServerDown:SQL Server 服務停止時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnServerUnresponsive:滿足任何狀況的較低值,而且 SQL Server 服務連接到叢集且超過 "HealthCheckTimeout" 臨界值,或者目前位於主要角色中的可用性複本處於失敗狀態時,便容錯移轉或重新啟動 (請參閱 HealthCheckTimeout 參數)。
</maml:para><maml:para>OnCriticalServerError:滿足任何狀況的較低值,而且發生內部嚴重伺服器錯誤 (記憶體不足的狀況、嚴重的寫入存取違規或傾印過多) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnModerateServerError:滿足任何狀況的較低值,而且發生一般伺服器錯誤 (持續的記憶體不足狀況) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnAnyQualifiedFailureConditions:滿足任何狀況的較低值,而且發生限定失敗狀況 (引擎工作者執行緒已耗盡、偵測到無法解決的死結) 時,便容錯移轉或重新啟動。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>將沒有回應的伺服器宣告為狀況不良之前經過的時間長度 (以毫秒為單位)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改之可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性群組的自動備份喜好設定。有效的選項包括:
</maml:para><maml:para>Primary:指定備份一定要在主要複本上進行,不論其所在位置為何。這通常是因為使用者需要在次要複本上執行備份時無法使用的功能,例如差異備份。
</maml:para><maml:para>SecondaryOnly:指定絕對不能在主要複本上執行備份。如果主要複本是唯一的線上複本,就不會進行備份。
</maml:para><maml:para>Secondary:指定除非主要複本是唯一的線上複本,否則備份會在次要複本上進行。然後,備份會在主要複本上進行。
</maml:para><maml:para>None:此選項會指定您在選擇要執行備份的複本時,不想要將主要/次要狀態納入考量。只考慮 BackupPriority 以及上線/已連接狀態等因素。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>決定可用性群組的自動容錯移轉行為。有效的選項包括:
</maml:para><maml:para>OnServerDown:SQL Server 服務停止時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnServerUnresponsive:滿足任何狀況的較低值,而且 SQL Server 服務連接到叢集且超過 "HealthCheckTimeout" 臨界值,或者目前位於主要角色中的可用性複本處於失敗狀態時,便容錯移轉或重新啟動 (請參閱 HealthCheckTimeout 參數)。
</maml:para><maml:para>OnCriticalServerError:滿足任何狀況的較低值,而且發生內部嚴重伺服器錯誤 (記憶體不足的狀況、嚴重的寫入存取違規或傾印過多) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnModerateServerError:滿足任何狀況的較低值,而且發生一般伺服器錯誤 (持續的記憶體不足狀況) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnAnyQualifiedFailureConditions:滿足任何狀況的較低值,而且發生限定失敗狀況 (引擎工作者執行緒已耗盡、偵測到無法解決的死結) 時,便容錯移轉或重新啟動。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>將沒有回應的伺服器宣告為狀況不良之前經過的時間長度 (以毫秒為單位)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性群組的自動備份喜好設定。有效的選項包括:
</maml:para><maml:para>Primary:指定備份一定要在主要複本上進行,不論其所在位置為何。這通常是因為使用者需要在次要複本上執行備份時無法使用的功能,例如差異備份。
</maml:para><maml:para>SecondaryOnly:指定絕對不能在主要複本上執行備份。如果主要複本是唯一的線上複本,就不會進行備份。
</maml:para><maml:para>Secondary:指定除非主要複本是唯一的線上複本,否則備份會在次要複本上進行。然後,備份會在主要複本上進行。
</maml:para><maml:para>None:此選項會指定您在選擇要執行備份的複本時,不想要將主要/次要狀態納入考量。只考慮 BackupPriority 以及上線/已連接狀態等因素。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue><dev:type><maml:name>AvailabilityGroupAutomatedBackupPreference</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>決定可用性群組的自動容錯移轉行為。有效的選項包括:
</maml:para><maml:para>OnServerDown:SQL Server 服務停止時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnServerUnresponsive:滿足任何狀況的較低值,而且 SQL Server 服務連接到叢集且超過 "HealthCheckTimeout" 臨界值,或者目前位於主要角色中的可用性複本處於失敗狀態時,便容錯移轉或重新啟動 (請參閱 HealthCheckTimeout 參數)。
</maml:para><maml:para>OnCriticalServerError:滿足任何狀況的較低值,而且發生內部嚴重伺服器錯誤 (記憶體不足的狀況、嚴重的寫入存取違規或傾印過多) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnModerateServerError:滿足任何狀況的較低值,而且發生一般伺服器錯誤 (持續的記憶體不足狀況) 時,便容錯移轉或重新啟動。
</maml:para><maml:para>OnAnyQualifiedFailureConditions:滿足任何狀況的較低值,而且發生限定失敗狀況 (引擎工作者執行緒已耗盡、偵測到無法解決的死結) 時,便容錯移轉或重新啟動。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue><dev:type><maml:name>AvailabilityGroupFailureConditionLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>將沒有回應的伺服器宣告為狀況不良之前經過的時間長度 (以毫秒為單位)。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改之可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 1 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityGroup -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAG -HealthCheckTimeout 120000
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將可用性群組 'MyAg' 的 HealhCheckTimeout 屬性設定為 120,000 毫秒 (兩分鐘)。如果主要伺服器在這段時間內沒有回應,而且自動容錯移轉已啟用,系統就會起始自動容錯移轉。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 2 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityGroup -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg -AutomatedBackupPreference SecondaryOnly
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將可用性群組 'MyAg' 的 AutomatedBackupPreference 屬性設定為 'SecondaryOnly'。這個可用性群組中資料庫的自動備份永遠不會在主要複本上進行,但是會重新導向至備份優先權最高的次要複本 (請參閱可用性複本的 BackupPriority 屬性)。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 3 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityGroup -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg -FailureConditionLevel OnServerDown
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將可用性群組 'MyAg' 的 FailureConditionLevel 屬性設定為 'OnServerDown'。這表示,當裝載主要複本的伺服器執行個體離線,而且自動容錯移轉已啟用時,系統就會起始自動容錯移轉。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAvailabilityGroupListener</command:name><maml:description><maml:para>這個 Cmdlet 會修改現有可用性群組接聽程式的通訊埠設定。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAvailabilityGroupListener</command:noun><dev:version /></command:details><maml:description><maml:para>Set-SqlAvailabilityGroupListener Cmdlet 會修改現有可用性群組接聽程式的通訊埠設定。這個 Cmdlet 只能在裝載主要複本的伺服器執行個體上執行。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAvailabilityGroupListener</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組接聽程式的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>接聽程式將用來接聽連接的 TCP 通訊埠。預設通訊埠是 TCP 通訊埠 1433。如果您有安全性考量,我們建議您使用不同的通訊埠編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAvailabilityGroupListener</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改之接聽程式的 SMO AvailabilityGroupListener 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>接聽程式將用來接聽連接的 TCP 通訊埠。預設通訊埠是 TCP 通訊埠 1433。如果您有安全性考量,我們建議您使用不同的通訊埠編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改之接聽程式的 SMO AvailabilityGroupListener 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組接聽程式的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>接聽程式將用來接聽連接的 TCP 通訊埠。預設通訊埠是 TCP 通訊埠 1433。如果您有安全性考量,我們建議您使用不同的通訊埠編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>1433</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 1 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityGroupListener -Port 1535 -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將名為 'MyListener' 之可用性群組接聽程式的通訊埠編號設定為 1535。這個通訊埠是用來接聽接聽程式的連接。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 2 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityGroupListener -Port 1535 -Script -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會產生 Transact-SQL 指令碼,這個指令碼會將名為 'MyListener' 之可用性群組接聽程式的通訊埠編號設定為 1535。此命令實際上不會變更通訊埠編號。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAvailabilityReplica</command:name><maml:description><maml:para>這個 Cmdlet 會修改現有可用性複本的設定。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>Set-SqlAvailabilityReplica Cmdlet 會設定或修改可用性複本的各種屬性。這個 Cmdlet 只能在裝載主要複本的伺服器執行個體上執行。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAvailabilityReplica</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性複本的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>複本的可用性模式。選項包括:SynchronousCommit 或 AsynchronousCommit。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此選項是 0..100 範圍內的整數,而且表示執行備份之複本的所需優先權。系統會從在線上而且可用的複本集中選擇優先權最高的複本來執行備份。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>主要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowReadWriteConnections:允取讀取/寫入連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>次要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowNoConnections:不允許連接
</maml:para><maml:para>AllowReadIntentConnectionsOnly:只允許讀取意圖的連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>採用 TCP://System-address:port 格式的端點 URL。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>複本的容錯移轉模式。選項包括:Manual 或 Automatic。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>路由至複本進行唯讀連接時要使用的連接完整網域名稱 (FQDN) 和通訊埠。例如:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>複本伺服器名稱的排序清單,這些名稱表示透過此可用性複本重新導向唯讀連接時供連接導向器使用的探查順序。這適用於可用性複本為可用性群組之目前主要複本的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>將連接視為失敗之前,在主要複本與這個複本之間等候回應的秒數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改之複本的 AvailabilityReplica 物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>複本的可用性模式。選項包括:SynchronousCommit 或 AsynchronousCommit。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此選項是 0..100 範圍內的整數,而且表示執行備份之複本的所需優先權。系統會從在線上而且可用的複本集中選擇優先權最高的複本來執行備份。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>主要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowReadWriteConnections:允取讀取/寫入連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>次要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowNoConnections:不允許連接
</maml:para><maml:para>AllowReadIntentConnectionsOnly:只允許讀取意圖的連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>採用 TCP://System-address:port 格式的端點 URL。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>複本的容錯移轉模式。選項包括:Manual 或 Automatic。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>路由至複本進行唯讀連接時要使用的連接完整網域名稱 (FQDN) 和通訊埠。例如:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>複本伺服器名稱的排序清單,這些名稱表示透過此可用性複本重新導向唯讀連接時供連接導向器使用的探查順序。這適用於可用性複本為可用性群組之目前主要複本的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>將連接視為失敗之前,在主要複本與這個複本之間等候回應的秒數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>複本的可用性模式。選項包括:SynchronousCommit 或 AsynchronousCommit。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaAvailabilityMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此選項是 0..100 範圍內的整數,而且表示執行備份之複本的所需優先權。系統會從在線上而且可用的複本集中選擇優先權最高的複本來執行備份。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>主要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowReadWriteConnections:允取讀取/寫入連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInPrimaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>次要角色中的可用性複本應該如何處理連接。有效的設定包括:
</maml:para><maml:para>AllowNoConnections:不允許連接
</maml:para><maml:para>AllowReadIntentConnectionsOnly:只允許讀取意圖的連接
</maml:para><maml:para>AllowAllConnections:允許所有連接
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInSecondaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>採用 TCP://System-address:port 格式的端點 URL。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>複本的容錯移轉模式。選項包括:Manual 或 Automatic。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaFailoverMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改之複本的 AvailabilityReplica 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性複本的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>路由至複本進行唯讀連接時要使用的連接完整網域名稱 (FQDN) 和通訊埠。例如:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>複本伺服器名稱的排序清單,這些名稱表示透過此可用性複本重新導向唯讀連接時供連接導向器使用的探查順序。這適用於可用性複本為可用性群組之目前主要複本的情況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>將連接視為失敗之前,在主要複本與這個複本之間等候回應的秒數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
要修改的可用性複本。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityReplica -AvailabilityMode "SynchronousCommit" -FailoverMode "Automatic" -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將可用性群組 'MyAg' 中的複本 'MyReplica' 修改成使用同步認可的可用性模式並且支援自動容錯移轉。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityReplica -AvailabilityMode "AsynchronousCommit" -FailoverMode "Manual" -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將可用性群組 'MyAg' 中的複本 'MyReplica' 修改成使用非同步認可的可用性模式並且僅支援強制手動容錯移轉 (可能會遺失資料)。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityReplica -ConnectionModeInSecondaryRole "AllowAllConnections" -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將可用性群組 'MyAg' 中的複本 'MyReplica' 修改成允許次要角色的所有連接。如果您想要將唯讀資料處理工作負載卸載至次要複本,這就很有用。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 4 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-Location SQLSERVER:\SQL\PrimaryServer\default\AvailabilityGroups\MyAg
$primaryReplica = Get-Item "AvailabilityReplicas\PrimaryServer"
$secondaryReplica = Get-Item "AvailabilityReplicas\SecondaryServer"
 
Set-SqlAvailabilityReplica -ReadOnlyRoutingConnectionUrl "TCP://PrimaryServer.domain.com:5022" -InputObject $primaryReplica
Set-SqlAvailabilityReplica -ReadOnlyRoutingConnectionUrl "TCP://SecondaryServer.domain.com:5022" -InputObject $secondaryReplica
Set-SqlAvailabilityReplica -ReadOnlyRoutingList "SecondaryServer","PrimaryServer" -InputObject $primaryReplica
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會將可用性群組中的主要複本和一個次要複本設定為唯讀路由。如果 ConnectionModeInSecondaryRole 選項設定為 AllowAllConnections 或 AllowReadIntentConnectionsOnly,唯讀路由可讓次要複本在用戶端透過虛擬網路名稱連接到可用性群組時接收並接受讀取要求。首先,此範例會將唯讀路由 URL 指派給每個複本。然後,它會設定主要複本的唯讀路由清單。在連接字串中設定 "ReadOnly" 屬性的連接將會重新導向至次要複本。如果這個次要複本無法讀取 (由 ConnectionModeInSecondaryRole 設定決定),連接將會導向回到主要複本。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 5 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityReplica -BackupPriority 60 -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將可用性複本 'MyReplica' 的備份優先權設定為 60。裝載主要複本的伺服器執行個體會使用這個優先權來決定哪個複本應該服務可用性群組中資料庫的自動備份要求 (系統會選擇優先權最高的複本)。這個優先權可以是 0 和 100 (含) 之間的任何數字。如果優先權為 0,就表示系統不應該將複本視為服務備份要求的候選。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlCredential</command:name><maml:description><maml:para>設定 SQL Credential 物件的屬性</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>您可以使用這個 Cmdlet,設定 SQL Credential 物件的 Identity 和 password 屬性。這個 Cmdlet 支援下列兩種作業模式:
 
1.藉由使用 –path 參數指定內含認證名稱的認證路徑或位置。
 
2.藉由使用 –InputObject 將 Smo.Credential 物件傳遞給物件。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlCredential</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行此作業之 Credential 的路徑。例如:SQLSERVER:\SQL\Computer\Instance\Credentials\Credential
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>指定必須驗證之資源 SQL Server 的使用者或帳戶名稱。如果是 Windows Azure 儲存體服務,這個參數就是 Windows Azure 儲存體帳戶的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>請使用這個參數指定使用者或帳戶的密碼。如果是 Windows Azure 儲存體服務,這個參數就是 Windows Azure 儲存體帳戶的存取金鑰值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>輸入認證物件。您可以使用 Get-SqlCredential Cmdlet 取得這個物件。
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>指定必須驗證之資源 SQL Server 的使用者或帳戶名稱。如果是 Windows Azure 儲存體服務,這個參數就是 Windows Azure 儲存體帳戶的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>請使用這個參數指定使用者或帳戶的密碼。如果是 Windows Azure 儲存體服務,這個參數就是 Windows Azure 儲存體帳戶的存取金鑰值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>指定必須驗證之資源 SQL Server 的使用者或帳戶名稱。如果是 Windows Azure 儲存體服務,這個參數就是 Windows Azure 儲存體帳戶的名稱。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>輸入認證物件。您可以使用 Get-SqlCredential Cmdlet 取得這個物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行此作業之 Credential 的路徑。例如:SQLSERVER:\SQL\Computer\Instance\Credentials\Credential
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>請使用這個參數指定使用者或帳戶的密碼。如果是 Windows Azure 儲存體服務,這個參數就是 Windows Azure 儲存體帳戶的存取金鑰值。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue><dev:type><maml:name>SecureString</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
-------------------------- EXAMPLE 1 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Set-SqlCredential -Path SQLSERVER:\SQL\Computer\Instance\Credentials\MySqlCredential –Identity "mystorageaccount"
 
 
</dev:code><dev:remarks><maml:para>此命令會藉由指定 SQL Credential 的路徑,將 MySqlCredential 的識別設定為 'mystorageaccount'。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
-------------------------- EXAMPLE 2 --------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;The command retrieves the credential object from the Get-Credential cmdlet and then pipes it to the Set-Sql Credential cmdlet to set the identity of mySqLCrendential to ‘mystorageaccount’.
PS C:\&gt; $cred = Get-SqlCredential -Name MySqlCredential
$cred | Set-SqlCredential –Identity "mystorageaccount"
 
 
</dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
-------------------------- EXAMPLE 3--------------------------
 
 
                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;The command prompts for the storage access key information and the Set-Sql Credential cmdlet to set the value for SECRET with the input value.
PS C:\&gt; $secret = read-host "Please enter the storage account access key"
PS C:\&gt; Set-SqlCredential –Identity "mystorageaccount" –Secret $secret
 
 
</dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlHADREndpoint</command:name><maml:description><maml:para>設定現有資料庫鏡像端點的屬性。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlHADREndpoint</command:noun><dev:version /></command:details><maml:description><maml:para>Set-SqlHadrEndpoint Cmdlet 可讓您變更現有資料庫鏡像端點的屬性 (名稱、狀態、驗證屬性等等)。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlHADREndpoint</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>資料庫鏡像端點的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端點所使用的驗證順序和類型。選項包括 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的選項需要憑證,除非憑證已經與端點產生關聯,否則您也必須設定 -Certificate 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端點應該用來驗證連接的憑證名稱。遠端點必須有一個特定憑證,該憑證含有符合指定憑證之私密金鑰的公開金鑰。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端點加密設定。選項包括 Disabled、Supported 或 Required。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端點所使用的加密格式。選項包括 Aes、AesRC4、None、RC4 和 RC4Aes。
</maml:para><maml:para>注意:只有 RC4 演算法支援回溯相容性。只有在資料庫相容性層級為 90 或 100 時,才能使用 RC4 或 RC4_128 加密新資料 (不建議使用)。請改用較新的演算法,例如其中一個 AES 演算法。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端點將接聽的 IP 位址。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端點的擁有者。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端點用來接聽連接的 TCP 通訊埠編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>State</maml:name><maml:description><maml:para>端點的狀態:Started、Stopped 或 Disabled。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointState</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlHADREndpoint</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該修改之端點的 Endpoint 物件。這個物件必須是資料庫鏡像端點。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端點所使用的驗證順序和類型。選項包括 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的選項需要憑證,除非憑證已經與端點產生關聯,否則您也必須設定 -Certificate 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端點應該用來驗證連接的憑證名稱。遠端點必須有一個特定憑證,該憑證含有符合指定憑證之私密金鑰的公開金鑰。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端點加密設定。選項包括 Disabled、Supported 或 Required。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端點所使用的加密格式。選項包括 Aes、AesRC4、None、RC4 和 RC4Aes。
</maml:para><maml:para>注意:只有 RC4 演算法支援回溯相容性。只有在資料庫相容性層級為 90 或 100 時,才能使用 RC4 或 RC4_128 加密新資料 (不建議使用)。請改用較新的演算法,例如其中一個 AES 演算法。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端點將接聽的 IP 位址。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端點的擁有者。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端點用來接聽連接的 TCP 通訊埠編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>State</maml:name><maml:description><maml:para>端點的狀態:Started、Stopped 或 Disabled。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointState</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端點所使用的驗證順序和類型。選項包括 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的選項需要憑證,除非憑證已經與端點產生關聯,否則您也必須設定 -Certificate 參數。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue><dev:type><maml:name>EndpointAuthenticationOrder</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthenticationOrder.Negotiate</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端點應該用來驗證連接的憑證名稱。遠端點必須有一個特定憑證,該憑證含有符合指定憑證之私密金鑰的公開金鑰。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端點加密設定。選項包括 Disabled、Supported 或 Required。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue><dev:type><maml:name>EndpointEncryption</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthentication.Required</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端點所使用的加密格式。選項包括 Aes、AesRC4、None、RC4 和 RC4Aes。
</maml:para><maml:para>注意:只有 RC4 演算法支援回溯相容性。只有在資料庫相容性層級為 90 或 100 時,才能使用 RC4 或 RC4_128 加密新資料 (不建議使用)。請改用較新的演算法,例如其中一個 AES 演算法。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue><dev:type><maml:name>EndpointEncryptionAlgorithm</maml:name><maml:uri /></dev:type><dev:defaultValue>RC4</dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>應該修改之端點的 Endpoint 物件。這個物件必須是資料庫鏡像端點。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端點將接聽的 IP 位址。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue><dev:type><maml:name>IPAddress</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端點的擁有者。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>資料庫鏡像端點的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端點用來接聽連接的 TCP 通訊埠編號。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>4022</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>State</maml:name><maml:description><maml:para>端點的狀態:Started、Stopped 或 Disabled。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointState</command:parameterValue><dev:type><maml:name>EndpointState</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointState.Stopped</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Endpoint</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
要設定其屬性的 AlwaysOn 端點。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>SMO.Endpoint</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlHadrEndpoint -Path SQLSERVER:\Sql\Computer\Instance\Endpoints\MyDbmEndpoint -Port 5050
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會將伺服器執行個體 'Computer\Instance' 上名為 'MyDbmEndpoint' 之資料庫鏡像端點的通訊埠編號設定為 5050。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlHadrEndpoint -Path SQLSERVER:\Sql\Computer\Instance\Endpoints\MyDbmEndpoint -State Started
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會啟動伺服器執行個體 'Computer\Instance' 上名為 'MyDbmEndpoint' 的資料庫鏡像端點。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlNetworkConfiguration</command:name><maml:description><maml:para>設定目標 SQL Server 執行個體的網路組態。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlNetworkConfiguration</command:noun><dev:version /></command:details><maml:description><maml:para>設定目標 SQL Server 執行個體的網路組態。</maml:para><maml:para>SQL Server 雲端配接器必須在主控 SQL Server 執行個體的電腦上執行及存取。</maml:para><maml:para>這個 Cmdlet 支援下列作業模式:</maml:para><maml:para>1.透過指定執行個體 PowerShell 路徑。</maml:para><maml:para>2.透過指定伺服器物件。</maml:para><maml:para>3.透過指定目標 SQL Server 執行個體的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlNetworkConfiguration</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>指定想在目標 SQL Server 執行個體上設定的網路通訊協定。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>接受 TCP 連線的連接埠。若要設定動態連接埠,此參數應設為零。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>指定想在目標 SQL Server 執行個體上停用的指定網路通訊協定。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>必要時,強制重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>避免重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlNetworkConfiguration</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>指定想在目標 SQL Server 執行個體上設定的網路通訊協定。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>接受 TCP 連線的連接埠。若要設定動態連接埠,此參數應設為零。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>指定想在目標 SQL Server 執行個體上停用的指定網路通訊協定。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>必要時,強制重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>避免重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlNetworkConfiguration</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>指定想在目標 SQL Server 執行個體上設定的網路通訊協定。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>接受 TCP 連線的連接埠。若要設定動態連接埠,此參數應設為零。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>指定想在目標 SQL Server 執行個體上停用的指定網路通訊協定。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>必要時,強制重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>避免重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>指定想在目標 SQL Server 執行個體上停用的指定網路通訊協定。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>必要時,強制重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>避免重新啟動 SQL Server 服務,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>接受 TCP 連線的連接埠。若要設定動態連接埠,此參數應設為零。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>指定想在目標 SQL Server 執行個體上設定的網路通訊協定。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue><dev:type><maml:name>Protocols</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Set-SqlNetworkConfiguration -Credential $credential -Protocol TCP -Port 1433 -NoServiceRestart -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para>此命令會將伺服器執行個體 'Computer\Instance' 的網路組態,設定為接受連接埠 1433 的 TCP 連線。目前的工作目錄會用來決定應該進行作業的伺服器執行個體。SQL Server 服務將不會自動重新啟動。系統會自動接受目標電腦的自我簽署憑證,而不提示使用者。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and disables TCP connections for each one of them. The SQL Server service will not be restarted automatically. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName" | Set-SqlNetworkConfiguration -Credential $credential -Protocol TCP -Disable -NoServiceRestart -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlSmartAdmin</command:name><maml:description><maml:para>此 Cmdlet 可設定或修改備份保留及儲存設定。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlSmartAdmin</command:noun><dev:version /></command:details><maml:description><maml:para>Set-SqlSmartAdmin Cmdlet 可設定或修改 BackupEnabled、BackupRetentionPeriodinDays、MasterSwitch 及 SqlCredential 參數設定。僅可針對執行個體層級的組態來執行 Cmdlet,而不能針對特定資料庫。</maml:para><maml:para>這個 Cmdlet 支援下列傳回物件的作業模式:
 
 1.將 Smo.Server 物件傳遞給 -InputObject 參數 (直接或透過管線)。
 
 2.傳遞 SQL Server 執行個體到 -Path 參數的路徑</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會使用目前的工作目錄。當您建立指令碼以管理多個執行個體時,這會非常有用。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupEnabled</maml:name><maml:description><maml:para>用來啟用或停用 SQL Server Managed Backup 到 Windows Azure 的參數。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupRetentionPeriodInDays</maml:name><maml:description><maml:para>備份檔案應保留的天數。此天數可決定資料庫復原能力的時間範圍。例如,若您的設定值為 30 天,即可將資料庫復原至最近 30 天的時間點。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>加密選項。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MasterSwitch</maml:name><maml:description><maml:para>用來暫停或重新啟動 Smart Admin 底下的所有服務 (包括 SQL Server Managed Backup 到 Windows Azure)。這是必要參數。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用來驗證 Windows Azure 儲存體帳戶的 SqlCredential 物件。這是必要參數。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlSmartAdmin</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>Smo Smart Admin 物件。可使用 Get-SqlSmartAdmin Cmdlet 擷取這個物件。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupEnabled</maml:name><maml:description><maml:para>用來啟用或停用 SQL Server Managed Backup 到 Windows Azure 的參數。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupRetentionPeriodInDays</maml:name><maml:description><maml:para>備份檔案應保留的天數。此天數可決定資料庫復原能力的時間範圍。例如,若您的設定值為 30 天,即可將資料庫復原至最近 30 天的時間點。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>加密選項。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MasterSwitch</maml:name><maml:description><maml:para>用來暫停或重新啟動 Smart Admin 底下的所有服務 (包括 SQL Server Managed Backup 到 Windows Azure)。這是必要參數。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用來驗證 Windows Azure 儲存體帳戶的 SqlCredential 物件。這是必要參數。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupEnabled</maml:name><maml:description><maml:para>用來啟用或停用 SQL Server Managed Backup 到 Windows Azure 的參數。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue><dev:type><maml:name>Boolean</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupRetentionPeriodInDays</maml:name><maml:description><maml:para>備份檔案應保留的天數。此天數可決定資料庫復原能力的時間範圍。例如,若您的設定值為 30 天,即可將資料庫復原至最近 30 天的時間點。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>加密選項。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue><dev:type><maml:name>BackupEncryptionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>Smo Smart Admin 物件。可使用 Get-SqlSmartAdmin Cmdlet 擷取這個物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MasterSwitch</maml:name><maml:description><maml:para>用來暫停或重新啟動 Smart Admin 底下的所有服務 (包括 SQL Server Managed Backup 到 Windows Azure)。這是必要參數。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue><dev:type><maml:name>Boolean</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會使用目前的工作目錄。當您建立指令碼以管理多個執行個體時,這會非常有用。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用來驗證 Windows Azure 儲存體帳戶的 SqlCredential 物件。這是必要參數。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance
</dev:code><dev:code>PS C:\&gt;Get-SqlSmartAdmin | Set-SqlSmartAdmin –BackupEnabled $True –BackupRetentionPeriodInDays 10
</dev:code><dev:remarks><maml:para>描述
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會設定 'MyInstance' 的雲端備份設定。其中會使用 Get-SqlSmartAdmin Cmdlet 擷取 Smart Admin 物件,並透過管線將其傳送給 Set-SqlSmartAdmin Cmdlet。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance
</dev:code><dev:code>PS C:\&gt;Get-SqlSmartAdmin | Set-SqlSmartAdmin –MasterSwitch $False
</dev:code><dev:remarks><maml:para>描述
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會暫停整個執行個體的 SQL Server Managed Backup 服務。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance
</dev:code><dev:code>PS C:\&gt;Get-SqlSmartAdmin | Set-SqlSmartAdmin –MasterSwitch $True
</dev:code><dev:remarks><maml:para>描述
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會還原 SQL Server Managed Backup 到 Windows Azure 的服務。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 4 --------------------------
  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;$encryptionOption = New-SqlBackupEncryptionOption -EncryptionAlgorithm Aes128 -EncryptorType ServerCertificate -EncryptorName "MyBackupCert"
</dev:code><dev:code>PS C:\&gt;Get-SqlSmartAdmin | Set-SqlSmartAdmin -EncryptionOption $encryptionOption
</dev:code><dev:remarks><maml:para>描述
</maml:para><maml:para>-----------
</maml:para><maml:para>此範例會提供 –EncryptionOption 參數以設定 SQL Server Managed Backup 到 Windows Azure 的加密選項。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Start-SqlInstance</command:name><maml:description><maml:para>啟動指定的 SQL Server 執行個體。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Start</command:verb><command:noun>SqlInstance</command:noun><dev:version /></command:details><maml:description><maml:para>啟動指定的 SQL Server 執行個體。</maml:para><maml:para>SQL Server 雲端配接器必須在主控 SQL Server 執行個體的電腦上執行及存取。</maml:para><maml:para>這個 Cmdlet 支援下列作業模式:</maml:para><maml:para>1.透過指定執行個體 PowerShell 路徑。</maml:para><maml:para>2.透過指定伺服器物件。</maml:para><maml:para>3.透過指定目標 SQL Server 執行個體的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Start-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Start-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Start-SqlInstance -Credential $credential -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para>此指令啟動 'Computer\Instance' 伺服器執行個體。目前的工作目錄會用來決定應該進行作業的伺服器執行個體。系統會自動接受目標電腦的自我簽署憑證,而不提示使用者。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and starts all the instances. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName" | Start-SqlInstance -Credential $credential -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Stop-SqlInstance</command:name><maml:description><maml:para>停止指定的 SQL Server 執行個體。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Stop</command:verb><command:noun>SqlInstance</command:noun><dev:version /></command:details><maml:description><maml:para>停止指定的 SQL Server 執行個體。</maml:para><maml:para>SQL Server 雲端配接器必須在主控 SQL Server 執行個體的電腦上執行及存取。</maml:para><maml:para>這個 Cmdlet 支援下列作業模式:</maml:para><maml:para>1.透過指定執行個體 PowerShell 路徑。</maml:para><maml:para>2.透過指定伺服器物件。</maml:para><maml:para>3.透過指定目標 SQL Server 執行個體的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>強制 Cmdlet 自動接受目標電腦的 SQL Server 雲端配接器自我簽署憑證,而不提示使用者。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>在目標電腦上指定具有 Windows 管理員認證的使用者帳戶。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目標執行個體的伺服器物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目標電腦上的公用管理連接埠。當您無法直接存取目標電腦的連接埠,但該連接埠有透過端點公開時,即應使用此參數,表示我們必須連線到其他連接埠。</maml:para><maml:para>SQL Server 雲端配接器必須以此連接埠存取。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您想要執行作業之 SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目標伺服器上重試命令的時間週期。超過逾時設定之後,就不會再嘗試重試。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此參數可指定將成為作業目標之 SQL Server 執行個體的名稱。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Stop-SqlInstance -Credential $credential -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para>此命令停止 'Computer\Instance' 伺服器執行個體。目前的工作目錄會用來決定應該進行作業的伺服器執行個體。系統會自動接受目標電腦的自我簽署憑證,而不提示使用者。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and stops all the instances. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName" | Stop-SqlInstance -Credential $credential -AcceptSelfSignedCertificate;
 
</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Suspend-SqlAvailabilityDatabase</command:name><maml:description><maml:para>在目前伺服器執行個體所裝載之複本的可用性資料庫上暫停資料移動。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Suspend</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Suspend-SqlAvailabilityDatabase Cmdlet 會在目前伺服器執行個體所裝載之複本的可用性資料庫上暫停資料移動。暫停次要資料庫時,其狀態會設定為 SUSPENDED,並且開始落後於對應的主要資料庫。暫停主要資料庫時,則會暫停每個次要複本的資料移動。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Suspend-SqlAvailabilityDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性資料庫的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Suspend-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要暫停資料移動之主要或次要資料庫的 AvailabilityDatabase 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要暫停資料移動之主要或次要資料庫的 AvailabilityDatabase 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性資料庫的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
指定要暫停資料移動的可用性資料庫。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><maml:alertSet><maml:title /><maml:alert><maml:para>執行此命令的執行個體必須啟用高可用性。
</maml:para></maml:alert><maml:alert></maml:alert></maml:alertSet><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Suspend-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會針對伺服器執行個體 'Computer\Instance' 上可用性群組 'MyAg' 中的可用性資料庫 'MyDatabase' 暫停資料同步處理。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;dir SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases | Suspend-SqlAvailabilityDatabase
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會針對伺服器執行個體 'Computer\Instance' 上可用性群組 'MyAg' 中的所有可用性資料庫暫停資料同步處理。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Suspend-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 指令碼,這個指令碼會針對伺服器執行個體 'Computer\Instance' 上可用性群組 'MyAg' 中的可用性資料庫 'MyDatabase' 暫停資料同步處理。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Suspending a Database in an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Switch-SqlAvailabilityGroup</command:name><maml:description><maml:para>起始可用性群組至特定次要複本的容錯移轉。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Switch</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>Switch-SqlAvailabilityGroup Cmdlet 會起始可用性群組至特定次要複本的容錯移轉。這個 Cmdlet 只能在目標次要複本上執行。容錯移轉之後,您容錯移轉的目標次要複本會成為新的主要複本。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Switch-SqlAvailabilityGroup</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowDataLoss</maml:name><maml:description><maml:para>起始強制容錯移轉至目標次要複本。可能會遺失資料。因此,除非您指定 -Force 或 -Script 參數,否則系統會提示您確認。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>同時指定 -Force 和 -AllowDataLoss,即可在不確認的情況下起始強制容錯移轉。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Switch-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>表示將容錯移轉之可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowDataLoss</maml:name><maml:description><maml:para>起始強制容錯移轉至目標次要複本。可能會遺失資料。因此,除非您指定 -Force 或 -Script 參數,否則系統會提示您確認。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>同時指定 -Force 和 -AllowDataLoss,即可在不確認的情況下起始強制容錯移轉。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowDataLoss</maml:name><maml:description><maml:para>起始強制容錯移轉至目標次要複本。可能會遺失資料。因此,除非您指定 -Force 或 -Script 參數,否則系統會提示您確認。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>同時指定 -Force 和 -AllowDataLoss,即可在不確認的情況下起始強制容錯移轉。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>表示將容錯移轉之可用性群組的 AvailabilityGroup 物件。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>輸出執行此 Cmdlet 所執行之工作的 Transact-SQL 指令碼。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>
 
指定要容錯移轉的目標可用性群組。
 
 
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Switch-SqlAvailabilityGroup -Path SQLSERVER:\Sql\SecondaryServer\InstanceName\AvailabilityGroups\MyAg
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會執行可用性群組 'MyAg' 至伺服器執行個體 'SecondaryServer\InstanceName' 的已規劃手動容錯移轉 (不會遺失資料)。您必須針對裝載要容錯移轉之目標次要複本的伺服器執行個體執行此命令。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Switch-SqlAvailabilityGroup -Path SQLSERVER:\Sql\SecondaryServer\InstanceName\AvailabilityGroups\MyAg -AllowDataLoss
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會執行可用性群組 'MyAg' 至伺服器執行個體 'SecondaryServer\InstanceName' 的強制容錯移轉 (可能會遺失資料)。因為強制容錯移轉可能會導致資料遺失,所以系統將提示您確認此作業。您必須針對裝載要容錯移轉之目標次要複本的伺服器執行個體執行此命令。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Switch-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\AgName -AllowDataLoss -Force
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會執行可用性群組 'MyAg' 至伺服器執行個體 'SecondaryServer\InstanceName' 的強制容錯移轉 (可能會遺失資料)。-Force 選項會隱藏此作業的確認。使用 -Force 選項時請小心,因為強制容錯移轉可能會導致資料從參與可用性群組的資料庫中遺失。您必須針對裝載要容錯移轉之目標次要複本的伺服器執行個體執行此命令。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 4 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Switch-SqlAvailabilityGroup -Path SQLSERVER:\Sql\SecondaryServer\InstanceName\AvailabilityGroups\MyAg -Script
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會輸出 Transact-SQL 指令碼,這個指令碼會執行可用性群組 'MyAg' 至伺服器執行個體 'SecondaryServer\InstanceName' 的已規劃手動容錯移轉。請注意,此命令不會導致容錯移轉。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Forcing Failover of an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Test-SqlAvailabilityGroup</command:name><maml:description><maml:para>透過評估 SQL Server 原則式管理 (PBM) 原則,評估可用性群組的健全狀況。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Test</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>Test-SqlAvailabilityGroup Cmdlet 會透過評估 SQL Server 原則式管理 (PBM) 原則,評估可用性群組的健全狀況。您必須擁有 CONNECT、VIEW SERVER STATE 和 VIEW ANY DEFINITION 權限,才能執行這個 Cmdlet。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-SqlAvailabilityGroup</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 AlwaysOn 原則類別目錄中的使用者原則。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 不會手動重新整理 -Path 或 -InputObject 參數所指定的物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之各項原則評估的結果。Cmdlet 針對每項原則評估輸出一個物件,此物件的欄位描述評估結果 (原則通過或失敗、原則名稱和類別目錄等等)。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Test-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>表示可用性群組的物件集合。這個 Cmdlet 會計算這些可用性群組的健全狀況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 AlwaysOn 原則類別目錄中的使用者原則。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 不會手動重新整理 -Path 或 -InputObject 參數所指定的物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之各項原則評估的結果。Cmdlet 針對每項原則評估輸出一個物件,此物件的欄位描述評估結果 (原則通過或失敗、原則名稱和類別目錄等等)。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 AlwaysOn 原則類別目錄中的使用者原則。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>表示可用性群組的物件集合。這個 Cmdlet 會計算這些可用性群組的健全狀況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 不會手動重新整理 -Path 或 -InputObject 參數所指定的物件。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性群組的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之各項原則評估的結果。Cmdlet 針對每項原則評估輸出一個物件,此物件的欄位描述評估結果 (原則通過或失敗、原則名稱和類別目錄等等)。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 1 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估名為 'MyAg' 之可用性群組的健全狀況並且輸出簡短摘要。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 2 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups | Test-SqlAvailabilityGroup
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估伺服器執行個體 'Computer\Instance' 上所有可用性群組的健全狀況並且輸出每個可用性群組的簡短摘要。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 3 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\AgName -ShowPolicyDetails
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估名為 'MyAg' 之可用性群組的健全狀況並且輸出已執行之每個原則式管理 (PBM) 原則的評估結果。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 4 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\AgName -AllowUserPolicies
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估名為 'MyAg' 之可用性群組的健全狀況。這項評估會包含使用者定義的原則。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 5 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups | Test-SqlAvailabilityGroup | Where-Object { $_.HealthState -eq "Error" }
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會顯示伺服器執行個體 'Computer\Instance' 上健全狀態為 "Error" 的所有可用性群組。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Test-SqlAvailabilityReplica</command:name><maml:description><maml:para>透過評估 SQL Server 原則式管理 (PBM) 原則,評估可用性複本的健全狀況。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Test</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>Test-SqlAvailabilityReplica Cmdlet 會透過評估 SQL Server 原則式管理 (PBM) 原則,評估可用性複本的健全狀況。您必須擁有 CONNECT、VIEW SERVER STATE 和 VIEW ANY DEFINITION 權限,才能執行這個 Cmdlet。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-SqlAvailabilityReplica</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>一個或多個可用性複本的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 AlwaysOn 原則類別目錄中的使用者原則。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 不會手動重新整理 -Path 或 -InputObject 參數所指定的物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之各項原則評估的結果。Cmdlet 針對每項原則評估輸出一個物件,此物件的欄位描述評估結果 (原則通過或失敗、原則名稱和類別目錄等等)。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Test-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>表示可用性複本的物件集合。這個 Cmdlet 會計算這些複本的健全狀況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 AlwaysOn 原則類別目錄中的使用者原則。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 不會手動重新整理 -Path 或 -InputObject 參數所指定的物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之各項原則評估的結果。Cmdlet 針對每項原則評估輸出一個物件,此物件的欄位描述評估結果 (原則通過或失敗、原則名稱和類別目錄等等)。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 AlwaysOn 原則類別目錄中的使用者原則。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>表示可用性複本的物件集合。這個 Cmdlet 會計算這些複本的健全狀況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 不會手動重新整理 -Path 或 -InputObject 參數所指定的物件。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>一個或多個可用性複本的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之各項原則評估的結果。Cmdlet 針對每項原則評估輸出一個物件,此物件的欄位描述評估結果 (原則通過或失敗、原則名稱和類別目錄等等)。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 1 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityReplica -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估可用性群組 'MyAg' 中名為 'MyReplica' 之可用性複本的健全狀況並且輸出簡短摘要。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 2 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas | Test-SqlAvailabilityReplica
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估可用性群組 'MyAg' 中所有可用性複本的健全狀況並且輸出每個複本的簡短摘要。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 3 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityReplica -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica -ShowPolicyDetails
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估可用性群組 'MyAg' 中名為 'MyReplica' 之可用性複本的健全狀況並且輸出已執行之每個原則式管理 (PBM) 原則的評估結果。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 4 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityReplica -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica -AllowUserPolicies
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估可用性群組 'MyAg' 中名為 'MyReplica' 之可用性複本的健全狀況。這項評估會包含使用者定義的原則。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 5 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas | Test-SqlAvailabilityReplica | Where-Object { $_.HealthState -eq "Error" }
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會顯示可用性群組 'MyAg' 中健全狀態為 "Error" 的所有可用性複本。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Test-SqlDatabaseReplicaState</command:name><maml:description><maml:para>透過評估 SQL Server 原則式管理 (PBM) 原則,評估所有聯結可用性複本之可用性資料庫的健全狀況。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Test</command:verb><command:noun>SqlDatabaseReplicaState</command:noun><dev:version /></command:details><maml:description><maml:para>Test-SqlDatabaseReplicaState Cmdlet 會透過評估 SQL Server 原則式管理 (PBM) 原則,評估所有聯結可用性複本之可用性資料庫的健全狀況。您必須擁有 CONNECT、VIEW SERVER STATE 和 VIEW ANY DEFINITION 權限,才能執行這個 Cmdlet。
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-SqlDatabaseReplicaState</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性資料庫之資料庫複本叢集狀態的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 AlwaysOn 原則類別目錄中的使用者原則。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 不會手動重新整理 -Path 或 -InputObject 參數所指定的物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之各項原則評估的結果。Cmdlet 針對每項原則評估輸出一個物件,此物件的欄位描述評估結果 (原則通過或失敗、原則名稱和類別目錄等等)。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Test-SqlDatabaseReplicaState</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>表示可用性資料庫狀態的物件集合。這個 Cmdlet 會計算這些可用性資料庫的健全狀況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 AlwaysOn 原則類別目錄中的使用者原則。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 不會手動重新整理 -Path 或 -InputObject 參數所指定的物件。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之各項原則評估的結果。Cmdlet 針對每項原則評估輸出一個物件,此物件的欄位描述評估結果 (原則通過或失敗、原則名稱和類別目錄等等)。
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 AlwaysOn 原則類別目錄中的使用者原則。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>表示可用性資料庫狀態的物件集合。這個 Cmdlet 會計算這些可用性資料庫的健全狀況。
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 不會手動重新整理 -Path 或 -InputObject 參數所指定的物件。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性資料庫之資料庫複本叢集狀態的路徑。這是選擇性參數。如果未指定,此參數的值預設為目前的工作位置。
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之各項原則評估的結果。Cmdlet 針對每項原則評估輸出一個物件,此物件的欄位描述評估結果 (原則通過或失敗、原則名稱和類別目錄等等)。
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.DatabaseReplicaState</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 1 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$path = "SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\DatabaseReplicaStates\MyReplica.MyDatabase"
Test-SqlDatabaseReplicaState -Path $path
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估可用性群組 'MyAg' 中可用性複本 'MyReplica' 上名為 'MyDatabase' 之可用性資料庫的健全狀況並且輸出簡短摘要。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 2 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\DatabaseReplicaStates | Test-SqlDatabaseReplicaState
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估可用性群組 'MyAg' 中所有可用性資料庫的健全狀況並且輸出每個資料庫的簡短摘要。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 3 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;dir SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\DatabaseReplicaStates | Test-SqlDatabaseReplicaState -ShowPolicyDetails
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估可用性群組 'MyAg' 中所有可用性資料庫的健全狀況並且輸出已執行之每個原則式管理 (PBM) 原則的評估結果。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 4 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;dir SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\DatabaseReplicaStates | Test-SqlDatabaseReplicaState -AllowUserPolicies
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會評估可用性群組 'MyAg' 中所有可用性資料庫的健全狀況。這項評估會包含使用者定義的原則。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
 
 
                -------------------------- EXAMPLE 5 --------------------------
 
 
 
            </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\DatabaseReplicaStates | Test-SqlDatabaseReplicaState | Where-Object { $_.HealthState -eq "Error" }
 
 
</dev:code><dev:remarks><maml:para>說明
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令會顯示可用性群組 'MyAg' 中健全狀態為 "Error" 的所有可用性資料庫。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Test-SqlSmartAdmin</command:name><maml:description><maml:para>此 Cmdlet 透過評估 (evaluating) SQL Server 原則式管理 (PBM) 評估 (assess) Smart Admin 的健全狀況。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Test</command:verb><command:noun>SqlSmartAdmin</command:noun><dev:version /></command:details><maml:description><maml:para>Test-SqlSmartAdmin Cmdlet 會為 SQL Server 執行個體評估 Smart Admin 的健全狀況。</maml:para><maml:para>Test-SqlSmartAdmin Cmdlet 會為 SQL Server 執行個體評估 Smart Admin 的健全狀況。這個 Cmdlet 支援下列傳回物件的作業模式:
 
 1.傳遞 SQL Server 執行個體到 -Path 參數的路徑。
 
 
2.將 Smo.Server 物件傳遞給 -InputObject 參數 (直接或透過管線)。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會使用目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 Smart Admin 警告和錯誤原則類別目錄中的使用者原則。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 將不會手動重新整理 Path 或 InputObject 參數所指定的物件。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之原則評估的結果。此 Cmdlet 會針對每項原則評估輸出一個物件。輸出包括評估的結果:例如原則名稱、類別目錄及健全狀況。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Test-SqlSmartAdmin</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>SmartAdmin 物件。您可以從 Get-SqlSmartAdmin Cmdlet 取得這個物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 Smart Admin 警告和錯誤原則類別目錄中的使用者原則。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 將不會手動重新整理 Path 或 InputObject 參數所指定的物件。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之原則評估的結果。此 Cmdlet 會針對每項原則評估輸出一個物件。輸出包括評估的結果:例如原則名稱、類別目錄及健全狀況。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>執行 Smart Admin 警告和錯誤原則類別目錄中的使用者原則。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>SmartAdmin 物件。您可以從 Get-SqlSmartAdmin Cmdlet 取得這個物件。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>設定此參數時,Cmdlet 將不會手動重新整理 Path 或 InputObject 參數所指定的物件。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 執行個體的路徑。這是選擇性參數。如果未指定,此參數的值會使用目前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>顯示此 Cmdlet 執行之原則評估的結果。此 Cmdlet 會針對每項原則評估輸出一個物件。輸出包括評估的結果:例如原則名稱、類別目錄及健全狀況。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在執行 Cmdlet 之前提示您確認。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述當您執行 Cmdlet 時沒有實際執行 Cmdlet 會發生什麼事。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.SmartAdmin</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>輸出即為原則評估的結果。</maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
  
-------------------------- EXAMPLE 1 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance
 Get-SqlSmartAdmin | Test-SqlSmartAdmin
Following is a list of the properties returned by the above command :
Name: Displays the name of the policy.
Category: Displays the category of the policy, SmartAdmin errors or SmartAdmin Warnings.
Result: Whether a result was returned or not (True or False)
Expression: Displays the policy conditions.
</dev:code><dev:remarks><maml:para>描述
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令可評估伺服器執行個體 'MyInstance' 上的資料庫健全狀況並輸出此健全狀態。此命令使用 Get-SqlSmartAdmin Cmdlet 擷取 Smart Admin 物件,並透過管線將其傳送給 Test-SqlSmartAdmin Cmdlet 使用。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 2 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance
 $policyResults = Get-SqlSmartAdmin | Test-SqlSmartAdmin
$policyResults.PolicyEvaluationDetails | select Name, Category, Result, Expression|f1
 
</dev:code><dev:remarks><maml:para>描述
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令可評估伺服器執行個體 'MyInstance' 上的資料庫健全狀況、輸出此健全狀態並篩選顯示內容。此命令使用 Get-SqlSmartAdmin Cmdlet 擷取 Smart Admin 物件,並透過管線將其傳送給 Test-SqlSmartAdmin Cmdlet 使用。
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
  
-------------------------- EXAMPLE 3 --------------------------
  
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;PS SQLSERVER:\SQL\COMPUTER\DEFAULT&gt; (get-sqlsmartadmin ).EnumHealthStatus()
Following is a sample output generated by using the above example: number_of_storage_connectivity_errors: 0
number_of_sql_errors: 2 
number_of_invalid_credential_errors: 0
number_of_other_errors : 0
number_of_corrupted_or_deleted_backups: 0
number_of_backup_loops: 2
number_of_retention_loops: 2
 
</dev:code><dev:remarks><maml:para>描述
</maml:para><maml:para>-----------
</maml:para><maml:para>此命令可提供詳細報告,內容與預設執行個體上傳回的錯誤相關:
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command></helpItems>