I can not connect to a data base in a linked server

  • Hi i have two server on the main server and on the main server i have 2 databases.

    I create a link in another server to the main server and the connections is ok.

    but this connection works well in database "1" on the main server, but when try to get info for the database "2"

    i see the follow error

    Msg 7314, Level 16, State 1, Procedure vw_sales_actuals, Line 5

    The OLE DB provider "SQLNCLI10" for linked server "MZMAS235\SQL1" does not contain the table ""EncoreCompanyM"."dbo"."vw_daily_sales"". The table either does not exist or the current user does not have permissions on that table.

  • Any particular reason you expect this to work in the first place?

    From where I sit, I can only encourage you to check that

    1) You have spelled the database name correctly.

    2) The view is actually in the dbo schema.

    3) You have spelt the name of the remote view correctly.

    4) The view does actually exist in this database.

    5) Your login is permitted to access the database in the linked server.

    6) And your database user has permission to access the view.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • What are you using linked servers for? I would recommend against using them too heavily as they can create security holes. I would recommend looking into SSIS instead.

    As for your error message I would check your spelling and authorizations in both the databases and the views.

    If you want to switch and do this with SSIS it is just a simple pull transaction and is very simple to implement depending on what you are trying to accomplish.

  • Check the view that you are trying to open. It might be selecting from a table from different database.

  • your instance has a backslash .... wrap your server name in brackets like this

    [MZMAS235\SQL1].[database].dbo.

    and make sure you have your perms set up right

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

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