CCNA Plan and manage database infrastructure Questions

69 of 144 questions · Page 2/2 · Plan and manage database infrastructure · Answers revealed

76
MCQeasy

A company runs a production Cloud SQL for PostgreSQL instance. They need to ensure high availability with automatic failover in case of a zone failure. Which configuration should they use?

A.Create a cross-region read replica and set it as failover target.
B.Use a zonal HA configuration by selecting a regional location.
C.Deploy a single Cloud SQL instance with multiple CPUs and high memory.
D.Enable high availability (HA) configuration during instance creation.
AnswerD

Cloud SQL HA provisions a standby in a different zone, with synchronous replication for automatic failover.

Why this answer

Option D is correct because enabling the high availability (HA) configuration during Cloud SQL for PostgreSQL instance creation automatically provisions a standby instance in a different zone within the same region. This synchronous replication setup ensures automatic failover with minimal data loss (typically under 1 second RPO) in the event of a zone failure, meeting the requirement for high availability.

Exam trap

Google Cloud often tests the misconception that a read replica can serve as a failover target for high availability, but in Cloud SQL, read replicas are asynchronous and require manual promotion, making them unsuitable for automatic zone-level failover.

How to eliminate wrong answers

Option A is wrong because a cross-region read replica is designed for read scaling and disaster recovery, not for automatic failover within the same region; failover to a cross-region replica would require manual promotion and introduces significant latency and potential data loss. Option B is wrong because 'zonal HA configuration' is not a valid Cloud SQL term; the correct approach is to use a regional HA configuration, which places the primary and standby in different zones automatically. Option C is wrong because scaling up CPUs and memory improves performance but does not provide any redundancy or automatic failover; a single instance remains a single point of failure.

77
Multi-Selecteasy

Which TWO factors are important when selecting the location for a Cloud Spanner instance?

Select 2 answers
A.Number of other Spanner instances in the region
B.Data residency compliance
C.Proximity to users
D.Cost of Cloud Spanner nodes in the region
E.Availability of Cloud VPN
AnswersB, C

Some regulations require data to remain within specific geographical boundaries.

Why this answer

Data residency compliance (B) is critical because Cloud Spanner instances are regional resources; data is stored and processed within the chosen Google Cloud region, and many regulations (e.g., GDPR, HIPAA) mandate that data remain within specific geographic boundaries. Proximity to users (C) is important because Spanner's read and write latencies are directly affected by network distance; choosing a region close to your user base minimizes latency and improves application performance.

Exam trap

Google Cloud often tests the misconception that cost (Option D) or the number of existing instances (Option A) are primary location factors, when in reality the official Google Cloud documentation emphasizes data residency and user proximity as the two key considerations for single-region Spanner instance placement.

78
Multi-Selecthard

A Cloud Spanner database is experiencing high CPU utilization and latency. The workload is read-heavy with occasional writes. Which TWO actions would most effectively improve performance?

Select 2 answers
A.Create a secondary index on frequently queried columns.
B.Use a smaller instance configuration to reduce cost.
C.Add more nodes to the instance.
D.Use a split point to distribute hot rows.
E.Enable interleaved tables to reduce joins.
AnswersA, C

Indexes reduce the need for full table scans, lowering CPU usage and query latency.

Why this answer

Creating a secondary index on frequently queried columns allows Cloud Spanner to serve read queries directly from the index without scanning the full base table, reducing CPU usage and latency. This is especially effective in read-heavy workloads because it minimizes the number of rows that must be processed per query.

Exam trap

Google Cloud often tests the misconception that manual split points or interleaved tables are primary tools for read performance tuning, when in fact Spanner handles splits automatically and interleaving is mainly for write locality and join optimization.

79
MCQmedium

A company is migrating an application from Datastore to Firestore in Datastore mode. They need to ensure zero downtime during the migration. What is the recommended approach?

A.Export all data from Datastore to Cloud Storage, then import into a new Firestore database.
B.Run both Datastore and Firestore in parallel, writing to both until migration is complete.
C.Create a new Firestore database and redirect traffic gradually.
D.Upgrade the existing Datastore project to Firestore in Datastore mode using the Cloud Console.
AnswerD

Firestore in Datastore mode is a seamless upgrade with full compatibility.

Why this answer

Option D is correct because upgrading an existing Datastore project to Firestore in Datastore mode via the Cloud Console is a built-in, one-way migration that preserves the existing database name, indexes, and data without requiring any export/import or application code changes. This process is designed to be a live upgrade with no downtime, as Firestore in Datastore mode is fully backward-compatible with the Datastore API, allowing existing queries and transactions to continue uninterrupted during the transition.

Exam trap

The trap here is that candidates often assume a migration requires an export/import or dual-write strategy, but Cisco tests the specific knowledge that Firestore in Datastore mode is a direct upgrade path from Datastore with zero downtime, not a separate service that needs data copied over.

How to eliminate wrong answers

Option A is wrong because exporting all data to Cloud Storage and then importing into a new Firestore database introduces significant downtime during the export and import operations, and it does not preserve the original database name or existing indexes without manual reconfiguration. Option B is wrong because running both Datastore and Firestore in parallel and writing to both is not a supported approach; there is no built-in mechanism to dual-write to Datastore and Firestore simultaneously, and this would require complex application-level changes and risk data inconsistency. Option C is wrong because creating a new Firestore database and redirecting traffic gradually still requires a cutover period where the application must be modified to point to the new database, and the existing Datastore data must be migrated separately, causing downtime or data staleness during the transition.

80
MCQeasy

A company wants to store and analyze data with BigQuery. They have customers in Europe and need to comply with GDPR data residency requirements. What should they do to ensure data stays within the European Union?

A.Use the default dataset location and rely on BigQuery's automatic compliance.
B.Create the dataset with the location set to 'EU'.
C.Set the query job location to 'EU' for all queries.
D.Choose a dataset location of 'us-central1' for performance.
AnswerB

Dataset location determines where data is stored.

Why this answer

Option B is correct because BigQuery enforces data residency at the dataset level. When you create a dataset with the location set to 'EU', all tables, views, and data within that dataset are physically stored in a Google Cloud region within the European Union. This ensures compliance with GDPR data residency requirements, as data will not be moved or replicated outside the EU without explicit user action.

Exam trap

Google Cloud often tests the misconception that query job location controls data residency, when in fact it only controls query processing location, while data storage is determined by the dataset location.

How to eliminate wrong answers

Option A is wrong because the default dataset location is 'US', which stores data in the United States and does not automatically comply with GDPR data residency requirements; BigQuery does not have an 'automatic compliance' feature. Option C is wrong because setting the query job location to 'EU' only affects where the query is processed, not where the underlying data is stored; data could still reside in a non-EU dataset. Option D is wrong because 'us-central1' is a location in the United States, which would violate GDPR data residency requirements by storing data outside the European Union.

81
MCQhard

A company's application using Cloud Bigtable is experiencing high read latency. The row keys are based on a timestamp prefix. Which design change is most likely to improve performance?

A.Increase the number of column families.
B.Use a single node cluster.
C.Use monotonically increasing row keys.
D.Reverse the timestamp in row keys to distribute writes.
AnswerD

Reversing the timestamp spreads writes across tablets, reducing hot spots and improving read latency.

Why this answer

In Cloud Bigtable, monotonically increasing row keys (like timestamps) cause all writes to hit a single tablet server, creating a hotspot that degrades read and write performance. Reversing the timestamp (e.g., using `Long.MAX_VALUE - timestamp`) distributes writes across the key space, preventing hotspots and reducing read latency by balancing load across nodes.

Exam trap

Google Cloud often tests the misconception that adding more nodes or column families solves performance issues, when the real fix is designing row keys to avoid hotspots by distributing writes evenly across the key space.

How to eliminate wrong answers

Option A is wrong because increasing column families does not address the root cause of hotspotting from sequential row keys; column families affect storage and schema design, not write distribution. Option B is wrong because a single node cluster would exacerbate the problem by concentrating all traffic on one node, increasing latency further. Option C is wrong because monotonically increasing row keys are exactly the pattern that causes hotspotting in Bigtable; this option describes the problematic behavior, not a fix.

82
Multi-Selecteasy

A company is building a microservices architecture and needs to choose a database per service. Which THREE factors should they consider?

Select 3 answers
A.Consistency requirements
B.Preferred programming language
C.Expected query patterns
D.Data size and growth rate
E.Number of developers
AnswersA, C, D

Different services may need strong or eventual consistency, affecting database choice (e.g., Spanner vs. Bigtable).

Why this answer

Consistency requirements are critical because different databases offer varying consistency models (e.g., ACID vs. BASE). For example, a financial transaction service requiring strong consistency would need a relational database like PostgreSQL, while a social media feed could tolerate eventual consistency with a NoSQL database like Cassandra.

Choosing based on consistency ensures data integrity aligns with business needs.

Exam trap

Google Cloud often tests the misconception that programming language or team size should drive database choice, but the correct focus is on data-specific factors like consistency, query patterns, and scalability.

83
MCQmedium

A Cloud SQL for MySQL instance requires a patch update. How can you minimize downtime during the update?

A.Apply the patch without restart
B.Use database migration to a new instance
C.Failover to a read replica during the update
D.Schedule the maintenance during a maintenance window
AnswerD

Scheduling maintenance allows Cloud SQL to perform rolling updates with minimal downtime, especially with HA enabled.

Why this answer

Option D is correct because Cloud SQL for MySQL uses a maintenance window to schedule patching during a period of low traffic, minimizing user impact. While a restart is typically required for patch application, the maintenance window allows you to control when that restart occurs, reducing downtime exposure. This is the standard recommended approach for managed database patching in Google Cloud.

Exam trap

Google Cloud often tests the misconception that read replicas can be used for failover during patching, but in Cloud SQL for MySQL, read replicas do not support automatic failover for patching—only regional failover replicas in a high-availability configuration can, and even then, the maintenance window is the key to minimizing downtime.

How to eliminate wrong answers

Option A is wrong because Cloud SQL for MySQL patch updates typically require a restart of the instance to apply system-level changes, and there is no 'apply without restart' feature for such updates. Option B is wrong because database migration to a new instance involves creating and copying data to a fresh instance, which incurs significant downtime during the migration process and is not a minimal-downtime approach for a simple patch. Option C is wrong because Cloud SQL for MySQL read replicas are not used for failover during patching; they are for read scaling and high availability, but the primary instance must still be patched, and failover to a replica does not eliminate the need for a restart on the primary.

84
Multi-Selecteasy

A company is planning to migrate their on-premises Oracle database to Cloud SQL. Which THREE prerequisites must be satisfied?

Select 3 answers
A.Convert Oracle-specific syntax to PostgreSQL or MySQL
B.Purchase Cloud SQL Enterprise Plus edition for the target instance
C.Ensure the source database is compatible with Database Migration Service (DMS)
D.Set up VPC peering or VPN to connect on-premises to Google Cloud
E.Create a Cloud Storage bucket for staging migration data
AnswersA, C, D

Database Migration Service handles schema conversion, but manual tuning may be needed.

Why this answer

Option A is correct because Cloud SQL does not support Oracle's proprietary PL/SQL syntax. When migrating from Oracle to Cloud SQL, you must convert Oracle-specific syntax (e.g., sequences, packages, hierarchical queries) to the target dialect—either PostgreSQL or MySQL—since Cloud SQL offers only these two engines. This conversion is a prerequisite to ensure the migrated database functions correctly after the move.

Exam trap

Google Cloud often tests the misconception that Cloud SQL supports Oracle as a native engine, leading candidates to overlook the mandatory syntax conversion, or that a staging bucket is always required when DMS can perform direct migration without intermediate storage.

