Skip to content

Commit c13f758

Browse files
authored
Merge pull request #22183 from MicrosoftDocs/FromPublicRepo
Confirm merge from FromPublicRepo to main to sync with https://github.com/MicrosoftDocs/sql-docs (branch live)
2 parents 72a8521 + 118529e commit c13f758

8 files changed

Lines changed: 46 additions & 7 deletions

File tree

azure-sql/database/database-copy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ New-AzSqlDatabaseCopy -ResourceGroupName "<resourceGroup>" -ServerName $sourcese
6161
-CopyResourceGroupName "myResourceGroup" -CopyServerName $targetserver -CopyDatabaseName "CopyOfMySampleDatabase"
6262
```
6363

64-
The database copy is an asynchronous operation but the target database is created immediately after the request is accepted. If you need to cancel the copy operation while still in progress, drop the the target database using the [Remove-AzSqlDatabase](/powershell/module/az.sql/new-azsqldatabase) cmdlet.
64+
The database copy is an asynchronous operation but the target database is created immediately after the request is accepted. If you need to cancel the copy operation while still in progress, drop the the target database using the [Remove-AzSqlDatabase](/powershell/module/az.sql/remove-azsqldatabase) cmdlet.
6565

6666
For a complete sample PowerShell script, see [Copy a database to a new server](scripts/copy-database-to-new-server-powershell.md).
6767

docs/azure-data-studio/quickstart-azure-cosmos-db-mongodb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This quickstart shows how to use Azure Data Studio to connect to the Azure Cosmo
2020

2121
To complete this quickstart, you need Azure Data Studio and an Azure Cosmos DB API account.
2222

23-
- [Install Azure Data Studio](./download-azure-data-studio.md).
23+
- [Install Azure Data Studio](https://github.com/microsoft/azuredatastudio#try-out-the-latest-insiders-build-from-main).
2424
- [Install the Azure Cosmos DB API for MongoDB extension for Azure Data Studio](./extensions/azure-cosmos-db-mongodb-extension.md).
2525
- [Create an Azure Cosmos DB API for MongoDB account](/azure/cosmos-db/mongodb/mongodb-introduction).
2626

docs/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ This article provides commands for installing the ODBC driver from the bash shel
2222

2323
> [!Note]
2424
> The Microsoft ODBC driver for SQL Server on macOS is only supported on the x64 architecture through version 17.7. Apple M1 (ARM64) support was added starting with version 17.8. The architecture will be detected and the correct package will be automatically installed by the Homebrew formula. If your command prompt is running in x64 emulation mode on the M1, the x64 package will be installed. If you're not running in emulation mode in your command prompt, the ARM64 package will be installed.
25+
> Additionally, the Homebrew default directory changed with the M1, to `/opt/homebrew`. The paths below use the x64 Homebrew paths, which default to `/usr/local`, so your file paths will vary accordingly.
2526
2627
## Microsoft ODBC 18
2728

docs/relational-databases/system-dynamic-management-views/sys-dm-database-backups-azure-sql-database.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,43 @@ SELECT *
5656
FROM sys.dm_database_backups
5757
ORDER BY backup_finish_date DESC;
5858
```
59+
You can get a friendlier resultset by joining to `sys.databases` and using a `CASE` statement. Run this query in the `master` database to get backup history for all databases in the Azure SQL Database server.
60+
61+
```sql
62+
SELECT db.name
63+
, backup_start_date
64+
, backup_finish_date
65+
, CASE backup_type
66+
WHEN 'D' THEN 'Full'
67+
WHEN 'I' THEN 'Differential'
68+
WHEN 'L' THEN 'Transaction Log'
69+
END AS BackupType
70+
, CASE in_retention
71+
WHEN 1 THEN 'In Retention'
72+
WHEN 0 THEN 'Out of Retention'
73+
END AS is_Bakcup_Available
74+
FROM sys.dm_database_backups AS ddb
75+
INNER JOIN sys.databases AS db
76+
ON ddb.physical_database_name = db.physical_database_name
77+
ORDER BY backup_start_date DESC;
78+
```
79+
80+
Run the below query in the user database context to get backup history for a single database.
81+
82+
```sql
83+
SELECT backup_start_date
84+
, backup_finish_date
85+
, CASE backup_type
86+
WHEN 'D' THEN 'Full'
87+
WHEN 'I' THEN 'Differential'
88+
WHEN 'L' THEN 'Transaction Log'
89+
END AS BackupType
90+
, CASE in_retention
91+
WHEN 1 THEN 'In Retention'
92+
WHEN 0 THEN 'Out of Retention'
93+
END AS is_Bakcup_Available
94+
FROM sys.dm_database_backups AS ddb
95+
INNER JOIN sys.databases AS db
96+
ON ddb.physical_database_name = db.physical_database_name
97+
ORDER BY backup_start_date DESC;
98+
```

