Professional Cloud Database Engineer Part 3
Question #: 61
Topic #: 1
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.
Selected Answer: C
Question #: 62
Topic #: 1
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.
Selected Answer: B
Question #: 63
Topic #: 1
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
Selected Answer: A
Question #: 64
Topic #: 1
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.
Selected Answer: C
Question #: 65
Topic #: 1
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.
Selected Answer: D
Question #: 66
Topic #: 1
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.
Selected Answer: C
Question #: 67
Topic #: 1
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.
Selected Answer: B
Question #: 68
Topic #: 1
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.
Selected Answer: C
Question #: 69
Topic #: 1
Your hotel booking company is expanding into Country A, where personally identifiable information (PII) must comply with regional data residency requirements and audits. You need to isolate customer data in Country A from the rest of the customer data. You want to design a multi-tenancy strategy to efficiently manage costs and operations. What should you do?
A. Apply a schema data management pattern.
B. Apply an instance data management pattern.
C. Apply a table data management pattern.
D. Apply a database data management pattern.
Selected Answer: B
Question #: 70
Topic #: 1
You work for a financial services company that wants to use fully managed database services. Traffic volume for your consumer services products has increased annually at a constant rate with occasional spikes around holidays. You frequently need to upgrade the capacity of your database. You want to use Cloud Spanner and include an automated method to increase your hardware capacity to support a higher level of concurrency. What should you do?
A. Use linear scaling to implement the Autoscaler-based architecture
B. Use direct scaling to implement the Autoscaler-based architecture.
C. Upgrade the Cloud Spanner instance on a periodic basis during the scheduled maintenance window.
D. Set up alerts that are triggered when Cloud Spanner utilization metrics breach the threshold, and then schedule an upgrade during the scheduled maintenance window.
Selected Answer: A
Question #: 71
Topic #: 1
Your organization has a busy transactional Cloud SQL for MySQL instance. Your analytics team needs access to the data so they can build monthly sales reports. You need to provide data access to the analytics team without adversely affecting performance. What should you do?
A. Create a read replica of the database, provide the database IP address, username, and password to the analytics team, and grant read access to required tables to the team.
B. Create a read replica of the database, enable the cloudsql.iam_authentication flag on the replica, and grant read access to required tables to the analytics team.
C. Enable the cloudsql.iam_authentication flag on the primary database instance, and grant read access to required tables to the analytics team.
D. Provide the database IP address, username, and password of the primary database instance to the analytics, team, and grant read access to required tables to the team.
Selected Answer: B
Question #: 72
Topic #: 1
Your organization stores marketing data such as customer preferences and purchase history on Bigtable. The consumers of this database are predominantly data analysts and operations users. You receive a service ticket from the database operations department citing poor database performance between 9 AM-10 AM every day. The application team has confirmed no latency from their logs. A new cohort of pilot users that is testing a dataset loaded from a third-party data provider is experiencing poor database performance. Other users are not affected. You need to troubleshoot the issue. What should you do?
A. Isolate the data analysts and operations user groups to use different Bigtable instances.
B. Check the Cloud Monitoring table/bytes_used metric from Bigtable.
C. Use Key Visualizer for Bigtable.
D. Add more nodes to the Bigtable cluster.
Selected Answer: C
Question #: 73
Topic #: 1
Your company is developing a new global transactional application that must be ACID-compliant and have 99.999% availability. You are responsible for selecting the appropriate Google Cloud database to serve as a datastore for this new application. What should you do?
A. Use Firestore.
B. Use Cloud Spanner.
C. Use Cloud SQL.
D. Use Bigtable.
Selected Answer: B
Question #: 74
Topic #: 1
You want to migrate your PostgreSQL database from another cloud provider to Cloud SQL. You plan on using Database Migration Service and need to assess the impact of any known limitations. What should you do? (Choose two.)
A. Identify whether the database has over 512 tables.
B. Identify all tables that do not have a primary key.
C. Identity all tables that do not have at least one foreign key.
D. Identify whether the source database is encrypted using pgcrypto extension.
E. Identify whether the source database uses customer-managed encryption keys (CMEK).
Selected Answer: BE
Question #: 75
Topic #: 1
Your organization is running a Firestore-backed Firebase app that serves the same top ten news stories on a daily basis to a large global audience. You want to optimize content delivery while decreasing cost and latency. What should you do?
A. Enable serializable isolation in the Firebase app.
B. Deploy a US multi-region Firestore location.
C. Build a Firestore bundle, and deploy bundles to Cloud CDN.
D. Create a Firestore index on the news story date.
Selected Answer: C
Question #: 76
Topic #: 1
You need to migrate a 1 TB PostgreSQL database from a Compute Engine VM to Cloud SQL for PostgreSQL. You want to ensure that there is minimal downtime during the migration. What should you do?
A. Export the data from the existing database, and load the data into a new Cloud SQL database.
B. Use Migrate for Compute Engine to complete the migration.
C. Use Datastream to complete the migration.
D. Use Database Migration Service to complete the migration.
Selected Answer: D
Question #: 77
Topic #: 1
You have a large Cloud SQL for PostgreSQL instance. The database instance is not mission-critical, and you want to minimize operational costs. What should you do to lower the cost of backups in this environment?
A. Set the automated backups to occur every other day to lower the frequency of backups.
B. Change the storage tier of the automated backups from solid-state drive (SSD) to hard disk drive (HDD).
C. Select a different region to store your backups.
D. Reduce the number of automated backups that are retained to two (2).
Selected Answer: D
Question #: 78
Topic #: 1
You are the primary DBA of a Cloud SQL for PostgreSQL database that supports 6 enterprise applications in production. You used Cloud SQL Insights to identify inefficient queries and now need to identify the application that is originating the inefficient queries. You want to follow Google-recommended practices. What should you do?
A. Shut down and restart each application.
B. Write a utility to scan database query logs.
C. Write a utility to scan application logs.
D. Use query tags to add application-centric database monitoring.
Selected Answer: D
Question #: 79
Topic #: 1
You are designing a database strategy for a new web application. You plan to start with a small pilot in one country and eventually expand to millions of users in a global audience. You need to ensure that the application can run 24/7 with minimal downtime for maintenance. What should you do?
A. Use Cloud Spanner in a regional configuration.
B. Use Cloud Spanner in a multi-region configuration.
C. Use Cloud SQL with cross-region replicas.
D. Use highly available Cloud SQL with multiple zones.
Selected Answer: A
Question #: 80
Topic #: 1
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.
Selected Answer: D
Question #: 81
Topic #: 1
Your company wants you to migrate their Oracle, MySQL, Microsoft SQL Server, and PostgreSQL relational databases to Google Cloud. You need a fully managed, flexible database solution when possible. What should you do?
A. Migrate all the databases to Cloud SQL.
B. Migrate the Oracle, MySQL, and Microsoft SQL Server databases to Cloud SQL, and migrate the PostgreSQL databases to Compute Engine.
C. Migrate the MySQL, Microsoft SQL Server, and PostgreSQL databases to Compute Engine, and migrate the Oracle databases to Bare Metal Solution for Oracle.
D. Migrate the MySQL, Microsoft SQL Server, and PostgreSQL databases to Cloud SQL, and migrate the Oracle databases to Bare Metal Solution for Oracle.
Selected Answer: D
Question #: 82
Topic #: 1
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 .
B. Use gcloud sql instances failover .
C. Use gcloud sql instances promote-replica .
D. Use gcloud sql instances promote-replica .
Selected Answer: A
Question #: 83
Topic #: 1
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.
Selected Answer: C
Question #: 84
Topic #: 1
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.
Selected Answer: D
Question #: 85
Topic #: 1
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.
Selected Answer: A
Question #: 86
Topic #: 1
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.
Selected Answer: A
Question #: 87
Topic #: 1
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.
Selected Answer: AC
Question #: 88
Topic #: 1
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.
Selected Answer: B
Question #: 89
Topic #: 1
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.
Selected Answer: D
Question #: 90
Topic #: 1
You are a DBA on a Cloud Spanner instance with multiple databases. You need to assign these privileges to all members of the application development team on a specific database:
Can read tables, views, and DDL –
Can write rows to the tables –
Can add columns and indexes –
Cannot drop the database –
What should you do?
A. Assign the Cloud Spanner Database Reader and Cloud Spanner Backup Writer roles.
B. Assign the Cloud Spanner Database Admin role.
C. Assign the Cloud Spanner Database User role.
D. Assign the Cloud Spanner Admin role.
Selected Answer: C