LinkedServer + changing default language


  • I am struggling with setting language for a query that runs on linked server:

    select * from OPENQUERY([my_linkedserver_here], 'select @@LANGID, @@LANGUAGE, * from myView')

    where [myView] is a view that requires @@LangID variable to display data with a proper language. I can't use 'set language' option inside query because it returns error that no column was found/returned or user has no priviledges to do it (I tried it with [sa]). Setting language outside OPENQUERY doesn't help either. Its always us_english set (default
    server's language I guess).

    Any hint?

    Thanks, Ray

  • sszymanski - Tuesday, November 14, 2017 1:03 AM


    I am struggling with setting language for a query that runs on linked server:

    select * from OPENQUERY([my_linkedserver_here], 'select @@LANGID, @@LANGUAGE, * from myView')

    where [myView] is a view that requires @@LangID variable to display data with a proper language. I can't use 'set language' option inside query because it returns error that no column was found/returned or user has no priviledges to do it (I tried it with [sa]). Setting language outside OPENQUERY doesn't help either. Its always us_english set (default
    server's language I guess).

    Any hint?

    Thanks, Ray

    One possibility is to change the default language for the login used for the linked server.

    Sue

  • Thank you, Sue, that solved the problem 🙂

    Best regards,
    Ray

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply