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

Tuesday, March 20, 2012

adding support for user defined functions to the ssis expression language

good idea or bad idea?

Oh yes. A very very very very very very good idea. And if you want an example of why - read this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=564759&SiteID=1&mode=1

and add a comment to Mahesh's Connect posting here: http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=166356

-Jamie

|||

Jamie Thomson wrote:

Oh yes. A very very very very very very good idea. And if you want an example of why - read this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=564759&SiteID=1&mode=1

and add a comment to Mahesh's Connect posting here: http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=166356

-Jamie

actually, i got this idea after reading mahesh's thread. so, i went ahead and already created a connect suggestion: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=166367

Monday, March 19, 2012

Adding SSIS to sql 2005 cluster

The basics
Win2k Enterprise
SQL 2005 Enterprise
2 node cluster, single instance.
So I have had these servers up for a little while and would like to add SSIS
to them.
I found this document here about running setup from the command line for a
cluster
http://msdn2.microsoft.com/en-gb/library/ms144259.aspx
this document for installing SSIS from the command line (not in a cluster)
http://msdn2.microsoft.com/en-gb/library/ms144291.aspx
and this about installing SSIS (not in a cluster)
http://support.microsoft.com/kb/913967
and this about how to configure SSIS on a cluster.
http://msdn2.microsoft.com/en-gb/library/ms345193.aspx
As you can see from this last document, step three seems trivial,
"3. Install Integration Services on each node of the cluster individually."
Can anyone help me put this all together.
I think the main thing I need is the command line to install SSIS on a
cluster.
Also, if anyone knows of any good books on HA SQL, that would be nice, I
looked at a stack of SQL2005 books last night and was surprised to find that
HA and Clustering are hardly mentioned.
Chris
The Installer for SSIS is "not" cluster aware.
You will need to install SSIS on each node of the cluster.
If you install it on Node 1 while the SQL server is running on that
node, the installer will install SSIS on Node 1 only.
You will have to run the install a second time on Node 2, preferably
while the SQL is running on Node 2
Once you have SSIS installed on both nodes, you can follow the
instructions in the document on configuring SSIS on a cluster,
remembering that after you make any changes to the MsDtsSrvr.ini.xml
file you need to restart the SSIS service . That should work in your
configuration. It gets real tricky when you have an active/active setup
(I am still struggling with that myself)
Sorry I cant help with the command line, perhaps a more command line
savy person can help with that.
CDSuperG wrote:
> The basics
> Win2k Enterprise
> SQL 2005 Enterprise
> 2 node cluster, single instance.
> So I have had these servers up for a little while and would like to add SSIS
> to them.
> I found this document here about running setup from the command line for a
> cluster
> http://msdn2.microsoft.com/en-gb/library/ms144259.aspx
> this document for installing SSIS from the command line (not in a cluster)
> http://msdn2.microsoft.com/en-gb/library/ms144291.aspx
> and this about installing SSIS (not in a cluster)
> http://support.microsoft.com/kb/913967
> and this about how to configure SSIS on a cluster.
> http://msdn2.microsoft.com/en-gb/library/ms345193.aspx
> As you can see from this last document, step three seems trivial,
> "3. Install Integration Services on each node of the cluster individually."
> Can anyone help me put this all together.
> I think the main thing I need is the command line to install SSIS on a
> cluster.
> Also, if anyone knows of any good books on HA SQL, that would be nice, I
> looked at a stack of SQL2005 books last night and was surprised to find that
> HA and Clustering are hardly mentioned.
> Chris
|||You can visit www.jumpstarttv.com. There is a good video on the site. You
will have to register before you can see the site, but I did and it helped a
lot.
"Jim" wrote:

