Showing posts with label package. Show all posts
Showing posts with label package. Show all posts

Friday, March 30, 2012

Managed index in Fuzzy Lookup Error

If we run the package with fuzzy lookup without selecting the "manage index" option it runs great and select the data and inserts data within the table as expected.

If we run the sam package after selecting the option for "manage index" it gives error:

Error: 0xC0202009 at Data Flow Task, Composite Lookup [15209]: An OLE DB error has occurred. Error code: 0x80040E14.

An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "A .NET Framework error occurred during execution of user defined routine or aggregate 'sp_FuzzyLookupTableMaintenanceInstall':

OK this becasue there is a known issue in SQL server 2005 June CTP. Its not there in Sep CTP

Managed index in Fuzzy Lookup Error

If we run the package with fuzzy lookup without selecting the "manage index" option it runs great and select the data and inserts data within the table as expected.

If we run the sam package after selecting the option for "manage index" it gives error:

Error: 0xC0202009 at Data Flow Task, Composite Lookup [15209]: An OLE DB error has occurred. Error code: 0x80040E14.

An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "A .NET Framework error occurred during execution of user defined routine or aggregate 'sp_FuzzyLookupTableMaintenanceInstall':

OK this becasue there is a known issue in SQL server 2005 June CTP. Its not there in Sep CTP

Wednesday, March 28, 2012

Making Transactions Work - Without Blocking

I'm having a very difficult time getting any type of transactions to work without encountering blocking.

Here's what I have. I created a package using the Import data option on a database to start with. That gave me the following:

On the control flow tab there is a Preparation SQL task which truncates a table followed by a Data Flow Task that then copies from an oracle database into that same table.

The two are connected by the green success arrow.

For obvious reasons, if the import from oracle fails, I would like the truncate of the table to be rolled back so that the table in question is returned to its previous state.

I have tried the following:

Setting the transactions setting on the data flow panel to "supported" and changing it on the Control Flow tab to required.

Setting both to required.

Setting the data flow setting to "supported", then adding a sequence container onto the control flow panel, moved both the preparation and data flow tasks into it and then set the sequence container to "required".

In all cases I have installed the package onto the server and then scheduled a job in SQL Server agent to run the package.

No matter what way I do it, the preparation sql task apparently opens a transaction and then the following data flow task starts a different one and is blocked by the first one. If you check a log file I set it to generate it clearly gets stuck after the sql preparation job when trying to start the data flow task. Checking sql server itself (Activity monitor), the job is stuck because it is blocked by process "-2".

So I'm lost as to how to make one single transaction be used for the entire package and get the behavior i need....

Thx.

R-

Robert,

I've had EXACTLY the same problem and to say I was annoyed is an understatement.

