Mengelola data Anda menggunakan konsol Google Cloud
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara menjelajahi dan mengelola data AlloyDB untuk PostgreSQL menggunakan AlloyDB Studio di konsol Google Cloud .
AlloyDB Studio menyertakan panel Explorer yang
terintegrasi dengan editor kueri dan tabel hasil kueri SQL.
Anda dapat menjalankan pernyataan DDL, DML, dan DQL dari satu antarmuka ini. Misalnya, daripada mengonfigurasi alat kueri database pihak ketiga, Anda dapat membuat tabel atau membuat kueri data menggunakan editor kueri ini.
Jika Anda baru menggunakan AlloyDB untuk PostgreSQL, lihat Ringkasan AlloyDB.
Anda dapat menggunakan panel Explorer di AlloyDB Studio untuk melihat dan berinteraksi dengan objek database. Anda dapat membuat, mengubah, dan menghapus objek database berikut:
Skema
Tabel
Kolom
Indeks dan kunci
Pemicu
Dilihat
Functions
Prosedur
Urutan
Jenis
Ekstensi
Peran dan izin yang diperlukan
Untuk menggunakan AlloyDB Studio, Anda memerlukan izin berikut:
Selain itu, pastikan Anda memiliki izin tingkat database untuk database yang Anda gunakan untuk autentikasi.
Memilih metode autentikasi database
Sebelum dapat mengakses database di AlloyDB Studio, Anda harus memilih metode autentikasi database terlebih dahulu. Untuk login ke database menggunakan AlloyDB Studio, Anda dapat menggunakan salah satu jenis autentikasi berikut:
Autentikasi database IAM: Dengan menggunakan autentikasi IAM, Anda dapat mengelola akses dan hak istimewa database untuk pengguna di organisasi Anda. Untuk menggunakannya, siapkan autentikasi IAM di instance.
Autentikasi database bawaan: Anda terhubung ke database di AlloyDB Studio menggunakan akun dan kredensial pengguna PostgreSQL Anda. Untuk mengetahui informasi selengkapnya, lihat Mengelola pengguna PostgreSQL dengan autentikasi standar.
Jelajahi data Anda
Untuk mengakses panel Explorer, ikuti langkah-langkah berikut:
Klik Autentikasi. Panel Explorer menampilkan daftar objek di database Anda.
Membuat, mengubah, dan membuat kueri data Anda
Anda dapat menggunakan editor kueri untuk menjalankan pernyataan SQL. Pernyataan harus dipisahkan dengan titik koma. Anda dapat menyusun
kueri sendiri, atau mengisi editor kueri dengan template.
Pernyataan dijalankan berdasarkan urutan saat Anda memasukkannya di editor kueri.
Untuk membuat, membuat kueri, atau mengubah data Anda, ikuti langkah-langkah berikut:
Login ke AlloyDB Studio menggunakan nama database, nama pengguna, dan sandi Anda.
Buat kueri menggunakan salah satu metode berikut:
Untuk menyusun kueri Anda sendiri, ikuti langkah-langkah berikut:
Buka tab baru dengan mengklik addNew SQL editor tab atau addNew tab.
Saat editor kueri muncul, tulis kueri Anda.
Untuk menyusun kueri yang dimulai dengan template, ikuti langkah-langkah berikut:
Di panel Explorer, di samping objek database,
klik more_vertView actions. Satu atau beberapa tindakan yang tersedia akan muncul.
Klik tindakan. Editor kueri akan diisi dengan template.
Ganti placeholder apa pun dalam template.
Klik Run. Tindakan ini akan menjalankan semua kueri di editor kueri. Hasil
kueri Anda akan muncul di tabel Results.
Anda juga dapat memilih dan
menjalankan satu atau beberapa kueri secara bersamaan. Untuk melakukannya, pilih satu atau beberapa kueri, lalu klik Jalankan yang dipilih.
Batasan
AlloyDB Studio mendukung kueri ringan. Respons yang lebih dari 10 MB mungkin
terpotong. AlloyDB Studio menunjukkan kapan hasil parsial ditampilkan.
Kueri atau pembuatan indeks yang berjalan lama pada tabel besar yang melebihi 5 menit di instance akan dihentikan dan dibatalkan.
AlloyDB Studio tidak mempertahankan koneksi database tetap terbuka setelah eksekusi skrip SQL selesai. Demikian pula, tab Editor tidak berbagi sesi umum dan setiap eksekusi memulai koneksi baru menggunakan sesi terpisah.
Saat Anda menjalankan beberapa pernyataan kueri secara bersamaan, dan salah satu kueri menghasilkan error, seluruh kueri akan dibatalkan.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-25 UTC."],[[["\u003cp\u003eAlloyDB Studio, accessible via the Google Cloud console, provides a unified interface to explore and manage your AlloyDB for PostgreSQL data, including a query editor and results table.\u003c/p\u003e\n"],["\u003cp\u003eThe Explorer pane within AlloyDB Studio allows users to create, alter, and delete various database objects like schemas, tables, columns, indexes, and functions, among others.\u003c/p\u003e\n"],["\u003cp\u003eTo access AlloyDB Studio, you need specific permissions, such as \u003ccode\u003ealloydb.clusters.get\u003c/code\u003e and \u003ccode\u003ealloydb.instances.executeSql\u003c/code\u003e, which can be granted through predefined or custom roles, along with necessary database-level permissions.\u003c/p\u003e\n"],["\u003cp\u003eUsers can compose SQL queries directly in the query editor or use templates provided for specific database actions, then run these queries and view the results in the Results table.\u003c/p\u003e\n"],["\u003cp\u003eAlloyDB Studio is subject to some limitations, including support for lightweight queries only, responses over 10MB being truncated, no persistent connections or shared sessions between editor tabs, and only supporting username and password authentication.\u003c/p\u003e\n"]]],[],null,["# Manage your data using the Google Cloud console\n\nThis page explains how to explore and manage your AlloyDB for PostgreSQL data\nusing AlloyDB Studio in the Google Cloud console.\n\nAlloyDB Studio includes an **Explorer** pane that\nintegrates with a query editor and a SQL query results table.\nYou can run DDL, DML, and DQL statements from this single interface. For\nexample, instead of configuring a third-party database query tool, you can\ncreate a table or query your data using this query editor.\n\nIf you're new to AlloyDB for PostgreSQL, see\n[AlloyDB overview](/alloydb/docs/overview).\n\nYou can use the **Explorer** pane in AlloyDB Studio to view and interact\nwith your database objects. You can create, alter, and delete the following\ndatabase objects:\n\n- Schemas\n- Tables\n- Columns\n- Indexes and keys\n- Triggers\n- Views\n- Functions\n- Procedures\n- Sequences\n- Types\n- Extensions\n\nRequired roles and permissions\n------------------------------\n\n\n| **Caution:** Users with broad database access could experience data loss when using Gemini. We recommend that you use an account with fewer database privileges when using Gemini.\n\n\u003cbr /\u003e\n\nTo use AlloyDB Studio, you need the following permissions:\n\n- `alloydb.clusters.get`\n- `alloydb.databases.list`\n- `alloydb.instances.executeSql`\n- `alloydb.instances.list`\n- `alloydb.users.list`\n\nYou can get these permissions through the\n[`roles/alloydb.admin`](/alloydb/docs/reference/iam-roles-permissions#roles)\nrole, or using a combination of\n[`roles/alloydb.viewer`](/alloydb/docs/reference/iam-roles-permissions#roles)\nand\n[`roles/alloydb.databaseUser`](/alloydb/docs/reference/iam-roles-permissions#roles)\nroles. If you don't have these roles, contact your Organization Administrator to\nrequest access. You might also be able to get the required permissions through\n[custom roles](/iam/docs/creating-custom-roles) or other\n[predefined roles](/iam/docs/understanding-roles).\n\nAdditionally, ensure that\nyou have [database-level permissions](/alloydb/docs/database-users/about)\nfor the database that you use for authentication.\n\nChoose a database authentication method\n---------------------------------------\n\nBefore you can access a database in AlloyDB Studio, you must first select a\ndatabase authentication method. To sign in to your database using\nAlloyDB Studio, you can use one of the following types of authentication:\n\n- IAM database authentication: use IAM\n authentication to manage the database access and privileges for users in your\n organization. To use this, set up\n [IAM authentication](/alloydb/docs/database-users/manage-iam-auth)\n on the instance.\n\n- Built-in database authentication: connect to the database in\n AlloyDB Studio by using your PostgreSQL user account and credentials. For\n more information, see\n [Manage PostgreSQL users with built-in authentication](/alloydb/docs/database-users/manage-roles).\n\nExplore your data\n-----------------\n\nTo access the **Explorer** pane, follow these steps:\n\n1. In the Google Cloud console, open the **AlloyDB** page.\n\n [Go to AlloyDB](https://console.cloud.google.com/alloydb)\n2. Select a cluster from the list.\n\n3. In the navigation menu, click **AlloyDB Studio**.\n\n4. Select a [database authentication method](#authentication).\n\n5. Click **Authenticate** . The **Explorer** pane displays a list of the objects\n in your database.\n\nCreate, modify, and query your data\n-----------------------------------\n\nYou can use the query editor to run SQL statements. Statements must be separated\nby a semicolon. Compose a query yourself, or populate the query editor with a\ntemplate.\n\nStatement execution is based on the order in which you enter them in the query\neditor.\n\nTo create, query, or modify your data, follow these steps:\n\n1. In the Google Cloud console, open the **AlloyDB** page.\n\n [Go to AlloyDB](https://console.cloud.google.com/alloydb)\n2. Select a cluster from the list.\n\n3. In the navigation menu, click **AlloyDB Studio**.\n\n4. Sign in to AlloyDB Studio using the name of your database, username,\n and password.\n\n5. Compose a query using one of the following methods:\n\n - To compose your own query, follow these steps:\n\n 1. Click add **New SQL editor tab** or add **New tab** to open a new tab.\n 2. When the query editor appears, write your query.\n - To compose a query that starts with a template, follow these steps:\n\n 1. In the **Explorer** pane, next to a database object, click more_vert **View actions**. One or more available actions appear.\n 2. Click an action. The query editor populates with a template.\n 3. Replace any placeholders in the template.\n6. Click **Run** . This executes all the queries in the query editor. The\n results of your query appear in the **Results** table.\n\n You can also select and execute one or multiple queries at the same time.\n To do this, select a query or multiple queries and click **Run selected**.\n\nLimitations\n-----------\n\n- AlloyDB Studio supports lightweight queries. Responses over 10MB might be truncated. AlloyDB Studio indicates when it returns partial results.\n- Long-running queries or index creations on large tables that exceed five minutes on the instance are timed-out and cancelled.\n- AlloyDB Studio doesn't keep a database connection open after execution of a SQL script is complete. Similarly, the **Editor** tabs don't share a common session and every execution starts a new connection using a separate session.\n- When you run multiple query statements at the same time, and one of the queries results in an error, then the whole query is cancelled.\n\nWhat's next\n-----------\n\n- Learn more about how [Gemini can help you write SQL or analyze your data](/alloydb/docs/write-sql-gemini)."]]