0

I have created a database through a task script in SSIS. When I later try to connect to that database through the Connection Manager I am told that the Connection Manager does not exist. The database is there in the server.

How can I establish the connection to the database to load the data after I've created a new DB in the script?

error-0 error-1

Error: The connection "Data Source=..;Initial Catalog=8888888;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;" is not found. This error is thrown by Connections collection when the specific connection element is not found.

Control Workflow

From the Microsoft Forums The connection "" is not found from..

Similar question: SSIS Connection not found in package

Hadi
  • 36,233
  • 13
  • 65
  • 124
William Humphries
  • 541
  • 1
  • 10
  • 21
  • 1
    Could you please provide a screenshot of the DataFlow and ControlFlow? Basically I think it's quite bad practive to create a DB from SSIS and then populate it with Data in the same step... however: I would suggest to define a String Variable which will contain the Connectstring (the one you posted) and then create a new ConnectionManager in your population package on which you put an Expression in order to use this Stringvariable as Connectionstring. This Connectionmanager can then be used within your package. – Tyron78 Jun 06 '18 at 16:14
  • @Tyron78 This is simply a matter of configuring the connection string and variables correctly? What steps would you take to create a DB and populate with Data? – William Humphries Jun 06 '18 at 16:41
  • 1
    No, you will additionally need a ConnectionManager. It's an object in your project (assuming you are working in a project...) which you can add. This ConnectionManager can then be modified in order to not use a static connectionstring but to use a variable instead. This string variable as you already mentioned has then to be populated with the correct string. This can be done within your script task. – Tyron78 Jun 06 '18 at 16:52
  • So, did you succeed in creating the connection manager? Otherwise I'll try to support you... – Tyron78 Jun 07 '18 at 06:02
  • @Tyron78 Yes, we were able to establish a dynamic connection through the connection manager. The flat files are now loading to the database. – William Humphries Jun 08 '18 at 13:03
  • 1
    @Tyron78 If you post your second comment as answer I will accept as answer. – William Humphries Jun 08 '18 at 13:06

1 Answers1

2

You will need a ConnectionManager. It's an object in your project (assuming you are working in a project...) which you can add. This ConnectionManager can then be modified in order to not use a static connectionstring but to use a variable instead. This string variable as you already mentioned has then to be populated with the correct string. This can be done within your script task

Tyron78
  • 4,117
  • 2
  • 17
  • 32