You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/Connect-DbaInstance.ps1
+2
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,8 @@ function Connect-DbaInstance {
142
142
143
143
Note that the token is valid for only one hour and cannot be renewed automatically.
144
144
145
+
Note that the returned SMO is not a fully functional SMO. It can only be used in a limited list of commands like Invoke-DbaQuery, Import-DbaCsv or Write-DbaDbTableData.
146
+
145
147
.PARAMETERDedicatedAdminConnection
146
148
Connects using "ADMIN:" to create a dedicated admin connection (DAC) as a non-pooled connection.
147
149
If the instance is on a remote server, the remote access has to be enabled via "Set-DbaSpConfigure -Name RemoteDacConnectionsEnabled -Value $true" or "sp_configure 'remote admin connections', 1".
$QueryStoreOptions=$sourceDB.Query("SELECT max_plans_per_query AS MaxPlansPerQuery, wait_stats_capture_mode_desc AS WaitStatsCaptureMode FROM sys.database_query_store_options;",$sourceDB.Name)
109
-
} elseif ($sourceServer.VersionMajor-ge15) {
110
-
$QueryStoreOptions=$sourceDB.Query("SELECT max_plans_per_query AS MaxPlansPerQuery, wait_stats_capture_mode_desc AS WaitStatsCaptureMode, capture_policy_execution_count AS CustomCapturePolicyExecutionCount, capture_policy_stale_threshold_hours AS CustomCapturePolicyStaleThresholdHours, capture_policy_total_compile_cpu_time_ms AS CustomCapturePolicyTotalCompileCPUTimeMS, capture_policy_total_execution_cpu_time_ms AS CustomCapturePolicyTotalExecutionCPUTimeMS FROM sys.database_query_store_options;",$sourceDB.Name)
111
-
}
112
-
113
107
foreach ($destinstancein$Destination) {
114
108
115
109
if (!$DestinationDatabase-and!$Exclude-and!$AllDatabases) {
@@ -152,6 +146,7 @@ function Copy-DbaDbQueryStoreOption {
0 commit comments