• Hi Paresh,

    Thanks for the response and suggestions. On running the queries you suggested, linked server is created successfully but I am getting the below error while querying through it.

    Query

    Select * from [ANKUR01].SmShirts.dbo.History

    Error

    Msg 18456, Level 14, State 1, Line 1

    Login failed for user 'dba'.

    Here are the requirements what exactly I want.

    1) User login into dot net application through USer1 which has only dbowner rights on the application database.

    2) From an configuration form user will choose another database which needs to be queried in conjunction with application database. This new database can be remote/local and can be accessed through SQL/Windows authentication.

    3) To access this new database I need to create an linked server.

    Please suggest me what should I do in this case to create linked server. Keeping in mind that database can be local/remote and can be accessed through SQL/Windows authentication.

    Thanks in advance.

    Ankur Bhargava