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: azure-sql/database/automated-backups-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -538,7 +538,7 @@ To view backup and data storage metrics in the Azure portal, follow these steps:
538
538
Backup storage consumption for a Hyperscale database depends on the retention period, choice of region, backup storage redundancy and workload type. Consider some of the following tuning techniques to reduce your backup storage consumption for a Hyperscale database:
539
539
540
540
- Reduce the [backup retention period](#change-the-short-term-retention-policy-using-the-azure-portal) to the minimum possible for your needs.
541
-
- Avoid doing large write-operations, such as index maintenance, more frequently than you need to. For index maintenance recommendations, see [Optimize index maintenance to improve query performance and reduce resource consumption](/sql/relational-databases/indexes/reorganize-and-rebuild-indexes.md).
541
+
- Avoid doing large write-operations, such as index maintenance, more frequently than you need to. For index maintenance recommendations, see [Optimize index maintenance to improve query performance and reduce resource consumption](/sql/relational-databases/indexes/reorganize-and-rebuild-indexes).
542
542
- For large data-load operations, consider using data compression when appropriate.
543
543
- Use the `tempdb` database instead of permanent tables in your application logic to store temporary results and/or transient data.
544
544
- Use locally-redundant or zone-redundant backup storage when geo-restore capability is unnecessary (for example: dev/test environments).
You can create a [service principal](/azure/active-directory/develop/app-objects-and-service-principals) with the [az ad sp create-for-rbac](/cli/azure/ad/sp#az-ad-sp-create-for-rbac) command in the [Azure CLI](/cli/azure/). Run this command with [Azure Cloud Shell](https://shell.azure.com/) in the Azure portal or by selecting the **Try it** button.
42
44
43
45
Replace the placeholders `server-name` with the name of your SQL server hosted on Azure. Replace the `subscription-id` and `resource-group` with the subscription ID and resource group connected to your SQL server.
@@ -63,6 +65,27 @@ The output is a JSON object with the role assignment credentials that provide ac
63
65
> [!IMPORTANT]
64
66
> It is always a good practice to grant minimum access. The scope in the previous example is limited to the specific server and not the entire resource group.
65
67
68
+
# [OpenID Connect](#tab/openid)
69
+
70
+
You need to provide your application's **Client ID**, **Tenant ID**, and **Subscription ID** to the login action. These values can either be provided directly in the workflow or can be stored in GitHub secrets and referenced in your workflow. Saving the values as GitHub secrets is the more secure option.
71
+
72
+
1. Open your GitHub repository and go to **Settings**.
73
+
74
+
1. Select **Settings > Secrets > New secret**.
75
+
76
+
1. Create secrets for `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, and `AZURE_SUBSCRIPTION_ID`. Use these values from your Active Directory application for your GitHub secrets:
77
+
78
+
|GitHub Secret | Active Directory Application |
79
+
|---------|---------|
80
+
|AZURE_CLIENT_ID | Application (client) ID |
81
+
|AZURE_TENANT_ID | Directory (tenant) ID |
82
+
|AZURE_SUBSCRIPTION_ID | Subscription ID |
83
+
84
+
1. Save each secret by selecting **Add secret**.
85
+
86
+
---
87
+
88
+
66
89
## Copy the SQL connection string
67
90
68
91
In the Azure portal, go to your Azure SQL Database and open **Settings** > **Connection strings**. Copy the **ADO.NET** connection string. Replace the placeholder values for `your_database` and `your_password`. The connection string will look similar to this output.
@@ -75,6 +98,8 @@ You'll use the connection string as a GitHub secret.
75
98
76
99
## Configure the GitHub secrets
77
100
101
+
# [Service principal](#tab/userlevel)
102
+
78
103
1. In [GitHub](https://github.com/), browse your repository.
79
104
80
105
1. Select **Settings > Secrets > New secret**.
@@ -93,6 +118,25 @@ You'll use the connection string as a GitHub secret.
93
118
94
119
1. Paste the connection string value into the secret's value field. Give the secret the name `AZURE_SQL_CONNECTION_STRING`.
95
120
121
+
# [OpenID Connect](#tab/openid)
122
+
123
+
You need to provide your application's **Client ID**, **Tenant ID**, and **Subscription ID** to the login action. These values can either be provided directly in the workflow or can be stored in GitHub secrets and referenced in your workflow. Saving the values as GitHub secrets is the more secure option.
124
+
125
+
1. Open your GitHub repository and go to **Settings**.
126
+
127
+
1. Select **Settings > Secrets > New secret**.
128
+
129
+
1. Create secrets for `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, and `AZURE_SUBSCRIPTION_ID`. Use these values from your Active Directory application for your GitHub secrets:
130
+
131
+
|GitHub Secret | Active Directory Application |
132
+
|---------|---------|
133
+
|AZURE_CLIENT_ID | Application (client) ID |
134
+
|AZURE_TENANT_ID | Directory (tenant) ID |
135
+
|AZURE_SUBSCRIPTION_ID | Subscription ID |
136
+
137
+
1. Save each secret by selecting **Add secret**.
138
+
139
+
---
96
140
97
141
## Add your workflow
98
142
@@ -107,21 +151,23 @@ You'll use the connection string as a GitHub secret.
107
151
108
152
on:
109
153
push:
110
-
branches: [ master ]
154
+
branches: [ main ]
111
155
pull_request:
112
-
branches: [ master ]
156
+
branches: [ main ]
113
157
```
114
158
115
-
1. Rename your workflow `SQL for GitHub Actions` and add the checkout and login actions. These actions will checkout your site code and authenticate with Azure using the `AZURE_CREDENTIALS` GitHub secret you created earlier.
159
+
1. Rename your workflow `SQL for GitHub Actions` and add the checkout and login actions. These actions will check out your site code and authenticate with Azure using the `AZURE_CREDENTIALS` GitHub secret you created earlier.
160
+
161
+
# [Service principal](#tab/userlevel)
116
162
117
163
```yaml
118
164
name: SQL for GitHub Actions
119
165
120
166
on:
121
167
push:
122
-
branches: [ master ]
168
+
branches: [ main ]
123
169
pull_request:
124
-
branches: [ master ]
170
+
branches: [ main ]
125
171
126
172
jobs:
127
173
build:
@@ -133,6 +179,31 @@ You'll use the connection string as a GitHub secret.
1. Use the Azure SQL Deploy action to connect to your SQL instance. Replace `SQL_SERVER_NAME` with the name of your server. You should have a dacpac package (`Database.dacpac`) at the root level of your repository.
137
208
138
209
```yaml
@@ -141,18 +212,20 @@ You'll use the connection string as a GitHub secret.
1. Complete your workflow by adding an action to logout of Azure. Here is the completed workflow. The file will appear in the `.github/workflows` folder of your repository.
217
+
1. Complete your workflow by adding an action to logout of Azure. Here's the completed workflow. The file will appear in the `.github/workflows` folder of your repository.
218
+
219
+
# [Service principal](#tab/userlevel)
147
220
148
221
```yaml
149
222
name: SQL for GitHub Actions
150
223
151
224
on:
152
225
push:
153
-
branches: [ master ]
226
+
branches: [ main ]
154
227
pull_request:
155
-
branches: [ master ]
228
+
branches: [ main ]
156
229
157
230
158
231
jobs:
@@ -176,6 +249,42 @@ You'll use the connection string as a GitHub secret.
@@ -36,7 +40,7 @@ To complete this quickstart, you need the following prerequisites:
36
40
|||Restore or import Adventure Works from a [BACPAC](database-import.md) file from [GitHub](https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/adventure-works)| Restore or import Adventure Works from a [BACPAC](database-import.md) file from [GitHub](https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/adventure-works)|
37
41
38
42
> [!IMPORTANT]
39
-
> The scripts in this article are written to use the Adventure Works database. With a SQL Managed Instance, you must either import the Adventure Works database into an instance database or modify the scripts in this article to use the Wide World Importers database.
43
+
> The scripts in this article are written to use the Adventure Works database. With a SQL Managed Instance, either import the Adventure Works database into an instance database or modify the scripts in this article to use the Wide World Importers database.
40
44
41
45
- Ruby and related software for your operating system:
42
46
@@ -48,26 +52,23 @@ To complete this quickstart, you need the following prerequisites:
48
52
49
53
## Get server connection information
50
54
51
-
Get the connection information you need to connect to a database in Azure SQL Database. You'll need the fully qualified server name or host name, database name, and login information for the upcoming procedures.
55
+
Get the information you need to connect to a database in Azure SQL Database. You'll need the fully qualified server name or host name, database name, and sign-in information for the upcoming procedures.
52
56
53
57
1. Sign in to the [Azure portal](https://portal.azure.com/).
54
58
55
59
2. Navigate to the **SQL databases** or **SQL Managed Instances** page.
56
60
57
-
3. On the **Overview** page, review the fully qualified server name next to **Server name** for a database in Azure SQL Database or the fully qualified server name (or IP address) next to **Host** for an Azure SQL Managed Instance or SQL Server on Azure VM. To copy the server name or host name, hover over it and select the **Copy** icon.
61
+
3. On the **Overview** page, review the fully qualified server name next to **Server name** for a database in Azure SQL Database or the fully qualified server name (or IP address) next to **Host** for an Azure SQL Managed Instance or SQL Server on Virtual Machines. To copy the server name or host name, hover over it and select the **Copy** icon.
58
62
59
63
> [!NOTE]
60
-
> For connection information for SQL Server on Azure VM, see [Connect to a SQL Server instance](../virtual-machines/windows/sql-vm-create-portal-quickstart.md#connect-to-sql-server).
64
+
> For connection information for SQL Server on Azure Virtual Machines, see [Connect to a SQL Server instance](../virtual-machines/windows/sql-vm-create-portal-quickstart.md#connect-to-sql-server).
61
65
62
66
## Create code to query your database in Azure SQL Database
63
67
64
68
1. In a text or code editor, create a new file named *sqltest.rb*.
65
69
66
70
1. Add the following code. Substitute the values from your database in Azure SQL Database for `<server>`, `<database>`, `<username>`, and `<password>`.
67
71
68
-
>[!IMPORTANT]
69
-
>The code in this example uses the sample AdventureWorksLT data, which you can choose as source when creating your database. If your database has different data, use tables from your own database in the SELECT query.
70
-
71
72
```ruby
72
73
require'tiny_tds'
73
74
server ='<server>.database.windows.net'
@@ -88,17 +89,21 @@ Get the connection information you need to connect to a database in Azure SQL Da
88
89
end
89
90
```
90
91
92
+
>[!IMPORTANT]
93
+
>This example uses the sample AdventureWorksLT data, which you can choose as source when creating your database. If your database has different data, use tables from your own database in the SELECT query.
94
+
91
95
## Run the code
92
96
93
97
1. At a command prompt, run the following command:
94
98
95
99
```bash
96
100
ruby sqltest.rb
97
101
```
98
-
99
-
1. Verify that the top 20 Category/Product rows from your database are returned.
102
+
103
+
1. Verify that the top 20 Category/Product rows from your database are returned.
100
104
101
105
## Next steps
106
+
102
107
-[Design your first database in Azure SQL Database](design-first-database-tutorial.md)
103
108
-[GitHub repository for TinyTDS](https://github.com/rails-sqlserver/tiny_tds)
104
109
-[Report issues or ask questions about TinyTDS](https://github.com/rails-sqlserver/tiny_tds/issues)
@@ -28,6 +28,7 @@ The following table lists the features of Azure SQL Database that are currently
28
28
29
29
| Feature | Details |
30
30
| ---| --- |
31
+
|[Azure Synapse Link for Azure SQL Database](/azure/synapse-analytics/synapse-link/sql-synapse-link-overview)| Azure Synapse Link for SQL enables near real time analytics over operational data in Azure SQL Database or SQL Server 2022. |
31
32
|[Elastic jobs](elastic-jobs-overview.md)| The elastic jobs feature is the SQL Server Agent replacement for Azure SQL Database as a PaaS offering. |
32
33
|[Elastic queries](elastic-query-overview.md)| The elastic queries feature allows for cross-database queries in Azure SQL Database. |
33
34
|[Elastic transactions](elastic-transactions-overview.md)| Elastic transactions allow you to execute transactions distributed among cloud databases in Azure SQL Database. |
@@ -59,6 +60,12 @@ The following table lists the features of Azure SQL Database that have transitio
59
60
60
61
Learn about significant changes to the Azure SQL Database documentation.
61
62
63
+
### May 2022
64
+
65
+
| Changes | Details |
66
+
| --- | --- |
67
+
| **Azure Synapse Link for Azure SQL Database** | Azure Synapse Link enables near real-time analytics over operational data in SQL Server 2022 and Azure SQL Database. With a seamless integration between operational stores and Azure Synapse Analytics dedicated SQL pools, Azure Synapse Link enables you to run analytics, business intelligence and machine learning scenarios on your operational data with minimum impact on source databases with a new change feed technology. For more information, see [What is Synapse Link for SQL? (Preview)](/azure/synapse-analytics/synapse-link/sql-synapse-link-overview).
0 commit comments