A visualização INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION contém informações sobre réplicas de schemata associadas a uma reserva de failover. A visualização INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION tem escopo no projeto da reserva de failover, e não na INFORMATION_SCHEMA.SCHEMATA_REPLICAS, que tem escopo no projeto que contém o conjunto de dados.
Papel necessário
Para receber as permissões necessárias para consultar a visualização INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION,
peça ao administrador para conceder a você o
papel do IAM de Leitor de recursos do BigQuery (roles/bigquery.resourceViewer)
no projeto.
Para mais informações sobre a concessão de papéis, consulte Gerenciar o acesso a projetos, pastas e organizações.
A visualização INFORMATION_SCHEMA.SCHEMATA_REPLICAS contém informações sobre
réplicas de conjuntos de dados.
A visualização INFORMATION_SCHEMA.SCHEMATA_REPLICAS tem o seguinte esquema:
Coluna
Tipo
Descrição
failover_reservation_project_id
STRING
O ID do projeto de administrador da reserva de failover, se ele estiver associado à réplica.
failover_reservation_name
STRING
O nome da reserva de failover, se ela estiver associada à réplica.
catalog_name
STRING
O ID do projeto que contém o conjunto de dados.
schema_name
STRING
O ID do conjunto de dados.
replica_name
STRING
O nome da réplica.
location
STRING
A região ou a multirregião em que a réplica foi criada.
replica_primary_assigned
BOOL
Se o valor for TRUE, a réplica terá a atribuição principal.
replica_primary_assignment_complete
BOOL
Se o valor for TRUE, a atribuição principal foi concluída.
Se o valor for FALSE, a réplica (ainda) não é a principal, mesmo que replica_primary_assigned seja igual a TRUE.
creation_time
TIMESTAMP
O horário de criação da
réplica. Quando a réplica é criada pela primeira vez, ela não é totalmente sincronizada com a réplica principal até
creation_complete ser igual a TRUE. O valor de
creation_time é definido antes de creation_complete ser
TRUE.
creation_complete
BOOL
Se o valor for TRUE, a sincronização completa inicial da
réplica principal para a secundária será concluída.
replication_time
TIMESTAMP
O valor de replication_time indica a inatividade do conjunto de dados.
Algumas tabelas na réplica podem estar à frente desse carimbo de data/hora. Esse valor só é visível na região secundária.
Se o conjunto de dados contiver uma tabela com dados de streaming, o valor de replication_time não será preciso.
sync_status
JSON
O status da sincronização
entre a réplica principal e a secundária. Retorna NULL se a réplica for
uma réplica principal.
Escopo e sintaxe
As consultas nessa visualização precisam incluir um
qualificador de região.
A tabela a seguir explica o escopo da região dessa visualização:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-17 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```"]]