πŸ”

PCDBE β€” questions

Page 8 of 9 Β· 170 total questions.

Topic 1 Β· Question 141

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?

  • AScale up the Bigtable instance by manually adding more nodes.
  • BAdd a new cluster to the existing instance, and enable multi-cluster routing in the app profile.
  • CAdd a new cluster to the existing instance, and isolate the workloads with two app profiles. (correct answer)
  • DScale up the Bigtable instance by enabling Autoscaling.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Add a new cluster to the existing instance, and isolate the workloads with two app profiles.

Topic 1 Β· Question 142

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?

  • AGrant the new database users access privileges to the appropriate tables. (correct answer)
  • BGrant the alloydb.client IAM role to each user.
  • CGrant the alloydb.viewer IAM role to each user.
  • DGrant the alloydb.alloydbreplica IAM role to each user.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Grant the new database users access privileges to the appropriate tables.

Topic 1 Β· Question 143

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?

  • AIncrease the time to live (TTL) value of all the keys within the cache.
  • BRedeploy your application to the same zone as the Memorystore instance.
  • CScale the Memorystore instance to a larger memory size. (correct answer)
  • DEnable read replicas. Deploy additional read replica instances to distribute read workloads.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Scale the Memorystore instance to a larger memory size.

Explanation

Memorystore provides managed in-memory Redis/Memcached caching to reduce latency and offload databases. This option decouples the components so they scale independently and absorb load spikes.

Topic 1 Β· Question 144

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?

  • ALoad the data into Spanner, and designate a primary key later based on business need.
  • BUse the GENERATE_UUID() function to generate universally unique identifier (UUID) values with the STRING(36) data type when you do the migration. (correct answer)
  • CDuring the migration, swap the order of keys so that the column that contains the monotonically increasing or decreasing value is the first key par.
  • DMigrate the tables with no primary key to maintain consistency with source.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use the GENERATE_UUID() function to generate universally unique identifier (UUID) values with the STRING(36) data type when you do the migration.

Topic 1 Β· Question 145

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?

  • ATake 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.
  • BCheck for missing roles and privileges in the cloned Cloud SQL instance. Grant missing privileges to the developers.
  • CClone the current production database, and restore it to an earlier point-in-time (PITR). Provide access to the cloned instance to the developers.
  • DDump 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. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option 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.

Explanation

Cloud SQL is a managed relational database (MySQL/PostgreSQL/SQL Server) that handles patching, backups, and failover.

Topic 1 Β· Question 146

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?

  • AImplement a single-cluster Bigtable instance with autoscaling enabled and row key design.
  • BImplement a multi-cluster Bigtable instance with autoscaling enabled and optimal schema design. (correct answer)
  • CImplement a multi-cluster Bigtable instance across multiple regions with replication.
  • DImplement AlloyDB for PostgreSQL to handle the analytical workload using read replica.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Implement a multi-cluster Bigtable instance with autoscaling enabled and optimal schema design.

Explanation

Cloud Bigtable is a managed, low-latency NoSQL wide-column store for very high-throughput workloads. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 147

You have a non-critical business application running on Google Kubernetes Engine (GKE) in the app-dev VPC. You have created an AlloyDB cluster with Private Service Access (PSA) and no public IP address in the db-dev VPC. You want your application to securely connect to AlloyDB in a cost-effective way. What should you do?

  • ASet up a high availability VPN between the app-dev and db-dev VPCs. Connect the application directly to AlloyDB.
  • BConnect by using the private IP address of the AlloyDB cluster directly from the application.
  • CConnect by using AlloyDB Auth Proxy installed in the GKE cluster. (correct answer)
  • DInstall a SOCKS proxy in a VM in the db-dev VPC. Install AlloyDB Auth Proxy in your GKE cluster, and connect to the AlloyDB cluster through the SOCKS server and port.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Connect by using AlloyDB Auth Proxy installed in the GKE cluster.

Explanation

Google Kubernetes Engine runs managed Kubernetes for containerized, portable workloads. AlloyDB is a managed PostgreSQL-compatible database for demanding transactional and analytical workloads. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 148

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?

  • ACreate and start multiple Database Migration Service jobs to migrate your database to the target Cloud SQL for MySQL instance.
  • BUpgrade the Amazon RDS for MySQL primary instance to an instance with more vCPUs and memory, and then run Google Cloud's Database Migration Service.
  • CCreate a single Database Migration Service migration job with initial load parallelism configured to maximum on the source Amazon RDS for MySQL read replica. (correct answer)
  • DCreate a single Database Migration Service migration job with initial Load Parallelism configured to Maximum on the Amazon RDS for MySQL primary instance.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option 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.

Explanation

Database Migration Service migrates databases to Cloud SQL/AlloyDB with minimal downtime.

Topic 1 Β· Question 149

You currently have a MySQL database running on Cloud SQL with a read replica in a different zone for non-mission critical analytics workloads. You want to enable high availability (HA) for the analytic workloads while keeping costs low. What should you do?

  • AIncrease the size of the read replica instance and enable HA.
  • BEnable HA on the current read replica. (correct answer)
  • CCreate a new HA instance in the same zone as the primary.
  • DCreate a new HA instance in a different region than the primary.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Enable HA on the current read replica.

