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 instance machine sizing (including vCPU count) is modified by patching the Cloud SQL instance settings. Increasing CPUs requires updating the instance configuration, which Cloud SQL applies with a restart, making it the minimal-effort scaling approach. MySQL flags cannot change allocated vCPUs, Compute Engine commands do not manage Cloud SQL instances, and recreating/restoring the instance is unnecessary and causes 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: The correct choice is C. In Cloud SQL for PostgreSQL, point-in-time recovery (PITR) is designed to recover from logical data corruption or accidental changes by restoring the instance to a specific time within the backup retention window. PITR restores to a new Cloud SQL instance, allowing you to verify the restored data before redirecting your application. HA provides a failover replica, not a read replica, so A and B are not applicable. Importing a week-old dump (D) would lose more recent valid transactions and is not the best way to restore to the last known pristine state.
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: For Cloud SQL for PostgreSQL high availability, the primary and standby form a regional HA configuration and must be in the same region but in different zones. To maximize resilience, the read replica should also be placed in a different zone rather than sharing the primary or standby zone. Option A distributes all three across separate zones within the same region, matching 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: Customer-managed encryption keys (CMEK) allow the organization to control key lifecycle activities and satisfy key locality/residency requirements while Cloud SQL encrypts data at rest. Cloud SQL also supports encryption in transit using TLS. The encryption choice is configured for the Cloud SQL instance, not by creating or managing the underlying persistent disk directly.
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 storage type (HDD vs SSD) is fixed at instance creation and cannot be changed later. HA failover instances and read replicas inherit the primary instance's storage characteristics rather than allowing an HDD-to-SSD conversion. Therefore, to migrate from HDD to SSD, you must create a new SSD-backed instance and export/import the data.
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: Use a dedicated service account for the new application and grant the least-privilege predefined role needed for read-only access. The Cloud Spanner Database Reader role provides the required read/query permissions without administrative capabilities. Reusing another application's service account is discouraged, Database Admin is overly permissive, and IAM grants roles rather than individual permissions in normal practice; a single permission is also insufficient for typical database access.
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 enriches SQL queries with application context that integrates with Cloud SQL Query Insights, allowing correlation of slow or problematic queries back to the originating microservice and code path. Query Insights is specifically designed to identify root causes of database performance issues. CPU metrics and recommenders do not identify failing microservice calls, and Cloud Trace is not the primary Cloud SQL feature leveraged by Sqlcommenter for this purpose.
Sources:
https://cloud.google.com/mysql/optimization
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 requirement is an open source, SQL-compliant database for a globally accessed but read-only application with nightly centralized updates. Cloud SQL for PostgreSQL uses the open source PostgreSQL database and supports cross-region read replicas to serve global read traffic. Bigtable is not SQL-compliant in the relational sense, Memorystore is an in-memory cache rather than a SQL database, and Cloud Spanner is not an open source database engine even though it supports SQL dialects.
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 including a maintenance deny period (up to 90 days), allowing you to prevent planned maintenance during a specified window such as December. This satisfies the requirement of avoiding planned downtime without incurring the extra cost of regional instances or read replicas. Opening a support ticket is not the supported mechanism for this.
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 intended Google Cloud architecture is Cloud SQL High Availability within a region (which uses synchronous replication to a standby in another zone for zero/near-zero RPO during zonal failures) combined with cross-region asynchronous replicas for disaster recovery. The question is imprecisely worded because Cloud SQL read replicas themselves are asynchronous; the synchronous component is the HA standby, not a read replica. Despite that terminology issue, option C best matches the intended design.
Sources:
https://cloud.google.com/blog/products/databases/managing-high-availability-with-cloud-sql-features
$19
Get all 168 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.