> The Installer for SSIS is "not" cluster aware.
> You will need to install SSIS on each node of the cluster.
> If you install it on Node 1 while the SQL server is running on that
> node, the installer will install SSIS on Node 1 only.
> You will have to run the install a second time on Node 2, preferably
> while the SQL is running on Node 2
> Once you have SSIS installed on both nodes, you can follow the
> instructions in the document on configuring SSIS on a cluster,
> remembering that after you make any changes to the MsDtsSrvr.ini.xml
> file you need to restart the SSIS service . That should work in your
> configuration. It gets real tricky when you have an active/active setup
> (I am still struggling with that myself)
> Sorry I cant help with the command line, perhaps a more command line
> savy person can help with that.
> CDSuperG wrote:
>

Adding ScriptTask programatically

Hi,

I'm developing tool for generating SSIS packages.

I need to add ScriptTask to package programatically and set its script code.

There is no problem for adding package, but I don't know how to set its script code, programatically.

Can anyone help me?

Thanks in advance, Borko

The trick is to use ScriptTaskCodeProvider class, PutSourceCode method.

Monicker argument is build from ScriptTask.VsaProjectName property.

It is usefull to analyze valid package XML during this action.

Regards, Borko

Tuesday, March 6, 2012

Adding Lookup Programmatically:How can I add column from reference dataset to the transformation

Hello,

I have created SSIS package programmatically, I want to add Lookup transformation,

How can I add column from reference dataset to the transformation?

I have try to add new output column but it gives me an validation error, I write following coed to add new output column to lookup.

IDTSOutputColumn90 outputColumn = this.lookup.OutputCollection[0].OutputColumnCollection.New();

outputColumn.Name = col.Name;

outputColumn.Description = "Staging table output";

outputColumn.TruncationRowDisposition = DTSRowDisposition.RD_FailComponent;

outputColumn.ErrorOrTruncationOperation = "Copy Column";

outputColumn.SetDataTypeProperties(col.DataType, col.Length, col.Precision, col.Scale, col.CodePage);

Please suggest other way to add column from reference dataset to transformation output.

You have to set the reference column name to the appropriate custom property of the output column. You do not have to set any truncation or data type attributes, just get the IDTSDesigntimeComponent90 interface and call SetOutputColumnProperty on it. It should set these attributes for you (assuming your reference metadata is set to the component properly).

It should look like this:

designTimeComponent.SetOutputColumnProperty(outputID, outputColumnID, "CopyFromReferenceColumn", refColumnName);

HTH.

|||

Thanks !

Now I have added designtimeComponent property, but I got following error in setting reference table command

"Command text was not set fro the command object" ,before setting designtimeproperties it's working fine

code I used:

this.lookup = this.dataFlow.ComponentMetaDataCollection.New();

// Set component's stock properties.

this.lookup.ComponentClassID = "DTSTransform.Lookup";

this.lookup.Name = "LookupTransform";

this.lookup.Description = "Lookup component";

CManagedComponentWrapper instance = this.lookup.Instantiate();

instance.ProvideComponentProperties();

this.lookup.RuntimeConnectionCollection[0].ConnectionManagerID

= this.package.Connections["OLEDBConnectionLookup"].ID;

this.lookup.RuntimeConnectionCollection[0].ConnectionManager

= DtsConvert.ToConnectionManager90(this.package.Connections["OLEDBConnectionLookup"]);

instance.SetComponentProperty("SqlCommand", "Select id as stg_id1 from [dbo].[Temp2]");

// Attach path between the OLEDB source components Output, and the Sort Component's Input.

this.dataFlow.PathCollection.New().AttachPathAndPropagateNotifications(

this.oledbSource.OutputCollection[0], this.lookup.InputCollection[0]);

instance.AcquireConnections(null);

instance.ReinitializeMetaData();

//Ingore on failuare

this.lookup.OutputCollection[0].ErrorRowDisposition = DTSRowDisposition.RD_IgnoreFailure;

IDTSVirtualInput90 vInput1 = this.lookup.InputCollection[0].GetVirtualInput();