Topic 1 Β· Question 150

You are planning the migration of a large Oracle database to AlloyDB for PostgreSQL. The database contains a large amount of application logic written as stored procedures that needs to be migrated to the target database. You want to minimize both migration effort and downtime for the migration. What should you do?

  • AUse Ora2pg for schema and code conversion and data migration.
  • BUse Ora2pg for schema and code conversion. Use the oracle_fdw extension in AlloyDB and replicate data from source to destination by using CREATE TABLE AS SELECT statements.
  • CUse Database Migration Service. Set up a conversion workspace for schema and code conversion. Create a migration job to perform backfill and change data capture to replicate data from source to destination. (correct answer)
  • DUse Database Migration Service. Set up a legacy conversion workspace for schema and code conversion. Create a migration job to perform backfill and change data capture to replicate data from source to destination.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Use Database Migration Service. Set up a conversion workspace for schema and code conversion. Create a migration job to perform backfill and change data capture to replicate data from source to destination.

Explanation

Database Migration Service migrates databases to Cloud SQL/AlloyDB with minimal downtime.

Topic 1 Β· Question 151

Your company uses a custom application to service thousands of users. The application is running on a Compute Engine and a Cloud SQL for PostgreSQL database. The company requires database passwords to be changed every 60 days. You need to ensure that the credentials used by the web application to connect to the database are managed securely. What should you do?

  • A1. Store the credentials in an encrypted text file in the application.2. Use Cloud Key Management Service (Cloud KMS) to store the key for decrypting the text file.3. Modify the application to decrypt the text file and retrieve the credentials on startup.4. Update the text file every 60 days.
  • B1. Store the credentials to the database in Secret Manager.2. Modify the application to retrieve the credentials from Secret Manager on startup.3. Configure the rotation interval to 60 days. (correct answer)
  • C1. Store the credentials in a text file in a Cloud Storage bucket.2. Modify the application to download the text file and retrieve the credentials on startup.3. Update the text file every 60 days.
  • D1. Configure IAM database authentication for the application to connect to the database.2. Create an IAM user and map it to a separate database user for each application user.3. Require users to update their passwords every 60 days.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: 1. Store the credentials to the database in Secret Manager.2. Modify the application to retrieve the credentials from Secret Manager on startup.3. Configure the rotation interval to 60 days.

Explanation

Secret Manager stores and controls access to secrets such as API keys and credentials.

Topic 1 Β· Question 152

You are a DBA at a retail company. The production databases are running in Cloud SQL for MySQL Enterprise Plus edition, version 8.0.34, in the us-centrall region. You need to set up and test disaster recovery (DR) with zero data loss in the us-west1 region. What should you do?

  • AUse advanced DR by setting up a cascading read replica in the us-west1 region, and designate it as the failover DR replica. Test switchover by using the gcloud switchover command.
  • BCreate a cross-region read replica, version 8.0.37, in the us-west1 region. Designate it as the failover DR replica, and test switchover by using the gcloud switchover command.
  • CCreate a cross-region read replica version 8.0.34, in the us-west1 region. Designate it as the failover DR replica, and test switchover by using the gcloud switchover command.
  • DCreate a cross-region read replica, version 8.0.34, in the us-west1 region. Test switchover by using the gcloud promote-replica with failover command. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Create a cross-region read replica, version 8.0.34, in the us-west1 region. Test switchover by using the gcloud promote-replica with failover command. By spanning multiple Availability Zones / adding redundancy, this option provides the high availability and resilience required.

Topic 1 Β· Question 153

You are designing the backup and recovery strategy of a Cloud SQL for MySQL database that serves a write heavy application. You need to be able to restore the database to any point in time within the past five days while minimizing the performance impact of database backups. What should you do?

  • AEnable automatic backup and point in time recovery. Configure the backup window during periods of low database traffic. Set backup and transaction log retention to at least five days. (correct answer)
  • BSchedule hourly on-demand backups and enable point in time recovery. Delete any delete backups that were taken over five days ago.
  • CSchedule a database export job to run every hour from a read replica instance. Retain the export dumps for at least five days.
  • DSchedule a database export job to run every hour. Use serverless export. Retain the export dumps for at least five days.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Enable automatic backup and point in time recovery. Configure the backup window during periods of low database traffic. Set backup and transaction log retention to at least five days.

Topic 1 Β· Question 154

Your company’s rapidly growing ecommerce application uses Cloud SQL for MySQL. Performance issues are surfacing during peak traffic periods. You need to ensure that the database can handle the load while minimizing downtime. What should you do?

  • AUse read replicas for query offloading, configure automatic failover, and test failover procedures regularly. (correct answer)
  • BVertically scale the primary instance by significantly increasing compute resources, such as vCPUs and memory.
  • CIncrease storage size on the existing instance and implement client-side caching for frequently accessed data.
  • DMigrate to a Cloud SQL for PostgreSQL database for better performance during high load.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use read replicas for query offloading, configure automatic failover, and test failover procedures regularly.

