Can I export server name as column value into a flat file destination?

26 views Asked by At

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?

1

There are 1 answers

0
KeithL On BEST ANSWER

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