foreach (IDTSVirtualInputColumn90 vColumn in vInput1.VirtualInputColumnCollection)

{

IDTSInputColumn90 col = instance.SetUsageType(this.lookup.InputCollection[0].ID, vInput1, vColumn.LineageID, DTSUsageType.UT_READONLY);

instance.SetInputColumnProperty(this.lookup.InputCollection[0].ID, col.ID, "JoinToReferenceColumn", "stg_id1");

}

IDTSDesigntimeComponent90 designTimeComponent = this.lookup.Instantiate();

designTimeComponent.ProvideComponentProperties();

designTimeComponent.AcquireConnections(null);

designTimeComponent.ReinitializeMetaData();

IDTSOutputColumn90 newColumn = designTimeComponent.InsertOutputColumnAt(this.lookup.OutputCollection[0].ID, 0, "stg_id1", "reference column");

designTimeComponent.SetOutputColumnProperty(this.lookup.OutputCollection[0].ID, newColumn.ID, "CopyFromReferenceColumn", "stg_id1");

designTimeComponent.ReleaseConnections();

instance.ReleaseConnections();

Any suggetions,Can I set component property (Such as SqlCommand) at design time.

|||

Well, this code seems to have many issues. Let's try to fix it iteratively: for the start do not call ProvideComponentProperties twice, it will reset everything. Also, ReinitializeMetadata has to be called only once.

How many upstream columns are coming to your lookup, it seems like you are mapping all of them to stg_id1. Only one can be used for this lookup.

Try to fix these things and then post the cleaned code and the new errors you are getting. Mark the places in the code where the errors are captured.

Hopefully, we will be able to nail it in the next iteration.

|||

Thanks Bob !

U mean to say I set all component properties using 'IDTSDesigntimeComponent90' instance not using 'CManagedComponentWrapper' (right?)

Can u explain me how can i set component properties at design time

|||

Hi

Now code is working fine but it gives a Validation Error,''Input column "Name" has datatype which cannot be joined on"

I have to input columns id & name. and I want to join on single column 'id',Now what can I do to remove validation error

// Add the component to the DataFlow task.

this.lookup = this.dataFlow.ComponentMetaDataCollection.New();

// Set component's stock properties.

this.lookup.ComponentClassID = "DTSTransform.Lookup";

this.lookup.Name = "LookupTransform";

this.lookup.Description = "Lookup component";

IDTSDesigntimeComponent90 designTimeComponent = this.lookup.Instantiate();

designTimeComponent.ProvideComponentProperties();

this.lookup.RuntimeConnectionCollection[0].ConnectionManagerID

= this.package.Connections["OLEDBConnectionLookup"].ID;

this.lookup.RuntimeConnectionCollection[0].ConnectionManager

= DtsConvert.ToConnectionManager90(this.package.Connections["OLEDBConnectionLookup"]);

designTimeComponent.SetComponentProperty("SqlCommand", "Select id as stg_id1 from [dbo].[Temp2]");

// Attach path between the OLEDB source components Output, and the Sort Component's Input.

this.dataFlow.PathCollection.New().AttachPathAndPropagateNotifications(

this.oledbSource.OutputCollection[0], this.lookup.InputCollection[0]);

designTimeComponent.AcquireConnections(null);

designTimeComponent.ReinitializeMetaData();

IDTSVirtualInput90 vInput1 = this.lookup.InputCollection[0].GetVirtualInput();

foreach (IDTSVirtualInputColumn90 vColumn in vInput1.VirtualInputColumnCollection)

{

IDTSInputColumn90 col = designTimeComponent.SetUsageType(this.lookup.InputCollection[0].ID, vInput1, vColumn.LineageID, DTSUsageType.UT_READONLY);

}

foreach (IDTSInputColumn90 col inthis.lookup.InputCollection[0].InputColumnCollection)

{

if (col.Name == "id")

designTimeComponent.SetInputColumnProperty(this.lookup.InputCollection[0].ID, col.ID, "JoinToReferenceColumn", "stg_id1");

}

