June 15, 2017 at 9:51 am
Executing the query "PROC_ACTION_INSERT ?,?" failed with the following error: "Cannot find the object 'PROC_ACTION_INSERT ', because it does not exist or you do not have permission.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly
I am getting the above error when running a SSIS shecduled as a job. When I run the SSIS from my box I do not get the error then again I am sysadmin on that database server.
The user1 that is running the job has all the needed permission and the stored procedure does exist in the database.
In the above stored procedure the following are done
Thanks
June 15, 2017 at 10:00 am
It's not the user that's running the job in whose context the commands run. If the user is a sysadmin, it'll run in the context of the SQL Server Agent account. Otherwise, it may use a proxy. Check the permissions on one of those accounts as appropriate.
John
June 15, 2017 at 10:22 am
June 15, 2017 at 10:27 am
Sorry this is not a sql job . It's a windows job running through task scheduler that calls a SSIS in the VB code. The job is run by user1 so the SSIS is also running in the user1 context .
June 15, 2017 at 11:11 am
How does it call the SSIS package?
June 15, 2017 at 12:44 pm
Steve Jones - SSC Editor - Thursday, June 15, 2017 11:11 AMHow does it call the SSIS package?
Through the VB code.
June 15, 2017 at 2:34 pm
Guras - Thursday, June 15, 2017 12:44 PMSteve Jones - SSC Editor - Thursday, June 15, 2017 11:11 AMHow does it call the SSIS package?Through the VB code.
pkgResults = pkg.Execute();
June 16, 2017 at 9:33 am
You didn't list user1 with execute permission on the proc
June 21, 2017 at 1:10 pm
This was removed by the editor as SPAM
June 21, 2017 at 3:00 pm
did you resolve this? when i read it, the first thing i though was it might be database context.
if the database context was master, you'd get that exact error, especially if the proc was in a differnet database.
i was expecting it to have db.schema.proc, like Production.dbo.PROC_ACTION_INSERT instead of just the proc name,and implied database and schema
Lowell
June 22, 2017 at 7:37 am
Lowell - Wednesday, June 21, 2017 3:00 PMdid you resolve this? when i read it, the first thing i though was it might be database context.
if the database context was master, you'd get that exact error, especially if the proc was in a differnet database.
i was expecting it to have db.schema.proc, like Production.dbo.PROC_ACTION_INSERT instead of just the proc name,and implied database and schema
I checked the permissions on the database objects and all were fine. I tried again and it worked!! It works now but the thing that bothers me is I do not know the cause and fix for it 🙁
June 22, 2017 at 7:44 am
I've seen this on a web server due to connection pooling, but it's been a while.
way back when , we resolved it via two ways: we assigned a default database for the account to NOT be master, but to be the actual database in question, and also made changes to use three part naming conventions for object names.
Lowell
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply