Solved

custom execute sql ssis task

Posted on 2014-03-13
7
745 Views
Last Modified: 2016-02-10
I need to get data from a non ODBC database into SQL for various reporting processes.  The non ODBC database does have a way to query the data via VB.NET code, but my report writer isn't familiar enough with .NET coding to get at the data that way.

I am thinking the best solution is to create an custom "Execute SQL Tasks" for SSIS that others can use to pull data from the proprietary database into SQL to do their work.  

Does anyone have any good example of how to create a custom SSIS task.  Specifically in mimicking the current "Execute SQL Task" that current exists.  Can I inherit directly from that object?

Thanks in advance...
0
Comment
Question by:MRS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39929072
I wouldn't go down the custom SSIS task road, too much maintenance!  However, you can achieve something similar by using the Script Transformation as Source in a Data Flow.  This allows you to write your code to access the data using either VB.NET or C# and it will work just like any other source in the data flow.

This should help you to get started with it: Creating a Source with the Script Component [TechNet]
0
 

Author Comment

by:MRS
ID: 39929556
Valentino,

Thanks for the reply.  I was looking at that object, but I was concerned that the end users would need to understand C# or VB.NET in order to re-use the component in another SSIS packages.  Can I set up a Script Transformation object with the query as a parameter or something so it could easily be copied and changed?
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 39933682
I was concerned that the end users would need to understand C# or VB.NET in order to re-use the component in another SSIS packages.

Hang on, those "end users", are they technical or business people?  If they are creating SSIS packages I assume they're technical, right?  But just don't have the programming skills?

Can I set up a Script Transformation object with the query as a parameter or something so it could easily be copied and changed?

Sure, that should be possible.  Variable parts such as server names can be passed into the script using the ReadOnlyVariables property.  So your SSIS developers can just copy/paste the component and set up the package variables as expected for the component, they won't need to write .NET code because you've already written it...
0
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 

Author Closing Comment

by:MRS
ID: 39934055
Thanks for all the info.

The end users are "report writers", so they are knowledgeable about writing SQL queries, but don't necessarily have a working knowledge of .NET.  So they know enough to read some code, but not make major changes or start from scratch every time they want to create a new SSIS package.

I will give it a shot with the Scripting Object.  Sounds like that might do the trick...  Knowing that they can just copy it to new SSIS packages once we get it set up should give them what they need.

One last question if you don't mind.  What is the normal result of a process like querying from an out side datasource?  Should I load the resulting data into a temp table for them to work with, or can I return it in memory for them to work with?
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39936198
Should I load the resulting data into a temp table for them to work with, or can I return it in memory for them to work with?

I usually load the data first into a data warehouse which also has a more interesting model for reporting: fact and dimension tables.  But that does take some time to set up.  In your situation it might be sufficient to make the data available in a local SQL Server database without the remodeling.  That should maker it easier for them so use in reports, as connecting to a SQL DB is standard procedure.

Just wondering: are you using SSIS as data source for SSRS? (ref Configuring Reporting Services to Use SSIS Package Data
0
 

Author Comment

by:MRS
ID: 39936626
Not necessarily.  We might go that way in the future, but our more immediate solution will be to generate specific Excel sheet reports, crystal reports, ext...

Thanks again for all the advice.  It was very helpful
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39937131
Glad I could help!
0

Featured Post

Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question