//Ingore on failuare

this.lookup.OutputCollection[0].ErrorRowDisposition = DTSRowDisposition.RD_IgnoreFailure;

IDTSOutputColumn90 newColumn = designTimeComponent.InsertOutputColumnAt(this.lookup.OutputCollection[0].ID, 0, "stg_id1", "reference column");

designTimeComponent.SetOutputColumnProperty(this.lookup.OutputCollection[0].ID, newColumn.ID, "CopyFromReferenceColumn", "stg_id1");

designTimeComponent.ReleaseConnections();

Thanks Bob for solution, can you give me ur e-mail id so I can ask you que. directly if I have

My id omkar.pimplekar@.gmail.com

|||It looks to me that you are selecting every column, as though they all take part in the join, see

foreach (IDTSVirtualInputColumn90 vColumn in vInput1.VirtualInputColumnCollection)

{

IDTSInputColumn90 col = designTimeComponent.SetUsageType(this.lookup.InputCollection[0].ID, vInput1, vColumn.LineageID, DTSUsageType.UT_READONLY);

}

Apply the same filter that you do in the following section, so only select the id column.

|||

Yes he is selecting every column, and it is not necessary. You can select only the column you want to join. Replace the two loops with one like this:

Code Snippet

IDTSVirtualInput90 vInput1 = this.lookup.InputCollection[0].GetVirtualInput();

foreach (IDTSVirtualInputColumn90 vColumn in vInput1.VirtualInputColumnCollection)

{

if (vColumn.Name == "id")

{

IDTSInputColumn90 col = designTimeComponent.SetUsageType(this.lookup.InputCollection[0].ID, vInput1, vColumn.LineageID, DTSUsageType.UT_READONLY);

designTimeComponent.SetInputColumnProperty(this.lookup.InputCollection[0].ID, col.ID, "JoinToReferenceColumn", "stg_id1");

}

}

I do not think that is causing your error though. The error is caused by data type mismatch between your "id" and "stg_id1" columns. They need to exactly match in data types.

HTH.

|||

Hi,

Thanks Bob,

Now All working fine,again thanks for quick suggetions

Saturday, February 25, 2012

Adding Integration Services Node in Server Management Studio

Hi,
Am just getting started with SSIS. Based on an article I saw online, I would expect to find an "Integration Services" node in Server Management Studio, but I don't see this node. I'm trying to create and execute a simple package.
Running...
Microsoft SQL Server 2005 - 9.00.1116 (Intel X86)
Apr 9 2005 20:56:37
Copyright (c) 1988-2004 Microsoft Corporation
Beta Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
...on a named instance.
Thanks,
krog
Have you tried in Object Explorer

Connect | Integration Services

Allan|||There it is. Thank you!|||I am testing this on Windows XP and when I run SSIS, I can connect to server but I don't see a way to connect to Integration Services. I see in the Providers folder DTSPackage but how do I execute this assuming this is what I need. I am new to SQL Express and I am trying to import a DBF file and create a database.

Neil|||I am trying to connnect through Object Browser, but I am getting Access Denied error. Please note I am not the Admin on the box. What kind of permission I need to register Integration Services connection on my Management studio? Finally I want to import some packages I developed on msdb.

Thanks|||Hi,

I am also experiencing Access Denied errors when using object explorer (on my workstation) to connect to SSIS.

I have searched and tried some tips but I am still not able to connect. I am a local administrator on the sql server, i have added myself to db_dtsadmin role in the msdb database.

Can anyone please shed some light on how to connect remotely to SSIS.

Thanks,
Jason|||SSIS only comes with Standard edition and above. SQL Express does not include SSIS.|||

Any additional information about this?

I also recieve "Access denied" when attempting to add an Integration Service connection through the object browser. It works fine on a co-worker's workstation. I have disabled my firewall. I'm on the same subnet as my co-worker who is able to connect.

