Querying and updating remote data

As mentioned earlier, queries with stretch-enabled tables return both local and remote data by default. You can manage the scope of queries by using the system stored procedure sys.sp_rda_set_query_mode to specify whether queries against the current Stretch-enabled database and its tables return both local and remote data, or local data only. The following modes are available:

  • LOCAL_AND_REMOTE (queries against Stretch-enabled tables return both local and remote data). This is the default mode.
  • LOCAL_ONLY (queries against Stretch-enabled tables return only local data).
  • DISABLED (queries against Stretch-enabled tables are not allowed).

When you specify the scope of queries against the Stretch Database, this ...

Get SQL Server 2017 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.