Showing posts with label packages. Show all posts
Showing posts with label packages. Show all posts

Monday, March 19, 2012

Can no longer open my SSIS packages

I am in the process of migrating DTS 2000 packages via DTS Migration Wizard.

I ran all of the packages through the wizard. Then, I successfully completed changing the remaining issues in two of my packages to SSIS. Everything was fine. The second package I completed is called from a SQL Agent Job. I managed to get the job step converted to use SSIS package. It ran successfully.

Now, I am trying to open other packages to work on them and I get "Microsoft Visual Studio is unable to load this document: Value does not fall within the expected range." and a message window that says "Object reference not set to an instance of an object." This actually happens with the two that I migrated, also. I can no longer access them.

What happened?!?!?!? Does anyone have any experience with this?

Well, the solution I had the files in must have been corrupted. I can open individual files using BIDS. I just can't do anything with them from the project. Seems as though a collection might have gone willy.

Saturday, February 25, 2012

Can I use Custom UI for executing Package in C#?

Hi

I've a doubt. I don't know whether it is possible or not.

I've a very less knowledge in DTS packages.

When I execute a package in C#. it is displaying predefined GUI for showing process.

Can I've my own UI when executing DTS.

Thanks in advance.

Could you clarify what you mean by "When I execute a package in C#" and whether the question is about DTS 2000 or SSIS. This forum is about SSIS, BTW.|||

Thanks for the reply Michael

I'm using SSIS

I'm putting the C# code here


public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Package package;
ConnectionManager ConMgr;

Package p;
private void Form1_Load(object sender, EventArgs e)
{
string pkg ="Package.dtsx";

Microsoft.SqlServer.Dts.Runtime.Application app = new Microsoft.SqlServer.Dts.Runtime.Application();
p = app.LoadPackage(pkg, null);

}

private void button1_Click(object sender, EventArgs e)
{
if(p!=null)

p.Execute();

}
}

When I click on Button ie) p.Execute(); is invoked I need my own UI to see the processing . Is it possible.

Thank u

|||Of course - you need to implement event sink interface (IDTSEvents) and/or logging sink interface (IDTSLogging), and call package.Execute(...) version that takes these interfaces (pass null for all other arguments). You'll get the information about the package progress and can show the UI similar (or completely different if you choose) to the one DtExecUI shows (DtExecUI uses the same interfaces).|||

Thanks michael

It is useful

and can I know abt DtExecUI for what it is useful for?.]

|||Well, it executes the packages :)

Some people use command line and some people like to use GUI to execute packages. We provide DTEXEC and DTEXECUI for each group appropriately.|||

Thank u Michael .

Thanks for ur support to know these.

And finally one , can u provide some resource to learn , how to create custom UI. and executing package.etc

|||

Hi

I've one more doubt.

Executing package is a single threaded or multi threaded?

Can I catch the names of the currently transfering table when Executing package?

Thanks in advance.

|||Execution is multithreaded, you'll need to gather information you need from the event and pass it to the UI thread, and probably call package.Execute() on a different thread too to avoid locking up the UI.

There are many events and log information, see Books Online for details. Creative use of this information joined with the package information (e.g. transform properties) may give you most of the information you need.

I don't have any sample, sorry.|||

Thanks alot Michael.

Friday, February 24, 2012

Can I sort the packages in the SSMS view for 'Stored Packages'?

Hey, I've about 188 packages and when I imported them into SQL server, they are not sorted under 'Stored packages'. It's very hard to find packages if they are not alphabetically listed. Can someone tell me if it's possible. Thank you.Sort option is not available for "Stored Packages" in SSMS. However, this might be a useful feature. I will add a request for this feature in our issue tracking system. Thanks.

Can I sort the packages in the SSMS view for 'Stored Packages'?

Hey, I've about 188 packages and when I imported them into SQL server, they are not sorted under 'Stored packages'. It's very hard to find packages if they are not alphabetically listed. Can someone tell me if it's possible. Thank you.Sort option is not available for "Stored Packages" in SSMS. However, this might be a useful feature. I will add a request for this feature in our issue tracking system. Thanks.

Sunday, February 19, 2012

Can I shedule packages from C#.net

I want to know what is the schedule of packages. and be able to change them from my .net Program.

ThanksYou can use the SSIS object model to execute packages directly, or you can schedule packages to run through SMO with the SMO.Agent namespace objects.
It's documented here: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/smo9mref/html/N_Microsoft_SqlServer_Management_Smo_Agent.htm
Thanks,
Kirk Haselden
Dev. Mngr
SSIS

Can I set expressions programmatically?

I'm building SSIS packages through code and I would like to set the properties of some custom tasks (not data flow tasks) to expressions. I've done some searches but turned up nothing. This is the only thing I'm hitting a brick wall on at the moment; Books Online has been excellent in detailing how to create packages via code up to this point.

For the sake of argument, let's say I want to set the SqlStatementSource property of an Execute SQL task to this value:

"INSERT INTO [SomeTable] VALUES (NEWID(), '" + @.[User:Tongue TiedomeStringVariable] + "')"

What would the code look like?

TaskHost has a SetExpression method:

TaskHost.SetExpression Method

http://msdn2.microsoft.com/de-de/library/microsoft.sqlserver.dts.runtime.taskhost.setexpression.aspx

I presume all of the other container types (Package, Sequence etc..) will do too.

-Jamie

|||AAAGGGGHHH!! I was expecting a property, not a method! So then in order to retrieve all expressions on a task, you'd have to iterate the Properties collection and call GetExpression() with the name of each one to see if it's non-null. Doesn't seem like a particularly good design to me. Why not a simple collection? Oh well, thanks for the help.|||

JeffJohnsonMVPVB wrote:

AAAGGGGHHH!! I was expecting a property, not a method! So then in order to retrieve all expressions on a task, you'd have to iterate the Properties collection and call GetExpression() with the name of each one to see if it's non-null. Doesn't seem like a particularly good design to me. Why not a simple collection? Oh well, thanks for the help.

Yep. I was expecting a Collection as well.

Maybe a read-only collection would be nice that is populated by SetExpression(). Are there such things as read-only collections? I've no idea - I'm no developer.

I too would be interested in seeing the rationale for this. I hope someone from MSFT chimes in.

Regards

-Jamie

Friday, February 10, 2012

Can I List the Integration Services Packages on my page?

I want to build an administration consoloe with asp.net

Can I list the packages , can I delete them?Yes, you can do this through the service interface on the Application Object.
Something like this:
Dim app As Application = New Application()
Dim pInfos As PackageInfos = app.GetPackageInfos("\\","yourserver",Nothing,Nothing)
For Each pInfo As PackageInfo In pInfos
Console.WriteLine("Name: {0}", pInfo.Name)
Next

Which will give you all the packages on the SQL Server instance.
For the packages on the IS Server, do something like this:
static void Main(string[] args)
{
Application app = new Application();
PackageInfos pInfos = app.GetDtsServerPackageInfos(@."File System", "yourserver");
foreach (PackageInfo pinfo in pInfos)
Console.WriteLine(pinfo.Folder + " " + pinfo.Description);
}