En iyi yanıtlayıcılar
Msg 7357, Level 16, State 1, Line 1 OPENROWSET

Soru
-
hi,
please help me , when i am exe below Query its give the above error msg
SELECT *
FROM OPENROWSET('SQLNCLI','server=sql2005;Uid=Swiftv2.user;Pwd=123456;Database=Swiftv2'
,'
exec sql2008r2.BOM.dbo.[USP_SABM_BOM_PRICECARD_BOTTLECOST_AK]
24,''PF2'',''2012-2013'',''MHN21101''
')
error msg
Msg 7357, Level 16, State 1, Line 1
Cannot process the object "
exec sql2008r2.BOM.dbo.[USP_SABM_BOM_PRICECARD_BOTTLECOST_AK]
24,'PF2','2012-2013','MHN21101'
". The OLE DB provider "SQLNCLI" for linked server "(null)"
indicates that either the object has no columns or the current user does not have permissions on that object.
regards venkat
- Düzenleyen kvraodba 8 Aralık 2012 Cumartesi 05:36
8 Aralık 2012 Cumartesi 02:26
Yanıtlar
-
I asked a couple of questions:
1) Why don't you execute the procedure directly from A?
2) Why you use OPENROWSET?
3) What does stored procedure in question do? Return data? Update data? Something else?
4) Have you verified that all names are specified exactly?It seems that you only answered 1 and 3. Unfortunately the answers are not satisfactory. One is a live server and one is test server. And? And you don't even know what the procedure does?
If you ask a question, and you get questions back, you should make the effort to answer them, as we might eventually be able to help you.
Since you don't seem to care, my recomendation is that you call the stored procedure directly without using the middle server and OPENROWSET:
exec [sql2008r2].BOM.dbo.[USP_SABM_BOM_PRICECARD_BOTTLECOST_AK] 24,'PF2','2012-2013','MHN21101'
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se- Yanıt Olarak Öneren Naomi N 10 Aralık 2012 Pazartesi 17:37
- Yanıt Olarak İşaretleyen Kalman Toth 14 Aralık 2012 Cuma 12:54
10 Aralık 2012 Pazartesi 08:31
Tüm Yanıtlar
-
Can you try the following (don't break the line):
SELECT * FROM OPENROWSET('SQLNCLI','server=sql2005;Uid=Swiftv2.user;Pwd=123456;Database=Swiftv2','exec [sql2008r2].BOM.dbo.[USP_SABM_BOM_PRICECARD_BOTTLECOST_AK] 24,''PF2'',''2012-2013'',''MHN21101''')
Also, try the SSIS Import/Export Wizard:
http://www.sqlusa.com/bestpractices/ssis-wizard/
Kalman Toth SQL 2008 GRAND SLAM
New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 20128 Aralık 2012 Cumartesi 08:17 -
- Düzenleyen kvraodba 8 Aralık 2012 Cumartesi 11:50
8 Aralık 2012 Cumartesi 11:42 -
Let me get this straight:
From one linked server: sql2005
You want to execute a stored procedure on a linked-linked (double linked) server:
sql2008r2.BOM.dbo.[USP_SABM_BOM_PRICECARD_BOTTLECOST_AK]
Have you tried the SSIS Wizard?
Kalman Toth SQL 2008 GRAND SLAM
New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012- Düzenleyen Kalman Toth 8 Aralık 2012 Cumartesi 15:40
8 Aralık 2012 Cumartesi 15:39 -
So what do you want to do really?
Right now are on server A and invokes OPENROWSET to from server B execute a procedure on server C. You are more or less asking for trouble.
Questions:
1) Why don't you execute the procedure directly from A?
2) Why you use OPENROWSET?
3) What does stored procedure in question do? Return data? Update data? Something else?
4) Have you verified that all names are specified exactly?
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se8 Aralık 2012 Cumartesi 16:27 -
hi,
i am using 2 linked servrs , its like (2005, 2008r2).
i am runing query in 2005(Sp2) and linked servres is (2008r2 RTM).
and also configured openrowset option in both servers .
regards venkat
10 Aralık 2012 Pazartesi 04:07 -
hi,
i am using 2 linked servrs , its like (2005, 2008r2).
i am runing query in 2005(Sp2) and linked servres is (2008r2 RTM).
and also configured openrowset option in both servers .
1. 2008r2 is live server , 2005 is test server
2. i think it used for retun data .
regards venkat
10 Aralık 2012 Pazartesi 04:11 -
I asked a couple of questions:
1) Why don't you execute the procedure directly from A?
2) Why you use OPENROWSET?
3) What does stored procedure in question do? Return data? Update data? Something else?
4) Have you verified that all names are specified exactly?It seems that you only answered 1 and 3. Unfortunately the answers are not satisfactory. One is a live server and one is test server. And? And you don't even know what the procedure does?
If you ask a question, and you get questions back, you should make the effort to answer them, as we might eventually be able to help you.
Since you don't seem to care, my recomendation is that you call the stored procedure directly without using the middle server and OPENROWSET:
exec [sql2008r2].BOM.dbo.[USP_SABM_BOM_PRICECARD_BOTTLECOST_AK] 24,'PF2','2012-2013','MHN21101'
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se- Yanıt Olarak Öneren Naomi N 10 Aralık 2012 Pazartesi 17:37
- Yanıt Olarak İşaretleyen Kalman Toth 14 Aralık 2012 Cuma 12:54
10 Aralık 2012 Pazartesi 08:31 -
It happened to me as well, in my case was the excel TAB name not matching with the linked server string connection
Msg 7357, Level 16, State 2, Line 4
Cannot process the object "Select * from [Sheet1$]Check if the tab name has the same name or, maybe is in spanish (Hoja1) which it will not work.
31 Temmuz 2020 Cuma 19:36