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

  • Pergunta

  • 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


    • Editado kvraodba sábado, 8 de dezembro de 2012 05:36
    sábado, 8 de dezembro de 2012 02:26

Respostas

  • 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
    • Sugerido como Resposta Naomi N segunda-feira, 10 de dezembro de 2012 17:37
    • Marcado como Resposta Kalman Toth sexta-feira, 14 de dezembro de 2012 12:54
    segunda-feira, 10 de dezembro de 2012 08:31

Todas as Respostas

  • 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

    sábado, 8 de dezembro de 2012 08:17
  • Hi Kalman Toth,  

    i run the same , its not wotking .

     please help me


    regards venkat



    • Editado kvraodba sábado, 8 de dezembro de 2012 11:50
    sábado, 8 de dezembro de 2012 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


    • Editado Kalman Toth sábado, 8 de dezembro de 2012 15:40
    sábado, 8 de dezembro de 2012 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
    sábado, 8 de dezembro de 2012 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

    segunda-feira, 10 de dezembro de 2012 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

    segunda-feira, 10 de dezembro de 2012 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
    • Sugerido como Resposta Naomi N segunda-feira, 10 de dezembro de 2012 17:37
    • Marcado como Resposta Kalman Toth sexta-feira, 14 de dezembro de 2012 12:54
    segunda-feira, 10 de dezembro de 2012 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.

    sexta-feira, 31 de julho de 2020 19:36