sona
sona

Reputation: 175

How to create Log file in SSIS

I want to create a log file in SSIS. I know how to create through management studio, but I wanted to run my SSIS package through Command Prompt. Can you help me find the Windows commands for that?

Upvotes: 2

Views: 25794

Answers (5)

sona
sona

Reputation: 175

You need to set up the a new connection string inside of Business Intelligence Development Studio (BIDS). where you have to specify the path of Log file...i mean here path will be D:\Sample_Examples\Log.log... and name of the connection manager will be Log.log so now the command prompt will get changed into

dtexec /f "C:\\Package.dtsx" /l "DTS.LogProviderTextFile";"Log.log"

instead of

dtexec /f "C:\\Package.dtsx" /l "DTS.LogProviderTextFile;D:\Sample_Examples\Log.log"

we cant specify a direct path after DTS.LogProviderTextFile...because of that only i got error...

Thank you very much for the suggestions...

Upvotes: 2

Flea
Flea

Reputation: 11284

Yes, you have to create a connection manager for the log provider; however; there is no documentation on how to do this if you are using a custom log provider.

Upvotes: 0

Peter M
Peter M

Reputation: 472

You can do this another way, without going into your SSIS package.

Create a batch file and run DTEXEC in a new instance of CMD, i.e.:

CMD /C DTEXEC your package and args > log file

When you do this, you can run this batch file and get your log file.

See http://richarddingwall.name/2009/01/26/capture-the-output-from-a-scheduled-task/ for more details

Upvotes: 1

bart
bart

Reputation: 31

In your SSIS you need to create and configure an SSIS Log provider before you can use it. Look into link text for more info.

Upvotes: 2

Eric
Eric

Reputation: 95223

You can use the /L option, as documented here; however, you can also set Logging up in a much easier and finer way through the SSIS>Logging menu in Visual Studio.

Cheers,
Eric

Upvotes: 2

Related Questions