SSIS Logging in 2012
While working on SQL Data tools for my SSIS package. I enabled logging using SQL Server option. But I am not seeing any logs I pick all the possible log events.
I was expecting to see some logging in the database which is associated to the connection string . I see a the table sysssislog but no logs I ran sql profiler to see where it is logging I see an SP being called for logging but I have no clue how is that
wired . If I change the connection to point to another database I see the default table sysssislog table getting the logs. Where should I be looking further to figure out how this logging is wired up ?
exec
sp_executesqlN'sp_ssis_addlogentry
@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11'
N'@P1 nvarchar(4000)
,@P2 nvarchar(4000)
,@P3 nvarchar(4000),
@P4 nvarchar(4000)
,@P5 uniqueidentifier
,@P6 uniqueidentifier,@P7 datetime2(7),@P8 datetime2(7),@P9 int,@P10 varbinary(8000),@P11 nvarchar(4000)'
N'PackageStart',N'DEVWBIWRK02',N'domain\user,N'Package','34BB2434-0C03-4D2E-A14B-D18DFE950C32','7A7D50CF-DF11-4383-BAC2-80B0A38BF2E9','2014-08-25
13:11:32','2014-08-25
13:11:32',0,0x,N'Beginning
of package execution.
Moyz Khan
Thanks Visakh,
Is there a way I can customize my own SP for logging ? Where i am working I inherited some SSIS packages which are logging to a particular database in some custom tables and not in SysSISSlogs I see that table there too but no data. When I open the
SSIS logging option all I see is which logging option is picked(
in this case) and the events to be logged. So if I change the database on the connection to a new database I see a new table in that database and I also see the logs in it. Trying to figure out where all that custom info is store and configured ?
THanks
Moyz Khan
Yes. you can customize logging.
For that you can enable event handlers for package for OnError,OnPostExecute etc events of the package and add logic inside event handler to add details to your own created customized table. You can make use of system variables like ErrorDescription,ErrorCode
etc to get error details
see this to get an idea
http://consultingblogs.emc.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx
http://sqljunkieshare.com/2011/12/09/ssis-package-logging-custom-logging-2008-r2-and-2012/
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Similar Messages
-
SSIS log provider for Text files - Clean logs
I have SQL Server 2012 with package deployment model.
I'm thinking what is best practise for logging.
Does SSIS log create new log files each day or does it log alway to same file forever?
How to handle that size of files in Logging Folder is under control? Is is manual process to clean(remove) logs or any automated way to remove logs older that 30 days etc?
Kenny_IIn all SSIS versions the logging to file is an append operation, or create then append if the log file does not exist. To remedy the file growth one needs to create a scheduled job.
Another option is to create a new file in the package http://goo.gl/4c1O3n this is helpful if you want to get rid of the files older than x days. IMO the easiest way to remove these is thru
Using Robocopy to delete old files from folder
Arthur My Blog -
Error when deploying SSIS package in 2012
Hi,
I am trying to deploy a SSIS package to 2012 version. But i am getting error as below,
TITLE: SQL Server Integration Services
There was an exception while loading Script Task from XML: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Tools.Applications, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.Tools.Applications, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.SqlServer.IntegrationServices.VSTA.VstaHelper.<CleanUp>b__1b()
at Microsoft.SqlServer.IntegrationServices.VSTA.MtaExecution.Run(Action action)
at Microsoft.SqlServer.IntegrationServices.VSTA.VstaHelper.CleanUp()
at Microsoft.SqlServer.VSTAHosting.VSTAScriptingEngine.DisposeVstaHelper()
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.MigrateVSTA21ScriptProject(XmlElement elemProj, IDTSInfoEvents events)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events)
There are 4 packages of same version, i get this error only for 2 packages and other 2 am able to deploy successfully. Can someone tel mewhat would be the issue.
the same package is successfully deployed from my colleague machine.
ManoHi Manon,
According to the error message, the packages that cannot be deployed should include Script Task/Component. But the package that can be deployed without problem include Script Task/Component, right? If so, the issue should occur because certain Visual Studio
Tools for Applications (VSTA) Runtime has been installed:
Microsoft Visual Studio Tools for Application x64 Runtime3.0
Microsoft Visual Studio Tools for Application x86 Runtime3.0
You can check it from the Programs and Features panel. Then, you can install the exact VSTA Runtime from the
\redist\VSTA\runtime\ folder of the SQL Server install media.
Reference:
https://connect.microsoft.com/SQLServer/feedback/details/776248/could-not-load-file-or-assembly-microsoft-visualstudio-tools-applications-core
Regards,
Mike Yin
TechNet Community Support -
SSIS 2008 Logging - SSIS Log Provider for SQL Server
Simple SSIS package - copies a table from Server A to Server B.
Everything works except logging using SSIS Log Provider for SQL Server. Selecting the similar events to using
SSIS Log Provider for Text Files does generates a file on the server.
I specified server B on the configuration for SSIS Log Provider for SQL Server.
Logged on with a username with sysadmin rights on Server B. Executed the package using that login and nothing is written to msdb..sysssislog
any ideas what's going on or what am I doing wrong?Just to be sure that the basics are right :
You sure that you configured the log provider correctly?
Selected the required 'components' on the left bar?
Selected events on the Details Tab?
selected the right table? I mean it should be --> select * from msdb..sysssislog
The default schema in your DB setup is dbo right? Coz, if not the logging will be a real problem. You might wanna recreate the table then ..
Btw, if you still experience issues, I'd advise you to enable all events and check for logging just to make sure that there isnt any prob with the DB setup ..
Do try and let us know :)
Edited:
Also a few more:
Check what database you chose in the connection setting page of the logging configuration wizard and check for entries in sysssislog of tht DB as, the sysssislog will be created only in that db.
Ensure that you have execute permission on sp_ssis_addlogentry in that particular db (mostly msdb). Can be checked via:
select name,
has_perms_by_name(name, 'OBJECT', 'EXECUTE') as has_execute
from msdb.sys.procedures
where name like 'sp_ssis_addlogentry' --for 2008 edition and up
or name like 'sp_dts_addlogentry' --for 2005 edition
Thanks to @Sathyanarrayanans for pointing this out :)
Hope this should help ..
Thanks, Jay <If the post was helpful mark as 'Helpful and if the post answered your query, mark as 'Answered'> -
Downgrade of SSIS packages from 2012 to 2008
Team,
We have put all our efforts to develop SSIS 2012 solution and now customer requirement changes and they wants to implement ETL in SQL 2008R2.
Is there anyway by which we can convert existing SQL 2012 packages to SQL 2008R2 , to meet the deliverables. please advice.Not possible to downgrade packages created in a higher version. The inverse can be done though by upgradation
So in your case best bet is to keep SSIS inside SQL 2012 version and use other parts ie relational database etc in SQL 2008 R2
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to see old ssis logs ?
Hi ! I don't know where or how SSIS (the SSIS tool, not sql server agent) stores logs for old jobs. Is there a way to see the log of SSIS jobs from past day, week, month etc . ?
Thanks.Will it also show reasons for failure of the package ? Thanks.
Hi blastoSO,
By querying the sysjobhistory table of MDSB database, we can view the error message of jobs. However, to get the SSIS package log details, we have to make use of SSIS logging such as SSIS logging provider for SQL Server which store the package logs into
the sysssislog table.
Regards,
Mike Yin
TechNet Community Support -
SSIS log file created twice, would someone please try this
I started off trying to explain the behavior, but it got too long and wasn't sure if people would follow it. So rather then trying to explain it, I would like to ask someone to try the following to see if they can dumplicate this odd behavior I am seeing on my side.
Please follow these steps, and let me know what you get.
(1) Take any simple working package, and create an SSIS log.
(2) Use the following for the expression to set the connection string for the log file's connection manager. For simplicity, let's say the file goes in a folder called "C:\SSIS_log\". For you it could be somewhere else.
Expression:
"C:\\SSIS_log\\"
+ "logfile_"
+ (DT_STR,4,1252)DATEPART( "yyyy" , @[System::StartTime] )
+ RIGHT("0" + (DT_STR,4,1252)DATEPART( "mm" , @[System::StartTime] ), 2)
+ RIGHT("0" + (DT_STR,4,1252)DATEPART( "dd" , @[System::StartTime] ), 2)
+ RIGHT("0" + (DT_STR,4,1252)DATEPART( "hh" , @[System::StartTime] ), 2)
+ RIGHT("0" + (DT_STR,4,1252)DATEPART( "mi" , @[System::StartTime] ), 2)
+ RIGHT("0" + (DT_STR,4,1252)DATEPART( "ss" , @[System::StartTime] ), 2)
+ ".txt"
When you evaluate this expression, you should see that it appends a time stamp that goes down to the minute and second of the package start time.
(3) Delete any existing files in the log directory.
(4) Run the package.
Make the following observations.
(A) How many log files do you get?
(B) And what do you see in the log file(s)?
(C) What time stamp do you have in name of the log file(s)?Jia Li said:
Okay, my take is this: when you execute package in BIDS, BIDS first validate the package and then a new package object is instantiated and executed. The package object used for validation is the same as long as the package is not reopened, so the first log file has the same name. Because the execution phase load package from xml again, it is using a new pakcage object, so expression get re-evaluated and the second log file gets renamed every time.
Duane Douglas said:
Jia Li said:
The @StartTime of the first file is evaluated when you open the package in BIDS. So if you close the package, re-open it and execute, you will get two files again.
i just remembered that someone else here experienced a similar issue with the starttime variable. i understand why it needs an intial value when a package is created or opened. but i don't understand why this value isn't replaced at run-time? can you please shed some light on this?
thanks
Duane Douglas, MCAD | http://www.ssisbi.com | Please mark the post(s) that answered your question.
ok. but if i'm not mistaken, the execution phase doesn't change the value of @starttime to reflect the current system time. after validation, the execution phase should change the value of @starttime to the current system time. no?Duane Douglas, MCAD | http://www.ssisbi.com | Please mark the post(s) that answered your question. -
In this video, I'm going to demonstrate how to use the SSIS Log Analyzer tool to analyze complex and verbose SSIS logs quickly and easily.
http://technet.microsoft.com/en-us/sqlserver/hh319894.aspxHi DebarchanS,
Thanks for sharing.
Thanks,
Eileen
Eileen Zhao
TechNet Community Support -
Hello All,
I created a SSIS package and the SSIS package is executed by the batch file. The output of the ssis process is captured in the log file using the below command line;
DTEXEC.EXE /f TestPkg.dtsx >> LogFileName
I want to store the text that goes into the LogFileName into the database table.
Is it possible to do it?Hi S Prashant,
To use the /L switch in the DTExec command line, we must configure the corresponding log provider in the package. In your scenario, you need to add both “SSIS log provider for Text files” and “SSIS log provider for SQL Server” logs but don’t need to check
them. The following image illustrates the configurations:
After configuring the logging, the name of each log provider connection manager can be used in the /L options such as:
DTExec /f “C:\Packages\Package.dtsx” /l “DTS.LogProviderTextFile;Log.txt” /l “DTS.LogProviderSQLServer.LocalHost.TestDB”
Regards,
Mike Yin
TechNet Community Support -
Sp_getapplock script not working in SSIS(data tools 2012)
Hi,
I have a SSIS package created in 2012 data tools. I have added sql tasks to create and release the locks.
Create the lock script in sql task1:
DECLARE @ProcResult int = 0;
-- Get an exclusive application lock on the package execution resource, to prevent other executions of the same package from doing the same
EXEC @ProcResult = sp_getapplock @Resource ='a',
@LockMode = 'Exclusive',
@LockOwner = 'Session',
@LockTimeout = 0; -- Do not wait for the lock
IF @ProcResult < 0
RAISERROR('Failed to acquire application lock on %s. sp_getapplock returned %d', 16, 1, @PackageResourceName, @ProcResult);
Release the lock in sql task 2:
DECLARE @ProcResult int = 0;
-- Release a previously acquired exclusive application lock on the package execution resource
EXEC @ProcResult = sp_releaseapplock @Resource ='a',
@LockOwner = 'Session';
IF @ProcResult < 0
RAISERROR('Failed to release application lock on %s. sp_releaseapplock returned %d', 16, 1, @PackageResourceName, @ProcResult);
When I ran this, the release lock failing with the following error:
[Execute SQL Task] Error: Executing the query "DECLARE @ProcResult int = 0;
-- Release a previou..." failed with the following error: "Cannot release the application lock (Database Principal: 'public', Resource: 'a') because it is not currently held.
Failed to release application lock on a. sp_releaseapplock returned -999". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
When I use the same above tasks with same scripts in data tools 2010 its working fine. Any thing wrong in 2012 Data tools?
Please advice. Tx in advance
PorusHi Porus,
May be you failed to release the lock from the 1st run, but
SSDT 2012 should not be used to author SSIS 2012 packages.
Arthur
MyBlog
Twitter -
SSIS in VS 2012 -- Set 32-bit mode permanently?
I am using BIDS in Visual Studio 2012. I need my SSIS packages to run in 32-bit mode. I set the debugging property for Run64BitRuntime to "false," but the next time I start
Visual Studio it's set back to "true." Is there a way to set VS to use 32-bit mode all the time without having to manually change it every time I open my project?I am using BIDS in Visual Studio 2012. I need my SSIS packages to run in 32-bit mode. I set the debugging property for Run64BitRuntime to "false," but the next time I
start Visual Studio it's set back to "true." Is there a way to set VS to use 32-bit mode all the time without having to manually change it every time I open my project?
Have you pressed the Save All button after changing it? That works in Visual Studio 2010. And also check the project file ****.dtproj.user
You will find the 64bit option in there:
<Configurations>
<Configuration>
<Name>Development</Name>
<Options>
<Run64BitRuntime>false</Run64BitRuntime>
Please mark the post as answered if it answers your question | My SSIS Blog:
http://microsoft-ssis.blogspot.com |
Twitter -
Upgrade SSIS/DTS to 2012/2014
Hi,
How to upgrade/migrate SSIS/DTS from SQL 2000/2005 to SQL 2012/2014?Depending on what packages use it may not always be possible to do complete upgrade of packages. The easiest way to do package upgrade is by opening package within BIDS/SSDT (client tools) in the new version. Then upgrade wizard will run and do an upgrade
of packages. Once this is done package gets opened and it may report any errors which may arise due to wizard being unable unable to upgrade few components inside package like custom third party components.
This you need to do manually yourself by either compiling assemblies against correct references in new version or installing third party component compatible with the latest versions.
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
SSIS Logging Warnings despite all being fixed
I have fixed all the warnings in my packages, the little yellow triangle with exclaimination mark. Most were just potential truncation warnings.
Now that they are fixed the little yellow triangle is gone in BIDS. But when i enable logging, SSIS is still logging the warnings in my ssislog table.
Why are they being logged if i fixed them and is there something im overlooking?Hi winstonSmith,
SQL Server Integration Services includes log providers that we can use to implement logging in packages, containers, and tasks. With logging, we can capture run-time information about a package, helping us audit and troubleshoot a package every time it is
run. The SQL Server log provider, which writes log entries to the sysssislog table in a SQL Server database.
As per my understanding, the sysssislog table contains one row for each logging entry that is generated by packages or their tasks and containers at run time. When the package executes, the log entries are written in the table. For the next time executing,
the new log entries are written after the previous entries. So even though the warnings are fixed, the table still stores the former warnings.
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
SSIS Deployment in 2012/2014
Hi, I upgraded SSIS packages from 2008 R2 to 2014 and deployed to IntegrationServicesCatalogs->ssisDB. Now I m trying to use DTExec to schedule the packages in SQL Agent. I saved the package configurations to SQL Server table. Can someone help in the
below command? I m getting the error "Cannot find the folder" when I run the package. All the packages are deployed into SSISDB->GBI Folder->GDM Project.
Would appreciate any help, THank you!
"C:\Program Files\Microsoft SQL Server\120\DTS\Binn\DTExec" /SQL "\SSISDB\GBI\GDM\Master Load.dtsx" /SERVER "GBIVCST01" /CHECKPOINTING OFF /REPORTING E /CONNECTION Admin;"Provider=SQLNCLI11;Data Source=BRIDCDW01\BRIDCDW01;Persist
Security Info=True;Password=GBI1;User ID=G_BI;Initial Catalog=GDMConfiguration1">>>> I saved the package configurations to SQL Server table.
Where to? I mean a database? It is possible the Agent cannot read the data? Do you run it locally?
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Exporting data on Excel recreating the sheet - SSIS 2008 R2-2012
Hi,
I need to read data from a SQL Server view to write the related rows on an Excel sheet, not with an append operation but with a delete operation against the sheet.
Any suggests to me, please?
ThanksHi Pscorca,
If the data volume is not large (for example less than a million), you can also use Lookup Transformation:
http://www.rad.pasfu.com/index.php?/archives/46-SSIS-Upsert-With-Lookup-Transform.html
If the data volume is large, use Merge statement in a Execute SQL Task as Murali suggested.
Regards,
Mike Yin
TechNet Community Support
Maybe you are looking for
-
Apple ID username, password not correct for imessenger ios 6
i just upgraded to ios 6 on my iphone 4 and imessenger is fine to send and receive but when i go to settings and try to register it with my apple ID i get an error that the username and password are not correct, although i am usung the apple ID fine
-
When trying to save a file to the computer I use for printing, the entire "Shared" section does NOT show up on my side panel. If I open up a Finder window, they are there and I have no issues accessing them. I just can't get them to appear to select
-
Flash cs 5.5 app development using a windows machine?
can any one tell me if it is possible for me to buy a publish certificate for Flash CS 5.5 for windows so that i can publish some games for the iPhone in retina display supported? also the other question is that, i have heard that apple will not allo
-
My music wont shuffle any more
My iPod Nano wont shuffle music any more
-
Hello all! I'll get right into my problem. I'm using netbeans 5.0 to do some Java at home along with my course at college. I'm currently working on an applet but am having some problems getting images to display, can anyone explain why I get the erro