| title | sys.sp_rda_deauthorize_db (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| description | Learn how to use sys.sp_rda_deauthorize_db to remove authenticated connections between local Stretch-enabled databases and remote Azure databases. | ||
| ms.custom | |||
| ms.date | 06/10/2016 | ||
| ms.prod | sql | ||
| ms.reviewer | |||
| ms.technology | stored-procedures | ||
| ms.topic | reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 2e362e15-2cd5-4856-9f0b-54df56b0866b | ||
| author | markingmyname | ||
| ms.author | maghan |
[!INCLUDE sqlserver2016]
Removes the authenticated connection between a local Stretch-enabled database and the remote Azure database. Run sp_rda_deauthorize_db when the remote database is unreachable or in an inconsistent state and you want to change query behavior for all Stretch-enabled tables in the database.
Transact-SQL Syntax Conventions
sp_rda_deauthorize_db
0 (success) or >0 (failure)
Requires db_owner permissions.
After you run sp_rda_deauthorize_db , all queries against Stretch-enabled databases and tables fail. That is, the query mode is set to DISABLED. To exit this mode, do one of the following things.
-
Run sys.sp_rda_reauthorize_db (Transact-SQL) to reconnect to the remote Azure database. This operation automatically resets the query mode to LOCAL_AND_REMOTE, which is the default behavior for Stretch Database. That is, queries return results from both local and remote data.
-
Run sys.sp_rda_set_query_mode (Transact-SQL) with the LOCAL_ONLY argument to let queries continue to run against local data only.
sys.sp_rda_set_query_mode (Transact-SQL)
sys.sp_rda_reauthorize_db (Transact-SQL)
Stretch Database