Google

Professional Cloud Database Engineer Free Practice Questions — Page 9

Question 81

Your company is shutting down their on-premises data center and migrating their Oracle databases using Oracle Real Application Clusters (RAC) to Google Cloud. You want minimal to no changes to the applications during the database migration. What should you do?

A. Migrate the Oracle databases to Cloud Spanner.
B. Migrate the Oracle databases to Compute Engine.
C. Migrate the Oracle databases to Cloud SQL.
D. Migrate the Oracle databases to Bare Metal Solution for Oracle.
Show Answer
Correct Answer: D
Explanation:
Bare Metal Solution for Oracle is designed to run Oracle databases, including Oracle RAC, with minimal or no application changes. Cloud Spanner requires application and schema changes, Cloud SQL does not support Oracle, and Compute Engine is not the recommended lift-and-shift target for Oracle RAC requiring full compatibility.

Question 82

You are managing a Cloud SQL for PostgreSQL instance in Google Cloud. You need to test the high availability of your Cloud SQL instance by performing a failover. You want to use the cloud command. What should you do?

A. Use gcloud sql instances failover <PrimaryInstanceName>.
B. Use gcloud sql instances failover <ReplicaInstanceName>.
C. Use gcloud sql instances promote-replica <PrimaryInstanceName>.
D. Use gcloud sql instances promote-replica <ReplicaInstanceName>.
Show Answer
Correct Answer: A
Explanation:
To test high availability for a Cloud SQL for PostgreSQL HA instance, you initiate a failover on the primary instance using the failover command. The promote-replica command is for read replicas, not HA failover. The failover command targets the primary instance, which then switches to its standby.

Question 83

You use Python scripts to generate weekly SQL reports to assess the state of your databases and determine whether you need to reorganize tables or run statistics. You want to automate this report but need to minimize operational costs and overhead. What should you do?

A. Create a VM in Compute Engine, and run a cron job.
B. Create a Cloud Composer instance, and create a directed acyclic graph (DAG).
C. Create a Cloud Function, and call the Cloud Function using Cloud Scheduler.
D. Create a Cloud Function, and call the Cloud Function from a Cloud Tasks queue.
Show Answer
Correct Answer: C
Explanation:
Use a Cloud Function to run the Python reporting logic and trigger it on a weekly schedule with Cloud Scheduler. This is a serverless, low-overhead, and cost-effective approach for periodic jobs. A Compute Engine VM incurs ongoing management and cost, Cloud Composer is excessive for a simple scheduled task, and Cloud Tasks is designed for asynchronous task dispatch rather than cron-style scheduling.

Question 84

Your company is using Cloud SQL for MySQL with an internal (private) IP address and wants to replicate some tables into BigQuery in near-real time for analytics and machine learning. You need to ensure that replication is fast and reliable and uses Google-managed services. What should you do?

A. Develop a custom data replication service to send data into BigQuery.
B. Use Cloud SQL federated queries.
C. Use Database Migration Service to replicate tables into BigQuery.
D. Use Datastream to capture changes, and use Dataflow to write those changes to BigQuery.
Show Answer
Correct Answer: D
Explanation:
Datastream is Google-managed change data capture (CDC) for MySQL and integrates with Dataflow templates to stream changes into BigQuery with low latency. Cloud SQL federated queries do not replicate data, Database Migration Service does not target BigQuery, and building a custom replication service is unnecessary given managed services.

Question 85

You are designing a physician portal app in Node.js. This application will be used in hospitals and clinics that might have intermittent internet connectivity. If a connectivity failure occurs, the app should be able to query the cached data. You need to ensure that the application has scalability, strong consistency, and multi-region replication. What should you do?

A. Use Firestore and ensure that the PersistenceEnabled option is set to true.
B. Use Memorystore for Memcached.
C. Use Pub/Sub to synchronize the changes from the application to Cloud Spanner.
D. Use Table.read with the exactStaleness option to perform a read of rows in Cloud Spanner.
Show Answer
Correct Answer: A
Explanation:
The requirements include offline querying during intermittent connectivity, scalability, strong consistency, and multi-region replication. Cloud Firestore supports offline persistence through client-side caching (PersistenceEnabled), automatically serving cached data when offline and synchronizing when connectivity returns. Firestore also provides strong consistency and supports multi-region deployments. The other options do not provide offline client-side query capability: Memorystore is an in-memory cache service, Pub/Sub with Spanner does not address offline local access, and exactStaleness is a Spanner read option rather than an offline caching solution.

Question 86

You manage a production MySQL database running on Cloud SQL at a retail company. You perform routine maintenance on Sunday at midnight when traffic is slow, but you want to skip routine maintenance during the year-end holiday shopping season. You need to ensure that your production system is available 24/7 during the holidays. What should you do?

A. Define a maintenance window on Sundays between 12 AM and 1 AM, and deny maintenance periods between November 1 and January 15.
B. Define a maintenance window on Sundays between 12 AM and 5 AM, and deny maintenance periods between November 1 and February 15.
C. Build a Cloud Composer job to start a maintenance window on Sundays between 12 AM and 1AM, and deny maintenance periods between November 1 and January 15.
D. Create a Cloud Scheduler job to start maintenance at 12 AM on Sundays. Pause the Cloud Scheduler job between November 1 and January 15.
Show Answer
Correct Answer: A
Explanation:
Cloud SQL supports configuring a one-hour weekly maintenance window and maintenance deny periods of up to 90 days. A Sunday 12 AM–1 AM maintenance window with a deny period from November 1 to January 15 fits these constraints. Option B exceeds both the one-hour window and the maximum deny period. Options C and D describe mechanisms that do not control Cloud SQL's managed maintenance scheduling.

Question 87

You want to migrate an on-premises 100 TB Microsoft SQL Server database to Google Cloud over a 1 Gbps network link. You have 48 hours allowed downtime to migrate this database. What should you do? (Choose two.)

A. Use a change data capture (CDC) migration strategy.
B. Move the physical database servers from on-premises to Google Cloud.
C. Keep the network bandwidth at 1 Gbps, and then perform an offline data migration.
D. Increase the network bandwidth to 2 Gbps, and then perform an offline data migration.
E. Increase the network bandwidth to 10 Gbps, and then perform an offline data migration.
Show Answer
Correct Answer: A, E
Explanation:
A 100 TB database cannot be transferred over a 1 Gbps or 2 Gbps network within a 48-hour downtime window using a purely offline migration. An offline migration over 10 Gbps can complete within the allowed downtime, and using change data capture (CDC) is the standard approach to minimize downtime by synchronizing changes before the final cutover. Moving physical servers is not a supported migration strategy.

Question 88

You need to provision several hundred Cloud SQL for MySQL instances for multiple project teams over a one-week period. You must ensure that all instances adhere to company standards such as instance naming conventions, database flags, and tags. What should you do?

A. Automate instance creation by writing a Dataflow job.
B. Automate instance creation by setting up Terraform scripts.
C. Create the instances using the Google Cloud Console UI.
D. Create clones from a template Cloud SQL instance.
Show Answer
Correct Answer: B
Explanation:
Terraform is the appropriate infrastructure-as-code tool for provisioning hundreds of Cloud SQL instances consistently. It enables reusable templates, enforces naming conventions and configuration standards (such as database flags and labels/tags), and supports automated, repeatable deployments. Dataflow is for data processing, the Cloud Console is not suitable at this scale, and cloning a template instance does not provide the same level of standardized, automated infrastructure management.

Question 89

Your organization is migrating 50 TB Oracle databases to Bare Metal Solution for Oracle. Database backups must be available for quick restore. You also need to have backups available for 5 years. You need to design a cost-effective architecture that meets a recovery time objective (RTO) of 2 hours and recovery point objective (RPO) of 15 minutes. What should you do?

A. 1 Create the database on a Bare Metal Solution server with the database running on flash storage. 2. Keep a local backup copy on all flash storage. 3. Keep backups older than one day stored in Actifio OnVault storage.
B. 1 Create the database on a Bare Metal Solution server with the database running on flash storage. 2. Keep a local backup copy on standard storage. 3. Keep backups older than one day stored in Actifio OnVault storage.
C. 1. Create the database on a Bare Metal Solution server with the database running on flash storage. 2. Keep a local backup copy on standard storage. 3. Use the Oracle Recovery Manager (RMAN) backup utility to move backups older than one day to a Coldline Storage bucket.
D. 1. Create the database on a Bare Metal Solution server with the database running on flash storage. 2. Keep a local backup copy on all flash storage. 3. Use the Oracle Recovery Manager (RMAN) backup utility to move backups older than one day to an Archive Storage bucket.
Show Answer
Correct Answer: B
Explanation:
Use flash storage for the production database, keep recent local backups on lower-cost standard storage for fast restores, and use Actifio OnVault for long-term retention. This provides quick local recovery to satisfy the 2-hour RTO while leveraging Actifio's backup management and efficient long-term retention for 5 years more appropriately than manually tiering RMAN backups to Cloud Storage. Keeping local backups on flash unnecessarily increases cost, and Archive/Coldline retrieval is less suitable for operational backup workflows.

Question 90

Your project is using Bigtable to store data that should not be accessed from the public internet under any circumstances, even if the requestor has a valid service account key. You need to secure access to this data. What should you do?

A. Use Identity and Access Management (IAM) for Bigtable access control.
B. Use VPC Service Controls to create a trusted network for the Bigtable service.
C. Use customer-managed encryption keys (CMEK).
D. Use Google Cloud Armor to add IP addresses to an allowlist.
Show Answer
Correct Answer: B
Explanation:
VPC Service Controls creates a security perimeter around supported Google Cloud services such as Cloud Bigtable, preventing data access from outside the trusted perimeter even if valid credentials (such as a leaked service account key) are used. IAM controls identity but not network/context boundaries, CMEK protects data at rest rather than access paths, and Cloud Armor protects HTTP(S) applications, not Bigtable API access.

$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.