85
MCQmedium

A company is migrating an on-premises PostgreSQL database to Cloud SQL. The database is 2 TB and must have minimal downtime during migration. Which migration strategy should the Database Engineer recommend?

A.Export the database using pg_dump and import into Cloud SQL using pg_restore during a maintenance window.
B.Set up PostgreSQL on Compute Engine and replicate data, then switch over to Cloud SQL.
C.Use Database Migration Service to set up continuous replication from the on-premises database to Cloud SQL, then perform a minimal-downtime cutover.
D.Use Cloud SQL's built-in replication feature to connect directly to the on-premises database.
AnswerC

Database Migration Service supports minimal-downtime migrations using continuous replication.

Why this answer

Option C is correct because the Database Migration Service (DMS) supports continuous replication from an on-premises PostgreSQL database to Cloud SQL using logical replication (pglogical or native PostgreSQL logical replication). This allows the source database to remain operational during the migration, and the cutover to Cloud SQL can be performed with minimal downtime, typically seconds to minutes, meeting the 2 TB size and low-downtime requirements.

Exam trap

Google Cloud often tests the distinction between tools that require downtime (like pg_dump/pg_restore) and services that support continuous replication (like DMS), and the trap here is that candidates may assume Cloud SQL's built-in replication can connect to any external database, when in fact it is limited to inter-instance replication within Google Cloud.

How to eliminate wrong answers

Option A is wrong because using pg_dump and pg_restore for a 2 TB database would require a long maintenance window (potentially hours or days) to export, transfer, and import the data, which contradicts the minimal downtime requirement. Option B is wrong because setting up PostgreSQL on Compute Engine and replicating data adds an unnecessary intermediate step and does not directly migrate to Cloud SQL; it also introduces additional operational overhead and potential latency without leveraging Cloud SQL's managed service benefits. Option D is wrong because Cloud SQL's built-in replication feature (e.g., cross-region replication or read replicas) cannot connect directly to an on-premises database; it is designed for replication between Cloud SQL instances, not for external sources.

86
Matchingmedium

Match each Google Cloud database service to its primary use case.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Relational databases (MySQL, PostgreSQL, SQL Server)

Globally distributed, strongly consistent relational database

Serverless NoSQL document database for mobile/web apps

High-throughput, low-latency NoSQL for large analytical workloads

In-memory data store for Redis or Memcached

Why these pairings

These services cover the main database offerings in Google Cloud.

87
MCQmedium

A database engineer is configuring a Memorystore for Redis instance for a session store application. The application requires persistent storage to survive node failures. Which tier and configuration should be used?

A.Standard tier with AOF persistence enabled
B.Standard tier with no persistence
C.Basic tier with RDB persistence enabled
D.Basic tier with AOF persistence enabled
AnswerA

Standard tier provides replication and failover; AOF persistence saves data to disk.

Why this answer

The Standard tier in Memorystore for Redis provides a replicated architecture with a primary and read replica, ensuring high availability and automatic failover. Enabling AOF (Append-Only File) persistence writes every write operation to an AOF file, which is stored on persistent disk and can be replayed to restore data after a node failure. This combination meets the session store requirement for data durability across failures, as the Basic tier lacks replication and cannot guarantee data survival.

Exam trap

Google Cloud often tests the misconception that enabling persistence on any tier is sufficient, but the trap here is that the Basic tier lacks replication and automatic failover, so even with AOF persistence, a node failure causes downtime and potential data loss, which is unacceptable for a session store requiring high availability.

How to eliminate wrong answers

Option B is wrong because Standard tier with no persistence does not save data to disk, so any node failure or restart results in complete data loss, failing the persistent storage requirement. Option C is wrong because Basic tier with RDB persistence uses point-in-time snapshots that can lose data between snapshots, and the Basic tier has no replication, so a node failure causes downtime and potential data loss. Option D is wrong because Basic tier with AOF persistence still lacks replication, meaning if the single node fails, the AOF file may be unrecoverable or the instance is unavailable, violating the need for session store durability.

88
MCQhard

Your team is migrating a 5 TB MySQL database from on-premises to Cloud SQL. The database receives 2,000 writes per second and the network link has 500 Mbps bandwidth. You need to minimize migration time with zero data loss. What should you do?

A.Configure Database Migration Service with a connectivity test and start continuous replication.
B.Export the database using mysqldump and import into Cloud SQL using the console.
C.Use gcloud sql import with a compressed CSV export from on-premises.
D.Set up a VPN, then use mysqldump with --master-data and pipe to mysql on Cloud SQL.
AnswerA

DMS supports continuous migration with minimal downtime.

Why this answer

Database Migration Service (DMS) with continuous replication is the correct choice because it supports live migration with minimal downtime and zero data loss for large databases like 5 TB. DMS uses MySQL binlog-based replication to synchronize changes from the on-premises source to Cloud SQL while the source remains operational, then performs a cutover with only seconds of downtime. This approach handles the 2,000 writes/second load and 500 Mbps bandwidth efficiently by streaming incremental changes rather than transferring the entire 5 TB in one shot.

Exam trap

Google Cloud often tests the misconception that a one-time dump and import (mysqldump or CSV) is sufficient for large databases with continuous writes, ignoring the requirement for zero data loss and minimal downtime that only continuous replication can satisfy.

How to eliminate wrong answers

Option B is wrong because mysqldump export and console import is a one-time dump that requires the source database to be read-locked or stopped to ensure consistency, causing significant downtime, and transferring 5 TB over 500 Mbps would take over 22 hours, during which writes would be lost. Option C is wrong because gcloud sql import with a compressed CSV export is designed for smaller, structured data imports and does not support continuous replication; it also requires converting the MySQL database to CSV format, which is impractical for a 5 TB database with schema complexity and risks data loss during conversion. Option D is wrong because piping mysqldump with --master-data directly to Cloud SQL via VPN still performs a one-time dump and import, which requires stopping writes on the source to capture a consistent snapshot, leading to downtime and potential data loss if writes continue during the transfer.

89
MCQeasy

A Database Engineer is responsible for managing a Cloud SQL for MySQL instance. The engineer needs to ensure that automated backups are retained for 14 days and that point-in-time recovery (PITR) is enabled. Which configuration should the engineer set?

A.Create scheduled manual backups each day and retain them for 14 days; PITR is not needed because backups are daily.
B.Enable automated backups, set backup retention to 14 days, and enable binary logging.
C.Enable automated backups with a retention of 14 days; PITR is automatically enabled.
D.Enable automated backups with 14-day retention and set up a cross-region replica for disaster recovery.
AnswerB

Automated backups with binary logging enable PITR.

Why this answer

Option B is correct because enabling automated backups with a 14-day retention ensures backup files are kept for the required duration, and enabling binary logging (which is required for PITR) allows point-in-time recovery by replaying transaction logs against a base backup. In Cloud SQL for MySQL, PITR is not automatically enabled with automated backups; binary logging must be explicitly enabled.

Exam trap

The trap here is that candidates assume enabling automated backups automatically enables point-in-time recovery, but Cloud SQL for MySQL requires binary logging to be separately enabled for PITR functionality.

How to eliminate wrong answers

Option A is wrong because scheduled manual backups do not provide the continuous transaction log coverage needed for point-in-time recovery, and PITR is still required for granular recovery to a specific timestamp, not just daily backups. Option C is wrong because PITR is not automatically enabled when automated backups are enabled; binary logging must be explicitly turned on to support PITR. Option D is wrong because a cross-region replica provides disaster recovery and high availability, not point-in-time recovery; PITR requires binary logging, not replication.

90
MCQmedium

Refer to the exhibit. A developer tries to connect to a Cloud SQL instance from a VM using the public IP. The connection fails with this error. What should the developer do to fix the connection?

A.Enable SSL-only mode on the Cloud SQL instance.
B.Add the client IP to the authorized networks.
C.Connect using the Cloud SQL Proxy.
D.Change the instance to require SSL for private connections.
AnswerC

The Cloud SQL Proxy handles SSL encryption and IAM authentication, bypassing the need for client-side SSL configuration.

Why this answer

The error indicates that the Cloud SQL instance does not have an authorized network allowing the VM's public IP. However, the correct fix is to use the Cloud SQL Proxy, which establishes a secure, authenticated tunnel to the instance without needing to authorize the VM's IP. The proxy handles IAM-based authentication and encryption, bypassing the public IP network authorization requirement entirely.

Exam trap

Google Cloud often tests the misconception that adding the client IP to authorized networks is the only way to fix a public IP connection failure, but the trap is that the Cloud SQL Proxy is the secure, recommended alternative that avoids IP management and works even when the VM's IP is not static or known.

How to eliminate wrong answers

Option A is wrong because enabling SSL-only mode enforces encryption for connections but does not bypass the authorized networks check; the connection would still fail if the client IP is not authorized. Option B is wrong because adding the client IP to authorized networks would work in principle, but the question implies the developer is using a VM with a dynamic or non-static public IP, making this approach impractical and insecure; the Cloud SQL Proxy is the recommended solution for such scenarios. Option D is wrong because requiring SSL for private connections applies only to private IP connections, not public IP connections, and does not resolve the public IP authorization issue.

91
MCQeasy

A company uses Cloud Spanner with a multi-region configuration (nam3) for a global application. They notice that write latency has increased significantly during peak hours. After investigation, they find that the number of splits has increased from 10 to 50, and the CPU utilization on most nodes is below 10%. However, writes are being throttled due to excessive hot spots on a few nodes. What should they do?

A.Redesign the primary key to avoid monotonic increases
B.Enable interleaved tables
C.Increase the number of nodes
D.Use a read replica
AnswerA

Using a non-monotonic key (e.g., hashed or UUID) spreads writes across all splits, reducing hot spots and throttling.

Why this answer

Option C is correct because hot spots in Spanner are often caused by monotonically increasing primary keys, which concentrate writes on a few splits. Redesigning the key to distribute writes (e.g., using a hash prefix) spreads the load evenly. Option A (increase nodes) does not fix the hot spot; the bottleneck is lock contention on specific splits.

Option B (interleaved tables) helps with child table joins but not with primary key distribution. Option D (read replicas) is for read scaling, not write throughput.

92
MCQeasy

A mobile app stores user profiles in Firestore. Users are spread globally. Which data model ensures low latency reads and writes?

A.A single collection containing all user documents
B.One document per user in a single collection with composite indexes
C.One collection per geographic region
D.Subcollections under a geographic region collection (e.g., /regions/{region}/users/{user})
AnswerD

Using subcollections under region documents distributes writes across regions, improving latency.

Why this answer

Option D is correct because it uses geographic region as the top-level collection key, which enables Firestore to co-locate user documents within the same region. This minimizes latency by ensuring that reads and writes for users in the same geographic area are served from a nearby Firestore instance, leveraging Firestore's automatic multi-region replication and strong consistency within a location.

Exam trap

The trap here is that candidates confuse composite indexes with data locality, assuming indexes solve latency issues, when in fact Firestore's performance depends on document grouping and proximity to the client's location.

How to eliminate wrong answers

Option A is wrong because a single collection containing all user documents forces Firestore to distribute documents across multiple regions, increasing read and write latency for globally distributed users due to cross-region data access. Option B is wrong because composite indexes do not affect data locality; they only optimize query performance, not reduce latency for geographically dispersed users. Option C is wrong because while it groups users by region, it still stores all user documents in a single collection per region, which does not provide the same locality benefits as using subcollections under a region document, and it can lead to hot-spotting on the region document itself.

93
MCQeasy

