Question
FlyLow_MK on Tue, 13 Dec 2016 21:41:51
Hello there,
I have been using Elastic Queries (Preview) on SQL Azure which is equivalent Cross DB joins on SQL server.
Scenario 1:
DB1.dbo.tablename1
DB2.dbo.tablename2
Scenario 2:
DB1.dbo.tablename1
DB2.[stg.abc].tablename2
I have some dependency on a app generated schema called stg.abc , schema is a two word separated by ‘.’
I am able to get this working in scenario 1: by creating External DataSource, External table, and use it in a view on DB1 referencing a table on DB2.
In scenario 2, I am facing issues
Msg 46823, Level 16, State 1, Line 22 Error retrieving data from #######.database.windows.net.DBname. The underlying error message received was: 'PdwManagedToNativeInteropException ErrorNumber: 46723, MajorCode: 467, MinorCode: 23, Severity: 16, State: 1, ErrorInfo: EventDescription, Exception of type 'Microsoft.SqlServer.DataWarehouse.Tds.PdwManagedToNativeInteropException' was thrown.'.
Has anyone faced this issue and is there any solution to this?
Replies
Alberto Morillo on Wed, 14 Dec 2016 03:00:10
Hello,
Could you please take a look at the instructions provided on the following article about elastic queries with different schemas?
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-query-vertical-partitioning
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com
FlyLow_MK on Wed, 14 Dec 2016 21:20:38
Hello Alberto,
thanks for your reply..
I forgot to update this thread. After some read up and little more troubleshooting, i figured out the solution.
solved it by creating [stg.abc] on DB1 and matching the schema names on both the DBs. Create External Table with the Same Schema as the source Table.