Google ACE Deploying and Implementing a Cloud Solution Practice Question
An organization needs to import a SQL dump file from a Cloud Storage bucket into an existing Cloud SQL for PostgreSQL instance. Which command should they use?
⚠ Common exam trap
The trap is reversing import and export commands, or using the wrong file format flag (csv vs sql); candidates must remember that 'gcloud sql import sql' is for SQL dumps and 'export sql' is for exporting.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
gcloud sql import sql my-instance gs://bucket/dump.sql --database=mydb
The correct command is 'gcloud sql import sql my-instance gs://bucket/dump.sql --database=mydb', which imports a SQL dump file from a Cloud Storage bucket into an existing Cloud SQL instance and specifies the target database. The 'gcloud sql import sql' subcommand is designed for importing SQL dump files, and the --database flag is required when the dump does not specify the database. This matches the requirement to import into an existing PostgreSQL instance.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
gcloud sql export sql my-instance gs://bucket/dump.sql
Why it's wrong here
The export subcommand writes data out of Cloud SQL to a bucket, the reverse direction of the required import. It tempts because it is the correct command when backing up or migrating a Cloud SQL instance outward to Cloud Storage, but here the data must travel from bucket into the instance.
- ✓
gcloud sql import sql my-instance gs://bucket/dump.sql --database=mydb
Why this is correct
The gcloud sql import sql command imports a SQL dump from a Cloud Storage URI into an existing instance, and --database=mydb directs the dump into the named database. This matches the stem's requirement to load a dump into Cloud SQL for PostgreSQL.
- ✗
gcloud sql instances import my-instance gs://bucket/dump.sql
Why it's wrong here
The import subcommand requires a --database flag naming the target database, and the dump must already exist in the bucket; without it the command fails. It tempts because gcloud sql instances import is genuinely the correct verb for loading a SQL dump into Cloud SQL, so the syntax looks right at a glance.
- ✗
gcloud sql import csv my-instance gs://bucket/dump.sql --database=mydb
Why it's wrong here
The `gcloud sql import csv` command is designed for importing CSV-formatted data, not SQL dump files, which contain SQL statements and schema definitions. This option is tempting because it follows the same `gcloud sql import` pattern used for SQL dumps, and would be correct if the file were a CSV and the target were a Cloud SQL for PostgreSQL instance requiring row-level data ingestion.
Go deeper
Related to this question
Learn chapter
AlloyDB for PostgreSQL
Key term
Cloud storage
Cloud storage is a service that lets you save data on remote servers accessed over the internet instead of on your computer's hard drive.
Key term
Organization
An Organization is a top-level container in Google Cloud that represents your company or entities and serves as the root node for all your cloud resources, policies, and access control.
About these practice questions
One of 775 original ACE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Google Cloud exam blueprint
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.