An e-commerce platform requires strong consistency across global regions. Which database service should they choose?

A.Cloud Bigtable
B.Firestore
C.Cloud Spanner
D.Cloud SQL
AnswerC

Cloud Spanner provides globally distributed strong consistency.

Why this answer

Cloud Spanner is the correct choice because it provides strong consistency across global regions via synchronous replication and TrueTime, ensuring ACID transactions with external consistency. This meets the e-commerce platform's requirement for globally consistent reads and writes without eventual consistency trade-offs.

Exam trap

The trap here is that candidates often confuse 'strong consistency' with 'eventual consistency' and pick Firestore for its real-time capabilities, overlooking that Firestore's multi-region mode sacrifices strong consistency for availability.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a NoSQL wide-column database designed for high-throughput analytical workloads, not strong consistency across regions—it offers only eventual consistency for replicated data. Option B is wrong because Firestore provides strong consistency within a single region but uses eventual consistency for multi-region deployments, failing the global strong consistency requirement. Option D is wrong because Cloud SQL is a regional relational database service that does not support multi-region replication with strong consistency; it relies on asynchronous replication for cross-region failover, which can lead to data loss or stale reads.

94
MCQeasy

A company is migrating their on-premises PostgreSQL database to Cloud SQL. They want to minimize downtime during the migration. Which approach should they use?

A.Use Database Migration Service with continuous replication
B.Use pg_dump and pg_restore
C.Export data to CSV and import into Cloud SQL
D.Use a third-party ETL tool
AnswerA

Database Migration Service supports continuous replication (CDC) to minimize downtime.

Why this answer

Database Migration Service (DMS) with continuous replication is the correct approach because it uses change data capture (CDC) to replicate ongoing transactions from the source PostgreSQL database to Cloud SQL, enabling a near-zero downtime migration. DMS handles schema conversion, data validation, and automated failover, which minimizes the cutover window to seconds or minutes.

Exam trap

The trap here is that candidates often assume any backup-and-restore method (like pg_dump) is sufficient for migration, but the PCDE exam specifically tests the requirement for minimal downtime, which only continuous replication can achieve.

How to eliminate wrong answers

Option B is wrong because pg_dump and pg_restore perform a logical backup and restore, which requires taking the source database offline or in read-only mode during the dump, causing significant downtime. Option C is wrong because exporting data to CSV and importing into Cloud SQL is a manual, batch-oriented process that does not support continuous replication, leading to extended downtime and potential data inconsistency. Option D is wrong because a third-party ETL tool typically extracts data in batches and cannot provide the continuous, low-latency replication needed for minimal downtime, and it introduces additional complexity and cost without native integration with Cloud SQL.

95
MCQeasy

A company plans to migrate an on-premises PostgreSQL database to Cloud SQL. The database is 2 TB in size and requires minimal downtime. Which migration approach should they use?

A.Export the database using pg_dump and import into Cloud SQL using psql.
B.Use Datastream to stream data into Cloud SQL.
C.Use Database Migration Service with a continuous migration job.
D.Copy the data files to Cloud Storage and use gcloud to load into Bigtable.
AnswerC

Database Migration Service supports virtually zero-downtime migrations through continuous replication.

Why this answer

Database Migration Service (DMS) with a continuous migration job is the correct approach because it supports minimal-downtime migrations from on-premises PostgreSQL to Cloud SQL. DMS uses logical replication (via PostgreSQL's pgoutput plugin) to continuously sync changes from the source to the target, allowing a short cutover window. For a 2 TB database, this avoids the lengthy downtime required by a full dump-and-load method.

Exam trap

The trap here is that candidates may choose pg_dump (Option A) because it is familiar and works for smaller databases, but they overlook the minimal-downtime requirement and the impracticality of exporting 2 TB without significant service interruption.

How to eliminate wrong answers

Option A is wrong because pg_dump and psql require a full export and import, which would take hours or days for a 2 TB database, causing significant downtime. Option B is wrong because Datastream is designed for streaming change data capture (CDC) to BigQuery or Cloud Storage, not for direct ingestion into Cloud SQL. Option D is wrong because copying data files to Cloud Storage and loading into Bigtable is for NoSQL workloads, not for migrating a relational PostgreSQL database to Cloud SQL.

96
MCQmedium

Refer to the exhibit. The company wants to achieve a 99.99% SLA for this Cloud SQL instance. What should they do?

A.Change to a different tier.
B.Change the availability type to REGIONAL.
C.Enable automatic backups.
D.Increase the number of CPUs.
AnswerB

REGIONAL availability uses zonal replications and offers a 99.99% SLA.

97
MCQmedium

A company runs a critical application on Cloud SQL for PostgreSQL. The database engineer needs to ensure that if the primary instance fails, a standby instance in a different region can take over with minimal data loss. Which configuration should the Database Engineer implement?

A.Set up a second Cloud SQL instance and configure application-level dual-writes to both instances.
B.Configure high availability (HA) within the same region using a regional persistent disk.
C.Create a cross-region replica with asynchronous replication and manually promote it during a disaster.
D.Create a cross-region replica with synchronous replication and enable automatic failover.
AnswerC

Cross-region replica with async replication is the standard DR configuration; manual promotion gives control.

Why this answer

Option C is correct because Cloud SQL for PostgreSQL supports cross-region replicas with asynchronous replication, which allows a standby instance in a different region to be promoted manually during a disaster. This minimizes data loss by replicating changes asynchronously, though some transactions may be lost if the primary fails before replication completes. Automatic failover is not supported for cross-region replicas in Cloud SQL, so manual promotion is required.

Exam trap

Google Cloud often tests the misconception that synchronous replication and automatic failover are available for cross-region replicas, but Cloud SQL only supports asynchronous replication for cross-region replicas and requires manual promotion.

How to eliminate wrong answers

Option A is wrong because application-level dual-writes introduce complexity, potential inconsistency, and do not leverage Cloud SQL's built-in replication, making it error-prone and not a standard disaster recovery solution. Option B is wrong because high availability (HA) within the same region using a regional persistent disk only protects against zonal failures, not regional disasters, and does not provide cross-region failover. Option D is wrong because Cloud SQL for PostgreSQL does not support synchronous replication for cross-region replicas, and automatic failover is not available for cross-region replicas; synchronous replication would also introduce unacceptable latency across regions.

98
MCQhard

A company uses Cloud Memorystore for Redis as a cache for their web application. They want to ensure that cache data survives a failover event with minimal data loss. The current instance has a standard tier (with replication) and persistence disabled. What change should they make?

A.Switch to the basic tier without replication but with high memory.
B.Enable persistence (AOF) on the instance.
C.Increase the instance memory size to hold more data.
D.Add a read replica to the instance.
AnswerB

Persistence ensures data is written to disk and can be recovered after failover.

Why this answer

Enabling AOF (Append-Only File) persistence on a Cloud Memorystore for Redis standard tier instance ensures that write operations are durably logged to disk. In the event of a failover, the promoted replica can replay the AOF to recover the most recent writes, minimizing data loss beyond what the default in-memory replication provides.

Exam trap

The trap here is that candidates assume replication alone guarantees data durability, but replication only copies data in memory and does not protect against loss of uncommitted writes during a failover without disk-based persistence enabled.

How to eliminate wrong answers

Option A is wrong because switching to the basic tier removes replication entirely, which increases the risk of data loss during any failure and does not address persistence. Option C is wrong because increasing memory size only allows more data to be cached in RAM, but does not make that data durable across a failover event. Option D is wrong because adding a read replica does not enable persistence; replicas in standard tier already exist for high availability, but without AOF they still lose data on failover if persistence is disabled.

99
MCQhard

Refer to the exhibit. A company creates these Cloud Spanner tables. What happens when a customer record is deleted?

A.The deletion fails if there are orders.
B.The orders are deleted only if the order date is older than 30 days.
C.All orders for that customer are automatically deleted.
D.The orders remain orphaned.
AnswerC

Cascade delete removes all child rows associated with the deleted parent row.

Why this answer

Option C is correct because Cloud Spanner enforces referential integrity through interleaved tables. When a parent row in the Customers table is deleted, all child rows in the Orders table that are interleaved under that customer are automatically deleted via a cascading delete. This behavior is inherent to the interleaved table structure, not an explicit ON DELETE CASCADE clause.

Exam trap

The trap here is that candidates may assume Cloud Spanner behaves like traditional relational databases (e.g., requiring explicit ON DELETE CASCADE or failing on foreign key violations), but interleaved tables automatically cascade deletes without any additional syntax.

How to eliminate wrong answers

Option A is wrong because Cloud Spanner interleaved tables automatically delete child rows, so the deletion does not fail even if orders exist. Option B is wrong because there is no time-based condition in the table schema; deletion of orders is unconditional and not filtered by order date. Option D is wrong because orphaned rows cannot occur in interleaved tables; the parent-child relationship ensures child rows are removed when the parent is deleted.

100
MCQhard

You are building a globally distributed leaderboard application that requires strongly consistent reads with latency under 10 ms and high write throughput. Which Google Cloud database service is most suitable?

A.Cloud Bigtable
B.Cloud Spanner
C.Memorystore
D.Firestore
AnswerB

Spanner offers strong consistency across regions, low latency, and high write throughput.

Why this answer

Cloud Spanner is the correct choice because it provides strongly consistent reads across globally distributed regions with latency under 10 ms, while also supporting high write throughput. It uses TrueTime and synchronous replication to ensure ACID transactions and global consistency, meeting the exact requirements of a globally distributed leaderboard application.

Exam trap

The trap here is that candidates often confuse 'low latency' with 'strong consistency' and choose Cloud Bigtable or Memorystore for their speed, overlooking the critical requirement for globally consistent reads that only Spanner can provide.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a NoSQL wide-column database designed for high throughput and low latency, but it offers only eventual consistency, not strongly consistent reads. Option C is wrong because Memorystore is an in-memory cache (Redis/Memcached) that provides low latency but lacks native global distribution and strong consistency across regions; it is typically used as a caching layer, not a primary globally consistent database. Option D is wrong because Firestore provides strong consistency within a single region but offers eventual consistency for multi-region deployments, and its write throughput is limited compared to Spanner, making it unsuitable for a globally distributed leaderboard with high write throughput.

101
MCQhard

A developer reports that their application cannot connect to a Cloud SQL instance using private IP, but public IP works. The Cloud SQL instance is in VPC peering with the application's VPC. The application is in the same region. What is the most likely cause?

A.The VPC peering connection is not established.
B.The private IP range of the Cloud SQL instance conflicts with the application's VPC.
C.The Cloud SQL proxy is not running.
D.The Cloud SQL instance has 'require SSL' enabled.
AnswerB

IP overlap in peered VPCs causes routing issues, preventing private IP connectivity while public IP remains unaffected.

Why this answer

Option B is correct because when a Cloud SQL instance is configured with a private IP address that overlaps with the application's VPC CIDR range, the VPC peering connection cannot route traffic correctly. This is due to the fact that VPC peering requires non-overlapping IP ranges to establish proper routing tables; overlapping ranges cause route conflicts and connectivity failures. Since public IP works, the issue is isolated to private IP routing, making IP range conflict the most likely cause.

Exam trap

Google Cloud often tests the misconception that VPC peering automatically handles overlapping IP ranges, when in fact overlapping ranges cause routing failures that prevent private IP connectivity even if the peering connection itself is established.

How to eliminate wrong answers

Option A is wrong because if the VPC peering connection were not established, public IP would also fail (since the application would be in a different network), and the question states public IP works. Option C is wrong because the Cloud SQL proxy is a tool for connecting to Cloud SQL via public IP or IAM authentication, but it is not required for private IP connectivity; the application can connect directly to the private IP without the proxy. Option D is wrong because requiring SSL affects encryption of the connection, not the ability to establish a TCP connection; if SSL were required, the connection would fail with an SSL error, not a complete inability to connect via private IP.

102
Multi-Selectmedium

A database engineer is designing a schema for a Cloud Spanner database. Which three practices should they follow to ensure good performance? (Choose three.)

Select 3 answers
A.Use split points to distribute data across nodes.
B.Use locking read (SELECT ... FOR UPDATE) for all transactional reads.
C.Design primary keys to avoid monotonically increasing values near the beginning of the key.
D.Use interleaved tables for parent-child relationships to colocate data.
E.Create secondary indexes on every column to speed up queries.
AnswersA, C, D

Explicit splits help avoid hot spots.

Why this answer

Option A is correct because explicitly defining split points in Cloud Spanner allows you to control how data is distributed across nodes, which can prevent hot spots and improve read/write throughput. By specifying split boundaries, you ensure that frequently accessed data is spread evenly, avoiding performance bottlenecks.

Exam trap

Google Cloud often tests the misconception that all transactional reads require locking to ensure consistency, but Cloud Spanner's snapshot isolation provides serializable reads without locks, making SELECT ... FOR UPDATE an anti-pattern for most workloads.

103
MCQhard

Refer to the exhibit. A database administrator notices that the Spanner instance has only 3 nodes, but the application experiences high read latency during peak hours. The team needs to improve performance without over-provisioning. What should they do?

A.Increase node count to 6
B.Use an interleaved table
C.Enable point-in-time recovery
D.Change to a multi-region configuration
E.Create a secondary index
AnswerE

Secondary indexes enable faster lookups and avoid full table scans, improving read latency.

Why this answer

Option C is correct because creating a secondary index can reduce full table scans, lowering read latency without requiring additional nodes. Option A (increase nodes) is over-provisioning if current CPU is low. Option B (interleaved table) may improve join performance but not general reads.

Option D (PITR) increases storage cost without improving latency. Option E (multi-region) adds write latency and cost.

104
Multi-Selecthard

Which THREE considerations are critical when migrating from Cassandra to Cloud Bigtable?

Select 3 answers
A.Using CQL for queries
B.Denormalizing data to avoid joins
C.Maintaining eventual consistency model
D.Row key design for even distribution
E.Using secondary indexes for efficient filtering
AnswersB, C, D

Bigtable is a wide-column store and does not support joins; data must be denormalized.

Why this answer

Option B is correct because Cloud Bigtable is a NoSQL wide-column database that does not support joins. Denormalization is a standard practice in Bigtable to model relational data into a single table, ensuring efficient single-row lookups and avoiding the performance penalty of multi-table queries that would require application-level joins.

Exam trap

Google Cloud often tests the misconception that CQL is a universal NoSQL query language, but in reality it is proprietary to Cassandra and not compatible with Bigtable's API.

105
MCQmedium

A financial services company runs a critical application on Cloud SQL for PostgreSQL. They require point-in-time recovery (PITR) with the ability to recover to any second within the past 7 days. However, their current backup configuration only allows recovery to the previous 7 days, but not within seconds. What should they do to enable PITR?

A.Enable point-in-time recovery and set the transaction log retention to 7 days.
B.Use the Cloud SQL query insight feature to replay queries.
C.Enable binary logging and set the binary log retention period to 7 days.
D.Increase the number of automated backups to 7 per day.
AnswerA

PITR in Cloud SQL for PostgreSQL uses transaction logs (WAL) retained for the specified period.

Why this answer

Option A is correct because enabling point-in-time recovery (PITR) on Cloud SQL for PostgreSQL automatically uses write-ahead log (WAL) archiving to allow recovery to any second within a specified retention period. Setting the transaction log retention to 7 days ensures that the archived WAL segments are kept for exactly 7 days, enabling recovery to any point within that window. This directly satisfies the requirement for second-granularity recovery over the past 7 days.

Exam trap

The trap here is that candidates confuse the number of automated backups (full backups) with the retention of transaction logs required for PITR, leading them to select Option D, or they mistakenly apply MySQL binary logging concepts (Option C) to a PostgreSQL environment.

How to eliminate wrong answers

Option B is wrong because Cloud SQL Query Insights is a performance monitoring and diagnostic feature that captures query metrics and execution plans; it does not replay queries or provide any recovery capability. Option C is wrong because binary logging is a MySQL-specific feature; Cloud SQL for PostgreSQL uses WAL (write-ahead logging) for PITR, not binary logs, and there is no 'binary log retention period' setting for PostgreSQL. Option D is wrong because increasing the number of automated backups (e.g., to 7 per day) only increases the frequency of full backups, not the retention of transaction logs; PITR requires transaction log retention, not more full backups.

106
MCQmedium

An e-commerce application uses Cloud Spanner for its global inventory database. The application experiences high write latency during peak hours. After reviewing the schema, the database engineer notices that the primary key is an auto-incrementing integer. What is the most likely cause of the high write latency?

A.The application is using read-only transactions instead of read-write transactions.
B.The database is configured with a backup retention period of 2 seconds.
C.The application is using read replicas that are out of date.
D.The monotonically increasing primary key creates a hotspot.
AnswerD

Spanner distributes data by key range; sequential keys cause all new rows to be written to a single node, creating a hotspot.

Why this answer

Cloud Spanner distributes data across splits based on the primary key range. A monotonically increasing integer primary key, such as an auto-incrementing ID, causes all new writes to target the same split (the highest key range), creating a hotspot. This single split becomes a bottleneck, leading to high write latency during peak hours, as Spanner cannot parallelize the writes across multiple nodes.

Exam trap

Google Cloud often tests the misconception that auto-incrementing keys are always optimal for performance, but in distributed databases like Spanner, they cause hotspots; candidates may incorrectly attribute latency to backup settings or read replicas instead of the key design flaw.

How to eliminate wrong answers

Option A is wrong because read-only transactions do not cause write latency; they are used for reading data and do not impact write performance. Option B is wrong because a backup retention period of 2 seconds is not a valid configuration (minimum retention is typically 1 day) and has no direct effect on write latency. Option C is wrong because read replicas (read-only nodes) are used for scaling reads, not writes; stale replicas do not cause high write latency.

107
Multi-Selecthard

You are planning capacity for a Cloud Spanner instance. Which TWO factors directly affect the number of nodes required?

Select 2 answers
A.Number of users
B.Read throughput in queries per second (QPS)
C.Number of indexes
D.Write throughput in queries per second (QPS)
E.Storage size in GB
AnswersB, D

Read QPS directly determines CPU and node requirements.

Why this answer

Cloud Spanner node capacity is primarily determined by compute and I/O requirements, which are directly driven by read and write throughput (QPS). Each node provides a fixed amount of processing power and throughput; therefore, to handle a given QPS, you must provision enough nodes to meet the peak read and write demand. Storage size (Option E) is not a direct factor because Spanner automatically uses available node resources for storage, and you can add nodes for throughput without exceeding storage limits.

Exam trap

The trap here is that candidates often assume storage size is a primary driver for node count, but Spanner decouples throughput and storage, so you must focus on QPS requirements first, especially in exam scenarios where throughput is the bottleneck.

108
Multi-Selectmedium

A Database Engineer is deploying a Cloud SQL for PostgreSQL instance for a financial services application that requires high availability and automatic failover. The engineer also needs to ensure that backups are taken daily and retained for 30 days. Which TWO actions should the engineer take? (Choose two.)

Select 2 answers
A.Create a cross-region replica and configure automatic failover.
B.Enable automated backups and set backup retention to 30 days.
C.Enable high availability (HA) configuration on the instance with a regional persistent disk.
D.Schedule a Cloud Scheduler job to export the database to Cloud Storage daily.
E.Enable point-in-time recovery (PITR) with a 7-day retention.
AnswersB, C

Automated backups with 30-day retention satisfies the requirement.

Why this answer

Option B is correct because Cloud SQL automated backups can be configured with a retention period of up to 365 days, and setting it to 30 days meets the requirement for daily backups with 30-day retention. Option C is correct because enabling high availability (HA) on a Cloud SQL instance with a regional persistent disk provides automatic failover to a standby instance in a different zone within the same region, ensuring high availability for the financial services application.

Exam trap

Google Cloud often tests the distinction between high availability (automatic failover within a region) and disaster recovery (cross-region replicas), leading candidates to incorrectly select cross-region replicas for failover when they are read-only and require manual promotion.

109
MCQmedium

A Cloud SQL instance stores financial data. They need to meet a 1-hour RPO and 30-minute RTO. What backup configuration should they use?

A.Export once a day to Cloud Storage.
B.Automatic backups plus binary logging to enable point-in-time recovery (PITR).
C.Enable high availability.
D.Automatic backups with a schedule of 1 hour.
AnswerB

PITR with binary logs allows recovery to any point in the last 7 days, meeting the 1-hour RPO.

Why this answer

Option B is correct because automatic backups combined with binary logging enable point-in-time recovery (PITR), which allows restoring the database to any point within the backup retention period. This configuration meets the 1-hour RPO by recovering transactions committed within the last hour, and the 30-minute RTO by using the most recent full backup plus binary logs to restore quickly.

Exam trap

Google Cloud often tests the distinction between high availability (HA) and backup/recovery; candidates mistakenly think HA alone satisfies RPO/RTO requirements, but HA only ensures uptime, not point-in-time data recovery.

How to eliminate wrong answers

Option A is wrong because exporting once a day to Cloud Storage provides an RPO of up to 24 hours, far exceeding the required 1-hour RPO, and restoring from an export can take significantly longer than 30 minutes. Option C is wrong because enabling high availability (HA) provides failover to a standby instance in case of zone failure, but does not address data backup or recovery point objectives; it does not protect against data corruption or accidental deletion. Option D is wrong because automatic backups with a 1-hour schedule create full backups every hour, but without binary logging, you can only restore to the exact backup timestamps, not to any point within the hour, so the effective RPO could be up to 1 hour plus the time to complete the backup, and recovery time may exceed 30 minutes due to the need to restore the full backup.

110
MCQhard

Your company runs a global application on Cloud Spanner. You notice that recent schema changes have caused a significant increase in latency for cross-node transactions. The previous schema used interleaved tables for parent-child relationships, but the new schema uses separate tables with foreign keys. What is the most likely cause of the increased latency?

A.The new schema uses foreign keys that require cross-node transactions.
B.The new schema does not use commit timestamps for versioning.
C.The new schema lacks secondary indexes on foreign key columns.
D.The Spanner instance was not resized after the schema change.
AnswerA

Foreign keys between separate tables can lead to distributed transactions across nodes.

Why this answer

The new schema uses separate tables with foreign keys instead of interleaved tables. In Cloud Spanner, interleaved tables guarantee that parent and child rows are co-located on the same split, allowing local joins without cross-node communication. Foreign keys between non-interleaved tables can reference rows stored on different splits, forcing distributed transactions that require two-phase commit across nodes, which significantly increases latency.

Exam trap

The trap here is that candidates may think foreign keys inherently cause performance issues due to constraint checking, but the real cause is the loss of data locality and resulting cross-split coordination in Spanner's distributed architecture.

How to eliminate wrong answers

Option B is wrong because commit timestamps are used for versioning and consistency, not for reducing cross-node transaction latency; omitting them would not cause the described latency increase. Option C is wrong because secondary indexes on foreign key columns improve query performance but do not eliminate the need for cross-node coordination when the referenced rows are on different splits. Option D is wrong because resizing the Spanner instance (adding/removing nodes) affects throughput and storage capacity, not the fundamental latency of cross-node transactions caused by non-interleaved schemas.

111
MCQhard

Refer to the exhibit. The application requires low-latency reads for users in Europe. The current cluster is in us-central1. What should they do?

A.Add a new cluster in a European region (e.g., europe-west1).
B.Increase the number of nodes in the existing cluster.
C.Use a multi-cluster instance with existing cluster.
D.Change the storage type to SSD in the existing cluster.
AnswerA

Adding a cluster in Europe allows reads to be served from a nearby location, reducing latency.

Why this answer

Adding a new cluster in a European region (e.g., europe-west1) is correct because it places data physically closer to users, reducing network latency for read operations. In a multi-region deployment, the application can read from the nearest cluster, achieving low-latency reads without changing the existing cluster's configuration. This approach leverages geographic proximity to minimize round-trip time (RTT) for European users.

Exam trap

Google Cloud often tests the misconception that scaling up (more nodes or faster storage) can solve geographic latency issues, when in fact only adding a regional cluster addresses the fundamental physics of network propagation delay.

How to eliminate wrong answers

Option B is wrong because increasing the number of nodes in the existing us-central1 cluster does not reduce the physical distance between European users and the data; network latency is dominated by propagation delay, not node count. Option C is wrong because a multi-cluster instance (e.g., in Cloud Spanner) is designed for global strong consistency and high availability, but it does not inherently provide low-latency reads for a specific region unless a new cluster is added in that region; the existing cluster alone cannot serve European users with low latency. Option D is wrong because changing the storage type to SSD improves I/O performance (e.g., lower disk latency) but does not address the network latency caused by geographic distance; the bottleneck for European users is the long-haul network path, not storage speed.

112
MCQeasy

A company is migrating a PostgreSQL database to Cloud SQL for PostgreSQL. They want to ensure minimal downtime during the migration. Which migration strategy should they use?

A.Set up application-level dual writes to both databases and switch over
B.Use Database Migration Service (DMS) with continuous replication
C.Create a read replica in Cloud SQL and promote it
D.Export the database using pg_dump and import into Cloud SQL
AnswerB

DMS provides minimal downtime via change data capture and replication.

Why this answer

Database Migration Service (DMS) with continuous replication is the correct strategy because it uses change data capture (CDC) to replicate ongoing transactions from the source PostgreSQL database to Cloud SQL with minimal lag. This allows the application to remain fully operational during the migration, and the cutover can be performed in seconds by stopping writes to the source and promoting the target, achieving near-zero downtime.

Exam trap

The trap here is that candidates often confuse 'read replica promotion' (which only works within Cloud SQL) with cross-environment migration, or they assume that pg_dump can be used with minimal downtime by running it on a replica, but the export still locks tables or requires a consistent snapshot that interrupts writes.

How to eliminate wrong answers

Option A is wrong because application-level dual writes require modifying application code to write to both databases simultaneously, which introduces complexity, potential data inconsistency, and does not guarantee minimal downtime during the actual cutover. Option C is wrong because creating a read replica in Cloud SQL and promoting it is not a supported migration path from an external PostgreSQL database; Cloud SQL read replicas can only be created from a Cloud SQL primary instance, not from an on-premises or external source. Option D is wrong because exporting with pg_dump and importing into Cloud SQL is a batch, offline process that requires the source database to be read-only or stopped during the export to ensure consistency, resulting in significant downtime.

113
MCQeasy

Refer to the exhibit. The company plans to store 3 TB of data in this instance. What is the minimum number of nodes required? (Assume 2 TB per node for HDD and 4 TB per node for SSD; this instance uses SSD.)

A.4
B.1
C.2
D.3
AnswerC

1 node provides 2 TB of SSD storage, so 2 nodes are needed for 3 TB.

Why this answer

The instance uses SSD storage, which provides 4 TB per node. To store 3 TB of data, a single node with 4 TB SSD would suffice, but the question asks for the minimum number of nodes required. However, the correct answer is 2 because in a distributed database like Couchbase (commonly tested in PCDE), data is replicated across nodes for high availability and durability.

With 1 node, there is no redundancy; with 2 nodes, you can store 3 TB of data while maintaining a replica, as each node contributes 4 TB of usable storage, and the effective storage after replication is 4 TB (2 nodes × 4 TB / 2 replicas = 4 TB), which is sufficient for 3 TB.

Exam trap

Google Cloud often tests the misconception that you only need enough raw storage to hold the data, ignoring the replication factor required for high availability in a clustered database environment.

How to eliminate wrong answers

Option A (4) is wrong because 4 nodes would provide 16 TB of raw SSD storage, which is excessive for only 3 TB of data and would be an inefficient use of resources. Option B (1) is wrong because a single node cannot provide data redundancy or high availability; in a production database cluster, you need at least 2 nodes to support replication and failover. Option D (3) is wrong because 3 nodes would provide 12 TB of raw storage, but after accounting for replication (typically 2 copies), the effective storage is 6 TB, which is more than needed; 2 nodes are sufficient and more cost-effective.

114
MCQhard

A healthcare company uses Cloud SQL for MySQL for patient records. They need to export data for a compliance audit. They must ensure the export includes all changes within a specific time window (e.g., last 24 hours). They have binary logging enabled. What is the best method to obtain a consistent snapshot of the data as of the audit time?

A.Use Database Migration Service's continuous export.
B.Use Cloud SQL clone to create a new instance from a point-in-time, then export from clone.
C.Use mysqldump to export at the audit time.
D.Use Cloud SQL's export feature with a specific backup-id.
AnswerB

Cloning uses binary logs to recreate the exact state at a given time, providing a consistent snapshot.

Why this answer

Option B is correct because Cloud SQL's clone feature can create a new instance from a specific point-in-time using binary logs, providing a consistent snapshot of the database as of the audit time. This ensures all changes within the last 24 hours are captured without impacting the production instance, and the export can then be performed from the clone.

Exam trap

The trap here is that candidates may think mysqldump or the export feature can capture a point-in-time snapshot, but they overlook that Cloud SQL's clone with PITR is the only method that provides a consistent, non-disruptive snapshot at an arbitrary time within the binary log retention window.

How to eliminate wrong answers

Option A is wrong because Database Migration Service's continuous export is designed for ongoing replication to external targets, not for creating a point-in-time consistent snapshot from Cloud SQL's binary logs. Option C is wrong because mysqldump at audit time would lock tables and impact production performance, and it cannot guarantee a consistent snapshot that includes all changes within a specific time window without binary log replay. Option D is wrong because Cloud SQL's export with a specific backup-id only exports from a full backup, not from a point-in-time that includes all changes within the last 24 hours; backups are typically taken at scheduled intervals, not at the exact audit time.

115
MCQeasy

A company wants to migrate a 100 GB MySQL database to Cloud SQL with minimal application changes. Which migration tool should they use?

A.mysqldump
B.Database Migration Service
C.BigQuery Data Transfer Service
D.Storage Transfer Service
AnswerB

DMS supports MySQL to Cloud SQL migrations with minimal changes.

Why this answer

Database Migration Service (DMS) is the correct tool because it is designed specifically for migrating databases to Cloud SQL with minimal downtime and minimal application changes. DMS uses a combination of initial snapshot and continuous change data capture (CDC) to replicate the source MySQL database to Cloud SQL, allowing the application to point to the new database with only a connection string update.

Exam trap

Google Cloud often tests the distinction between database migration tools and general data transfer or backup tools, so the trap here is that candidates might choose mysqldump (Option A) because it is a familiar MySQL tool, overlooking that it causes downtime and is not optimized for live migrations to Cloud SQL.

How to eliminate wrong answers

Option A is wrong because mysqldump is a logical backup tool that exports data as SQL statements, which requires taking the source database offline or locking tables during the dump, and the import process can be slow and error-prone for a 100 GB database, leading to significant application downtime and potential data inconsistency. Option C is wrong because BigQuery Data Transfer Service is designed for loading data into BigQuery, a data warehouse, not for migrating operational databases to Cloud SQL, and it does not support MySQL as a source or Cloud SQL as a target. Option D is wrong because Storage Transfer Service is used for moving objects from on-premises or other cloud storage to Google Cloud Storage (GCS), not for migrating live databases to Cloud SQL, and it cannot handle the transactional consistency or schema requirements of a MySQL database.

116
MCQhard

A company runs a critical application on Cloud SQL for PostgreSQL with a primary instance in us-central1 and a cross-region read replica in us-west1 for disaster recovery. The database engineer is responsible for ensuring that in the event of a regional outage in us-central1, the application can continue with minimal data loss and within 15 minutes of downtime. The application writes about 1000 transactions per second. The current setup has automated backups enabled with point-in-time recovery (7-day retention) and the cross-region replica is configured with asynchronous replication. Which action should the database engineer take to meet the recovery objectives?

A.Promote the cross-region read replica to a new primary and redirect application traffic.
B.Change the cross-region replica to synchronous replication and enable automatic failover.
C.Create a new instance from the latest backup in us-west1 and redirect traffic.
D.Increase automated backup frequency to every hour and ensure binary logging is enabled.
AnswerA

Promoting a read replica is fast (minutes) and meets the 15-minute RTO. Data loss is limited to the replication lag (seconds/minutes).

Why this answer

Option D is correct because using Database Migration Service (DMS) for continuous migration is not needed; instead, promoting the cross-region read replica is the fastest failover method. However, with asynchronous replication, some data loss may occur. To minimize data loss, they should set replication lag alerts and automate failover procedures.

Option A is wrong because backup-based recovery takes longer than 15 minutes for 1TB. Option B is wrong because synchronous replication across regions is not supported in Cloud SQL for PostgreSQL. Option C is wrong because increasing backup frequency doesn't help with fast failover.

117
MCQmedium

A database administrator notices that a Cloud SQL for MySQL instance is experiencing high CPU usage during peak hours. The instance has 4 vCPUs and 15 GB of memory. The query patterns are mostly read-intensive with occasional writes. Which action should the DBA take first to address the high CPU usage?

A.Increase the max_connections flag to allow more concurrent connections
B.Enable read pool to offload read queries
C.Increase the machine type to 8 vCPUs
D.Analyze slow query log and optimize queries
AnswerD

Analyzing slow queries helps identify inefficient SQL that consumes CPU; optimizing is the most effective first step.

Why this answer

High CPU usage in a read-intensive Cloud SQL for MySQL instance is most often caused by inefficient queries that consume excessive CPU cycles. Analyzing the slow query log allows the DBA to identify and optimize these queries, addressing the root cause directly. Increasing resources or changing configuration without understanding the workload can mask the problem and lead to unnecessary costs.

Exam trap

Google Cloud often tests the misconception that scaling up resources is the first troubleshooting step, when in reality, analyzing and optimizing query performance is the most effective initial action for CPU-bound issues in Cloud SQL.

How to eliminate wrong answers

Option A is wrong because increasing max_connections can actually worsen CPU usage by allowing more concurrent queries to compete for CPU resources, potentially increasing contention. Option B is wrong because read pool offloading is a feature for Cloud SQL for PostgreSQL, not MySQL, and MySQL instances use read replicas instead. Option C is wrong because scaling up to 8 vCPUs is a reactive measure that does not address the underlying query inefficiency; it increases cost without guaranteeing performance improvement if the queries are poorly optimized.

118
Multi-Selecthard

A company's Cloud Spanner database currently uses a regional configuration in us-central1. Due to growth, the database must support global reads with low latency and maintain strong consistency. The database engineer is evaluating options. Which THREE considerations should the engineer include in the design? (Choose three.)

Select 3 answers
A.Use interleaved tables to reduce the number of reads required for hierarchical data.
B.Select a configuration that places the leader region close to the majority of write traffic.
C.Ensure the schema uses primary keys that distribute writes evenly across nodes.
D.Add read replicas in remote regions to serve reads with eventual consistency.
E.Use a multi-region instance configuration that includes multiple read-write regions.
AnswersB, C, E

Leader placement reduces write latency and indirectly benefits read latency.

Why this answer

Option B is correct because in a multi-region Cloud Spanner configuration, the leader region handles all writes and must be placed close to the majority of write traffic to minimize write latency. This ensures strong consistency, as all reads are served from the same leader region by default, and global reads with low latency require careful leader placement to avoid cross-region round trips.

Exam trap

Google Cloud often tests the misconception that read replicas can provide strong consistency, but in Cloud Spanner, read replicas only serve eventually consistent reads, while strong consistency requires contacting the leader region or using a multi-region configuration with read-write regions.

119
MCQeasy

A developer needs a local development database that mirrors a Cloud SQL instance. What is the best practice?

A.Use Cloud SQL Proxy to connect locally
B.Use Cloud Functions
C.Export data and import to local MySQL
D.Use Cloud SQL's public IP
AnswerC

Exporting the database provides a dump that can be loaded into a local MySQL instance.

Why this answer

Option C is correct because exporting the Cloud SQL instance data (e.g., using `gcloud sql export sql` or `mysqldump`) and importing it into a local MySQL database creates an exact, offline replica of the production schema and data. This allows the developer to work with a full, consistent dataset without network latency, connection overhead, or dependency on Cloud SQL availability, which is the standard best practice for local development mirrors.

Exam trap

The trap here is that candidates confuse 'connecting to a remote database' (Options A and D) with 'creating a local copy,' failing to recognize that a true development mirror must be an offline, independent replica to avoid latency, security, and availability issues.

How to eliminate wrong answers

Option A is wrong because Cloud SQL Proxy is a secure tunnel for connecting to a live Cloud SQL instance over the internet; it does not create a local copy of the database, so the developer remains dependent on network connectivity and the production instance, which defeats the purpose of a local development mirror. Option B is wrong because Cloud Functions are serverless compute units for event-driven code, not a database service or tool for replicating or mirroring database state; they cannot store or serve a local copy of a Cloud SQL database. Option D is wrong because using Cloud SQL's public IP exposes the instance directly to the internet, which is a security risk and still requires a live connection to the remote database, not a local development mirror.

120
Drag & Dropmedium

Arrange the steps to create and connect to a Cloud SQL for PostgreSQL instance using the gcloud command-line tool.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order

Why this order

After creating the instance, you set the password, configure network access, then connect via psql.

121
Multi-Selectmedium

A company plans to migrate an on-premises MySQL database to Cloud SQL. Which THREE steps should they include in their migration plan?

Select 3 answers
A.Test application compatibility with Cloud SQL.
B.Connect to Cloud SQL via Database Migration Service.
C.Convert all stored procedures to PostgreSQL dialect.
D.Determine whether to use private or public IP.
E.Enable point-in-time recovery before migration.
AnswersA, B, D

Ensure the application works with Cloud SQL's MySQL version and configuration to avoid surprises.

Why this answer

Option A is correct because testing application compatibility with Cloud SQL ensures that any MySQL-specific features, configurations, or behaviors used by the application are supported in the Cloud SQL environment. This step is critical to identify potential issues early, such as unsupported storage engines, character set differences, or version-specific SQL syntax, before committing to the full migration.

Exam trap

The trap here is that candidates may confuse the need to convert stored procedures when migrating between different database engines (e.g., MySQL to PostgreSQL) with a homogeneous MySQL-to-Cloud SQL migration, where no dialect conversion is required.

122
Multi-Selectmedium

A company is migrating an on-premises PostgreSQL database to Cloud SQL. They need to minimize downtime during migration. Which TWO steps should they take?

Select 2 answers
A.Set up a read replica for switchover
B.Use pg_dump and restore
C.Enable automatic backups
D.Configure a high-availability instance
E.Use Database Migration Service with continuous replication
AnswersA, E

Correct: A read replica can be promoted to primary with minimal downtime, enabling a quick cutover.

Why this answer

Option A (Database Migration Service with continuous replication) minimizes downtime by syncing changes in real time. Option C (Set up a read replica) allows a near-instantaneous cutover by promoting the replica. Option B (automatic backups) does not reduce downtime.

Option D (pg_dump) involves downtime. Option E (HA instance) is for post-migration availability, not migration steps.

123
MCQhard

A Cloud Spanner instance is experiencing increased latency during peak hours. Monitoring shows CPU utilization nearing 70%. How should they scale?

A.Add more nodes.
B.Change to a higher-tier machine type.
C.Increase the number of splits.
D.Add more processing units.
AnswerA

Adding nodes increases CPU capacity and reduces latency due to high CPU.

124
MCQhard

A developer reports that an application cannot connect to a Cloud SQL SQL Server instance. The error log shows the message in the exhibit. The instance exists and the user credentials are correct. What is the most likely cause?

A.The Cloud SQL instance has reached its maximum number of connections.
B.The database name specified in the connection string is incorrect.
C.The Cloud SQL proxy is not running.
D.The Cloud SQL instance is not in the same VPC network as the application.
AnswerB

This error commonly occurs when the database name is misspelled or does not exist.

Why this answer

The error message in the exhibit indicates that the login failed for the user, which is a common symptom when the database name in the connection string does not match an existing database on the Cloud SQL SQL Server instance. Even though the user credentials are correct, SQL Server requires a valid database context to establish the connection; an incorrect database name causes the server to reject the login attempt. This is a configuration issue, not an authentication or network problem.

Exam trap

Google Cloud often tests the distinction between authentication errors and database context errors, leading candidates to incorrectly blame network or proxy issues when the actual problem is a simple misconfiguration in the connection string's database name.

How to eliminate wrong answers

Option A is wrong because reaching the maximum number of connections would produce a different error, such as 'Cannot open server connection' or 'Connection limit exceeded', not a login failure for a specific database. Option C is wrong because if the Cloud SQL proxy were not running, the application would not be able to reach the Cloud SQL instance at all, resulting in a network timeout or connection refused error, not a SQL Server login error. Option D is wrong because if the instance were not in the same VPC network, the application would experience a network connectivity failure (e.g., timeout or unreachable host), not a SQL Server authentication error that includes a database name reference.

125
MCQhard

A company has a Spanner instance with 5 nodes serving a global application. They receive alerts that write latency has increased significantly during business hours in the Asia-Pacific region. The team confirms that no application changes have been made. What is the most likely cause and recommended action?

A.Writes are hitting a hot spot due to monotonically increasing keys; consider using a hash prefix or bit-reversed key
B.CPU utilization is above 70%; enable Spanner fine-grained access control
C.Set up interleaved indexes to speed up writes
D.The instance is under-provisioned; increase the number of nodes
AnswerA

Using a hash prefix or bit-reversed key distributes writes across splits, reducing hot spots.

Why this answer

Monotonically increasing keys (e.g., timestamps or auto-increment IDs) cause all new writes to target the same tablet leader in Spanner, creating a hot spot. This increases write latency because the single node becomes a bottleneck, especially during peak business hours in the Asia-Pacific region. Using a hash prefix or bit-reversed key distributes writes evenly across nodes, resolving the contention.

Exam trap

Google Cloud often tests the misconception that adding nodes (scaling out) always fixes write latency, but the real issue is often a hot spot from poor key design, which requires schema-level changes rather than infrastructure scaling.

How to eliminate wrong answers

Option B is wrong because CPU utilization above 70% is a symptom, not a root cause, and enabling fine-grained access control does not reduce write latency. Option C is wrong because interleaved indexes optimize read performance by colocating parent and child rows, but they do not speed up writes; in fact, they can add overhead to write operations. Option D is wrong because the instance has 5 nodes and no application changes were made, so under-provisioning is unlikely; the issue is a hot spot from key design, not insufficient capacity.

126
Drag & Dropmedium

Arrange the steps to configure high availability for a Cloud SQL for MySQL instance.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order

Why this order

Create instance first, then enable HA and set standby zone, then verify and test.

127
MCQeasy

A developer runs the command shown in the exhibit and wants to verify that replication is enabled on the Bigtable instance. Where should they look for this information in the output?

A.Examine the 'instanceType' field for 'MULTI_CLUSTER'.
B.Look for a 'replication' field in the JSON.
C.View the 'clusters' list within the instance description.
D.Check the 'state' field for 'REPLICATED'.
AnswerC

Clusters indicate replication if multiple clusters exist.

Why this answer

Option C is correct because the `gcloud bigtable instances describe` command returns a JSON representation of the instance, which includes a `clusters` list. Each cluster object in that list contains a `replication` field (e.g., `defaultStorageType` and `nodes`), and the presence of multiple clusters in the list indicates that replication is configured. Replication in Cloud Bigtable is enabled by adding more than one cluster to the instance, so examining the `clusters` list directly shows whether replication is active.

Exam trap

The trap here is that candidates confuse the `instanceType` field (which is `PRODUCTION` or `DEVELOPMENT`) with replication status, or expect a dedicated `replication` boolean field, when in fact replication is indicated by the presence of multiple clusters in the `clusters` list.

How to eliminate wrong answers

Option A is wrong because `instanceType` in Cloud Bigtable is either `PRODUCTION` or `DEVELOPMENT`, not `MULTI_CLUSTER`; the term 'MULTI_CLUSTER' is used for routing options, not instance type. Option B is wrong because there is no top-level `replication` field in the JSON output of `gcloud bigtable instances describe`; replication status is derived from the number of clusters in the `clusters` list. Option D is wrong because the `state` field in the instance description indicates the lifecycle state (e.g., `READY`, `CREATING`), not replication status; there is no `REPLICATED` state value.

128
MCQmedium

A financial services company runs a Cloud SQL for PostgreSQL instance for transactional data. They need to conduct regular security audits and compliance checks. The database engineer must ensure that all connections to the database are encrypted and that access is restricted to authorized VMs only. The database is currently accessible from the internet via an authorized network with a public IP. What should the database engineer do to meet these requirements?

A.Create a Cloud SQL proxy instance in the same VPC and force all clients to connect through the proxy.
B.Configure SSL/TLS for all connections and use an authorized network with a specific CIDR range.
C.Enable Cloud SQL private IP and disable public IP. Use VPC Service Controls and Cloud Identity-Aware Proxy for access.
D.Enable Cloud SQL public IP with SSL/TLS and restrict access using Cloud Armor.
AnswerC

Private IP eliminates internet exposure; VPC Service Controls and IAP enforce access control.

Why this answer

Option C is correct because it addresses both requirements: encryption and access restriction. Enabling Cloud SQL private IP ensures that the database is only reachable from within the VPC, eliminating internet exposure. VPC Service Controls provide a security perimeter to prevent data exfiltration, and Cloud Identity-Aware Proxy (IAP) enables fine-grained, identity-based access to the database without requiring a public IP or VPN.

Exam trap

The trap here is that candidates often confuse Cloud SQL proxy with a network-level access control solution, or they assume that SSL/TLS and authorized networks are sufficient for VM-only access, overlooking the fact that authorized networks still expose a public IP and do not enforce VM identity.

How to eliminate wrong answers

Option A is wrong because Cloud SQL proxy is a client-side tool for encrypting connections and simplifying authentication, but it does not restrict access to authorized VMs only; it still requires a public IP or a private IP with appropriate network configuration, and it does not enforce VM-level authorization. Option B is wrong because while SSL/TLS encrypts connections, using an authorized network with a public IP still exposes the database to the internet, violating the requirement to restrict access to authorized VMs only; authorized networks are IP-based and do not enforce VM-level identity. Option D is wrong because Cloud Armor is a web application firewall for HTTP(S) traffic, not for database connections; it cannot restrict access to Cloud SQL PostgreSQL instances, and using a public IP with SSL/TLS still leaves the database internet-facing.

129
Multi-Selecthard

A company runs a Bigtable instance for time-series data. They need to reduce storage costs without compromising query performance for the most recent 30 days. Which three strategies should they implement?

Select 2 answers
A.Increase the number of cluster nodes to improve compaction
B.Use Cloud Storage as a cold storage tier for historical data
C.Enable Bigtable replication and delete data from one cluster
D.Set garbage collection to delete data older than 30 days
E.Reduce the number of cluster nodes to save costs
AnswersB, D

Export old data to Cloud Storage and delete from Bigtable.

Why this answer

Option B is correct because moving historical data (older than 30 days) to Cloud Storage as a cold storage tier reduces Bigtable storage costs while keeping the most recent 30 days in Bigtable for fast queries. Option D is correct because setting garbage collection (GC) to delete data older than 30 days automatically removes stale data, reducing storage footprint without impacting query performance for recent data. Both strategies directly address cost reduction while preserving performance for the required time window.

Exam trap

Google Cloud often tests the misconception that reducing cluster nodes or increasing nodes is a direct cost-saving strategy, but candidates must remember that performance requirements (especially for recent data) dictate node count, and cost savings must come from data lifecycle management, not infrastructure scaling.

130
MCQeasy

Your organization requires that all database backups be stored in a different region for disaster recovery. You are using Cloud SQL for MySQL. What backup configuration should you use?

A.Enable automated backups and select the same region as the instance.
B.Enable automated backups and select a different region for the backup location.
C.Use on-demand exports to Cloud Storage in the same region.
D.Configure a multi-region Cloud Storage bucket and point automated backups there.
AnswerB

This meets the cross-region DR requirement.

Why this answer

Cloud SQL for MySQL allows you to specify a different region for automated backup storage, which satisfies the disaster recovery requirement of storing backups in a separate region. By selecting a different region for the backup location, you ensure that if the primary region fails, the backups remain accessible for recovery. This is the only built-in option that directly meets the cross-region backup requirement without additional manual steps.

Exam trap

Google Cloud often tests the misconception that automated backups can be directed to a multi-region Cloud Storage bucket, but Cloud SQL only supports a single-region backup location for automated backups, not multi-region or dual-region buckets.

How to eliminate wrong answers

Option A is wrong because selecting the same region as the instance does not provide disaster recovery isolation; a regional failure would affect both the instance and its backups. Option C is wrong because on-demand exports to Cloud Storage in the same region also lack cross-region redundancy; the backups remain vulnerable to the same regional outage. Option D is wrong because Cloud SQL automated backups cannot be pointed to a multi-region Cloud Storage bucket; automated backups are stored in Cloud SQL's internal backup storage, not in a user-managed bucket, and the backup location must be a single region.

131
Multi-Selectmedium

A company is migrating their on-premises Oracle database to Cloud SQL for PostgreSQL. They want to minimize downtime during the cutover. Which two strategies should the database engineer recommend? (Choose 2.)

Select 2 answers
A.Use a Cloud VPN tunnel for data transfer.
B.Use Database Migration Service with continuous replication.
C.Use a third-party tool like pglogical for replication.
D.Use Cloud SQL for PostgreSQL with read replicas and promote.
E.Perform an export using pg_dump and import using psql.
AnswersB, C

DMS allows continuous replication with minimal downtime.

Why this answer

Database Migration Service (DMS) with continuous replication is correct because it supports minimal-downtime migrations from Oracle to Cloud SQL for PostgreSQL by continuously replicating changes from the source to the target until cutover. This allows the source database to remain operational during most of the migration, with only a brief pause to finalize the switch.

Exam trap

Google Cloud often tests the misconception that any replication tool (like pglogical) can be used across heterogeneous databases, but pglogical only works between PostgreSQL instances, not from Oracle to PostgreSQL.

132
MCQmedium

A company is migrating an Oracle database to Cloud Spanner. The Oracle database has complex stored procedures and triggers. What is the best approach?

A.Use Dataflow to stream data from Oracle to Spanner.
B.Use BigQuery to load data then export to Spanner.
C.Rewrite the stored procedures and triggers to Spanner-compatible SQL and use a heterogeneous migration tool.
D.Use Database Migration Service for homogenous migration.
AnswerC

Spanner uses standard SQL with limited procedural support; rewriting is necessary, and a tool like Dataflow can migrate data.

Why this answer

Option C is correct because Oracle stored procedures and triggers are written in PL/SQL, which is not compatible with Cloud Spanner's SQL dialect. A heterogeneous migration tool (e.g., Striim or Datastream with custom transforms) can handle schema and data conversion, but the application logic must be rewritten to Spanner-compatible SQL (e.g., using Cloud Spanner's stored procedures in GoogleSQL). This ensures the business logic is preserved and optimized for Spanner's distributed architecture.

Exam trap

The trap here is that candidates assume Database Migration Service (DMS) can handle any migration, but DMS only supports homogeneous migrations (same database engine), and Oracle to Spanner is heterogeneous, requiring a rewrite of stored procedures and triggers.

How to eliminate wrong answers

Option A is wrong because Dataflow is a data processing service, not a migration tool for complex stored procedures and triggers; it can stream data but cannot convert PL/SQL logic to Spanner-compatible SQL. Option B is wrong because BigQuery is an analytics data warehouse, not a migration intermediary; loading data into BigQuery and then exporting to Spanner adds unnecessary complexity and does not address the conversion of stored procedures and triggers. Option D is wrong because Database Migration Service (DMS) supports homogeneous migrations (e.g., MySQL to Cloud SQL for MySQL), but Oracle to Spanner is heterogeneous, and DMS cannot convert PL/SQL to Spanner SQL.

133
MCQhard

A Cloud SQL for PostgreSQL instance is experiencing high CPU usage due to many short-lived connections. Which configuration change can help without application changes?

A.Use read replicas
B.Increase the max_connections parameter
C.Increase the tier to more vCPUs
D.Enable connection pooling with pgBouncer
AnswerD

pgBouncer reduces the number of concurrent connections to the database, lowering CPU usage.

Why this answer

Option B is correct because enabling connection pooling with pgBouncer reduces the CPU overhead of creating and tearing down connections. Option A (read replicas) helps with read load, not CPU from connections. Option C (increase max_connections) may worsen the issue.

Option D (increase tier) increases cost but may not address the root cause of connection churn.

134
Multi-Selecthard

A company stores log files in Cloud Storage buckets. The logs are accessed frequently for the first 30 days, then rarely for the next 6 months, after which they must be archived for 7 years. They want to minimize storage costs. Which two actions should they take? (Choose two.)

Select 2 answers
A.Keep objects in Standard storage class for the entire retention period.
B.Set a lifecycle rule to change storage class to Nearline after 30 days.
C.Set a lifecycle rule to delete the objects after 30 days.
D.Enable Autoclass to automatically transition objects to colder storage classes.
E.Set a lifecycle rule to change storage class to Archive after 6 months.
AnswersB, E

Nearline is cost-effective for data accessed less than once a month.

Why this answer

Options B and C are correct: they should transition to Nearline after 30 days, and then to Archive after 6 months. Option A is wrong because autoclass is a single setting that automatically transitions, but it may not precisely match the 30-day/6-month schedule; custom lifecycle rules give more control. Option D is wrong because deleting after 30 days loses data needed for 6 months.

