Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS writing window username instead of service account while logging

I have implemented a SSIS 2008 package using BIDS. My package currently logs exceptions and information to the database. I am running the package via a SQL Job. I have configured the job to run using a service account. The problem that I am facing is that when the logs are written, I am seeing my windows credentials written to the username column instead of service account credentials. I am running the job via SSMS using my windows credentials. I have been told that Jobs would run via any DBA guy and they may not log in using Service account.

Following are the steps I followed for the job to run as service account.

  1. Created a credential with the service account as identity.
  2. Created a proxy associating with the credential.
  3. Configured the job to use the proxy account.

Below is the connection string from my package. I had removed Integrated Security=SSPI; and provided the userid and password of the service account but got an error message saying incorrect login.

<DTS:Property DTS:Name="ConnectionString">Data Source=xxxxxxxxx;User ID=;Initial Catalog=xxxxxx;Provider=SQLNCLI10.1;Integrated Security=SSPI;Application Name=xxxxxx-{452DA0BD-2ACF-4780-9DB0-5A64ABB406A1}xxxxxx\xxxxxx.xxxxxxx;Auto Translate=False;</DTS:Property>

Another thing that I have noticed is the creator name in the package is having my windows username. I tried updating that but no luck.

The errors are logged using event handlers

Event handler enter image description hereenter image description here

The connection string in the dtscConfig file

Data Source=xxx\xxx;Initial Catalog=xxx;Provider=SQLNCLI10.1;Integrated Security=SSPI;Application Name=xxx\xxxxxxx;Auto Translate=False;
like image 281
Tom Avatar asked Oct 17 '22 07:10

Tom


1 Answers

I have fixed the issue. I am passing system:username in parameter to the stored procedure which has solved the issue

like image 116
Tom Avatar answered Oct 19 '22 23:10

Tom