locked
cannot find stored procedure <storedProcedureName> RRS feed

  • Question

  • I have a desktop application that contains a sqlexpress database. On my developing machine my program works fine. Now when installing it on another machine (with the created installer) and then run the application I get an error
    "Cannot find stored procedure < .... >"

    I'm using following connection string:
    Data Source=.\\SQLEXPRESS;AttachDbFilename=database_app;Integrated Security=True;Connect Timeout=30;User Instance=True

    I tried several things, but no luck at this time... if some one could help me with this, that would be great :-)
    Thursday, September 4, 2008 2:08 PM

All replies

  • Okay, I think we found the problem why... the user which I was logged on on the external machine wasn't an administrator.
    We are testing further on this. I we know the right cause I'll post it.
    Thursday, September 4, 2008 3:34 PM
  • Okay I found out that only the machines administrator could execute the storedprocedures... Now I'm having problems on finding a solution for changing the permissions on the storedprocedures so when an other user logges in on the machine, he also has permissions for executing the program

    any ideas how? found things like "grant execute on <storedprocedure> to public" no luck ...

    So I'm out of ideas
    Friday, September 5, 2008 8:41 AM
  • Who is the owner of that stored procedure? I will aslo move thread to appropriate forum

     

    Friday, September 5, 2008 9:52 AM
  • stored procedure owner is "dbo"
    or in the properties in the manager there is the domain/gerbrand set as owner.
    when I install it on another machine in the same domain and I log in on that computer with my domain/gerbrand
    then i get the error of stored procedure isn't found.

    if i log in as the administrator of that computer then i have no problems at all.

    Oh didn't know that I posted it in the wrong thread sorry.


    Friday, September 5, 2008 10:09 AM
  • You can grant the execute permission on the stored procedure to the installing account. 

     

    I think in your case the ddl looks like:

     

    grant execute on [stored procedure name] to [domain\gerbrand]

     

    HTH,

     

    -Steven Gott

    SDE/T

    SQL Server

     

    Sunday, September 7, 2008 4:50 PM