Option E is wrong because Standard class is the most expensive; not cost-effective for rare access. Correct: B and C.

135
Multi-Selecteasy

A team is designing a disaster recovery plan for a Cloud Spanner instance. They want an RPO of 10 minutes and RTO of 5 minutes. Which two features should they use?

Select 2 answers
A.Enable point-in-time recovery (PITR) with a 10-minute recovery period
B.Deploy a cross-region read replica
C.Configure automated backups
D.Use database versioning to failover
E.Set up a multi-region configuration
AnswersA, E

PITR allows recovery to any point within window, meeting RPO.

Why this answer

Point-in-time recovery (PITR) with a 10-minute recovery period is correct because it allows restoring Cloud Spanner data to any point within the last 10 minutes, meeting the RPO of 10 minutes. PITR provides versioned data retention without requiring manual backups, enabling recovery within seconds to minutes, which satisfies the RTO of 5 minutes when combined with a multi-region configuration.

Exam trap

Google Cloud often tests the misconception that read replicas or automated backups alone can meet strict RPO/RTO requirements, but in Cloud Spanner, only PITR combined with a multi-region configuration provides the necessary recovery granularity and automatic failover.

136
MCQhard

A company uses Cloud Bigtable with replication across two clusters in us-east1 and us-west1. They have a critical application that requires strong consistency for all reads after writes. What configuration should they implement to meet this requirement?

A.Use cluster-group routing with multi-cluster routing.
B.Use single-cluster routing with single-row transactions.
C.Enable inter-cluster replication with strong consistency.
D.Use multi-cluster routing to automatically route to the nearest cluster.
AnswerB

Single-cluster routing ensures all reads and writes go to the same cluster, providing strong consistency.

Why this answer

Cloud Bigtable does not support strong consistency across clusters in a replicated setup; replication is eventually consistent. To guarantee strong consistency for reads after writes, you must use single-cluster routing with single-row transactions, which ensures that all reads and writes for a given row are processed by the same cluster, providing ACID semantics for that row.

Exam trap

The trap here is that candidates often assume 'replication' implies strong consistency, but Cloud Bigtable's cross-cluster replication is eventually consistent, and the only way to achieve strong consistency is to confine all operations to a single cluster using single-row transactions.

How to eliminate wrong answers

Option A is wrong because cluster-group routing with multi-cluster routing distributes requests across clusters, which can lead to stale reads due to eventual consistency. Option C is wrong because inter-cluster replication in Cloud Bigtable is inherently eventually consistent; there is no configuration to make it strongly consistent across clusters. Option D is wrong because multi-cluster routing routes to the nearest cluster based on latency, but this does not guarantee strong consistency; reads may return stale data if the write has not yet replicated.

137
MCQmedium

A news website uses Cloud SQL for MySQL for content management. They experience slow reads during breaking news events. They have a single primary instance in us-east1. They need to improve read scalability globally. They also want to ensure data is backed up in another region. What should they do?

A.Use Cloud Spanner with multi-region configuration.
B.Enable automatic failover to a standby instance in another region.
C.Add cross-region read replicas in multiple regions and use replica read for queries.
D.Use Bigtable for content storage.
AnswerC

Read replicas provide read scalability and can be used for backups.

Why this answer

Option C is correct because adding cross-region read replicas in multiple regions allows the website to offload read queries to replicas located closer to global users, reducing latency during traffic spikes. Cloud SQL for MySQL supports cross-region replicas, which also provide a backup copy of data in another region for disaster recovery, meeting both scalability and backup requirements without changing the database engine.

Exam trap

Google Cloud often tests the distinction between read scalability and disaster recovery, and the trap here is that candidates confuse cross-region read replicas (which provide both read offloading and a backup copy) with automatic failover (which Cloud SQL for MySQL does not support across regions).

How to eliminate wrong answers

