Professional Cloud Database Engineer Free Practice Questions — Page 7
Question 61
Your organization has a production Cloud SQL for MySQL instance. Your instance is configured with 16 vCPUs and 104 GB of RAM that is running between 90% and 100% CPU utilization for most of the day. You need to scale up the database and add vCPUs with minimal interruption and effort. What should you do?
A. Issue a gcloud sql instances patch command to increase the number of vCPUs.
B. Update a MySQL database flag to increase the number of vCPUs.
C. Issue a gcloud compute instances update command to increase the number of vCPUs.
D. Back up the database, create an instance with additional vCPUs, and restore the database.
Show Answer
Correct Answer: A
Explanation: Cloud SQL instances can be vertically scaled by modifying instance settings using `gcloud sql instances patch`, including increasing the number of vCPUs. This approach requires minimal effort and typically only a brief restart. Database flags cannot change underlying CPU resources, `gcloud compute instances update` applies only to Compute Engine VMs, and backing up and restoring to a new instance would cause significantly more interruption.
Question 62
You are running a transactional application on Cloud SQL for PostgreSQL in Google Cloud. The database is running in a high availability configuration within one region. You have encountered issues with data and want to restore to the last known pristine version of the database. What should you do?
A. Create a clone database from a read replica database, and restore the clone in the same region.
B. Create a clone database from a read replica database, and restore the clone into a different zone.
C. Use the Cloud SQL point-in-time recovery (PITR) feature. Restore the copy from two hours ago to a new database instance.
D. Use the Cloud SQL database import feature. Import last week's dump file from Cloud Storage.
Show Answer
Correct Answer: C
Explanation: For Cloud SQL for PostgreSQL with high availability, the correct way to recover from data corruption or accidental changes is to use point-in-time recovery (PITR). PITR allows restoring the database to an exact moment before the issue occurred using automatic backups and WAL logs. Read replicas would already contain the corrupted data, and importing an old dump would be slower and less precise. PITR restores to a new instance, which is the recommended and supported recovery approach.
Question 63
You are configuring a brand new Cloud SQL for PostgreSQL database instance in Google Cloud. Your application team wants you to deploy one primary instance, one standby instance, and one read replica instance. You need to ensure that you are following Google-recommended practices for high availability. What should you do?
A. Configure the primary instance in zone A, the standby instance in zone C, and the read replica in zone B, all in the same region.
B. Configure the primary and standby instances in zone A and the read replica in zone B, all in the same region.
C. Configure the primary instance in one region, the standby instance in a second region, and the read replica in a third region.
D. Configure the primary, standby, and read replica instances in zone A, all in the same region.
Show Answer
Correct Answer: A
Explanation: Cloud SQL for PostgreSQL high availability uses a regional (HA) configuration where the primary and standby instances must be in the same region but different zones, with synchronous replication between zones. Google recommends placing them in separate zones to protect against zonal failures. Read replicas are also regional resources and, for HA best practices, should be placed in a different zone within the same region. Option A correctly distributes the primary, standby, and read replica across different zones in the same region, aligning with Google-recommended HA practices.
Question 64
Your organization has a security policy to ensure that all Cloud SQL for PostgreSQL databases are secure. You want to protect sensitive data by using a key that meets specific locality or residency requirements. Your organization needs to control the key's lifecycle activities. You need to ensure that data is encrypted at rest and in transit. What should you do?
A. Create the database with Google-managed encryption keys.
B. Create the database with customer-managed encryption keys.
C. Create the database persistent disk with Google-managed encryption keys.
D. Create the database persistent disk with customer-managed encryption keys.
Show Answer
Correct Answer: B
Explanation: The requirement is to control the encryption key’s lifecycle and meet locality or residency requirements while ensuring encryption at rest and in transit. Cloud SQL supports customer-managed encryption keys (CMEK) at the instance level using Cloud KMS, which allows the organization to control key rotation, disablement, and location. Google-managed keys do not provide this control, and persistent disks are managed by Cloud SQL and are not configured independently. Therefore, creating the database (Cloud SQL instance) with customer-managed encryption keys is the correct choice.
Question 65
Your organization has an existing app that just went viral. The app uses a Cloud SQL for MySQL backend database that is experiencing slow disk performance while using hard disk drives (HDDs). You need to improve performance and reduce disk I/O wait times. What should you do?
A. Export the data from the existing instance, and import the data into a new instance with solid-state drives (SSDs).
B. Edit the instance to change the storage type from HDD to SSD.
C. Create a high availability (HA) failover instance with SSDs, and perform a failover to the new instance.
D. Create a read replica of the instance with SSDs, and perform a failover to the new instance
Show Answer
Correct Answer: A
Explanation: In Cloud SQL for MySQL, the choice of storage type (HDD vs SSD) is permanent once an instance is created. You cannot edit an existing instance to change disk type, and HA failover replicas or read replicas inherit the same disk type as the primary. Therefore, to move from HDD to SSD and improve disk I/O performance, you must export the data from the existing HDD-backed instance and import it into a newly created instance that uses SSD storage.
Question 66
You are configuring a new application that has access to an existing Cloud Spanner database. The new application reads from this database to gather statistics for a dashboard. You want to follow Google-recommended practices when granting Identity and Access Management (IAM) permissions. What should you do?
A. Reuse the existing service account that populates this database.
B. Create a new service account, and grant it the Cloud Spanner Database Admin role.
C. Create a new service account, and grant it the Cloud Spanner Database Reader role.
D. Create a new service account, and grant it the spanner.databases.select permission.
Show Answer
Correct Answer: C
Explanation: Follow least-privilege and service-account isolation best practices. Create a new service account for the new application and grant it a predefined IAM role rather than individual permissions. Since the app only reads data, Cloud Spanner Database Reader provides the required read/query permissions without excessive privileges. Admin is too broad, reusing an existing service account is discouraged, and granting a single permission is not recommended over roles.
Question 67
Your retail organization is preparing for the holiday season. Use of catalog services is increasing, and your DevOps team is supporting the Cloud SQL databases that power a microservices-based application. The DevOps team has added instrumentation through Sqlcommenter. You need to identify the root cause of why certain microservice calls are failing. What should you do?
A. Watch Query Insights for long running queries.
B. Watch the Cloud SQL instance monitor for CPU utilization metrics.
C. Watch the Cloud SQL recommenders for overprovisioned instances.
D. Watch Cloud Trace for application requests that are failing.
Show Answer
Correct Answer: A
Explanation: Sqlcommenter adds application context to SQL statements and integrates directly with Cloud SQL Query Insights. Query Insights lets you correlate failing or slow microservice calls with the exact database queries and their originating services, which is essential for root cause analysis. Cloud Trace does not natively trace Cloud SQL queries, CPU metrics are too coarse, and recommenders are unrelated to request failures.
Question 68
You are designing a database architecture for a global application that stores information about public parks worldwide. The application uses the database for read-only purposes, and a centralized batch job updates the database nightly. You want to select an open source, SQL-compliant database. What should you do?
A. Use Bigtable with multi-region clusters.
B. Use Memorystore for Redis with multi-zones within a region.
C. Use Cloud SQL for PostgreSQL with cross-region replicas.
D. Use Cloud Spanner with multi-region configuration.
Show Answer
Correct Answer: C
Explanation: The requirements are an open source, SQL‑compliant database for a read‑heavy workload with centralized nightly updates and global read access. Bigtable is not SQL, and Memorystore is not a SQL database and is regional only. Cloud Spanner, while globally distributed, is not an open source database engine and is unnecessary complexity for a mostly read‑only workload. Cloud SQL for PostgreSQL uses a truly open source SQL database and supports cross‑region read replicas, which fits global read access with centralized writes.
Question 69
Your company is migrating their MySQL database to Cloud SQL and cannot afford any planned downtime during the month of December. The company is also concerned with cost, so you need the most cost-effective solution. What should you do?
A. Open a support ticket in Google Cloud to prevent any maintenance in that MySQL instance during the month of December.
B. Use Cloud SQL maintenance settings to prevent any maintenance during the month of December.
C. Create MySQL read replicas in different zones so that, if any downtime occurs, the read replicas will act as the primary instance during the month of December.
D. Create a MySQL regional instance so that, if any downtime occurs, the standby instance will act as the primary instance during the month of December.
Show Answer
Correct Answer: B
Explanation: Cloud SQL provides maintenance settings that allow you to define a maintenance deny period of up to 90 days, during which Google will not perform planned maintenance. This meets the requirement of zero planned downtime in December and is the most cost-effective option because it does not require additional replicas or regional instances. Opening a support ticket cannot override managed maintenance, and replicas or regional instances add extra cost.
Question 70
Your online delivery business that primarily serves retail customers uses Cloud SQL for MySQL for its inventory and scheduling application. The required recovery time objective (RTO) and recovery point objective (RPO) must be in minutes rather than hours as a part of your high availability and disaster recovery design. You need a high availability configuration that can recover without data loss during a zonal or a regional failure. What should you do?
A. Set up all read replicas in a different region using asynchronous replication.
B. Set up all read replicas in the same region as the primary instance with synchronous replication.
C. Set up read replicas in different zones of the same region as the primary instance with synchronous replication, and set up read replicas in different regions with asynchronous replication.
D. Set up read replicas in different zones of the same region as the primary instance with asynchronous replication, and set up read replicas in different regions with synchronous replication.
Show Answer
Correct Answer: C
Explanation: The requirement is RTO/RPO in minutes with no data loss during zonal or regional failure. In Cloud SQL for MySQL, this is achieved by a highly available configuration with a synchronous standby (failover replica) in a different zone within the same region to avoid data loss, combined with cross‑region replicas for regional disaster recovery. Option C best matches this design intent: same‑region, multi‑zone synchronous replication for HA and cross‑region asynchronous replication for regional recovery. The other options either rely only on asynchronous replication (which risks data loss) or place replicas in ways that do not meet both HA and DR requirements.
$19
Get all 167 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.