Lesson Learned #307:Reference to database and/or server name is not supported in this version

This post has been republished via RSS; it originally appeared at: Azure Database Support Blog articles.

Our customer got the following error message: Msg 40515, Level 15, State 1, Line 19 - Reference to database and/or server name in 'DbName.dbo.TableName' is not supported in this version of SQL Server, executing the following TSQL: select * into [DbName].[dbo].[TableName] from [TableName2] 

 

As we mentioned, in this URL: https://techcommunity.microsoft.com/t5/azure-database-support-blog/cross-database-query-in-azure-sql-database/ba-p/369126This requires accessing tables on different DBs using 3 part naming that is not possible in Azure SQL Database but in Azure SQL Managed Instance is possible.
 

If we need to use Azure SQL Database, the recomendation is to use external tables - https://techcommunity.microsoft.com/t5/azure-database-support-blog/cross-database-query-in-azure-sql-database/ba-p/369126
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.