Option A is wrong because Cloud Spanner is a globally distributed, horizontally scalable database that requires significant application changes and does not use MySQL, making it an over-engineered migration for a MySQL-based content management system. Option B is wrong because automatic failover to a standby instance in another region is not supported by Cloud SQL for MySQL; Cloud SQL only supports regional high availability with a zonal standby, not cross-region failover. Option D is wrong because Bigtable is a NoSQL wide-column database optimized for analytical workloads and time-series data, not for content management with complex queries and joins, and it would require a complete schema redesign.

138
MCQmedium

A company notices that their Cloud SQL for PostgreSQL instance, as shown in the exhibit, frequently runs out of storage, causing downtime. They have set up automated backups with point-in-time recovery. What is the most likely cause of the storage issue?

A.Transaction logs for point-in-time recovery are consuming disk space.
B.The activation policy is set to ALWAYS, causing continuous writes.
C.The instance tier (db-custom-4-15360) is too low for the workload.
D.The data disk type (PD_SSD) is not suitable for PostgreSQL.
AnswerA

Transaction logs are stored on the same disk and can grow large.

Why this answer

The correct answer is A because Cloud SQL for PostgreSQL uses transaction logs (WAL files) to enable point-in-time recovery (PITR). These logs accumulate on the disk until they are automatically removed, but if the rate of log generation exceeds the cleanup rate or if the backup retention period is long, the logs can fill the disk, causing storage exhaustion and downtime.

Exam trap

Google Cloud often tests the misconception that storage issues are caused by instance tier or disk type, when in fact the hidden culprit is transaction log accumulation from point-in-time recovery settings.

How to eliminate wrong answers

Option B is wrong because the activation policy (ALWAYS vs ON_DEMAND) controls whether the instance is billed continuously, not the frequency of writes; it does not directly cause storage to run out. Option C is wrong because the instance tier (db-custom-4-15360) refers to vCPU and memory, not storage capacity; a low tier might cause performance issues but not storage exhaustion. Option D is wrong because PD_SSD is a fully suitable disk type for PostgreSQL; the storage issue is about capacity, not disk type suitability.

139
MCQmedium

You need to ensure that read operations on a Cloud Spanner database return the most recent committed data. Which read type should you use?

A.Read-only transaction
B.Stale read
C.Partitioned read
D.Strong read
AnswerD

Strong reads return the most recent committed data at read time.

Why this answer

Strong read is the correct choice because it guarantees that read operations return the most recent committed data from Cloud Spanner. Unlike other read types, strong reads access the current state of the database at the time of the read, ensuring external consistency and linearizability, which is critical for applications requiring up-to-date data.

Exam trap

The trap here is that candidates often confuse read-only transactions with strong reads, assuming that any read-only operation automatically returns the latest data, whereas in Spanner, read-only transactions can be configured for stale reads unless explicitly set to strong.

How to eliminate wrong answers

Option A is wrong because a read-only transaction can use stale reads or strong reads depending on the timestamp bound, but by default it does not guarantee the most recent committed data unless explicitly configured with a strong read. Option B is wrong because a stale read intentionally returns data that is older than the current time, trading consistency for lower latency, which does not meet the requirement for the most recent committed data. Option C is wrong because a partitioned read is designed for large-scale, high-throughput reads across partitions and does not inherently provide strong consistency; it typically uses stale reads for performance.

140
MCQhard

A company uses Cloud Spanner. The backup service account 'sa-backup' needs to create and manage backups of the 'orders' database. However, backup creation fails with a permission error. What is the most likely cause?

A.The service account lacks the spanner.databases.read permission.
B.The service account is assigned the role roles/spanner.databaseBackupAdmin, which is a custom role that does not include the spanner.backups.create permission.
C.The backup role must be granted at the instance level, not on the database.
D.The instance 'orders-db' is in a regional configuration, which does not support backups.
AnswerC

The role roles/spanner.backupAdmin must be granted on the instance, not the database, to create backups.

Why this answer

Option C is correct because Cloud Spanner backup permissions must be granted at the instance level, not on the database itself. The service account 'sa-backup' needs the `spanner.backups.create` permission on the instance resource to create backups, and assigning a role like `roles/spanner.databaseBackupAdmin` at the database level does not propagate the necessary instance-level permissions, causing the backup creation to fail with a permission error.

Exam trap

The trap here is that candidates often assume database-level roles are sufficient for database-specific operations like backups, but Cloud Spanner enforces instance-level scoping for backup permissions, leading to a common mistake of assigning roles at the wrong resource hierarchy level.

How to eliminate wrong answers

Option A is wrong because the `spanner.databases.read` permission is for reading database data, not for creating backups; backup creation requires `spanner.backups.create` and related permissions at the instance level. Option B is wrong because `roles/spanner.databaseBackupAdmin` is a predefined role that includes `spanner.backups.create` and other necessary permissions; it is not a custom role lacking that permission, so the failure is not due to a missing permission in the role itself. Option D is wrong because Cloud Spanner supports backups for both regional and multi-region instances; a regional configuration does not prevent backup creation.

141
MCQmedium

A global e-commerce platform needs a database that supports strong consistency across multiple continents and can handle high write throughput. Which database service should they choose?

A.Cloud SQL for PostgreSQL
B.Cloud Firestore
C.Cloud Spanner
D.Cloud Bigtable
AnswerC

Cloud Spanner offers global strong consistency and high write throughput, making it ideal for global e-commerce.

Why this answer

Cloud Spanner is the correct choice because it provides globally distributed, strongly consistent relational database service with synchronous replication across regions and continents, supporting external consistency and high write throughput via TrueTime and Paxos-based consensus. This meets the requirement for strong consistency across multiple continents and high write throughput, which is not achievable with traditional single-region or eventually consistent databases.

Exam trap

The trap here is that candidates often confuse 'strong consistency' with 'eventual consistency' and choose Cloud Bigtable or Cloud Firestore for their high throughput, failing to recognize that only Cloud Spanner provides both strong consistency and horizontal scalability across continents.

How to eliminate wrong answers

Option A is wrong because Cloud SQL for PostgreSQL is a single-region, single-writer database that cannot scale horizontally across continents or provide strong consistency across multiple geographic regions. Option B is wrong because Cloud Firestore is a NoSQL document database that offers strong consistency only within a single region, and its multi-region mode provides eventual consistency, not the strong consistency required across continents. Option D is wrong because Cloud Bigtable is a wide-column NoSQL database designed for high throughput but only supports single-row transactions and eventual consistency across regions, lacking the strong consistency and multi-row transactional support needed for a global e-commerce platform.

142
MCQmedium

A company is migrating an on-premises Oracle database to Cloud SQL for PostgreSQL. The database is 2 TB in size and the network bandwidth to Google Cloud is limited to 500 Mbps. The migration window is 48 hours. Which migration strategy should the Database Engineer recommend?

A.Create a VPN tunnel and use pg_dump/pg_restore over the network.
B.Use Database Migration Service with continuous replication.
C.Export the database to flat files, compress, upload to Cloud Storage, then import to Cloud SQL.
D.Request a dedicated interconnect and then migrate.
AnswerC

File-based migration with compression can work within the bandwidth and time constraints.

Why this answer

Option C is correct because the 2 TB database size and 500 Mbps bandwidth yield a theoretical transfer time of approximately 9.5 hours (2 TB * 1024 GB/TB * 8 bits/byte / 500 Mbps / 3600 seconds/hour), which fits within the 48-hour window. However, pg_dump/pg_restore over a VPN (Option A) would be slower due to TCP overhead and latency, and Database Migration Service with continuous replication (Option B) requires ongoing connectivity and may not complete the initial load within the window. Exporting to flat files, compressing them (e.g., with gzip), uploading to Cloud Storage, and then importing to Cloud SQL leverages high-throughput parallel uploads and avoids network latency issues, making it the most reliable strategy for a one-time migration within the given constraints.

Exam trap

The trap here is that candidates often assume Database Migration Service (Option B) is always the best choice for any migration, but they overlook that continuous replication is unnecessary for a one-time migration and that the initial load still faces the same bandwidth bottleneck as other network-based methods.

How to eliminate wrong answers

Option A is wrong because pg_dump/pg_restore over a VPN tunnel with 500 Mbps bandwidth would be severely impacted by TCP overhead, latency, and potential packet loss, making it unlikely to complete a 2 TB migration within 48 hours. Option B is wrong because Database Migration Service with continuous replication is designed for minimal downtime migrations, but the initial full load still requires transferring the entire 2 TB over the network, which faces the same bandwidth limitation; additionally, continuous replication would be unnecessary and add complexity for a one-time migration. Option D is wrong because requesting a dedicated interconnect is a long-term provisioning process (weeks to months) that cannot be completed within the 48-hour migration window, and it is overkill for a single migration event.

143
MCQeasy

A company is running a MySQL database on Cloud SQL and needs to optimize for high random read/write performance. Which storage type should they choose?

A.SSD persistent disk
B.Local SSD
C.Balanced persistent disk
D.HDD persistent disk
AnswerA

SSD persistent disk offers high IOPS and low latency, ideal for database storage in Cloud SQL.

Why this answer

SSD persistent disk provides consistent low-latency performance for random read/write operations, which is critical for MySQL databases on Cloud SQL. It offers higher IOPS and throughput compared to HDD or balanced persistent disks, making it the optimal choice for high random read/write workloads.

Exam trap

The trap here is that candidates may confuse Local SSD's high performance with persistence, not realizing it is ephemeral and cannot be used for Cloud SQL's managed database service, which requires durable storage.

How to eliminate wrong answers

Option B (Local SSD) is wrong because it is ephemeral and data is lost if the instance stops or fails, making it unsuitable for persistent database storage on Cloud SQL. Option C (Balanced persistent disk) is wrong because it offers lower IOPS and higher latency than SSD persistent disk, which is not ideal for high random read/write performance. Option D (HDD persistent disk) is wrong because it is designed for sequential read/write workloads and has significantly lower IOPS and higher latency, making it unsuitable for random access patterns.

144
MCQhard

A team is reviewing IAM permissions on a Cloud Storage bucket. The exhibit shows the bucket's IAM policy. A developer is using the service account sa-1 and reports that they cannot delete objects in the bucket. What is the likely reason?

A.The etag value must be updated before any delete operation.
B.The service account sa-1 does not have the storage.objects.delete permission.
C.A condition is attached to the objectViewer role that prevents deletion.
D.The policy only allows deletion by the service account sa-2.
AnswerB

objectViewer only grants read access.

Why this answer

The IAM policy shown in the exhibit grants the `objectViewer` role to service account `sa-1`, which includes the `storage.objects.get` and `storage.objects.list` permissions but does not include `storage.objects.delete`. Without the `storage.objects.delete` permission, the developer cannot delete objects in the bucket, even if they can view them. The correct answer is B because the service account lacks the necessary delete permission.

Exam trap

Google Cloud often tests the distinction between viewing and deleting objects, where candidates mistakenly assume that having read access (objectViewer) also allows deletion, or that a condition or etag is the blocking factor, rather than recognizing the missing delete permission.

How to eliminate wrong answers

Option A is wrong because the `etag` field in an IAM policy is used for optimistic concurrency control during policy updates, not for object deletion operations; object deletion does not require updating the etag. Option C is wrong because the exhibit shows no conditions attached to the `objectViewer` role; even if a condition existed, it would restrict access further, but the core issue is the lack of the delete permission. Option D is wrong because the policy does not explicitly restrict deletion to `sa-2`; it only grants `storage.objectAdmin` to `sa-2`, which includes delete permission, but this does not prevent `sa-1` from deleting if it had the permission.

← PreviousPage 2 of 2 · 144 questions total

Ready to test yourself?

Try a timed practice session using only Plan and manage database infrastructure questions.