Showing posts with label ssis. Show all posts
Showing posts with label ssis. Show all posts

Wednesday, March 28, 2012

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.

Making changes to SSIS packages

Hello,

I created a SSIS project with some SSIS packages within my local machine. Once all development and testing stuff was finished I imported the same to SSIS package store within Integration services. Then I created another test folder within my local machine and copied all the packages along with the project .sln file to that test folder.

Now the problem, If I make any changes to the package within test folder it automatically saves the changes to my other folder. Does anybody have a reason why it is doing so.

Thank You

Jatin

I'm guessing its because the solution still contains a reference to the original .dtsx file.

-Jamie

|||

Jamie,

Thank you, I got the problem.

|||

Yes that would be my thought too.

While in the new/copied solution, click on each package name in the solution explorer and view the 'Full Path' property and verify they are what you think. Another place I have burned myself is copying a solution with parent packages calling children packages....and forgetting to update the connection manager used by the ExecutePackage task to point to the new child rather than the old child...mmm sounds a bit like a soap opera.

hope that helps.

Wednesday, March 21, 2012

Make sure the application for the project type (.rptproj) is installed

Hi,

Till Some time back my SSRS SSIS services were working fine. I was able to create/open any project from the Business Intelligence Development Studio. That time only BI suite was installed in Visual Studio 2005.

But due to some other requirements , we had to installed Complete VS.NET 2005 on the same system. After the installation i am only able to create/open ASP.NET applications. All earlier Reporting and Integration project are giving error on opening. Even i a m not able to create a new SSRS or SSIS application.

Error Message says:

"The application for the project 'c:\documents and settings\....rtpproj' is not installed.

Make sure the application for the project type (.rptproj) is installed"

I remote login to this server to work on.

There is another thing, one of my colleague when he log in to this system using his ID, he is able to create new porjects. This is system is not a Terminal Server in true sense.

So What should be the solution for this?.

Installation/Reinstallation of Sql Server component or reinstallation of everything.

Or may be some better option.Pls your suggestions will be highly appreciated.

Thanks

Sumit

I think you need to re-install the client components, especially the BI Development Studio|||Can you also check the .NET framework version installed after that VS installation.sql

Make sure the application for the project type (.rptproj) is installed

Hi,

Till Some time back my SSRS SSIS services were working fine. I was able to create/open any project from the Business Intelligence Development Studio. That time only BI suite was installed in Visual Studio 2005.

But due to some other requirements , we had to installed Complete VS.NET 2005 on the same system. After the installation i am only able to create/open ASP.NET applications. All earlier Reporting and Integration project are giving error on opening. Even i a m not able to create a new SSRS or SSIS application.

Error Message says:

"The application for the project 'c:\documents and settings\....rtpproj' is not installed.

Make sure the application for the project type (.rptproj) is installed"

I remote login to this server to work on.

There is another thing, one of my colleague when he log in to this system using his ID, he is able to create new porjects. This is system is not a Terminal Server in true sense.

So What should be the solution for this?.

Installation/Reinstallation of Sql Server component or reinstallation of everything.

Or may be some better option.Pls your suggestions will be highly appreciated.

Thanks

Sumit

I think you need to re-install the client components, especially the BI Development Studio|||Can you also check the .NET framework version installed after that VS installation.|||

I received this same exact error

wondering if you found a "quick" fix, or maybe just one that works

Please help

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

Monday, February 20, 2012

Maintenance Plan Tasks In SSIS(Sql 2005)

I am finding difficult to set Expression Property "SelectedDatabases" in Check Databases Integrity Task in SSIS.

I keep getting error:

TITLE: Expression Builder

Expression cannot be evaluated.


ADDITIONAL INFORMATION:

The data type of variable "User::varDataset" is not supported in an expression.

Reading the variable "User::varDataset" failed with error code 0xC00470D0.

(Microsoft.DataTransformationServices.Controls)

I need the flexibilty to be able to control the Task behaviour during runtime through Variables.

Any suggestions .... or even a different approach will be helpful..

cheers

aigbor

Hi Aigbor

I encountered a similar problem when using the Shrink Database Task and decided to use Execute SQL Task with an expression instead.

You might find the execute sql task with the DBCC CHECKDB command to be more useful.

Maintenance Plan Tasks In SSIS(Sql 2005)

I am finding difficult to set Expression Property "SelectedDatabases" in Check Databases Integrity Task in SSIS.

I keep getting error:

TITLE: Expression Builder

Expression cannot be evaluated.


ADDITIONAL INFORMATION:

The data type of variable "User::varDataset" is not supported in an expression.

Reading the variable "User::varDataset" failed with error code 0xC00470D0.

(Microsoft.DataTransformationServices.Controls)

I need the flexibilty to be able to control the Task behaviour during runtime through Variables.

Any suggestions .... or even a different approach will be helpful..

cheers

aigbor

Hi Aigbor

I encountered a similar problem when using the Shrink Database Task and decided to use Execute SQL Task with an expression instead.

You might find the execute sql task with the DBCC CHECKDB command to be more useful.