Showing posts with label provide. Show all posts
Showing posts with label provide. Show all posts

Monday, March 19, 2012

custom report name, not rdl filename

I m trying to deploy reports using rs.exe & rss script. I would like to provide custom Report Name for each report I am deploying (not same as report rdl filename) for more meaningful listing under Report Manager. Is there a way to implement the same?

Thanks

Can you rename the filename to be more meaningful, and use quotations around the filename?

cheers,

Andrew

|||

Hi Andrew, I guess thats the only good option we have for now...

It would have been nice if there were a property for it (ex. ReportName seperate from ReportFilename)

Thanks

|||In Report Manager go to the properies tab of the report...you can change the name. If you create a linked report, you can name the linked reports to anything you want. This is the name that will appear in your reports for ReportFilename|||

jamvir,

I wanted it to named before deployment. I have 100+ of reports being deployed in 3 environments with bi-weekly release cycle. Naming them each time in Report Manager would be a tedious work.

Sunday, March 11, 2012

Custom Logger Doesn't Work in Certain cases

I am testing a set of SSIS packages, In order to test my SSIS packages for errors I have two negative test cases

1) I didn't provide checkpoint file for the checkpoint enabled package.

2) I provide a wrong configuration file

Even though I am using a script task in my "on error" event of my SSIS package. It is not executed. (Perhaps because the package doesn't even execute).

My problem is that SSIS itself puts just a simple one liner in windows event log "Package Failure Error". It does not provide which package failed, why it failed etc. Therefore the admin who gets the ticket to resolve the issue has no clue of what is going wrong and where!

Since my custom logger doesn't even run, I don't know how can I put more details into the windows event log.

How can I resolve this?

regards,

Abhishek.

Sorry to bump so soon, but I am really stuck here.

|||Loggers don't even enter the picture on malformed configuration file warnings/errors. Malformed configurations files are detected at package load time, even before validation. So, if you have a logger ( custom or stock, doesn't matter) defined inside the package, warnings like "invalid xml configuration file" won't be sent there.

The sequence for possible package execution is as follows:
1. Package Load (warnings/errors such as invalid configuration file happen here )
2. Package Validation
3. Package Execution (with validation too)

To trap package load errors, you could capture dtexec's console log output (if you're using that mechanism for package execution).

To implement your own logging; that is, to catch warnings/errors early in the package lifespan without using dtexec's console logger to do so, implement IDTSEvents (by subclassing DefaultsEvents) on package load. See Loading and Running a Local package programmatically (the capturing events from a running package section)

For example, the following will log package load,validate,and execute events, while loggers will get validate and execute events.

Code Snippet

using System;
using System.Diagnostics;
using Microsoft.SqlServer.Dts.Runtime;

namespace IS
{
class PackageRunner
{
static void Main(string[] args)
{
string pkgFileName = args[0];
ISEventsListener eventListener = new ISEventsListener();
// subclass of DefaultEvents

Application isApp = new Application();
// listen for pre-validation errors via LoadPackage
using (Package pkg = isApp.LoadPackage(pkgFileName, eventListener))
{
DTSExecResult validationOutcome = pkg.Validate(null, null, eventListener, null);
if (validationOutcome == DTSExecResult.Success)
{
DTSExecResult executionOutcome = pkg.Execute(null, null, eventListener, null, null);
}
}
Console.WriteLine("Press something...");
Console.ReadKey();
}
}
}

Checkpoint files are a different story, a missing checkpoint file setting will be logged by custom loggers and the package will not execute because of that.