# “USE statement is not supported to switch between databases” when using CData Azure Synapse in ODI Studio

**URL:** <https://community.cdata.com/t/use-statement-is-not-supported-to-switch-between-databases-when-using-cdata-azure-synapse-in-odi-studio/589>\
**Category:** Editions\
**Tags:** article, linux-unix, jdbc, odi, azure-synapse\
**Created:** [January 2, 2024, 7:48pm UTC](https://community.cdata.com/t/use-statement-is-not-supported-to-switch-between-databases-when-using-cdata-azure-synapse-in-odi-studio/589 "2024-01-02T19:48:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albi\_M](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Albi\_M](https://community.cdata.com/u/Albi_M)\
**Post date:** [January 2, 2024, 7:48pm UTC](https://community.cdata.com/t/use-statement-is-not-supported-to-switch-between-databases-when-using-cdata-azure-synapse-in-odi-studio/589/1 "2024-01-02T19:48:20Z")

</div>

This article provides details for the error:

_‘USE statement is not supported to switch between databases. Use a new connection to connect to a different Database.’_

This error is triggered by a badly configured Physical Schema.

 ![21804e83-f02d-4322-ac79-b894d1caf8e2.png](https://us1.discourse-cdn.com/cdata/original/1X/727d06c1a790b7432374ad5835170e945f62efbd.png)

When the _Database (Catalog/Work Catalog)_ specified in the physical schema does not correspond to the value of the _Database_ connection property this will trigger the _“Use \<database\_name\>”_ statement which AzureSynapse does not support:

- [USE (Transact-SQL) - SQL Server | Microsoft Learn](https://learn.microsoft.com/en-us/sql/t-sql/language-elements/use-transact-sql?view=sql-server-ver16)
- 

**Fix:**

To fix this issue the user must set _Database (Catalog)_ and _Database (Work Catalog)_ to the actual name of the database he wants to connect with (specified in the connection string)

Additional details on how to establish a connection with AzureSynapse can be found here:

- [Connecting to AzureSynapse](https://cdn.cdata.com/help/HEH/jdbc/pg_connectionj.htm#:~:text=separated%20with%20semicolons.-,Connecting%20to%20Azure%20Synapse,-In%20addition%20to)