Topic 1 Β· Question 155

Your organization’s databases are running in Cloud SQL. Due to data residency regulations, your organization mandates that backups are stored in a specific region. You are also required to make sure that the databases have monthly full backups, which are retained until your Cloud SQL instance is deleted, along with daily backups. What should you do?

  • ASchedule automated backups for Cloud SQL with a retention period of 365 days.
  • BSchedule daily and monthly on-demand backups.
  • CSchedule automated backups, and create on-demand monthly backups to custom backup locations. (correct answer)
  • DCreate an Organization Policy Service resource location constraint. Schedule automated backups with the retention period of 30 days.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Schedule automated backups, and create on-demand monthly backups to custom backup locations.

Topic 1 Β· Question 156

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?

  • AMigrate the database to Spanner.
  • BEvaluate the application connection pooling configuration settings.
  • CReview Cloud SQL System Insights for the instance, and analyze CPU, memory, and storage utilization metrics. (correct answer)
  • DCreate two Cloud SQL instances, and split the workload between them.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Review Cloud SQL System Insights for the instance, and analyze CPU, memory, and storage utilization metrics.

Explanation

Cloud SQL is a managed relational database (MySQL/PostgreSQL/SQL Server) that handles patching, backups, and failover.

Topic 1 Β· Question 157

You want to migrate an on-premises MySQL database to Cloud SQL. The on-premises database currently has 16 cores and 64 GB of RAM and averages 75% CPU utilization to support an application with over 100.000 tables. You need to specify the most cost-effective machine size you need when migrating to Cloud SQL for MySQL. What should you do?

  • ASelect a Cloud SQL for MySQL database with a machine configuration of 12 cores and 48 GB of RAM.
  • BSelect a Cloud SQL for MySQL database with a machine configuration of 16 cores and 64 GB of RAM.
  • CSelect a Cloud SQL for MySQL database with a machine configuration of 32 cores and 256 GB of RAM. (correct answer)
  • DSelect a Cloud SQL for MySQL database with a machine configuration of 64 cores and 768 GB of RAM.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Select a Cloud SQL for MySQL database with a machine configuration of 32 cores and 256 GB of RAM.

Explanation

Cloud SQL is a managed relational database (MySQL/PostgreSQL/SQL Server) that handles patching, backups, and failover. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 158

You have a regional Spanner instance with no autoscaler that is serving a production workload. You observed a surge in write activities to the database during an ongoing promotional event. You received an alert that the database is close to the storage limit. Based on the storage utilization trend, the database will run out of storage in the next few hours. You want to resolve this issue as soon as possible. What should you do?

  • ACreate a custom instance configuration and add a custom read-only replica to the Spanner instance.
  • BIncrease the compute capacity of the Spanner instance. (correct answer)
  • CMove the Spanner instance to a multi-regional configuration.
  • DArchive and delete historical data from the database.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Increase the compute capacity of the Spanner instance.

Explanation

Cloud Spanner is a horizontally scalable, strongly consistent relational database with global reach.

Topic 1 Β· Question 159

Your organization deploys a high-volume, low-latency sensor data ingestion system. Resilience is crucial, and the workload is expected to grow significantly over time. You need to design a database tier on Google Cloud to ensure faster performance and high availability, while following Google-recommended practices. What should you do?

  • ADeploy multiple Bigtable clusters, shard data manually across them, and set up the application logic for fault tolerance.
  • BDeploy a single-zone Bigtable cluster and optimize the application code for maximum write throughput.
  • CDeploy a single-region Bigtable instance and increase the nodes to maximize data durability.
  • DProvision a multi-zone Bigtable cluster, configure replication, perform an application stress-test, and set up performance monitoring. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Provision a multi-zone Bigtable cluster, configure replication, perform an application stress-test, and set up performance monitoring.

Explanation

Cloud Bigtable is a managed, low-latency NoSQL wide-column store for very high-throughput workloads. By spanning multiple Availability Zones / adding redundancy, this option provides the high availability and resilience required.

Topic 1 Β· Question 160

Your company is migrating a legacy on-premises Oracle database to Cloud SQL for PostgreSQL. As a part of the migration, you need to convert schema and other database code objects, such as procedures, functions, and triggers, from Oracle to PostgreSQL. The database migration needs to be accomplished with minimal application code changes and manual intervention. What is the Google-recommended approach you should do?

  • AManually rewrite both the Oracle schema and queries to be compatible with PostgreSQL syntax and semantics.
  • BUse a schema conversion tool to automatically convert the Oracle schema to PostgreSQL schema, then manually rewrite all queries.
  • CMigrate the data directly from Oracle to PostgreSQL without any conversion. Rely on application-level compatibility layers to handle any syntax or semantic differences.
  • DUse Database Migration Service code conversion workspace, then review and refactor as needed. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use Database Migration Service code conversion workspace, then review and refactor as needed.

Explanation

Database Migration Service migrates databases to Cloud SQL/AlloyDB with minimal downtime.

Showing questions 141–160 of 170 Β· Page 8 of 9