0

Trying to execute SSIS package via script.

Declare @execution_id bigint

EXEC [SSISDB].[catalog].[create_execution]
 @package_name = N'SF_Appointment.dtsx'
,@execution_id = @execution_id OUTPUT
,@folder_name = N'Packages'
,@project_name = N'SF_tables'
,@use32bitruntime = False
,@reference_id = Null
,@runinscaleout = False

I think it may be the folder name because I am using the folder where the package is located and not where the project is located?

enter image description here

The error I get is

Msg 27146, Level 16, State 1, Procedure SSISDB.catalog.create_execution, Line 201 [Batch Start Line 0] Cannot access the package or the package does not exist. Verify that the package exists and that the user has permissions to it.

I have the highest levels of access, which is why I think it is the folder and not my permissions. If it is my permissions, I'd have see what it could be because I have system admin access... I tried searching online but it all goes back to my permissions but I have the ones they talk about. This is why I say it may be the folder but even that gives me the same error.

2
  • In addition to Piotr Palka's answer, I think you have to execute this using Windows Credential's. If you are logged in using SQL Credentials, that might be the problem. Commented Sep 10 at 16:41
  • ah okay. Piotr's answer actually worked for me. but it I will keep that in mind in the future if i need to. thank you Commented Sep 16 at 18:12

1 Answer 1

3

Your screenshot do not match anything you entered in the script.

To execute package from the screenshot you need:

Folder Name: SSISPackages

Project Name: AthenaBucketExport

Package: BucketReport_Export.dtsx

An easy way to create good script is to go to SSMS, click "Execute..." on the package, enter parameters and then click "Script" button in the left upper corner. SSMS will create correct execution script for you.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.