Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Ansicht SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION
Die Ansicht INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION enthält Informationen zu Schemareplikaten, die mit einer Failover-Reservierung verknüpft sind. Die Ansicht INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION ist auf das Projekt der Failover-Reservierung beschränkt, im Gegensatz zur AnsichtINFORMATION_SCHEMA.SCHEMATA_REPLICAS, die auf das Projekt beschränkt ist, das das Dataset enthält.
Erforderliche Rolle
Um die Berechtigungen zu erhalten, die Sie zum Abfragen der Ansicht INFORMATION_SCHEMA.SCHEMATA_REPLICAS_BY_FAILOVER_RESERVATION benötigen, müssen Sie Ihren Administrator bitten, Ihnen die IAM-Rolle BigQuery-Ressourcenbetrachter (roles/bigquery.resourceViewer) für das Projekt zuzuweisen.
Weitere Informationen zum Zuweisen von Rollen finden Sie unter Zugriff auf Projekte, Ordner und Organisationen verwalten.
Die Ansicht INFORMATION_SCHEMA.SCHEMATA_REPLICAS enthält Informationen zu Dataset-Replikaten.
Die Ansicht INFORMATION_SCHEMA.SCHEMATA_REPLICAS hat das folgende Schema:
Spalte
Typ
Beschreibung
failover_reservation_project_id
STRING
Die Projekt-ID des Failover-Reservierungs-Administratorprojekts, falls es mit dem Replikat verknüpft ist.
failover_reservation_name
STRING
Der Name der Failover-Reservierung, falls sie mit dem Replikat verknüpft ist.
catalog_name
STRING
Die ID des Projekts, das das Dataset enthält.
schema_name
STRING
Die Dataset-ID des Datasets.
replica_name
STRING
Der Name des Replikats.
location
STRING
Die Region oder Multiregion, in der das Replikat erstellt wurde.
replica_primary_assigned
BOOL
Wenn der Wert TRUE ist, hat das Replikat die primäre Zuweisung.
replica_primary_assignment_complete
BOOL
Wenn der Wert TRUE ist, ist die primäre Zuweisung abgeschlossen.
Wenn der Wert FALSE ist, ist das Replikat (noch) nicht das primäre Replikat, auch wenn replica_primary_assigned gleich TRUE ist.
creation_time
TIMESTAMP
Der Erstellungszeitpunkt des Replikats. Wenn das Replikat zum ersten Mal erstellt wird, ist es erst dann vollständig mit dem primären Replikat synchronisiert, wenn creation_complete gleich TRUE ist. Der Wert von creation_time wird festgelegt, bevor creation_complete gleich TRUE ist.
creation_complete
BOOL
Bei einem Wert von TRUE ist die erste vollständige Synchronisierung des primären Replikats mit dem sekundären Replikat abgeschlossen.
replication_time
TIMESTAMP
Der Wert für replication_time gibt an, wie alt der Datensatz ist.
Einige Tabellen im Replikat liegen möglicherweise vor diesem Zeitstempel. Dieser Wert ist nur in der sekundären Region sichtbar.
Wenn das Dataset eine Tabelle mit Streamingdaten enthält, ist der Wert von replication_time nicht genau.
sync_status
JSON
Der Status der Synchronisierung zwischen dem primären und dem sekundären Replikat. Gibt NULL zurück, wenn das Replikat ein primäres Replikat ist.
Bereich und Syntax
Für Abfragen dieser Ansicht muss ein Regions-Qualifier verwendet werden.
In der folgenden Tabelle wird der Regionsbereich für diese Ansicht erläutert:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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```"]]