Your organization needs to migrate a critical, on-premises MySQL database to Cloud SQL for MySQL. The on-premises database is on a version of MySQL that is supported by Cloud SQL and uses the InnoDB storage engine. You need to migrate the database while preserving transactions and minimizing downtime. What should you do?
-
A
Use Database Migration Service to connect to your on-premises database, and choose continuous replication. After the on-premises database is migrated, promote the Cloud SQL for MySQL instance, and connect applications to your Cloud SQL instance.
-
B
Build a Cloud Data Fusion pipeline for each table to migrate data from the on-premises MySQL database to Cloud SQL for MySQL. Schedule downtime to run each Cloud Data Fusion pipeline. Verify that the migration was successful. Re-point the applications to the Cloud SQL for MySQL instance.
-
C
Pause the on-premises applications. Use the mysqldump utility to dump the database content in compressed format. Run gsutil to move the dump file to Cloud Storage. Use the Cloud SQL for MySQL import option. After the import operation is complete, re-point the applications to the Cloud SQL for MySQL instance.
-
D
Pause the on-premises applications. Use the mysqldump utility to dump the database content in CSV format. Run gsutil to move the dump file to Cloud Storage. Use the Cloud SQL for MySQL import option. After the import operation is complete, re-point the applications to the Cloud SQL for MySQL instance.
Reveal answer details
Close answer details
Correct answerA
Explanationhttps://cloud.google.com/database-migration/docs/mysql/configure-source- database To migrate the database while preserving transactions and minimizing downtime, you should use Database Migration Service. This service will allow you to migrate the database in a way that is transparent to your users and applications. It will also allow you to test the migration before you make it live, so that you can be sure that everything will work as expected.
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.
Reveal answer details
Close answer details
Correct answerA
ExplanationCloud Trace doesn't support Cloud SQL. Eliminate D. Cloud SQL recommenders for overprovisioned instances would tell you about Cloud SQL instances which are too large for their workload. Eliminate C. Monitoring CPU utilization wouldn't tell you why microservice calls are failing. Eliminate B. SQLcommenter integrates with Query Insights. So A is the best answer. https://cloud.google.com/blog/topics/developers-practitioners/introducing-sqlcommenter-open-source-orm-auto-instrumentation-library
You are setting up a Bare Metal Solution environment. You need to update the operating system to the latest version. You need to connect the Bare Metal Solution environment to the internet so you can receive software updates. What should you do?
-
A
Setup a static external IP address in your VPC network.
-
B
Set up bring your own IP (BYOIP) in your VPC.
-
C
Set up a Cloud NAT gateway on the Compute Engine VM.
-
D
Set up Cloud NAT service.
Reveal answer details
Close answer details
Correct answerC
Explanationhttps://cloud.google.com/bare-metal/docs/bms-setup?hl=en#bms-access-internet-vm-nat The docs specifically says "Setting up a NAT gateway on a Compute Engine VM" is the way to give BMS internet access.
You are using Compute Engine on Google Cloud and your data center to manage a set of MySQL databases in a hybrid configuration. You need to create replicas to scale reads and to offload part of the management operation. What should you do?
-
A
Use external server replication.
-
B
Use Data Migration Service.
-
C
Use Cloud SQL for MySQL external replica.
-
D
Use the mysqldump utility and binary logs.
Reveal answer details
Close answer details
Correct answerC
ExplanationAn external replica is a method that allows you to create a read-only copy of your Cloud SQL instance on an external server, such as a Compute Engine instance or an on-premises database server 1. An external replica can help you scale reads and offload management operations from your data center to Google Cloud. You can also use an external replica for disaster recovery, migration, or reporting purposes 1. To create an external replica, you need to configure a Cloud SQL instance that replicates to one or more replicas external to Cloud SQL, and a source representation instance that represents the source database server in Cloud SQL1. You also need to enable access on the Cloud SQL instance for the IP address of the external replica, create a replication user, and export and import the data from the source database server to the external replica 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.
Reveal answer details
Close answer details
Correct answerD
Explanation"Datastream is a serverless and easy-to-use Change Data Capture (CDC) and replication service that allows you to synchronize data across heterogeneous databases, storage systems, and applications reliably and with minimal latency. Datastream supports change data streaming from Oracle and MySQL databases to Google Cloud Storage (GCS). The service offers streamlined integration with Dataflow templates to power up to date materialized views in BigQuery for analytics, replicate their databases into Cloud SQL or Cloud Spanner for database synchronization, or leverage the event stream directly from GCS to realize event-driven architectures."
Your organization is running a critical production database on a virtual machine (VM) on Compute Engine. The VM has an ext4-formatted persistent disk for data files. The database will soon run out of storage space. You need to implement a solution that avoids downtime. What should you do?
-
A
In the Google Cloud Console, increase the size of the persistent disk, and use the resize2fs command to extend the disk.
-
B
In the Google Cloud Console, increase the size of the persistent disk, and use the fdisk command to verify that the new space is ready to use
-
C
In the Google Cloud Console, create a snapshot of the persistent disk, restore the snapshot to a new larger disk, unmount the old disk, mount the new disk, and restart the database service.
-
D
In the Google Cloud Console, create a new persistent disk attached to the VM, and configure the database service to move the files to the new disk.
Reveal answer details
Close answer details
Correct answerA
Explanationhttps://cloud.google.com/compute/docs/disks/resize-persistent-disk#resize_partitions
Your application follows a microservices architecture and uses a single large Cloud SQL instance, which is starting to have performance issues as your application grows. in the Cloud Monitoring dashboard, the CPU utilization looks normal You want to follow Google-recommended practices to resolve and prevent these performance issues while avoiding any major refactoring. What should you do?
-
A
Use Cloud Spanner instead of Cloud SQL.
-
B
Increase the number of CPUs for your instance.
-
C
Increase the storage size for the instance.
-
D
Use many smaller Cloud SQL instances.
Reveal answer details
Close answer details
Correct answerD
Explanationhttps://cloud.google.com/sql/docs/mysql/best-practices#data-arch
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.
Reveal answer details
Close answer details
Correct answerA
Explanation"Deny maintenance period. A block of days in which Cloud SQL does not schedule maintenance. Deny maintenance periods can be up to 90 days long. " https://cloud.google.com/sql/docs/mysql/maintenance
You need to redesign the architecture of an application that currently uses Cloud SQL for PostgreSQL. The users of the application complain about slow query response times. You want to enhance your application architecture to offer sub-millisecond query latency. What should you do?
-
A
Configure Firestore, and modify your application to offload queries.
-
B
Configure Bigtable, and modify your application to offload queries.
-
C
Configure Cloud SQL for PostgreSQL read replicas to offload queries.
-
D
Configure Memorystore, and modify your application to offload queries.
Reveal answer details
Close answer details
Correct answerD
Explanation"sub-millisecond latency" always involves Memorystore. Furthermore, as we are talking about a relational DB (Cloud SQL), BigTable is not a solution to be considered.
Question 10
Single choice
Your company is evaluating Google Cloud database options for a mission-critical global payments gateway application. The application must be available 24/7 to users worldwide, horizontally scalable, and support open source databases. You need to select an automatically shardable, fully managed database with 99.999% availability and strong transactional consistency. What should you do?
-
A
Select Bare Metal Solution for Oracle.
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationThe application must be available 24/7 to users worldwide, horizontally scalable, and support open source databases.
Question 11
Single choice
Your team recently released a new version of a highly consumed application to accommodate additional user traffic. Shortly after the release, you received an alert from your production monitoring team that there is consistently high replication lag between your primary instance and the read replicas of your Cloud SQL for MySQL instances. You need to resolve the replication lag. What should you do?
-
A
Identify and optimize slow running queries, or set parallel replication flags.
-
B
Stop all running queries, and re-create the replicas.
-
C
Edit the primary instance to upgrade to a larger disk, and increase vCPU count.
-
D
Edit the primary instance to add additional memory.
Reveal answer details
Close answer details
Correct answerA
Explanationhttps://cloud.google.com/sql/docs/mysql/replication/replication-lag#optimize_queries_and_schema
Question 12
Single choice
You are designing for a write-heavy application. During testing, you discover that the write workloads are performant in a regional Cloud Spanner instance but slow down by an order of magnitude in a multi-regional instance. You want to make the write workloads faster in a multi-regional instance. What should you do?
-
A
Place the bulk of the read and write workloads closer to the default leader region.
-
B
Use staleness of at least 15 seconds.
-
C
Add more read-write replicas.
-
D
Keep the total CPU utilization under 45% in each region.
Reveal answer details
Close answer details
Correct answerA
Explanationhttps://cloud.google.com/spanner/docs/instance-configurations#multi-region-best-practices Best practicesForoptimalperformance,followthesebestpractices:Designaschemathatpreventshotspotsandotherperformanceissues.Foroptimalwritelatency,placecomputeresourcesforwrite-heavyworkloadswithinorclosetothedefaultleaderregion.Foroptimalreadperformanceoutsideofthedefaultleaderregion,usestalenessofatleast15seconds.Toavoidsingle-regiondependencyforyourworkloads,placecriticalcomputeresourcesinatleasttworegions.Agoodoptionistoplacethemnexttothetwodifferentread-writeregionssothatanysingleregionoutagewillnotimpactallofyourapplication.ProvisionenoughcomputecapacitytokeephighprioritytotalCPUutilizationunder45%ineachregion.
Question 13
Single choice
You are developing a new application on a VM that is on your corporate network. The application will use Java Database Connectivity (JDBC) to connect to Cloud SQL for PostgreSQL. Your Cloud SQL instance is configured with IP address 192.168.3.48, and SSL is disabled. You want to ensure that your application can access your database instance without requiring configuration changes to your database. What should you do?
-
A
Define a connection string using your Google username and password to point to the external (public) IP address of your Cloud SQL instance.
-
B
Define a connection string using a database username and password to point to the internal (private) IP address of your Cloud SQL instance.
-
C
Define a connection string using Cloud SQL Auth proxy configured with a service account to point to the internal (private) IP address of your Cloud SQL instance.
-
D
Define a connection string using Cloud SQL Auth proxy configured with a service account to point to the external (public) IP address of your Cloud SQL instance.
Reveal answer details
Close answer details
Correct answerC
ExplanationThe Cloud SQL connectors are libraries that provide encryption and IAM-based authorization when connecting to a Cloud SQL instance. They can't provide a network path to a Cloud SQL instance if one is not already present. Other ways to connect to a Cloud SQL instance include using a database client or the Cloud SQL Auth proxy. https://cloud.google.com/sql/docs/postgres/connect-connectors https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/blob/main/docs/jdbc-postgres.md
Question 14
Single choice
You are managing a set of Cloud SQL databases in Google Cloud. Regulations require that database backups reside in the region where the database is created. You want to minimize operational costs and administrative effort. What should you do?
-
A
Configure the automated backups to use a regional Cloud Storage bucket as a custom location.
-
B
Use the default configuration for the automated backups location.
-
C
Disable automated backups, and create an on-demand backup routine to a regional Cloud Storage bucket.
-
D
Disable automated backups, and configure serverless exports to a regional Cloud Storage bucket.
Reveal answer details
Close answer details
Correct answerA
Explanationhttps://cloud.google.com/sql/docs/mysql/backup-recovery/backing-up#locationbackups You can use a custom location for on-demand and automatic backups. For a complete list of valid location values, see the Instance locations.
Question 15
Single choice
You are building an application that allows users to customize their website and mobile experiences. The application will capture user information and preferences. User profiles have a dynamic schema, and users can add or delete information from their profile. You need to ensure that user changes automatically trigger updates to your downstream BigQuery data warehouse. What should you do?
-
A
Store your data in Bigtable, and use the user identifier as the key. Use one column family to store user profile data, and use another column family to store user preferences.
-
B
Use Cloud SQL, and create different tables for user profile data and user preferences from your recommendations model. Use SQL to join the user profile data and preferences
-
C
Use Firestore in Native mode, and store user profile data as a document. Update the user profile with preferences specific to that user and use the user identifier to query.
-
D
Use Firestore in Datastore mode, and store user profile data as a document. Update the user profile with preferences specific to that user and use the user identifier to query.
Reveal answer details
Close answer details
Correct answerC
ExplanationUse Firestore in Datastore mode for new server projects. Firestore in Datastore mode allows you to use established Datastore server architectures while removing fundamental Datastore limitations. Datastore mode can automatically scale to millions of writes per second. Use Firestore in Native mode for new mobile and web apps. Firestore offers mobile and web client libraries with real-time and offline features. Native mode can automatically scale to millions of concurrent clients.
Question 16
Single choice
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.
Reveal answer details
Close answer details
Correct answerC
Explanationhttps://cloud.google.com/spanner/docs/iam#spanner.databaseUser
Question 17
Single choice
You are managing two different applications: Order Management and Sales Reporting. Both applications interact with the same Cloud SQL for MySQL database. The Order Management application reads and writes to the database 24/7, but the Sales Reporting application is read-only. Both applications need the latest data. You need to ensure that the Performance of the Order Management application is not affected by the Sales Reporting application. What should you do?
-
A
Create a read replica for the Sales Reporting application.
-
B
Create two separate databases in the instance, and perform dual writes from the Order Management application.
-
C
Use a Cloud SQL federated query for the Sales Reporting application.
-
D
Queue up all the requested reports in PubSub, and execute the reports at night.
Reveal answer details
Close answer details
Question 18
Single choice
Your company uses the Cloud SQL out-of-disk recommender to analyze the storage utilization trends of production databases over the last 30 days. Your database operations team uses these recommendations to proactively monitor storage utilization and implement corrective actions. You receive a recommendation that the instance is likely to run out of disk space. What should you do to address this storage alert?
-
A
Normalize the database to the third normal form.
-
B
Compress the data using a different compression algorithm.
-
C
Manually or automatically increase the storage capacity.
-
D
Create another schema to load older data.
Reveal answer details
Close answer details
Correct answerC
Explanationhttps://cloud.google.com/sql/docs/mysql/instance-settings#storage-capacity-2ndgen
Question 19
Single choice
Your company's mission-critical, globally available application is supported by a Cloud Spanner database. Experienced users of the application have read and write access to the database, but new users are assigned read-only access to the database. You need to assign the appropriate Cloud Spanner Identity and Access Management (IAM) role to new users being onboarded soon. What roles should you set up?
-
A
roles/spanner.databaseReader
-
B
roles/spanner.databaseUser
-
C
-
D
roles/spanner.backupWriter
Reveal answer details
Close answer details
Correct answerA
Explanationhttps://cloud.google.com/spanner/docs/iam?hl=it
Question 20
Single choice
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).
Reveal answer details
Close answer details
Correct answerD
ExplanationBy default, for each instance, Cloud SQL retains seven automated backups, in addition to on-demand backups. You can configure how many automated backups to retain (from 1 to 365). We charge a lower rate for backup storage than for other types of instances. https://cloud.google.com/sql/docs/mysql/backup-recovery/backups
|