Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Vista de SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION
La vista INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION contiene información sobre las réplicas de esquemas asociadas a una reserva de conmutación por error. La vista INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION se limita al proyecto de la reserva de conmutación por error, a diferencia de la vista INFORMATION_SCHEMA.SCHEMATA_REPLICAS, que se limita al proyecto que contiene el conjunto de datos.
Función requerida
Para obtener los permisos que necesitas para consultar la vista INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION, pídele a tu administrador que te otorgue el rol de IAM Visualizador de recursos de BigQuery (roles/bigquery.resourceViewer) en el proyecto.
Para obtener más información sobre cómo otorgar roles, consulta Administra el acceso a proyectos, carpetas y organizaciones.
La vista INFORMATION_SCHEMA.SCHEMATA_REPLICAS contiene información sobre las réplicas de conjuntos de datos.
La vista INFORMATION_SCHEMA.SCHEMATA_REPLICAS tiene el siguiente esquema:
Columna
Tipo
Descripción
failover_reservation_project_id
STRING
Es el ID del proyecto de administrador de reservas de conmutación por error si está asociado con la réplica.
failover_reservation_name
STRING
Es el nombre de la reserva de conmutación por error si está asociada a la réplica.
catalog_name
STRING
El ID del proyecto que contiene el conjunto de datos.
schema_name
STRING
Es el ID del conjunto de datos.
replica_name
STRING
El nombre de la réplica.
location
STRING
Es la región o multirregión en la que se creó la réplica.
replica_primary_assigned
BOOL
Si el valor es TRUE, la réplica tiene la asignación principal.
replica_primary_assignment_complete
BOOL
Si el valor es TRUE, la asignación principal está completa.
Si el valor es FALSE, la réplica no es (aún) la réplica principal, incluso si replica_primary_assigned es igual a TRUE.
creation_time
TIMESTAMP
Es la fecha y hora de creación de la réplica. Cuando se crea la réplica por primera vez, no se sincroniza por completo con la réplica principal hasta que creation_complete sea igual a TRUE. El valor de creation_time se establece antes de que creation_complete sea igual a TRUE.
creation_complete
BOOL
Si el valor es TRUE, la sincronización completa inicial de la réplica principal con la réplica secundaria está completa.
replication_time
TIMESTAMP
El valor de replication_time indica la obsolescencia del conjunto de datos.
Es posible que algunas tablas de la réplica estén más avanzadas que esta marca de tiempo. Este valor solo se ve en la región secundaria.
Si el conjunto de datos contiene una tabla con datos de transmisión, el valor de replication_time no será preciso.
sync_status
JSON
Es el estado de la sincronización entre la réplica principal y la secundaria. Devuelve NULL si la réplica es una réplica principal.
Permiso y sintaxis
Las consultas realizadas a esta vista deben incluir un calificador de región.
En la siguiente tabla, se explica el permiso de la región para esta vista:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (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```"]]