locked
Msg 7357, Level 16, State 1, Line 1 OPENROWSET RRS feed

  • คำถาม

  • 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


    • แก้ไขโดย kvraodba 8 ธันวาคม 2555 5:36
    8 ธันวาคม 2555 2:26

คำตอบ

  • 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
    • เสนอเป็นคำตอบโดย Naomi N 10 ธันวาคม 2555 17:37
    • ทำเครื่องหมายเป็นคำตอบโดย Kalman Toth 14 ธันวาคม 2555 12:54
    10 ธันวาคม 2555 8:31

ตอบทั้งหมด

  • 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 2012

    8 ธันวาคม 2555 8:17
  • Hi Kalman Toth,  

    i run the same , its not wotking .

     please help me


    regards venkat



    • แก้ไขโดย kvraodba 8 ธันวาคม 2555 11:50
    8 ธันวาคม 2555 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


    • แก้ไขโดย Kalman Toth 8 ธันวาคม 2555 15:40
    8 ธันวาคม 2555 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.se
    8 ธันวาคม 2555 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 ธันวาคม 2555 4: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 ธันวาคม 2555 4: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
    • เสนอเป็นคำตอบโดย Naomi N 10 ธันวาคม 2555 17:37
    • ทำเครื่องหมายเป็นคำตอบโดย Kalman Toth 14 ธันวาคม 2555 12:54
    10 ธันวาคม 2555 8: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 กรกฎาคม 2563 19:36