SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


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


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

Author
Message
euroflim_titoce
euroflim_titoce
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 7
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.
Erland Sommarskog
Erland Sommarskog
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2093 Visits: 872
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.

Erland Sommarskog, SQL Server MVP, www.sommarskog.se
zachary.curtin
zachary.curtin
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 Visits: 80
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.
iaminyourhead
iaminyourhead
Valued Member
Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)

Group: General Forum Members
Points: 62 Visits: 415
Check the view that you are trying to open. It might be selecting from a table from different database.
WahooNo2
WahooNo2
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 10
your instance has a backslash .... wrap your server name in brackets like this

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

and make sure you have your perms set up right
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search