Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Un'applicazione tipica utilizza un client, ad esempio un driver di basso livello o un mapper oggetto-relazionale (ORM), per connettersi al database. Spanner supporta client in più lingue
che ti consentono di utilizzare librerie comuni, come JDBC, negli ambienti
sviluppatore. Per ulteriori informazioni, consulta la panoramica dei driver.
Oltre a gestire il modo in cui la tua applicazione si connette a Spanner,
devi anche gestire le query inviate e la sintassi utilizzata.
Spanner supporta due dialetti SQL, entrambi basati sullo standard ANSI SQL.
Puoi scegliere di utilizzare l'interfaccia GoogleSQL o PostgreSQL per Spanner in base all'ecosistema in cui vuoi operare. Per ulteriori informazioni, consulta
Scegliere il dialetto giusto per il database Spanner.
A causa delle differenze di architettura tra il database Spanner e il database di origine, la sintassi utilizzata in Spanner potrebbe non essere in linea con quella del database di origine.
Completa manualmente i seguenti passaggi per eseguire la migrazione dell'applicazione a Spanner:
Spanner non supporta l'esecuzione di codice utente nel database, quindi devi spostare eventuali procedure e trigger archiviati a livello di database nell'applicazione.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-05 UTC."],[],[],null,["# Migrate your application code\n\nA typical application uses a client, such as a low-level driver or an object-relational mapper (ORM) to\nconnect to the database. Spanner supports clients in multiple languages\nthat let you use common libraries, such as JDBC, across developer\nenvironments. For more information, see\n[Overview of drivers](/spanner/docs/drivers-overview).\n\nIn addition to managing how your application connects to Spanner,\nyou also have to manage which queries are sent and which syntax the queries are using.\nSpanner supports two SQL dialects, both based on ANSI SQL standard.\nYou can choose to use GoogleSQL or PostgreSQL interface for Spanner based\non the ecosystem you want to operate in. For more information, see\n[Choosing the right dialect for your Spanner database](/spanner/docs/choose-googlesql-or-postgres).\nBecause of the\narchitectural differences between the Spanner database and your\nsource database, the syntax used\nin Spanner might not align with the syntax of your source database.\n\nComplete the following steps manually\nto migrate your application to Spanner:\n\n- Spanner doesn't support running user code in the database,\n so you need to move any procedures and triggers stored at the database level\n into the application.\n\n- Use Spanner client libraries and ORMs. For more information, see\n [Overview of APIs, client libraries, and ORM drivers](/spanner/docs/api-libraries-overview).\n\n- Take note of [Spanner partitioned DML](/spanner/docs/dml-partitioned),\n [read-only transactions](/spanner/docs/transactions#read-only_transactions),\n [commit timestamps](/spanner/docs/commit-timestamp), and read timestamps and\n how they can optimize application performance.\n\n- You also might need to make changes to transaction handling. Consider the following:\n\n - The mutations per commit limit is 80,000. Each secondary index on a table is an additional mutation per row. To modify data using mutations, see [Insert, update, and delete data using mutations](/spanner/docs/modify-mutation-api). To modify a large amount of data, use [partitioned DML](/spanner/docs/dml-partitioned)."]]