Stay organized with collections
Save and categorize content based on your preferences.
SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION view
The INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION view contains
information about schemata replicas associated with a failover reservation. The
INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION view is scoped to
the project of the failover reservation, as opposed to the
INFORMATION_SCHEMA.SCHEMATA_REPLICAS
view that is scoped to the
project that contains the dataset.
Required role
To get the permissions that
you need to query the INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION view,
ask your administrator to grant you the
BigQuery Resource Viewer (roles/bigquery.resourceViewer)
IAM role on the project.
For more information about granting roles, see Manage access to projects, folders, and organizations.
The INFORMATION_SCHEMA.SCHEMATA_REPLICAS view contains information about
dataset replicas.
The INFORMATION_SCHEMA.SCHEMATA_REPLICAS view has the following schema:
Column
Type
Description
failover_reservation_project_id
STRING
The project ID of the failover reservation admin project if it's
associated with the replica.
failover_reservation_name
STRING
The name of the failover reservation if it's associated with the
replica.
catalog_name
STRING
The project ID of the project that contains the dataset.
schema_name
STRING
The dataset ID of the dataset.
replica_name
STRING
The name of the replica.
location
STRING
The region or multi-region the replica was created in.
replica_primary_assigned
BOOL
If the value is TRUE, the replica has the primary assignment.
replica_primary_assignment_complete
BOOL
If the value is TRUE, the primary assignment is complete.
If the value is FALSE, the replica is not (yet) the primary
replica, even if replica_primary_assigned equals
TRUE.
creation_time
TIMESTAMP
The replica's creation
time. When the replica is first created, it is not fully synced with the primary replica until
creation_complete equals TRUE. The value of
creation_time is set before creation_complete equals
TRUE.
creation_complete
BOOL
If the value is TRUE, the initial full sync of the
primary replica to the secondary replica is complete.
replication_time
TIMESTAMP
The value for replication_time indicates the staleness
of the dataset.
Some tables in the replica might be ahead of this timestamp. This value is only visible in the secondary region.
If the dataset contains a table with streaming data, the value of replication_time will not be accurate.
sync_status
JSON
The status of the sync
between the primary and secondary replica. Returns NULL if the replica is a
primary replica.
Scope and syntax
Queries against this view must include a region qualifier.
The following table explains the region scope for this view:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eINFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION\u003c/code\u003e view provides details about schemata replicas linked to a failover reservation, scoped to the project of that reservation, unlike the \u003ccode\u003eINFORMATION_SCHEMA.SCHEMATA_REPLICAS\u003c/code\u003e view.\u003c/p\u003e\n"],["\u003cp\u003eAccessing the view requires the BigQuery Resource Viewer role (\u003ccode\u003eroles/bigquery.resourceViewer\u003c/code\u003e) on the project, which can also be granted through custom or other predefined roles.\u003c/p\u003e\n"],["\u003cp\u003eThe view's schema includes information like the failover reservation's project ID and name, catalog and schema names, replica name, location, primary assignment status, creation and replication times, and synchronization status.\u003c/p\u003e\n"],["\u003cp\u003eQueries against the \u003ccode\u003eINFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION\u003c/code\u003e view must include a region qualifier, with the query execution location matching the region of the view, and allows for filtering datasets by region and failover reservations.\u003c/p\u003e\n"],["\u003cp\u003eThe current view is a pre-GA product/feature, meaning it is available "as is" and might have limited support, which is subject to the "Pre-GA Offerings Terms".\u003c/p\u003e\n"]]],[],null,["# SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION view\n==============================================\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThe `INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION` view contains\ninformation about schemata replicas associated with a failover reservation. The\n`INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION` view is scoped to\nthe project of the failover reservation, as opposed to the\n[`INFORMATION_SCHEMA.SCHEMATA_REPLICAS`\nview](/bigquery/docs/information-schema-schemata-replicas) that is scoped to the\nproject that contains the dataset.\n\nRequired role\n-------------\n\n\nTo get the permissions that\nyou need to query the `INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION` view,\n\nask your administrator to grant you the\n\n\n[BigQuery Resource Viewer](/iam/docs/roles-permissions/bigquery#bigquery.resourceViewer) (`roles/bigquery.resourceViewer`)\nIAM role on the project.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nSchema\n------\n\nThe `INFORMATION_SCHEMA.SCHEMATA_REPLICAS` view contains information about dataset replicas. The `INFORMATION_SCHEMA.SCHEMATA_REPLICAS` view has the following schema:\n\nScope and syntax\n----------------\n\nQueries against this view must include a [region qualifier](/bigquery/docs/information-schema-intro#syntax).\nThe following table explains the region scope for this view:\n\nReplace the following:\n\n- Optional: \u003cvar translate=\"no\"\u003eRESERVATION_PROJECT_ID\u003c/var\u003e: the ID of the administration project of the reservation. If not specified, the default project is used.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: any [dataset region name](/bigquery/docs/locations). For example, ```region-us```.\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n | **Note:** You must use [a region qualifier](/bigquery/docs/information-schema-intro#region_qualifier) to query `INFORMATION_SCHEMA` views. The location of the query execution must match the region of the `INFORMATION_SCHEMA` view.\n\n\u003cbr /\u003e\n\nExamples\n--------\n\nThis section lists example queries of the\n`INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION` view.\n\n**Example: List all replicated datasets in a region**\n\nThe following example lists all the replicated datasets in the `US` region: \n\n```googlesql\nSELECT *\nFROM `region-us`.INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION\nWHERE failover_reservation_name = \"failover_reservation\";\n```\n\nThe result is similar to the following: \n\n```\n+--------------+--------------+--------------+----------+--------------------------+-------------------------------------+---------------------+-------------------+---------------------+---------------------------------+---------------------------+-------------------------------------------------------------------------------+\n| catalog_name | schema_name | replica_name | location | replica_primary_assigned | replica_primary_assignment_complete | creation_time | creation_complete | replication_time | failover_reservation_project_id | failover_reservation_name | sync_status |\n+--------------+--------------+--------------+----------+--------------------------+-------------------------------------+---------------------+-------------------+---------------------+---------------------------------+---------------------------+-------------------------------------------------------------------------------+\n| project2 | test_dataset | us-east4 | us-east4 | true | true | 2024-05-09 20:34:06 | true | NULL | project1 | failover_reservation | NULL |\n| project2 | test_dataset | us | US | false | false | 2024-05-09 20:34:05 | true | 2024-05-10 18:31:06 | project1 | failover_reservation | {\"last_completion_time\":\"2024-06-06 18:31:06\",\"error_time\":null,\"error\":null} |\n+--------------+--------------+--------------+----------+--------------------------+-------------------------------------+---------------------+-------------------+---------------------+---------------------------------+---------------------------+-------------------------------------------------------------------------------+\n```"]]