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
[Azure SQL Managed Instance](sql-managed-instance-paas-overview.md) auditing tracks database events and writes them to an audit log in your Azure storage account.
22
+
This article teaches you to configure auditing for [Azure SQL Managed Instance](sql-managed-instance-paas-overview.md). Auditing tracks database events and writes them to an audit log in your Azure storage account.
23
23
24
24
Auditing also:
25
25
@@ -304,6 +304,20 @@ The key differences in the `CREATE AUDIT` syntax for auditing to Azure Blob stor
304
304
- Shutdown option is **not supported**.
305
305
- `queue_delay` of 0 is **not supported**.
306
306
307
+
## Permissions
308
+
309
+
To set up auditing, you need database permissions within SQL managed instance, and you also need permissions to the Azure resources that are used for storing and accessing the audit logs.
310
+
311
+
To set up SQL managed instance auditing you need to following database permissions:
312
+
313
+
|Database permissions |Configure audit |View audit logs using T-SQL |
314
+
|---------|---------|---------|
315
+
|**VIEW DATABASE SECURITY AUDIT** |No|Yes|
316
+
|**ALTER ANY DATABASE AUDIT** | Yes | No |
317
+
|**CONTROL DATABASE** | Yes | Yes |
318
+
319
+
To configure auditing to Azure storage, you need the **Storage blob data contributor** role on the storage account or higher permissions. To configure auditing to Event Hubs or Log Analytics, you need the **Monitoring Contributor** role or higher permissions on the resource group where the Event Hub or Log Analytics workspace is provisioned.
Copy file name to clipboardExpand all lines: docs/relational-databases/track-changes/known-issues-and-errors-change-data-capture.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,12 +95,13 @@ When the data type of a column on a CDC-enabled table is changed to an unsupport
95
95
The following are examples of `ALTER COLUMN` data type changes that aren't supported when CDC is enabled on a table:
96
96
97
97
-**bigint** to **int**
98
-
-**char(x)**, **nvarchar(x)**, or **nvarchar(x)** to **uniqueidentifier**, **DATE**, or **INT**
98
+
-**char(x)**, **nvarchar(x)**, or **nvarchar(x)** to **uniqueidentifier**, **DATE**, **Numeric**or **INT**
99
99
100
100
Changing the data type of a column in a CDC-enabled table can result in the following errors:
101
101
102
102
-[Error 241](#error-241---conversion-failed-when-converting-date-andor-time-from-character-string) - Conversion failed when converting date and/or time from character string.
103
-
-[Error 245](#error-245---conversion-failed-when-converting-the-value-from-string-to-int) - Conversion failed when converting the value.
103
+
-[Error 245](#error-245---conversion-failed-when-converting-the-value-from-string-to-int) - Conversion failed when converting the value.
104
+
-[Error 8114](#error-8114---conversion-failed-when-converting-from-a-character-string-to-numeric-value) - Conversion failed when converting from a character string to numeric value.
104
105
-[Error 8169](#error-8169---conversion-failed-when-converting-from-a-character-string-to-uniqueidentifier) - Conversion failed when converting from a character string to uniqueidentifier.
105
106
106
107
Changing the size of columns of a CDC-enabled table using DDL statements can cause issues with the subsequent CDC capture process can result in the following errors:
@@ -239,6 +240,12 @@ These are the different troubleshooting categories included in this section:
239
240
240
241
***Recommendation**: Before making any changes to column size, you must assess whether the alteration is compatible with the existing data in CDC change tables. To address this problem, you need to disable and re-enable CDC for your database. For more information about enabling CDC for a database or a table, see [Enable CDC for a database](enable-and-disable-change-data-capture-sql-server.md#enable-for-a-database) and [Enable CDC for a table](enable-and-disable-change-data-capture-sql-server.md#enable-for-a-table).
241
242
243
+
#### Error 8114 - Conversion failed when converting from a character string to numeric value
244
+
245
+
***Cause**: This error occurs when an [ALTER COLUMN](../../t-sql/statements/alter-table-transact-sql.md#alter-column) command is issued to change the data type of a column when the table has CDC enabled. For example, if a table has a **char(x)**, **nvarchar(x)**, **nvarchar(x)** column and you change the data type to **numeric** (such as: `ALTER TABLE table_name ALTER COLUMN [column_name] numeric`), you might see this error in the [sys.dm_cdc_errors](../system-dynamic-management-views/change-data-capture-sys-dm-cdc-errors.md) Dynamic Management View (DMV). Error 8114 indicates an unsupported data conversion in the change table, even though the ALTER command on the source table succeeds.
246
+
247
+
***Recommendation**: To resolve this issue, disable and re-enable CDC for your table after altering the column. Alternatively, disable CDC before running the `ALTER COLUMN` command, and then reenable CDC after the `ALTER COLUMN` change.
248
+
242
249
#### Error 8115 - Arithmetic overflow error converting data type from bigint to int
243
250
244
251
***Cause**: This error occurs when an [ALTER COLUMN](../../t-sql/statements/alter-table-transact-sql.md#alter-column) DDL is executed on a CDC-enabled table that results in a decrease in the precision of the column (such as changing the data type of the column from **bigint** to **int**). The decreased precision column is unable to hold the values present in the change table.
@@ -247,10 +254,12 @@ These are the different troubleshooting categories included in this section:
247
254
248
255
#### Error 8169 - Conversion failed when converting from a character string to uniqueidentifier
249
256
250
-
***Cause**: This error occurs when an [ALTER COLUMN](../../t-sql/statements/alter-table-transact-sql.md#alter-column) command is issued to change the data type of a column when table has CDC enabled. For example, if a table has a **char(x)**, **nvarchar(x)**, **nvarchar(x)** column and you change the data type to **uniqueidentifier** (such as: `ALTER TABLE table_name ALTER COLUMN [column_name] uniqueidentifier`), you might see this error in the [sys.dm_cdc_errors](../system-dynamic-management-views/change-data-capture-sys-dm-cdc-errors.md) Dynamic Management View (DMV). Error 8169 indicates an unsupported data conversion in the change table, even though the ALTER command on the source table succeeds.
257
+
***Cause**: This error occurs when an [ALTER COLUMN](../../t-sql/statements/alter-table-transact-sql.md#alter-column) command is issued to change the data type of a column when the table has CDC enabled. For example, if a table has a **char(x)**, **nvarchar(x)**, **nvarchar(x)** column and you change the data type to **uniqueidentifier** (such as: `ALTER TABLE table_name ALTER COLUMN [column_name] uniqueidentifier`), you might see this error in the [sys.dm_cdc_errors](../system-dynamic-management-views/change-data-capture-sys-dm-cdc-errors.md) Dynamic Management View (DMV). Error 8169 indicates an unsupported data conversion in the change table, even though the ALTER command on the source table succeeds.
251
258
252
259
***Recommendation**: To resolve this issue, disable and re-enable CDC for your table after altering the column. Alternatively, disable CDC before running the `ALTER COLUMN` command, and then reenable CDC after the `ALTER COLUMN` change.
253
260
261
+
262
+
254
263
## Create user and assign role
255
264
256
265
If the `cdc user` was removed, you can manually add the user back.
0 commit comments