Friday, March 30, 2012

Invoking SSIS Packages from DotNet

Hi,

How can we invoke SSIS Packages from an Windows or ASP.NET Application (using C# ).

Thanks

Jegan

First you have a look at the documentation -

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/dtsref9/html/1a08c75e-ce8c-45ee-81bd-32248bbdb2b2.htm

or

Managing Packages Programmatically
(http://msdn2.microsoft.com/en-us/library/1a08c75e-ce8c-45ee-81bd-32248bbdb2b2.aspx)

Then you ask some specific questions if you get stuck.

|||

Darren ,

Thanks for the links. now i am able to create sample application.but when i am using Fuzzylookup and FlatFileDestination in my package and i am executing the package from a windows application (C#).i am getting the following errors

1.The product level is insufficient for component Fuzzy Lookup
2.The product level is insufficient for component Conditional Split
3.The product level is insufficient for component Flat File

what could be the reason .

Thanks

Jegan

|||

Fuzzy Lookup requires installation of SSIS from Enterprise Edition of SQL Server, for other components SSIS installation from Standard Edition is OK. You've probably only installed the Client/Workstation Componentss, not SSIS - so you can't run the packages.

For more details see http://msdn2.microsoft.com/en-us/library/aa337371.aspx

|||

Michael,

my machine already have SSIS installed and i am using VS 2005 Team Edition for Software Developers.so what could be the problem

Thanks

Jegan

|||Check if you have a service called MsDtsServer (display name SQL Server Integration Services).

If you do not have such service, you don't have SSIS installed. Installing just Workstation Components gives you access to some SSIS aspects, e.g. designing the packages in BIDS. But it is not enough to execute the packages outside of designer.

Invoking SSIS Packages from DotNet

Hi,

How can we invoke SSIS Packages from an Windows or ASP.NET Application (using C# ).

Thanks

Jegan

First you have a look at the documentation -

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/dtsref9/html/1a08c75e-ce8c-45ee-81bd-32248bbdb2b2.htm

or

Managing Packages Programmatically
(http://msdn2.microsoft.com/en-us/library/1a08c75e-ce8c-45ee-81bd-32248bbdb2b2.aspx)

Then you ask some specific questions if you get stuck.

|||

Darren ,

Thanks for the links. now i am able to create sample application.but when i am using Fuzzylookup and FlatFileDestination in my package and i am executing the package from a windows application (C#).i am getting the following errors

1.The product level is insufficient for component Fuzzy Lookup
2.The product level is insufficient for component Conditional Split
3.The product level is insufficient for component Flat File

what could be the reason .

Thanks

Jegan

|||

Fuzzy Lookup requires installation of SSIS from Enterprise Edition of SQL Server, for other components SSIS installation from Standard Edition is OK. You've probably only installed the Client/Workstation Componentss, not SSIS - so you can't run the packages.

For more details see http://msdn2.microsoft.com/en-us/library/aa337371.aspx

|||

Michael,

my machine already have SSIS installed and i am using VS 2005 Team Edition for Software Developers.so what could be the problem

Thanks

Jegan

|||Check if you have a service called MsDtsServer (display name SQL Server Integration Services).

If you do not have such service, you don't have SSIS installed. Installing just Workstation Components gives you access to some SSIS aspects, e.g. designing the packages in BIDS. But it is not enough to execute the packages outside of designer.sql

Invoking SQL Server JOB created for a report schedule

Hi,
Instead of runing a report through the schedule that I have created, I am invoking the SQL Agent Job that has been created for the schedule of the report, using the system stored procedure sp_startjob. Is this a recommended approach? Are there drawbacks for this approach?
Subash

This is a perfectly reasonable solution. If you are just trying to fire a subscription you could also use the FireEvent method to invoke the subscription.

The only drawback is that this is not a supported scenario, which means the job could change in a SP or new release, however this seems unlikely.

Invoking ms access from a scheduled job in sql server 2000

Is it possible to run a mdb from a scheduled job in sql server? I simply want to run a mdb with a autoexec in it. Don't want to use microsoft scheduler....

Thanks!

To 'run a mdb...with a autoexec in it' requires a client application.

SQL Server is NOT a client application.

Invoking MigrationWizardConsole

I have a couple of questions concerning invoking the application MigrationWizardConsole.exe. Can this application be invoked directly or is invoked from the GUI app, MigrationWizard.exe? My other question is if the MigrationWizardConsole can be invoked directly what are the parameters?

Thanks

Ron Cotton

MigrationWizardConsole is used only by setup during upgrades. It should not be invoked by users.|||

Sasha,

Thanks for the information...Do you have any suggestions concerning automating the migration of SQL 2000 databases to SQL 2005?

Thanks

Ron C

Invoking an assembly before a report is rendered

Hi All,
I want to implement a sort of licensing policy for the reports
developed by me. For this I have created my own custom assembly. I
want to invoke the assembly just before the report is rendered so that
I can check if the license is valid and then allow the report to be
rendered, else a default page.
Thanxs in anticipation.You might want to check out this section in BOL (OnInit):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_rdl_7gma.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"CoolGuyFromPune" <raviful@.hotmail.com> wrote in message
news:eed4d072.0407050640.7cc929cd@.posting.google.com...
> Hi All,
> I want to implement a sort of licensing policy for the reports
> developed by me. For this I have created my own custom assembly. I
> want to invoke the assembly just before the report is rendered so that
> I can check if the license is valid and then allow the report to be
> rendered, else a default page.
> Thanxs in anticipation.sql

Invoking a SQL Server user-defined function via SQL passed to Informix

==========
Background
==========
My colleague and I are using MS Reporting Services to create reports based upon data extracted from an Informix database. Inseveral reports, we have the need to parse the contents of a variable length field in order to extract a variable lengthforeign key value.

Note that the key value is of variable length and embedded within a string that's also of variable length.

==========
Question
==========
Given the fact that we aren't allowed to add anything within the back-end Informix environment, we wrote a SQL Server userdefined function that can extract a variable length "key" value from a variable length string. My question is as follows:

Is it even possible to invoke a SQL Server user defined function in our SQL statement (passed to Informix) within the context of Reporting Services?

==========
Environment Notes
==========
- We are NOT allowed to add anything within the back-end Informix db environment.

- We are connecting via an Informix ODBC driver with a linked Informix server defined in our SQL Server environment.

- We've tried defining the user-defined function within the "master", "ReportServer" and "ReportServerTempDB" databases with the appropriate permissions set.

==========
Error Messages
==========
We've received the following error message after trying to invoke the SQL Server user defined function:

SELECT field1, field2, field3, dbo.udf_GetStringElement(field3,'/',1,2) AS extrctd

[Informix][Informix ODBC Driver][Informix]Identifier length exceeds the maximum allowed by this version of the server.

We receive the following error message after creating a new SQL Server user defined function using a shorter name:

SELECT field1, field2, field3, dbo.gse(field3,'/',1,2) AS extrctd

[Informix][Informix ODBC Driver][Informix]Routine (dbo.gse) can not be resolved.

Any feedback would be appreciated,

ndm

have you tried using a custom code function for it ?|||

Hey, thanks for the reply.

I'm not sure I understand what you mean by "custom code function". The user defined functions I mentioned, "udf_GetStringElement", "gse", are user defined functions that I wrote. It's not one of the "system" functions (e.g. "fn_isreplmergeagent") found in master.

I merely created the function WITHIN the context of the "master" db and eventually within "Report Server" and "ReportServerTempDB" in an attempt to invoke the function within a Report Services SQL statement.

|||By Custom Code function I mean the custom code vb.net functions you canwrite under Report -> Properties -> Code tab. You canreplicate the logic of your user defined function you have in sql intovb.net.
what xactly foes your user defined function do ?
|||

Ah, I understand what you're saying about simply replicating/writing the string parsing/extraction logic within the Report Services environment, but our issue isn't really a (post-data aggregation) formatting problem.

Our SQL Server user defined function parses a variable length string in order to extract a variable length "foreign key" value that we'll need to use for joining data from several Informix tables.

Unless there's another approach of which I'm unaware, I'm assuming that we need to parse this string DURING the SQL execution in order to perform the requisite join(s).

Appreciate the feedback,

ndm

|||I didnt understand the situation completely..you have the SELECT stmt from Informix db but the UDF is in SQL Server right ? does the udf do anything other than string parsing ? looks like its a little complicated and we could be hitting the limitations ( one of the many) of RS.|||

Correct; the SELECT statement (defined within shared Report Services dataset) is passed to Informix and our custom UDF is in SQL Server.

More specifically, I've tried placing our custom SQL Server UDF within several of the SQL Server databases ("master", "ReportServer" and "ReportServerTempDB"). When I attempt to invoke the UDF within the SQL statement passed to Informix, I receive the aforementioned error messages.

The key point is that we need to be able to parse DURING the SQL execution in order to perform some requisite join(s).

Within a pure SQL Server environment, I can access the UDF from master (or, for that matter, any other SQL Server db so long as the appropriate permissions are set). I'm not even sure if what we're trying to accomplish is possible since the SQL statement is being passed to Informix. I was wondering if there was some "Reporting Services" method for invoking our custom UDF defined WITHIN the SQL Server realm.

Again, I appreciate the reply.

ndm

|||

The SQL statement you have is executed on Informix DB engine and it wouldnt understand the SQL UDF..unless you make a specific connection to SQL for which it may not be possible in 1 SELECT stmt..you prbly might need to use a set of stmts..If the UDF is only doing some string parsing I would recommend moving it into RS custom code and rewriting it in vb.net. Cant think of anything else..

|||

I would create a DTS package that is scheduled to get the data from Informix and populate the Reporting Service database. Try the urls below for more info. Hope this helps.

http://www.sqldts.com

http://www.microsoft.com/technet/prodtechnol/sql/2000/deploy/infmxsql.mspx#EDAA

Kind regards,

Gift Peddie

|||

Yes, I'm thinking that we may have to take a less directextract+dump+cleanse route (Informix -> MS SQL Server -> MS Reporting Services) for this scenario. We were trying to avoid taking snapshots of the data and having to maintain a secondary (albeit temporary) data store.

Your recommendation merits further consideration.

Thanks for the feedback,

ndm