Professional Cloud Database Engineer Free Practice Questions — Page 3
Question 21
Your company is rapidly expanding its user base across North America, nearly doubling in the last 6 months. This expansion causes a substantial increase in query volume on your mission-critical Cloud SQL database. This has led to noticeable performance issues and slower query response times. You suspect that your Cloud SQL instance may not be able to handle the incremental load. You need to identify the root cause of this performance bottleneck and ensure that your database can scale with your growing user base. What should you do?
A. Migrate the database to Spanner.
B. Evaluate the application connection pooling configuration settings.
C. Review Cloud SQL System Insights for the instance, and analyze CPU, memory, and storage utilization metrics.
D. Create two Cloud SQL instances, and split the workload between them.
Show Answer
Correct Answer: C
Explanation: The first step is to identify the root cause of the performance bottleneck. Cloud SQL System Insights and monitoring metrics (CPU, memory, disk I/O, storage) reveal whether the instance is resource-constrained under increased load. Only after confirming the constraint should you consider scaling, tuning pooling, or migrating. The other options are premature without diagnosis.
Question 22
You are the DBA working at a large bank in Europe. Your business-critical banking application runs on Oracle 12.2 in your on-premises data center. You decided to modernize your on-premises Oracle database by migrating to AlloyDB. You must meet the following requirements:
• Remain on-premises and maintain open-source portability.
• Meet regulatory requirements for data residency.
• Support both OLTP and OLAP workloads.
• Maintain high availability (HA) mode and automatic failover.
What should you do?
A. Deploy AlloyDB Omni in a standalone VM on-premises, and set up disaster recovery (DR) in AlloyDB for PostgreSQL.
B. Migrate to AlloyDB for PostgreSQL by using Database Migration Service.
C. Deploy Kubernetes-based AlloyDB Omni database cluster on-premises. Enable HA by using the AlloyDB Omni Kubernetes operator, and migrate your Oracle database to Omni.
D. Deploy AlloyDB Omni as a docker-based container in your on-premises VM, enable HA for it, and migrate your Oracle database to the Omni container.
Show Answer
Correct Answer: C
Explanation: AlloyDB Omni is designed for on‑premises and open‑source–portable deployments. Running it as a Kubernetes-based cluster on‑premises allows you to meet data residency and regulatory requirements, supports both OLTP and OLAP workloads, and provides built‑in high availability and automatic failover via the AlloyDB Omni Kubernetes operator. The other options either rely on managed cloud AlloyDB, lack proper HA, or do not align with supported on‑premises architectures.
Question 23
You have an application that performs numerous reads and writes all day running in a single Bigtable cluster. A new batch analytics job needs to read the same data and you want to make sure that the new job does not affect the existing workload. What should you do?
A. Scale up the Bigtable instance by manually adding more nodes.
B. Add a new cluster to the existing instance, and enable multi-cluster routing in the app profile.
C. Add a new cluster to the existing instance, and isolate the workloads with two app profiles.
D. Scale up the Bigtable instance by enabling Autoscaling.
Show Answer
Correct Answer: C
Explanation: To prevent the new batch analytics job from impacting the existing read/write workload, you should add a second cluster to the same Bigtable instance and use separate app profiles to isolate traffic. App profiles allow you to direct different workloads to different clusters, ensuring resource isolation. Simply scaling up or autoscaling a single cluster does not provide isolation, and multi-cluster routing would spread load rather than separate it.
Question 24
You are setting up a new AlloyDB instance and want users to be able to use their existing Identity and Access Management (IAM) identities to connect to AlloyDB. You have performed the following steps:
• Manually enabled IAM authentication on the AlloyDB instance
• Granted the alloydb.databaseUser and ser-viceusage.serviceUsageconsumer IAM roles to the users
• Created new AlloyDB database users based on corresponding IAM identities
Users are able to connect but are reporting that they are not able to SELECT from application tables. What should you do?
A. Grant the new database users access privileges to the appropriate tables.
B. Grant the alloydb.client IAM role to each user.
C. Grant the alloydb.viewer IAM role to each user.
D. Grant the alloydb.alloydbreplica IAM role to each user.
Show Answer
Correct Answer: A
Explanation: IAM authentication only controls how users authenticate to AlloyDB, not what they can do inside the database. Even though the users can connect successfully using their IAM identities, they still need standard PostgreSQL database privileges (such as SELECT) on schemas and tables. Therefore, you must grant the appropriate table or schema privileges to the new database users.
Question 25
You are using Memorystore for Redis to cache frequently accessed data and improve your application's performance. Recently, your application is experiencing sudden spikes in latency when interacting with the Memorystore for Redis instance. Upon checking the logs, you discover a high number of "evicted keys" messages. You want to reduce the occurrences of latency spikes and their impact on the application. What should you do?
A. Increase the time to live (TTL) value of all the keys within the cache.
B. Redeploy your application to the same zone as the Memorystore instance.
C. Scale the Memorystore instance to a larger memory size.
D. Enable read replicas. Deploy additional read replica instances to distribute read workloads.
Show Answer
Correct Answer: C
Explanation: The presence of a high number of evicted keys indicates that the Redis instance is running out of memory and is evicting data to make space. These evictions cause cache misses and recomputation, leading to latency spikes. Scaling the Memorystore instance to a larger memory size reduces evictions and stabilizes latency. Increasing TTL would worsen memory pressure, redeploying the app does not address evictions, and read replicas do not solve memory exhaustion.
Question 26
You are the DBA of your organization. You provided a cloned instance from the production Cloud SQL for PostgreSQL database to the developers for testing purposes. After the creation of the clone, your developers notice missing data in one of the recently altered tables. What should you do to ensure that all data is included?
A. Take a back up of the production database, and restore it to another Cloud SQL for PostgreSQL instance. Provide access to the new instance to the developers.
B. Check for missing roles and privileges in the cloned Cloud SQL instance. Grant missing privileges to the developers.
C. Clone the current production database, and restore it to an earlier point-in-time (PITR). Provide access to the cloned instance to the developers.
D. Dump the production database to a file. Modify the dumped file to ALTER TABLE to SET LOGGED on tables that were unlogged in production. Reload the data in the new Cloud SQL for PostgreSQL instance.
Show Answer
Correct Answer: D
Explanation: Cloud SQL clone operations rely on backups. PostgreSQL UNLOGGED tables do not have their data included in backups, so recently altered tables that were set UNLOGGED can appear empty or missing data in a clone. To ensure all data is included, the data must be dumped from production, the tables altered to LOGGED, and then reloaded into a new Cloud SQL instance.
Question 27
Your company is developing a 24/7, global, real-time analytics platform that needs to store and process large amounts of versioned time-series data. You need to design a platform that is highly scalable to accommodate traffic spikes and ensure high availability for mission-critical operations. What should you do?
A. Implement a single-cluster Bigtable instance with autoscaling enabled and row key design.
B. Implement a multi-cluster Bigtable instance with autoscaling enabled and optimal schema design.
C. Implement a multi-cluster Bigtable instance across multiple regions with replication.
D. Implement AlloyDB for PostgreSQL to handle the analytical workload using read replica.
Show Answer
Correct Answer: C
Explanation: The requirements call for a global, mission-critical, 24/7 platform with high availability and scalability for versioned time-series data. Cloud Bigtable is designed for high-throughput time-series workloads, and only a multi-cluster, multi-region deployment with replication provides global availability, resilience to regional failures, and low-latency access worldwide. Autoscaling and schema design are important, but without multi-region replication they do not meet the global high-availability requirement.
Question 28
You are migrating an on-premises database to Spanner. There are a few tables, each with a few hundred records that do not have a primary key on the source database. You need to migrate all of the tables over to the news database while avoiding hot-spotting issues. What should you do?
A. Load the data into Spanner, and designate a primary key later based on business need.
B. Use the GENERATE_UUID() function to generate universally unique identifier (UUID) values with the STRING(36) data type when you do the migration.
C. During the migration, swap the order of keys so that the column that contains the monotonically increasing or decreasing value is the first key par.
D. Migrate the tables with no primary key to maintain consistency with source.
Show Answer
Correct Answer: B
Explanation: Cloud Spanner requires every table to have a primary key. To avoid hot-spotting, the primary key should not be monotonically increasing. Generating UUID values (e.g., with GENERATE_UUID() stored as STRING(36)) provides a uniformly distributed key, allows migration of tables that previously lacked a primary key, and avoids write hotspots. The other options either violate Spanner requirements or increase hotspot risk.
Question 29
You are migrating your critical production database from Amazon RDS for MySQL to Cloud SQL for MySQL by using Google Cloud's Database Migration Service. You want to keep disruption to your production database to a minimum and, at the same time, optimize migration performance. What should you do?
A. Create and start multiple Database Migration Service jobs to migrate your database to the target Cloud SQL for MySQL instance.
B. Upgrade the Amazon RDS for MySQL primary instance to an instance with more vCPUs and memory, and then run Google Cloud's Database Migration Service.
C. Create a single Database Migration Service migration job with initial load parallelism configured to maximum on the source Amazon RDS for MySQL read replica.
D. Create a single Database Migration Service migration job with initial Load Parallelism configured to Maximum on the Amazon RDS for MySQL primary instance.
Show Answer
Correct Answer: C
Explanation: To minimize disruption to the production database while optimizing migration performance, the initial load should not stress the primary instance. Using a read replica as the source offloads the heavy initial data copy from the production primary, and configuring initial load parallelism to maximum speeds up the migration. Creating multiple jobs or running parallelism on the primary would increase risk, and simply upgrading the primary adds cost without eliminating disruption.
Question 30
You are running a Cloud SQL for PostgreSQL 13 Enterprise Edition instance. During an audit, you discovered that the write-ahead logs used for point-in-time recovery (PITR) are stored on disk. You need to store PITR logs in a Cloud Storage bucket going forward. How should you do this without compromising recoverability or losing the current PITR logs?
A. Clone the instance. Create a new instance with PITR retention set to 30 days.
B. Change the transaction logs (WAL) retention period.
C. Upgrade to Enterprise Plus Edition.
D. Disable PITR, then enable PITR.
Show Answer
Correct Answer: C
Explanation: In Cloud SQL for PostgreSQL, the storage location of PITR write-ahead logs is tied to the instance edition. Enterprise Edition stores WALs on disk, while Enterprise Plus Edition stores PITR logs in Cloud Storage. Google supports upgrading the edition in place, which moves PITR log storage to Cloud Storage without breaking recoverability or discarding existing PITR data. Changing retention settings, disabling/re-enabling PITR, or cloning the instance would not safely migrate existing PITR logs.
$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.