You won't like the answer - I don't think this can be solved. The -2 SPID is MSDTC (documented here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_wa-wz_3v8v.asp and here http://msdn2.microsoft.com/ms173730.aspx). It happens because the 2 tasks run under differrent connections. If they were the same connection it wouldn't be a problem.

I've mentioned a workaround here: http://blogs.conchango.com/jamiethomson/archive/2005/08/20/2048.aspx but it can only really be used in specific situations.

-Jamie

|||

Thanks for the information. Glad to know someone else has run into this also.

This really sucks. Deleting or turncating a table and then refreshing it with new data is a very common action. And it hink 100$ of the time you would want to be able to roll back the complete thing in the event of an error.

Maybe MS can explain to us how they anticpate you are supposed to perform this type of function?

|||

Thanks.

I did try that actually but received the error:

INCOMPATIBLE TRANSACTION CONTEXT

when it tried to do the dataflow task (step 2).

Making SSIS Replace instead of Add on

I am working on a configuration database in SSIS. One of the modules in the package is giving me endless amounts of grief. The module is for some reason set up to add data onto the end of any data already stored in the table. Instead, I would like it to replace this data. I have tried an Execute SQL Task that should delete all of the rows in the table, but this isn't working. Is there a more efficient way to do this?

-Kyle

No, sounds like you're on the right track. Destinations only add new data. If you want to remove the old data first then you should use an Execute SQL Task with a DELETE or TRUNCATE statement. Are you getting an error?
|||

Would a truncate table work (from an execute sql task or ole db command transform)?

truncate table myTable

|||

EWisdahl wrote:

Would a truncate table work (from an execute sql task or ole db command transform)?

truncate table myTable

Yes! Provided you have permissions to truncate.

Monday, March 26, 2012

Making my containers visible design time

Hi all,

I have run into a problem! Im developing a SSIS package programmatically using C#. But when i create and add a container (foreachloop and sequence) the container is not becommming visible in design time in my intergration services designer (when i open the .dtsx package afterwards). Does anyone have a solution to this problem? It is only a problem with containers i create myself (it is working when im adding e.g. dataflow tasks to existing containers).

Sincerely

Bryan

I have not observed this when building packages programmatically. Here's a basic C# package generator which adds in a single sequence before saving to disk. Does this sequence container not appear when your run the generator?

using System;

using System.Collections.Generic;

using System.Text;

using System.Xml;

using Microsoft.SqlServer.Dts.Runtime;

namespace GeneratePackage

{

class SingleSequence

{

static string pkgName = "AtomicSequence.dtsx";

static void Main(string[] args)

{

Application a = new Application();

Package p = CreatePackage();

Console.WriteLine("Attempting to save {0} to {1}", pkgName, Environment.CurrentDirectory);

a.SaveToXml(pkgName, p, null);

Console.WriteLine("Press key to exit...");

Console.Read();

return;

}

public static Package CreatePackage()

{

Package package = new Package();

package.PackageType = DTSPackageType.DTSDesigner90;

package.CreationDate = DateTime.Now;

package.CheckpointFileName = @."AtomicSequence.xml";

package.SaveCheckpoints = true;

package.CheckpointUsage = DTSCheckpointUsage.IfExists;

FillExecutables_Package(package.Executables, package);

package.Name = @."AtomicSequence";

return package;

}

private static void FillExecutables_Package(Executables property, Package obj)

{

Sequence exec1 = (Sequence)property.Add("STOCK:SEQUENCE");

exec1.FailPackageOnFailure = true;

exec1.Name = @."SEQ Atomic";

exec1.Description = @."Sequence Container";

}

}

}

|||

Thx for the reply...

Your sample works fine, i can see the sequence in my design environment. The main difference between your project and mine is that i save directly to the package store in the SQL Server...

I will try to save my package to the disk instead of to the package store and see if that helps. Ill return when i have tested it, thx in advance :-)

Sincerely

Bryan

|||

Hi again,

Doesnt seem to work, i tried to modify my own code and its not showing up design time :-(

I better explain how i do things:

I have a partially filled package that i load from disk and "fills in the blanks" (this is done to make it generic enough to suit the different source systems i work with) i fill in a premade sequence container with a bunch of foreach loops and lots of components inside those. I then save the ssis to the packages storage and thats it! When i load it in the designer it still shows up without the loops i added programmatically visible.
After some thorough research i can see that in the XML of the package there is some kind of embedded xml in the start of the package, concerning layout (at least i think its concerning layout) and my added components are not present in that embedded xml...

Edit: BTW im doing this also with another sequence where i fill in a bunck of processing tasks, these shows up on top of each other and doesnt seem to be visually in the container, i can drag them out but not drag them inside again. It seems that its only my foreach loop that not gets visible - weird

/Bryan

|||

Yep, that's definitely layout information. You might check to just see if the containers are outside the viewable area of the package. Grab the little box on the bottom right of the design surface and see if the container shows up.

The xml at the beginning of the package is added by the designer. There is no API for managing that xml.

Wednesday, March 7, 2012

Maintenance Plans are Disappearing...

I'm not even sure where to post this, but has anyone had a problem with maintenance plans disappearing?

I mean the SSIS package and the job just disappearing....?

I have four servers. Two dev and two prod. I created a pretty simple maintenance plan to backup databases. There are four tasks in the plan. One for each of four databases. Backing each up to a separate file, all in the same folder.

The plan gets associated with a job that has it run daily, every six hours, with no end date.

The plan runs just fine. Then this morning, on one of the servers, the plan and its job are just gone.

This is the second time this has happened. And it's not the same server that it happened on the first time.

Why would a maintenance plan just disappear?

Anyone?

J

We have almost the same problem, The SSIS jobs have dissapeared two times now. In our case the Job is still there generating errors since it can't find the Maintenance plans.

Does anyone know why this happens??

/Thomas