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: docs/azure_data_studio/README_FOR_MARKETPLACE.md
+28-16Lines changed: 28 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -105,28 +105,36 @@ For more information see the [Code of Conduct FAQ][conduct-FAQ] or contact [open
105
105
## SQL PowerShell Examples
106
106
In order to use these examples (below), you need to install the SqlServer module from the [PowerShell Gallery](https://www.powershellgallery.com/packages/SqlServer).
In this example, we use the `Get-SqlInstance` cmdlet to Get the Server SMO objects for ServerA & ServerB. The default output for this command will include the Instance name, version, Service Pack, & CU Update Level of the instances.
109
113
110
-
In this example, we use the Get-SqlInstance cmdlet to Get the Server SMO objects for ServerA & ServerB. The default output for this command will include the Instance name, version, Service Pack, & CU Update Level of the instances.
Here is a sample of what that output will look like:
114
-
<pre><code><# Sample Output #>
119
+
120
+
```
115
121
Instance Name Version ProductLevel UpdateLevel
116
122
------------- ------- ------------ -----------
117
123
ServerA 13.0.5233 SP2 CU4
118
-
ServerB 14.0.3045 RTM CU12</code></pre>
124
+
ServerB 14.0.3045 RTM CU12
125
+
```
119
126
120
-
In this example, we will do a 'dir' (alias for Get-ChildItem) to get the list of all SQL Server instances listed in your Registered Servers file, and then use the Get-SqlDatabase cmdlet to get a list of Databases for each of those instances.
127
+
In this example, we will do a `dir` (alias for `Get-ChildItem`) to get the list of all SQL Server instances listed in your Registered Servers file, and then use the `Get-SqlDatabase` cmdlet to get a list of Databases for each of those instances.
121
128
122
-
<pre><code>dir 'SQLSERVER:\SQLRegistration\Database Engine Server Group' -Recurse |
129
+
```
130
+
dir 'SQLSERVER:\SQLRegistration\Database Engine Server Group' -Recurse |
123
131
WHERE {$_.Mode -ne 'd' } |
124
132
FOREACH {
125
133
Get-SqlDatabase -ServerInstance $_.Name
126
134
}
127
-
</code></pre>
135
+
```
128
136
Here is a sample of what that output will look like:
@@ -139,18 +147,22 @@ PBIRSTempDB Normal 16.00 MB 4.20 MB Simple 140 sa
139
147
SSISDB Normal 325.06 MB 26.21 MB Full 140 sa
140
148
tempdb Normal 72.00 MB 61.25 MB Simple 140 sa
141
149
WideWorldImporters Normal 3.2 GB 2.6 GB Simple 130 sa
142
-
</code></pre>
150
+
```
143
151
144
-
This example uses the Get-SqlDatabase cmdlet to retireve a list of all databases on the ServerB instance, then presents a grid/table to select which databases should be backed up. Once the user clicks on the "OK" button, only the highlighted databases will be backed up.
152
+
This example uses the `Get-SqlDatabase` cmdlet to retireve a list of all databases on the ServerB instance, then presents a grid/table to select which databases should be backed up. Once the user clicks on the "OK" button, only the highlighted databases will be backed up.
This example again gets list of all SQL Server instances listed in your Registered Servers file, then reports every failed SQL Agent Job since Midnight, for each SQL Server instances listed.
160
+
This example again gets list of all SQL Server instances listed in your Registered Servers file, then calls the `Get-SqlAgentJobHistory` which reports every failed SQL Agent Job since Midnight, for each SQL Server instances listed.
151
161
152
-
<pre><code>dir 'SQLSERVER:\SQLRegistration\Database Engine Server Group' -Recurse |
162
+
```
163
+
dir 'SQLSERVER:\SQLRegistration\Database Engine Server Group' -Recurse |
0 commit comments