0

I have a parameterized OLE DB Source connection manager in SSIS. From that I want to retrieve just the server name and print it as a row in a flat file destination.

The connection manager is something like

"Data Source=TESTSERVER.local;Initial Catalog=TEST_DB;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;"

From this I want to retrieve just TESTSERVER.local and use it as a column value. Can anyone please help me here?

Chris Albert
  • 2,462
  • 8
  • 27
  • 31
  • If you want the server name you could select SELECT @@SERVERNAME as part of your query. – Brad May 18 '22 at 17:39

1 Answers1

0

You should have access to that parameter for the whole connection string.

Try using TOKEN twice in a derived column.

TOKEN(TOKEN(Parameter, ";",1), "=",2)

https://learn.microsoft.com/en-us/sql/integration-services/expressions/token-ssis-expression?view=sql-server-ver15

KeithL
  • 5,348
  • 3
  • 19
  • 25