Access Linked Server View

  • Hi,

    I have a linked server with login credentials where we can access a view to query data. I have created another view in our database that queries the view on linked server. We have an integrated security implemented for .NET authentication. How can I execute the second view I created which is apparently failing to query from linked server if I access from our .net application.

    However it works fine if I run it in management studio.

    What is the right way of accessing data without using the linked server directly from our application. I want to avoid building connection string if the linked server changes.

    Any help will be greatly appreciated.

    Thanks,

  • Do you have the SQL Server error that gets kicked up when you try to call the local view that looks to the linked server view from .Net?


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Well the error is " Login failed for user {My login id}"

    My colleagues have been able to access that view using stored procedures in different databases, but I need to access it using a view.

  • I'd start with the internal security on the linked server object, see who it's imitating, and see if that login can get to the view/has access to the other server.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

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

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