SSIS Tip – Xpath from a C# Script Task

Ben MarckTechnical TipsLeave a Comment

At some point you may need to use Xpath from within a script task rather than using Integration Services built in XML Task’s Xpath functionality. Here’s how I implemented it. The primary limitation is that it will only return a single value, but this can be adjusted to return multiple values easily. Chances are you’ll already be using a  script task, but incase you don’t, start with a standard Script Task (this can be either a Control Flow Script Task or a Data Flow Script Task). Don’t forget to set your ReadOnly / ReadWrite variables. Here’s the boilerplate code for using … Read More

SSIS Tip – Read from Variables to Rows in Data Flow using Script Task

Ben MarckTechnical TipsLeave a Comment

Reading from variables to augment rows with data from variables isn’t readily apparent in SSIS. A workaround I found was to use a script task right before your OLE DB Destination and access the SSIS variable objects directly. Script Task Setup Start with a standard Script Task in your data flow. Add columns to your output in the ‘Inputs and Outputs’ tab, set the names and output data types appropriately Access Variables in your ‘main’ script section by using the following code IDTSVariables100 vars = null; //Gets reference to the SSIS Variables this.VariableDispenser.LockOneForRead(“session”, ref vars);//Locks the Variable in quotes, for Read … Read More

ADF Table Row Selection Event Update Form

Ben MarckTechnical Tips1 Comment

One of the UI requirements in a recent ADF project was to use an ADF Read-Only Table and its built-in functionality (row selection, filtering and sorting) to allow a user to find a row, select it, then automatically have a form on the same page be updated with the data from the row selected for updating and saving. Let’s run though how to implement this… 1. Build the ADF Read-Only table by dragging the appropriate data control onto the view. Ensure you enable the appropriate ADF behaviors on the Edit Table Columns screen. Row Selection is required, but Filtering & Sorting is optional … Read More

SSIS Tip – Save Package to MS SQL Server (Integration Services)

Ben MarckTechnical TipsLeave a Comment

In order to save your SSIS package built using Business Intelligence Development Studio (BIDS) to Integration Services MSDB, you’ll need to: In BIDS, right-click the solution and select Properties Under Deployment Utility, change the CreateDeploymentUtility option from False to True Rebuild the solution Now find in your solution project folder under the bin\deployment file path an Integration Services Deployment Manifest. Right-click this manifest file and select Deploy. Follow the wizard steps to deploy to your server and choose where to save to the database. The package should then appear in SSIS in SQL Server Management Studio under Integration Services in /MSDB.

Oracle ADF vs. Other Java Web Frameworks

Ben MarckTechnical TipsLeave a Comment

To extend on an earlier blog posts by a colleague here at M&S, I’m a firm believer in using different technologies in different situations. Trying to make a technology ‘work’ when another is clearly a better choice is very often a critical mistake. Reasons why these decisions get made are numerous (familiarity with a technology, existing infrastructure, etc). With that said, my own take on ADF vs. other Java web frameworks (such as Grails) is actual a lot more black & white than I thought it would be. While ADF enables typical CRUD functionality quickly and efficiently, it’s abstraction from the … Read More

Request XML from URL in SSIS C# Script Task

Ben MarckTechnical Tips1 Comment

Occasionally, I’ve needed to pull XML from the internet via an URL. This allows you to dynamically pull XML from sources than your local.In order to do so, you’ll need a string variable (to populate with the XML from the internet) and the code below in a Script Task. Every time you need to reference the XML in the variable, change your XML Data Sources and XML tasks to pull XML from a variable. string Url = (string)Dts.Variables[“Url”].Value; XmlDocument doc = new XmlDocument(); doc.Load(Url); //You can use a string here if you’d like…I pull from a variable for the URL … Read More

Oracle DBMS_SCHEDULER vs DBMS_JOB (Create, Run, Monitor, Remove)

Ben MarckTechnical TipsLeave a Comment

DBMS_SCHEDULER is a newer, more complex job scheduling engine released in 10g, intended to replace DBMS_JOB going forward. DBMS_JOB, the older job scheduler, as of now is still available for quick and easy DB based job scheduling.

Job scheduling comprises the core of the functionality of DBMS_SCHUDULER, however here are some additional benefits available to DBMS_SCHEDULER:

  • Logging of job runs (job history)
  • Simple but powerful scheduling syntax (similar to but more powerful than cron syntax)
  • Running of jobs outside of the database on the operating system (see below)
  • Resource management between different classes of jobs
  • Use of job arguments including passing of objects into stored procedures
  • Privilege-based security model for jobs
  • Naming of jobs and comments in jobs
  • Stored, reusable schedules