• KGJ-Dev (7/7/2014)


    I will be writing a stored procedure in in db1 and i wanted to access the TableA's data of db2. i am aware of using the linked server. but i am, looking for alternate for linked server because i need to pass credentials at runtime to connect the server and access the objects.

    I'd still use the Linked Server. If you're looking to have the linkage impersonate someone, you can do that during linked server setup if it's generic. If you want to setup as a specific user so you can control your impersonation, use the EXECUTE AS clause on a procedure.

    You don't want to set it up in a way where you're going to pass in a name/password for the other server on every call. It's, at best, painful.


    - 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