Best regards,

Shad

Adding Integration Services Node in Server Management Studio

Hi,
Am just getting started with SSIS. Based on an article I saw online, I would expect to find an "Integration Services" node in Server Management Studio, but I don't see this node. I'm trying to create and execute a simple package.
Running...
Microsoft SQL Server 2005 - 9.00.1116 (Intel X86)
Apr 9 2005 20:56:37
Copyright (c) 1988-2004 Microsoft Corporation
Beta Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
...on a named instance.
Thanks,
krog
Have you tried in Object Explorer

Connect | Integration Services

Allan
|||There it is. Thank you!
|||I am testing this on Windows XP and when I run SSIS, I can connect to server but I don't see a way to connect to Integration Services. I see in the Providers folder DTSPackage but how do I execute this assuming this is what I need. I am new to SQL Express and I am trying to import a DBF file and create a database.

Neil|||I am trying to connnect through Object Browser, but I am getting Access Denied error. Please note I am not the Admin on the box. What kind of permission I need to register Integration Services connection on my Management studio? Finally I want to import some packages I developed on msdb.

Thanks|||Hi,

I am also experiencing Access Denied errors when using object explorer (on my workstation) to connect to SSIS.

I have searched and tried some tips but I am still not able to connect. I am a local administrator on the sql server, i have added myself to db_dtsadmin role in the msdb database.

Can anyone please shed some light on how to connect remotely to SSIS.

Thanks,
Jason|||SSIS only comes with Standard edition and above. SQL Express does not include SSIS.|||

Any additional information about this?

I also recieve "Access denied" when attempting to add an Integration Service connection through the object browser. It works fine on a co-worker's workstation. I have disabled my firewall. I'm on the same subnet as my co-worker who is able to connect.

Best regards,

Shad

Adding Integration Services Node in Server Management Studio

Hi,
Am just getting started with SSIS. Based on an article I saw online, I would expect to find an "Integration Services" node in Server Management Studio, but I don't see this node. I'm trying to create and execute a simple package.
Running...
Microsoft SQL Server 2005 - 9.00.1116 (Intel X86)
Apr 9 2005 20:56:37
Copyright (c) 1988-2004 Microsoft Corporation
Beta Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
...on a named instance.
Thanks,
krog
Have you tried in Object Explorer

Connect | Integration Services

Allan|||There it is. Thank you!|||I am testing this on Windows XP and when I run SSIS, I can connect to server but I don't see a way to connect to Integration Services. I see in the Providers folder DTSPackage but how do I execute this assuming this is what I need. I am new to SQL Express and I am trying to import a DBF file and create a database.

Neil|||I am trying to connnect through Object Browser, but I am getting Access Denied error. Please note I am not the Admin on the box. What kind of permission I need to register Integration Services connection on my Management studio? Finally I want to import some packages I developed on msdb.

Thanks|||Hi,

I am also experiencing Access Denied errors when using object explorer (on my workstation) to connect to SSIS.

I have searched and tried some tips but I am still not able to connect. I am a local administrator on the sql server, i have added myself to db_dtsadmin role in the msdb database.

Can anyone please shed some light on how to connect remotely to SSIS.

Thanks,
Jason|||SSIS only comes with Standard edition and above. SQL Express does not include SSIS.|||

Any additional information about this?

I also recieve "Access denied" when attempting to add an Integration Service connection through the object browser. It works fine on a co-worker's workstation. I have disabled my firewall. I'm on the same subnet as my co-worker who is able to connect.

Best regards,

Shad

Adding Integration Services Node in Server Management Studio

Hi,
Am just getting started with SSIS. Based on an article I saw online, I would expect to find an "Integration Services" node in Server Management Studio, but I don't see this node. I'm trying to create and execute a simple package.
Running...
Microsoft SQL Server 2005 - 9.00.1116 (Intel X86)
Apr 9 2005 20:56:37
Copyright (c) 1988-2004 Microsoft Corporation
Beta Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
...on a named instance.
Thanks,
krog
Have you tried in Object Explorer

