Blog Post

Azure Database Support Blog
1 MIN READ

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

Jose_Manuel_Jurado's avatar
Jan 27, 2023

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
 

Published Jan 27, 2023
Version 1.0
No CommentsBe the first to comment