docs/sql-server/azure-arc/connect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ az provider register --namespace 'Microsoft.AzureArcData'
5050

5151
## Initiate the connection from Azure
5252

53-
If the machine with SQL Server is already connected to Azure Arc, you can register the SQL Server instances on that machine by installing the SQL Server extension (*WindowsAgent.SqlServer*). Once installed, the SQL Server extension will recognize all the installed SQL Server instances and register them with Azure Arc. The extension will run continuously to detect changes of the SQL Server configuration. For example, if a new SQL Server instance is installed on the machine, if will be automatically registered with Azure. See [virtual machine extension management](/azure/azure-arc/servers/manage-vm-extensions) for instructions how to install and uninstall extensions using the Azure portal, Azure PowerShell or Azure CLI.
53+
If the machine with SQL Server is already connected to Azure Arc, you can register the SQL Server instances on that machine by installing the SQL Server extension (*WindowsAgent.SqlServer*). Once installed, the SQL Server extension will recognize all the installed SQL Server instances and register them with Azure Arc. The extension will run continuously to detect changes of the SQL Server configuration. For example, if a new SQL Server instance is installed on the machine, if will be automatically registered with Azure. See [virtual machine extension management](/azure/azure-arc/servers/manage-vm-extensions) for instructions on how to install and uninstall extensions using the Azure portal, Azure PowerShell or Azure CLI.
5454

5555
> [!IMPORTANT]
5656
>1. The Managed System Identity for the corresponding **Server - Azure Arc** must have the *Azure Connected SQL Server Onboarding* role at resource group level.

docs/sql-server/azure-arc/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Review [networking configuration, transport layer security, and resource provide
7373

7474
The resource provider `Microsoft.AzureArcData` is required to connect the SQL Server instances to Azure Arc. To register the resource provider, follow the instructions in the [Prerequisites](connect.md#prerequisites) section.
7575

76-
If you connected an instance of SQL Server ot Azure Arc prior to December 2020, you need to follow the [prerequisite steps](connect.md#prerequisites) to migrate the existing **SQL Server - Azure Arc** resources to the new namespace.
76+
If you connected an instance of SQL Server to Azure Arc prior to December 2020, you need to follow the [prerequisite steps](connect.md#prerequisites) to migrate the existing **SQL Server - Azure Arc** resources to the new namespace.
7777

7878
## Supported Azure regions
7979

docs/t-sql/functions/string-split-transact-sql.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ In a practice run, the preceding SELECT returned following result table:
9797
|dolor|
9898
|sit|
9999
|amet.|
100-
| &nbsp; |
101100

102101
The following example enables the `ordinal` column by passing 1 for the optional third argument:
103102

@@ -114,7 +113,6 @@ This statement then returns the following result table:
114113
|dolor|3|
115114
|sit|4|
116115
|amet.|5|
117-
| &nbsp; ||
118116

119117
## Examples
120118

docs/t-sql/queries/select-over-clause-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ ORDER BY SalesOrderNumber,ProductKey;
620620
The following example shows using the OVER clause with an aggregate function in a calculated value. Notice that the aggregates are calculated by `SalesOrderNumber` and the percentage of the total sales order is calculated for each line of each `SalesOrderNumber`.
621621

622622
```sql
623-
-- Uses AdventureWorks
623+
-- Uses AdventureWorksDW2019
624624

625625
SELECT SalesOrderNumber AS OrderNumber, ProductKey AS Product,
626626
OrderQuantity AS Qty,

0 commit comments

Comments
 (0)