Connect | Integration Services

Allan|||There it is. Thank you!|||I am testing this on Windows XP and when I run SSIS, I can connect to server but I don't see a way to connect to Integration Services. I see in the Providers folder DTSPackage but how do I execute this assuming this is what I need. I am new to SQL Express and I am trying to import a DBF file and create a database.

Neil|||I am trying to connnect through Object Browser, but I am getting Access Denied error. Please note I am not the Admin on the box. What kind of permission I need to register Integration Services connection on my Management studio? Finally I want to import some packages I developed on msdb.

Thanks|||Hi,

I am also experiencing Access Denied errors when using object explorer (on my workstation) to connect to SSIS.

I have searched and tried some tips but I am still not able to connect. I am a local administrator on the sql server, i have added myself to db_dtsadmin role in the msdb database.

Can anyone please shed some light on how to connect remotely to SSIS.

Thanks,
Jason|||SSIS only comes with Standard edition and above. SQL Express does not include SSIS.|||

Any additional information about this?

I also recieve "Access denied" when attempting to add an Integration Service connection through the object browser. It works fine on a co-worker's workstation. I have disabled my firewall. I'm on the same subnet as my co-worker who is able to connect.

Best regards,

Shad

Friday, February 24, 2012

Adding folders in the solution explorer?

Hi..
Isn′t it possible to create sub folders in the solution explorer?
I have it hard time to create a decent structure inside the SSIS Package folder, since I have like 30 packages in my project. Is it just me being silly or cannot this be done?
Have a nice day
/Erik

nope...

You can add folders to a solution but withing a project, everything is either in packages of misc.

|||ok, thanks for the input though

Sunday, February 19, 2012

Adding dll or executable

Is there an ability to add dll or executable to ssis?

To do what? You can add DLLs to scripts, yes. You can execute executables, yes.|||how can i execute executable or dll?|||You can execute an "executable" using the Execute Process Task.

Please search this forum for examples in working with DLLs.|||Thanks

Thursday, February 16, 2012

Adding Custom component to the Tool Box

Hi,

I was trying the SSIS programming samples,that comes with installation of SQL Server 2005, I want to load the ChangeCase DLL in the toolbox.

The readMe file gives the direction. It does not work. It says you will see component in once you see DataFlow Task button( clicking Choose Items in the tools box).

I cannot load the custom component to the toolbox, Can I get some help.

Thank you,

Have a quick look at this -

How do I install a task or transform component? - http://www.konesans.com/faq.aspx#installtask

You do not see you component in the "SSIS Data Flow Items" tab? If it is not listed there, then it is not installed correctly. Components must be place in the GAC so that they can be found at run-time. They must also be placed in the SSIS specific PipelineComponents folder so that they can be found by the designer. This is where the Choose Toolbox stuff looks. By default this is -

C:\Program Files\Microsoft SQL Server\90\DTS\PipelineComponents

The location is actually defined in a registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\DTS Pipeline Components". The AssemblyFolders is where VS searches for assemblies that can be added like this.

Thursday, February 9, 2012

Adding a web reference (web service) to an SSIS script task?

Is it possible to do this under SSIS 2005? How? I see I can add a reference to system.web.services.dll.. but then what?

The web service was developed in vb.net/vs.net 2005 and I have no problem adding and consuming it from a web page developed using vs.net 2005 - asp.net/vb.net.

Thanks for any help or information.

VSA won't allow you set a web reference. You can compile the proxy created by Visual Studio and reference that.
|||

Jay is absolutely correct. Script Task uses VSA as its dotnet editor and that does not support web references.

Although it doesn't help you much now...the functionality you are after will be in katmai. In the meantime, do what Jay suggested.

-Jamie