Skip to content

Commit 45c2a63

Browse files
Merge pull request #36837 from MicrosoftDocs/FromPublicRepo
Confirm merge from FromPublicRepo to main to sync with https://github.com/MicrosoftDocs/sql-docs (branch live)
2 parents 6c30388 + 4efbcf7 commit 45c2a63

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

docs/t-sql/statements/alter-fulltext-catalog-transact-sql.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,40 @@ To use `ALTER FULLTEXT CATALOG`, you need one of the following permissions:
8484

8585
To use `ALTER FULLTEXT CATALOG ... AS DEFAULT`, you need `ALTER` permission on the full-text catalog, and `CREATE FULLTEXT CATALOG` permission on the database.
8686

87+
## Remarks
88+
89+
When you run a `REBUILD` operation on a full-text catalog, the rebuild operation pauses if another session has an open transaction that's running `INSERT`, `UPDATE`, or `DELETE` operations on tables that belong to that catalog. The rebuild operation resumes only after that other transaction commits or rolls back. You can monitor this situation by using the [sys.dm_exec_requests](../../relational-databases/system-dynamic-management-views/sys-dm-exec-requests-transact-sql.md) and [sys.dm_exec_sessions](../../relational-databases/system-dynamic-management-views/sys-dm-exec-sessions-transact-sql.md) dynamic management views (DMVs). You might see locks between the user session and the background rebuild sessions, with a wait type of `LCK_M_IS`.
90+
91+
Similarly, during a `REORGANIZE` operation, you might see the `FT_MASTER_MERGE` wait type in the session where the command is running. This wait type can occur when other sessions have long-running transactions that are doing `INSERT`, `UPDATE`, or `DELETE` operations on tables in the same full-text catalog. In the `sys.dm_exec_requests` and `sys.dm_exec_sessions` DMVs, you might see one or more background sessions with a `LCK_M_IX` wait type and the `FT_MASTER_MERGE` command. The `REORGANIZE` operation doesn't complete until those locks are released.
92+
93+
The following query returns blocked background sessions.
94+
95+
```sql
96+
SELECT r1.session_id,
97+
r1.blocking_session_id,
98+
r1.wait_type,
99+
r1.wait_resource,
100+
r1.last_wait_type,
101+
r1.command AS BlockedSessionCommand,
102+
r2.command AS BlockingSessionCommand,
103+
s1.login_name AS BlockedSessionLogin,
104+
s2.login_name AS BlockingSessionLogin,
105+
s1.host_name AS BlockedSessionHost,
106+
s2.host_name AS BlockingSessionHost,
107+
r1.status AS BlockedSessionStatus,
108+
r2.status AS BlockingSessionStatus
109+
FROM sys.dm_exec_requests AS r1
110+
INNER JOIN sys.dm_exec_sessions AS s1
111+
ON r1.session_id = s1.session_id
112+
INNER JOIN sys.dm_exec_sessions AS s2
113+
ON r1.blocking_session_id = s2.session_id
114+
LEFT OUTER JOIN sys.dm_exec_requests AS r2
115+
ON s2.session_id = r2.session_id
116+
WHERE r1.blocking_session_id <> 0
117+
AND r1.status = 'background'
118+
ORDER BY r1.wait_time DESC;
119+
```
120+
87121
## Examples
88122

89123
The following example changes the `AccentSensitivity` property of the default full-text catalog `ftCatalog`, which is accent sensitive.

0 commit comments

Comments
 (0)