Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Linked Datastore issue

$
0
0

Hi guys

 

Two databases sitting on same sql server linked by creating linked server in Microsoft sql server managment studio... after that created linked datastores in data services 4.2... and when looked it the "Displayed optimized sql"... query is not created properly...

 

SQL Generated from Data Services:-

 

INSERT INTO "DBO"."STG_TABLE" table is in Same_server.DB2

 

INSERT INTO "DBO"."STG_TABLE" ( "ID" , "ACT_ORD" , "ICD" , "ICD_DESC" , "DIA_DESC"  , "USR_NM" , "LNG_COND" , "Adm_id" )
SELECT 
TAB1"ID"  , 
TAB1"ACT_ORD"  , 
TAB2"ICD"  , 
TAB2"ICD_DESC"  ,
TAB1"dia_DESC"  , 
STG_TAB"USR_NM", 
TAB44"LNG_COND"  , 
TAB3"ADM_id"

 

FROM ((("LOCALSERVER".DB1."DBO".TAB1 TAB1 LEFT OUTER JOIN "LOCALSERVER".DB1."DBO".TAB2 TAB2
ON ( TAB1"ID"  =  TAB2"ID" )) LEFT OUTER JOIN SAME_SERVER.."DBO".STG_TAB STG_TAB
ON ( TAB1"us_id"  =  STG_TAB"US_ID" )) LEFT OUTER JOIN SAME_SERVER.."DBO".TAB44 TAB44
ON ( TAB2"ICD"  =  TAB44"ICD" )) LEFT OUTER JOIN "LOCALSERVER".DB1."DBO".TAB3 TAB3
ON ( TAB1"id_2"  =  TAB3"ID" )

 

when i tried running the dataflow, sql query it gives below mentioned error:-

An invalid schema or catalog was specified for the provider "SQLNCLI11" for linked server "Same_Server".

 

correct sql should be:-

INSERT INTO "DBO"."STG_TABLE" ( "ID" , "ACT_ORD" , "ICD" , "ICD_DESC" , "DIA_DESC"  , "USR_NM" , "LNG_COND" , "Adm_id" )
SELECT 
TAB1"ID"  , 
TAB1"ACT_ORD"  , 
TAB2"ICD"  , 
TAB2"ICD_DESC"  ,
TAB1"dia_DESC"  , 
STG_TAB"USR_NM", 
TAB44"LNG_COND"  , 
TAB3"ADM_id"  
 
FROM ((("LOCALSERVER".DB1."DBO".TAB1 TAB1 LEFT OUTER JOIN "LOCALSERVER".DB1."DBO".TAB2 TAB2
ON ( TAB1"ID"  =  TAB2"ID" )) LEFT OUTER JOIN SAME_SERVER.DB2."DBO".STG_TAB STG_TAB
ON ( TAB1"us_id"  =  STG_TAB"US_ID" )) LEFT OUTER JOIN SAME_SERVER.DB2."DBO".TAB44 TAB44
ON ( TAB2"ICD"  =  TAB44"ICD" )) LEFT OUTER JOIN "LOCALSERVER".DB1."DBO".TAB3 TAB3
ON ( TAB1"id_2"  =  TAB3"ID" )

 

In correct sql query SAME_SERVER.DB2."DBO".STG_TAB STG_TAB should be written instead of SAME_SERVER.."DBO".STG_TAB STG_TAB

 

could you please help me where the issue is...

 

see the attached screenshot of dataflow created

 

Let me know if you need more information.


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>