sp_external_policy_refresh (Transact-SQL)
Applies to:
SQL Server 2022 (16.x)
Azure SQL Database
Forces immediate download of latest published policies for the whole instance (for every database).
Note
If there are any ongoing pull requests by the background task or by another user, the request waits until the former task is finished and starts a new pull. – This ensures that the result of calling this proc explicitly always results in a refreshed cache.
Syntax
sp_external_policy_refresh [ @type = ] 'type'
[ ; ]
Arguments
Important
Arguments for extended stored procedures must be entered in the specific order as described in the Syntax section. If the parameters are entered out of order, an error message occurs.
[ @type = ] 'type'
Type can be reload
(complete policy download) or update
(incremental policy download). Default type is update
.
Return code values
0
(success) or a nonzero number (failure).
Permissions
Requires ALTER SERVER STATE
(covered by CONTROL SERVER
) permission.
Examples
A. Complete policy refresh
The following example downloads complete set of policies.
EXEC sp_external_policy_refresh @type = 'reload'
B. Incremental policy refresh
The following example downloads policies incrementally by using the default type 'update'.
EXEC sp_external_policy_refresh;