Skip to content

Commit 96dca82

Browse files
authored
Refresh ALTER FULLTEXT CATALOG article (#36768)
1 parent 29bac15 commit 96dca82

1 file changed

Lines changed: 91 additions & 69 deletions

File tree

Lines changed: 91 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
2-
title: "ALTER FULLTEXT CATALOG (Transact-SQL)"
2+
title: ALTER FULLTEXT CATALOG (Transact-SQL)
33
description: ALTER FULLTEXT CATALOG (Transact-SQL)
44
author: markingmyname
55
ms.author: maghan
6-
ms.date: "03/14/2017"
6+
ms.reviewer: randolphwest
7+
ms.date: 03/04/2026
78
ms.service: sql
89
ms.subservice: t-sql
910
ms.topic: reference
@@ -18,75 +19,96 @@ helpviewer_keywords:
1819
- "full-text catalogs [SQL Server], modifying"
1920
- "full-text catalogs [SQL Server], reorganizing"
2021
dev_langs:
21-
- "TSQL"
22+
- TSQL
2223
---
2324
# ALTER FULLTEXT CATALOG (Transact-SQL)
25+
2426
[!INCLUDE [SQL Server Azure SQL Database Azure SQL Managed Instance](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
2527

26-
Changes the properties of a full-text catalog.
27-
28-
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
29-
30-
## Syntax
31-
32-
```syntaxsql
33-
ALTER FULLTEXT CATALOG catalog_name
34-
{ REBUILD [ WITH ACCENT_SENSITIVITY = { ON | OFF } ]
35-
| REORGANIZE
36-
| AS DEFAULT
37-
}
38-
```
39-
28+
Use this statement to change the properties of a full-text catalog.
29+
30+
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
31+
32+
## Syntax
33+
34+
```syntaxsql
35+
ALTER FULLTEXT CATALOG catalog_name
36+
{ REBUILD [ WITH ACCENT_SENSITIVITY = { ON | OFF } ]
37+
| REORGANIZE
38+
| AS DEFAULT
39+
}
40+
```
41+
4042
## Arguments
41-
*catalog_name*
42-
Specifies the name of the catalog to be modified. If a catalog with the specified name does not exist, [!INCLUDE[msCoName](../../includes/msconame-md.md)] [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] returns an error and does not perform the ALTER operation.
43-
44-
REBUILD
45-
Tells [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to rebuild the entire catalog. When a catalog is rebuilt, the existing catalog is deleted and a new catalog is created in its place. All the tables that have full-text indexing references are associated with the new catalog. Rebuilding resets the full-text metadata in the database system tables.
46-
47-
WITH ACCENT_SENSITIVITY = {ON|OFF}
48-
Specifies if the catalog to be altered is accent-sensitive or accent-insensitive for full-text indexing and querying.
49-
50-
To determine the current accent-sensitivity property setting of a full-text catalog, use the FULLTEXTCATALOGPROPERTY function with the **accentsensitivity** property value against *catalog_name*. If the function returns '1', the full-text catalog is accent sensitive; if the function returns '0', the catalog is not accent sensitive.
51-
52-
The catalog and database default accent sensitivity are the same.
53-
54-
REORGANIZE
55-
Tells [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to perform a *master merge*, which involves merging the smaller indexes created in the process of indexing into one large index. Merging the full-text index fragments can improve performance and free up disk and memory resources. If there are frequent changes to the full-text catalog, use this command periodically to reorganize the full-text catalog.
56-
57-
REORGANIZE also optimizes internal index and catalog structures.
58-
59-
Keep in mind that, depending on the amount of indexed data, a master merge may take some time to complete. Master merging a large amount of data can create a long running transaction, delaying truncation of the transaction log during checkpoint. In this case, the transaction log might grow significantly under the full recovery model. As a best practice, ensure that your transaction log contains sufficient space for a long-running transaction before reorganizing a large full-text index in a database that uses the full recovery model. For more information, see [Manage the Size of the Transaction Log File](../../relational-databases/logs/manage-the-size-of-the-transaction-log-file.md).
60-
61-
AS DEFAULT
62-
Specifies that this catalog is the default catalog. When full-text indexes are created with no specified catalogs, the default catalog is used. If there is an existing default full-text catalog, setting this catalog AS DEFAULT will override the existing default.
63-
64-
## Permissions
65-
User must have ALTER permission on the full-text catalog, or be a member of the **db_owner**, **db_ddladmin** fixed database roles, or sysadmin fixed server role.
66-
67-
> [!NOTE]
68-
> To use ALTER FULLTEXT CATALOG AS DEFAULT, the user must have ALTER permission on the full-text catalog and CREATE FULLTEXT CATALOG permission on the database.
69-
70-
## Examples
71-
The following example changes the `accentsensitivity` property of the default full-text catalog `ftCatalog`, which is accent sensitive.
72-
73-
```sql
74-
--Change to accent insensitive
75-
USE AdventureWorks2022;
76-
GO
77-
ALTER FULLTEXT CATALOG ftCatalog
78-
REBUILD WITH ACCENT_SENSITIVITY=OFF;
79-
GO
80-
-- Check Accentsensitivity
81-
SELECT FULLTEXTCATALOGPROPERTY('ftCatalog', 'accentsensitivity');
82-
GO
83-
--Returned 0, which means the catalog is not accent sensitive.
84-
```
85-
86-
## See Also
87-
[sys.fulltext_catalogs (Transact-SQL)](../../relational-databases/system-catalog-views/sys-fulltext-catalogs-transact-sql.md)
88-
[CREATE FULLTEXT CATALOG (Transact-SQL)](../../t-sql/statements/create-fulltext-catalog-transact-sql.md)
89-
[DROP FULLTEXT CATALOG (Transact-SQL)](../../t-sql/statements/drop-fulltext-catalog-transact-sql.md)
90-
[Full-Text Search](../../relational-databases/search/full-text-search.md)
91-
92-
43+
44+
#### *catalog_name*
45+
46+
Specifies the name of the catalog to modify. If a catalog with the specified name doesn't exist, [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] returns an error and doesn't perform the `ALTER` operation.
47+
48+
#### REBUILD
49+
50+
The [!INCLUDE [ssdenoversion-md](../../includes/ssdenoversion-md.md)] rebuilds the entire catalog. When you rebuild a catalog, the existing catalog is deleted and a new catalog is created in its place. All the tables that have full-text indexing references are associated with the new catalog. Rebuilding resets the full-text metadata in the database system tables.
51+
52+
#### WITH ACCENT_SENSITIVITY = { ON | OFF }
53+
54+
Specifies if the catalog to be altered is accent-sensitive or accent-insensitive for full-text indexing and querying.
55+
56+
To determine the current accent-sensitivity property setting of a full-text catalog, use the `FULLTEXTCATALOGPROPERTY` function with the `AccentSensitivity` property value against *catalog_name*.
57+
58+
- If the function returns `1`, the full-text catalog is accent sensitive.
59+
- If the function returns `0`, the catalog isn't accent sensitive.
60+
61+
The catalog and database default accent sensitivity are the same.
62+
63+
#### REORGANIZE
64+
65+
The [!INCLUDE [ssdenoversion-md](../../includes/ssdenoversion-md.md)] performs a *master merge*, which involves merging the smaller indexes created in the process of indexing into one large index. Merging the full-text index fragments can improve performance and free up disk and memory resources. If there are frequent changes to the full-text catalog, use this command periodically to reorganize the full-text catalog.
66+
67+
`REORGANIZE` also optimizes internal index and catalog structures.
68+
69+
Depending on the amount of indexed data, a master merge might take some time to complete. Merging a large amount of data can create a long running transaction, delaying truncation of the transaction log during a checkpoint. In this case, the transaction log might grow significantly under the full recovery model.
70+
71+
As a best practice, ensure that your transaction log contains sufficient space for a long-running transaction before reorganizing a large full-text index in a database that uses the full recovery model. For more information, see [Manage the size of the transaction log file](../../relational-databases/logs/manage-the-size-of-the-transaction-log-file.md).
72+
73+
#### AS DEFAULT
74+
75+
Specifies that this catalog is the default catalog. When you create full-text indexes without specifying catalogs, the default catalog is used. If there's an existing default full-text catalog, setting this catalog `AS DEFAULT` overrides the existing default.
76+
77+
## Permissions
78+
79+
To use `ALTER FULLTEXT CATALOG`, you need one of the following permissions:
80+
81+
- `ALTER` permission on the full-text catalog
82+
- Membership in the **db_owner** or **db_ddladmin** fixed database roles
83+
- Membership in the **sysadmin** fixed server role
84+
85+
To use `ALTER FULLTEXT CATALOG ... AS DEFAULT`, you need `ALTER` permission on the full-text catalog, and `CREATE FULLTEXT CATALOG` permission on the database.
86+
87+
## Examples
88+
89+
The following example changes the `AccentSensitivity` property of the default full-text catalog `ftCatalog`, which is accent sensitive.
90+
91+
1. Change catalog to accent insensitive.
92+
93+
```sql
94+
USE AdventureWorks2025;
95+
GO
96+
97+
ALTER FULLTEXT CATALOG ftCatalog
98+
REBUILD WITH ACCENT_SENSITIVITY = OFF;
99+
```
100+
101+
1. Check accent sensitivity.
102+
103+
```sql
104+
SELECT FULLTEXTCATALOGPROPERTY('ftCatalog', 'AccentSensitivity');
105+
```
106+
107+
The query returns `0`, which means the catalog isn't accent sensitive.
108+
109+
## Related content
110+
111+
- [sys.fulltext_catalogs (Transact-SQL)](../../relational-databases/system-catalog-views/sys-fulltext-catalogs-transact-sql.md)
112+
- [CREATE FULLTEXT CATALOG (Transact-SQL)](create-fulltext-catalog-transact-sql.md)
113+
- [DROP FULLTEXT CATALOG (Transact-SQL)](drop-fulltext-catalog-transact-sql.md)
114+
- [Full-Text Search](../../relational-databases/search/full-text-search.md)

0 commit comments

Comments
 (0)