skip to main | skip to sidebar

Friday, March 30, 2012

KPI that compares the growth over years

Hi there,
I'm new to SSAS and MDX. Creating my first dimensions and cubes went fairly fine. But now I hang on KPI.
I'm trying to create a KPI which shows the growth of bookings comparing one year to the previous year.
I want to set a fiterexpression for the time-dimension (e.g. YearString equals 1998). If a filter is set, it should show the bookings for that year ([Measures].[Bookings]) as value and the bookings of the previous year as goal.
My problem is, that I cannot access the selected YearString, to get the bookings of the previous year. I tried the function parallelPeriod() and also a self-created Calculation, but it seems that [dimension time].[hierachy].CurrentMember is always [dimension time].[hierachy].[(All)].

My data structure is as followed:

Fact-table: FactBookings
SeasonID (FK)
YearID (FK)
AgencyID (FK)
CountryID (FK)
RegionID (FK)
IncomeID (FK)
AgeID (FK)
AgencyID (FK)
Bookings

Dimensions:
Income, Age, Agency:
[dimensionname]ID
[dimensionname]String

Dimension geography (having a hierarchy):
RegionID
CountryID
RegionString
CountryString
primary key: RegionID+CountryID

Dimension time (having a hierarchy):
YearID
SeasonID
YearString
Season String
primary key: YearID+SeasonID

Is there a way to access the filterexpressions for a KPI, or does anyone has an idea, how a calculation might has to be, which shows the value of the previous year compared to the actual year?

It would be very nice, if anybody could give me an idea how to create such a KPI.

Regards,
Maik.

First, you need to create the calculated member for the PreviousYear. You can use either Time Intelligence Wizard, you use formulas from the following blog post: http://www.sqljunkies.com/WebLog/mosha/archive/2006/10/25/time_calculations_parallelperiod.aspx

After that, you can enter the expression for KPI as (Time.PreviousYear, Measures.Booking) and it should work fine.

HTH,

Mosha (http://www.mosha.com/msolap)

|||Thank for your answer.
I've tried it for hours.
Now I have a dimension [Time Calculations]
with a calculated member:
CREATE [Time Calculations].[Prior Year] =
(ParallelPeriod([Dimension Time].[YearString - SeasonString].[YearString]), [Time Calculations].[Current Period]);

But for my KPI something like
([Time Calculations].[Prior Year], [Measures].[Bookings])
as the goal-expression wasn't working.

Finally, after turning IsAggregatable to false for YearString in dimension time, I was able to select a year at the KPI-Browser and the goal-expression showed up the measure-value of the previous year. Yeah! .
But I'm still not completely happy. Because of turning IsAggregatable to false, the measure in the Cube-Browser is fixed either to the first year or to one year specified as a filter.
At this point I'm unable to summarise/aggregate the bookings over all time or more than one year.

Any idea for that?

BTW: nice blog Mosha .|||You shouldn't have had to set IsAggregatable to False on Year attribute. Just remember - when it is aggregatable - you will have All level, so the current member inside your Time dimension will be All Years, so you will need to manually position to specific year in order to see a previous year.

Posted by depredationnmqp at 2:51 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: compares, create, creating, cubes, database, dimensions, fairly, growth, hang, kpi, mdx, microsoft, mysql, oracle, server, sql, ssas

KPI measure and dimension

Hi Folks,

i have big problem. my measure is call "VALUE".

and the Dimension "TYPE" (TYPE a,b)

The kpi should compare VALUE Type a and TYPE b.

How it works?

Can everyone help me. THX Greg

It depends on what you mean by comparing the two values, but here's an example of an MDX expression (in a calculated measure, but you could easily use it inside a KPI) that compares two values - Internet Sales Amount for Fridays and Saturdays - on the same dimension:

Code Snippet

with member measures.test as

iif( ([Measures].[Internet Sales Amount], [Date].[Day Name].&[6])

>

([Measures].[Internet Sales Amount], [Date].[Day Name].&[7])

, "Friday is greater", "Saturday is greater")

select [Date].[Calendar Year].members on 0,

[Product].[Category].members on 1

from [Adventure Works]

where(measures.test)

HTH,

Chris

|||

Hi Greg,

Edit your cube in BIDS and then go to KPI's tab.

Create a new KPI and complete the form with MDX script you need for Value, Goal, Status and Trend.

There you can also set Status indicator e Trend indicator (traffic light, gauge, standard arrow and so on).

Here you can find some instructions:

http://msdn2.microsoft.com/en-us/library/ms181183.aspx


|||

thx

this code help me

([Measures].[VALUE], ( [DIM].[NAME].[MEMBER] ))

Posted by depredationnmqp at 2:49 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: call, compare, database, dimension, folks, kpi, measure, microsoft, mysql, oracle, quottypequot, quotvaluequot, server, sql, type, value

KPI List Web Part in MOSS 2007 - How Do I Display an 'As of Date' For Indicators?

I have created an SQL 2005 SSAS cube with many different KPIs defined. In MOSS 2007 (SP2) I have created a site to display these various KPIs in several KPI Lists. Some of the indicators in the underlying cube are updated daily, others weekly, others quarterly, etc.

What are some ways to display to the user what date or time slice each specific indicator is "as of"?

Thanks in advance for any help you can provide.

-Steve

Hello. I do not think that there is a property in SSAS2005 that you can use for this.

The easy way is to create separate KPI:s depending on the time slice /or update window and simply name the KPI:s in SSAS2005 in this way.

I can think of ActSalesBudSalesMonth and ActSalesBudSalesYearToDate. I usually use shorter names.

Else I recommend you to find a property/information field in MOSS 2007

HTH

Thomas Ivarsson

Posted by depredationnmqp at 2:49 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: created, cube, database, date, defined, display, indicators, kpi, kpis, microsoft, moss, mysql, oracle, server, sp2, sql, ssas, various, web

KPI List Web Part in MOSS 2007 - How Do I Display an 'As of Date' For Indicators?

I have created an SQL 2005 SSAS cube with many different KPIs defined. In MOSS 2007 (SP2) I have created a site to display these various KPIs in several KPI Lists. Some of the indicators in the underlying cube are updated daily, others weekly, others quarterly, etc.

What are some ways to display to the user what date or time slice each specific indicator is "as of"?

Thanks in advance for any help you can provide.

-Steve

Hello. I do not think that there is a property in SSAS2005 that you can use for this.

The easy way is to create separate KPI:s depending on the time slice /or update window and simply name the KPI:s in SSAS2005 in this way.

I can think of ActSalesBudSalesMonth and ActSalesBudSalesYearToDate. I usually use shorter names.

Else I recommend you to find a property/information field in MOSS 2007

HTH

Thomas Ivarsson

Posted by depredationnmqp at 2:48 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: created, cube, database, date, defined, display, indicators, kpi, kpis, microsoft, moss, mysql, oracle, server, sp2, sql, ssas, various, web

KPI in SQL 2005

Hello,
I search informations or a tutoriel to carry out a KPI (Key Performance
Indicator) in Analysis Services 2005.
Can you help me.
Thanks!!
NicoHi
Look in SQL 2005 Beta 2 books online. Asking this question in the betagroups
for 2005 will also help.
"pralnico" wrote:

> Hello,
> I search informations or a tutoriel to carry out a KPI (Key Performance
> Indicator) in Analysis Services 2005.
> Can you help me.
> Thanks!!
> Nicosql
Posted by depredationnmqp at 2:48 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: analysis, carry, database, informations, key, kpi, microsoft, mysql, oracle, performanceindicator, search, server, services, sql, tutoriel

KPI in SQL 2005

Hello,
I search informations or a tutoriel to carry out a KPI (Key Performance
Indicator) in Analysis Services 2005.
Can you help me.
Thanks!!
Nico
Hi
Look in SQL 2005 Beta 2 books online. Asking this question in the betagroups
for 2005 will also help.
"pralnico" wrote:

> Hello,
> I search informations or a tutoriel to carry out a KPI (Key Performance
> Indicator) in Analysis Services 2005.
> Can you help me.
> Thanks!!
> Nico
Posted by depredationnmqp at 2:47 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: analysis, carry, database, informations, key, kpi, microsoft, mysql, oracle, performanceindicator, search, server, services, sql, tutoriel

KPI in SQL 2005

Hello,
I search informations or a tutoriel to carry out a KPI (Key Performance
Indicator) in Analysis Services 2005.
Can you help me.
Thanks!!
NicoHi
Look in SQL 2005 Beta 2 books online. Asking this question in the betagroups
for 2005 will also help.
"pralnico" wrote:
> Hello,
> I search informations or a tutoriel to carry out a KPI (Key Performance
> Indicator) in Analysis Services 2005.
> Can you help me.
> Thanks!!
> Nico
Posted by depredationnmqp at 2:47 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: analysis, carry, database, indicator, informations, key, kpi, microsoft, mysql, oracle, performance, search, server, services, sql, tutoriel

KPI in Reporting Service

Hi All,

How to integrated the KPI from SSAS 2005 to SSRS 2005 ?

So the value and indicator from KPI can be retrieve/view by SSRS 2005...

Any suggestion will be very helpful.

THX.

Hi

I have the exact same problem ...

But when deploying scorecards from Business Scorecard Manager to Reporting Services it is possible to get reporting services to show images as well as values. However when you look at the report in Visual Studio / Report Layout there is no give-away as to how the image is generated ...

A home-made syntax may be a solution as the KPI-value can be seen to be (e.g.) "=Fields!Advertising_comp_to_Turnover_Goal.Value". Exchange of "Value" with "Indicator" does not work however.

Any other suggestions?

Chr.

|||

I found a description of how to make it work ... not for me however!!

Chr.

http://www.sqljunkies.com/WebLog/sqlbi/archive/category/325.aspx

Report Builder Model with UDM

postedTuesday, November 15, 2005 6:13 AM bymarcorusso

Today I lost a lot of time digging on this problem so a I hope post about this will save time of other developers!

I wanted to import the UDM into a model for Report Builder. You have to do these steps:

go intoSQLServer Management Studio
Posted by depredationnmqp at 2:46 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: database, indicator, integrated, kpi, microsoft, mysql, oracle, reporting, retrieve, server, service, sql, ssas, ssrs, value, view

KPI in Reporting Service

How to integrated the KPIs from SSAS 2005 to SSRS 2005 ?

Moving this thread to the reporting services forum where someone should be able to help
Posted by depredationnmqp at 2:45 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: database, integrated, kpi, kpis, microsoft, mysql, oracle, reporting, server, service, sql, ssas, ssrs

KPI Help Required-I want a revenue report with average Daily Revenue

Hi All,

What I am trying to do is create a average daily revenue KPI using vs.net 2005.

The necessary fields from my fact table are Revenue and the datetimeID, there will be multiple entries perday.

I would like my KPI to check if we are hitting a $10,000 daily average in revenue. But I need to know how many Distinct Days are being calcuated. If I were using regular SQL I could use:

COUNT( SELECT DISTINCT dayNumberOfMonth,monthNumberOfYear,YearNumber)
or
COUNT(SELECT DISTINCT LEFT(datetimeAlternateKey,10))

My Current Datetime Table contains:
datetimeID
fulldatetime
monthNumberOfYear
calendarYear
dayNumberOfMonth

Any references out there on how I can go about doing this? More of less this is what I want to do:

Value Expression:
[Measures].[Revenue] * (Distinct Number Of days)

Goal Expression:
10,000*[Distinct Number of Days)

Any suggestions of books to look for or good web resources would be much appreciated.

Thanks all

What period would you be calculating this over and have you considered how you want partial periods treated?

Is the KPI meant to be "adaptive"? So if the user selects a month, it calculates the average for that month and if they select a year it calculates the average for the year?

Assuming that your Time dimension has a calendar hierarchy and a Day attribute, you could do something like the following:

Count(descendants([Time].[Calendar].CurrentMember, [Time].[Calendar].[Day]))

If there is $30,000 revenue recorded on day 1 of the month, does that mean that the KPI has been met for the whole month?

|||Thanks for the reply Darren,

When you refer to [Time].[Calendar].[Day], does [Day] represent an ongoing incrementing day count from the start of dates kept? i.e. Not day or month, nor day of year?

The KPI is meant to be adaptive, at a later point I will go for fixed KPIS (e.g. yesterday).

If for example our Goal Value was $1000 a day, and we did $30,000 in day. Our KPI would be met for any 30 day span that held that date. So right now my datetime table looks like this:

Do you have any suggestions on books I buy for Analysis Services / MDX?

Thanks
|||

winnipeg wrote:

When you refer to [Time].[Calendar].[Day], does [Day] represent an ongoing incrementing day count from the start of dates kept? i.e. Not day or month, nor day of year?

No, the first parameter to the descendants function picks up the current context of the time.calendar hierarchy. If the current context of time.calendar is a month member, the descendants will be all the days in the month. If it is a year member, it will be all the days in the year

winnipeg wrote:


Do you have any suggestions on books I buy for Analysis Services / MDX?

MDX Solutions: With Microsoft SQL Server Analysis Services 2005 and Hyperion Essbase by George Spofford, Sivakumar Harinath, Christopher Webb, and Dylan Hai Huang - is the best one I know for MDX

Applied Microsoft Analysis Services 2005: And Microsoft Business Intelligence Platform by Teo Lachev - is a good alround SSAS book

sql
Posted by depredationnmqp at 2:45 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: average, create, database, fact, fields, kpi, microsoft, mysql, necessary, net, oracle, report, required-i, revenue, server, sql, table

KPI graphic in RS2005

Hi,
Does anybody know how to show a SS2005 KPI image in reporting services?
Thanks.You can't just show the image that you see in SSAS because it is not
streamed back. Instead, you need to load you image based on the KPI value.
The image Value property can be controlled programatically. I have a sample
project (http://prologika.com/CS/blogs/blog/archive/2005/10/05/687.aspx)
that demonstrates how you can manipulate the image source programically. It
doesn't show KPI values, but it should be able to steer you in the right
direction.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Fernando Marçal" <FernandoMaral@.discussions.microsoft.com> wrote in message
news:14EC6E85-C505-443E-B2D9-5FF923133B4C@.microsoft.com...
> Hi,
> Does anybody know how to show a SS2005 KPI image in reporting services?
> Thanks.|||Hi Teo,
Will look into it. Thanks.
"Teo Lachev [MVP]" wrote:
> You can't just show the image that you see in SSAS because it is not
> streamed back. Instead, you need to load you image based on the KPI value.
> The image Value property can be controlled programatically. I have a sample
> project (http://prologika.com/CS/blogs/blog/archive/2005/10/05/687.aspx)
> that demonstrates how you can manipulate the image source programically. It
> doesn't show KPI values, but it should be able to steer you in the right
> direction.
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "Fernando Marçal" <FernandoMaral@.discussions.microsoft.com> wrote in message
> news:14EC6E85-C505-443E-B2D9-5FF923133B4C@.microsoft.com...
> > Hi,
> >
> > Does anybody know how to show a SS2005 KPI image in reporting services?
> >
> > Thanks.
>
>
Posted by depredationnmqp at 2:44 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: database, graphic, image, kpi, microsoft, mysql, oracle, reporting, rs2005, server, services, sql, ss2005

KPI Goals from dimension attributes.

Hi,

Currently I'm busy creating a Cube and I'd like to use dimension attributes as goals in my KPI's. I'm creating a cube that has facts that are related to agreements. In the agreements dimension I've stored the goals that are defind within the actual agreements with the customers. So when creating a KPI I'd like to use those goals from the dimension.

I've tried something like this: [Agreement].[Norm Percentage].CURRENTMEMBER as my Goal Expression, but it's not working as expected.

Really hope that one of you can explain me how to do it.

Thanks in advance,

The .CurrentMember function will return a member, what you should be looking at is using the .MemberValue function

eg.

[Agreement].[Norm Percentage].MemberValue

The thing you will need to think about is what you what to see when multiple or All "Norm Percentages" are in context. I don't know enough about your data to know if an average would make sense, but If it did, something like the following may be a more robust expression.

AVG(EXISTING [Agreement].[Norm Percentage].[Norm Percentage], [Aggrement].[Norm Percentage].MemberValue)

|||

Darren thanks for your reply.

I've tested you're solution and it is looking better then what I got the first time. But unfortunately the averages are not what I expected.

I'll look into it today. So I'll post a new reply at the end the day with my results.

Posted by depredationnmqp at 2:43 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: attributes, busy, creating, cube, database, dimension, facts, goals, kpi, microsoft, mysql, oracle, server, sql

KPI Goals from dimension attributes.

Hi,

Currently I'm busy creating a Cube and I'd like to use dimension attributes as goals in my KPI's. I'm creating a cube that has facts that are related to agreements. In the agreements dimension I've stored the goals that are defind within the actual agreements with the customers. So when creating a KPI I'd like to use those goals from the dimension.

I've tried something like this: [Agreement].[Norm Percentage].CURRENTMEMBER as my Goal Expression, but it's not working as expected.

Really hope that one of you can explain me how to do it.

Thanks in advance,

The .CurrentMember function will return a member, what you should be looking at is using the .MemberValue function

eg.

[Agreement].[Norm Percentage].MemberValue

The thing you will need to think about is what you what to see when multiple or All "Norm Percentages" are in context. I don't know enough about your data to know if an average would make sense, but If it did, something like the following may be a more robust expression.

AVG(EXISTING [Agreement].[Norm Percentage].[Norm Percentage], [Aggrement].[Norm Percentage].MemberValue)

|||

Darren thanks for your reply.

I've tested you're solution and it is looking better then what I got the first time. But unfortunately the averages are not what I expected.

I'll look into it today. So I'll post a new reply at the end the day with my results.

Posted by depredationnmqp at 2:43 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: attributes, busy, creating, cube, database, dimension, facts, goals, kpi, microsoft, mysql, oracle, server, sql

KPI Goal Value doesn't change after filtering the date

Hello everyone,

i'm new to Analysis Services and trying to build a Data Warehouse especially for using KPIs in it. Watching the famous AdventureWorksDW example i try to use the MDX Statements likewise. I want to use a KPI just like the first in the list "Growth in Customer Base". But when using a MDX Statement for the Goal Expression like this:

Case
When [Date].[Fiscal].CurrentMember.Level Is [Date].[Fiscal].[Fiscal Year]
Then .30
When [Date].[Fiscal].CurrentMember.Level Is [Date].[Fiscal].[Fiscal Semester]
Then .15
When [Date].[Fiscal].CurrentMember.Level Is [Date].[Fiscal].[Fiscal Quarter]
Then .075
When [Date].[Fiscal].CurrentMember.Level Is [Date].[Fiscal].[Month]
Then .025
Else "NA"
End

after filtering the resultset by the "Date" Dimension -> "Fiscal" Hierarchy -> equals "FY 2004" in the KPI-Browser it just shows "NA" like it does in the AdventureWorksDW, too. Is there a way to use a similar example in AdventureWorksDW that changes the goal dependend on the Filter like my description? All other KPI examples in AdventureWorksDW the goals depend on other values already contained in the DB and not dependend on the Filter Expression used.

Unfortunately, I think that the KPI browser may be misleading because, "filtering the resultset by the "Date" Dimension -> "Fiscal" Hierarchy -> equals "FY 2004" in the KPI-Browser" is probably generating a subselect, rather than applying the condition in the where clause. Try an MDX query directly, like:

>>

select {KPIGoal("Growth in Customer Base")} on 0

from [Adventure Works]

where [Date].[Fiscal].[Fiscal Year].&[2004]

-

Growth in Customer Base Goal
0.3

>>

|||Hi Deepak,

thank's a lot for your help! That works perfectly. But my goal is to visualize the KPIs with the Business Scorecard Manager and hoped I just have to give him the cube and he visualizes it. Does the Business Scorecard Manager filter with subselects or in a where clause?

I hope you or someone else can help me out with this second point and I will be happy ...

Claudio|||

Hi Claudio,

My guess is that BSM 2005 filters with where clause, since I think that it works with AS 2000 cube as well. But you could find out for sure by tracing the MDX query from BSM to AS 2005, using SQL Profiler.

Posted by depredationnmqp at 2:42 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: analysis, build, database, date, especially, famous, filtering, goal, kpi, kpis, microsoft, mysql, oracle, server, services, sql, value, warehouse, watching

KPI for each member of a dimension

All the examples I have seen have set KPI's against all the data in the cube. Is it possible to do this for each member of a dimension?

Specifically, I have an application which carries out calculations for a series of 'what if' scenarios. For each Scenario I have a warning level and a trigger level. These levels are held as attrbutes for the Scenario dimension.

It seems to me that I could create a report that calculates the values for each dimension via an MDX query, but I think this should be a calculated member somewhere but I'm at a loss as to the best way to do this.

Does anyone have any ideas as to how best to approach this?


Looking into this further I think I can use the cube calculation tab to add a calculated member to the dimension. Am trying this now... watch this space...

sql
Posted by depredationnmqp at 2:42 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: cube, database, dimension, dimensionspecifically, examples, kpi, member, microsoft, mysql, oracle, server, sql

KPI design and implementation

Hi all,

I'm fairly new to analysis services and am encountering some difficulties when it comes to designing KPI's. I want these to be designed so that they may be displayed in a KPI list on Sharepoint 2007 server.

The basic premise for the simple data warehouse pilot was to present usage data for a number of customer sites split up but time etc. These sites also have a potential usage value attached to them. I'd like to implement a KPI that shows the current progress in the current month for there usage against the site's potential. A cylinder or thermometer type diagram i believe would work well to show the progress as a percentage value.

This may be to vague a description and i'm willing to elaborate further if necessary but could someone please help me understand how best to approach this?

Many thanks in advance,

Grant

Hello. First, if you have installed the SQL Server 2005 samples you will find an SSAS2005(Analysis Services) project, Adventure Works, with a lot of KPI:s in the cube editor. This is to get to know the MDX syntax for KPI:s.

To get the KPI:s to Sharepoint is not done directly. You will need a separate solution for this.

You can query and display KPI:s in Reporting Services 2005 but you will only see the values not the graphic/icons.

One option is to use Excel 2007 and construct a KPI spreadsheet report and publish it in Sharepoint. Another option is to use ProClarity Analytics platform and use their webparts for Sharepoint. Both these alternatives are not free of charge.

A third option is Microsofts Business Scorecard Server. It uses Sharepoint directly. This product and ProClarity will be included in the new Performance Point Server that will be on the market this summer.

HTH

Thomas Ivarsson

Posted by depredationnmqp at 2:41 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: analysis, database, design, designed, designing, difficulties, encountering, fairly, implementation, kpi, microsoft, mysql, oracle, server, services, sql

KPI Annotations property field

If you look through the the properties collection of a KPI in ADOMD, the last item is called "Annotations". Does anyone know how to set this property through BIDS?

We need to pass additional data to our client app for each KPI in order to make up for incomplete functionality and bugs in Analysis Services in regards to formatting, and we would like to use this field if possible. "Annotations" is not the same as "Description" by the way. We may have to prepend XML data to the description field if there is not an alternative.

Any help would be appreciated.

Thanks,

Terry

and bugs in Analysis Services in regards to formatting

Can you please provide more details about bugs in formatting of KPIs ? I beleive any formatting issue can be solved without going to annotations.

|||

Terry and I work together and I'm replying on his behalf...

The issue we have happens when the KPI value and goal are evaluated in the status or trend expression. For example, if both are formatted (using the Format function) as percent, the KPI status expression shows an error message of "type mismatch for the / operator." We've been getting around this by formatting them as "standard" in the KPI and formatting them in the client app by checking for values that don't start with a "$".

Recently, we came across another issue where the value returned was null. The KPI expression was checking for divide by zero errors but not for null numerators. The status expression blew up with the same error, presumably because the goal was still a formatted value. Removing the format from the Value and Goal or returning a formatted 0 instead of a null both resolve the problem.

It seems that the KPI framework is very sensitive to how values are formatted. This is why we've been thinking about moving the formatting to the client side by passing a format string in Current Time Member or by using Annotations. It seems it would be better to format the end result instead of worrying about how AS handles formats in Status and Trend. Following all the examples we've seen, we're using KPIValue and KPIGoal in the status expression instead of repeating the Value calculation multiple times.

Any advice would be greatly appreciated.

|||

Can you please explain a little more about "if both are formatted (using the Format function)". Do you mean that you use VBA's Format function in the expression of KPI ? If so - this is really bad practice, it has all kinds of problems associated with it. Why wouldn't you want to rely on standard MDX formatting capabilities - I cannot think of scenario where MDX won't be able to do what Format function can do.

It would be best if you will provide some examples of KPI expressions that you are using, and expected formatting.

Thanks,

Mosha (http://www.mosha.com/msolap)

|||

Yes, we are using VBA's Format in KPIs. We're using Format_String in calculations. It may be bad practice, but AdventureWorks and all of the books we have show examples of using it for KPIs. It would be great if there's a better way to do this. Here's sample code for one of the KPIs:

VALUE:

Case
When (Not IsEmpty( ([Measures].[Average Customers]) ))
And (Not IsEmpty( [Measures].[Annualized Contribution]))
Then Format(
([Measures].[Annualized Contribution])
/
([Measures].[Average Customers])
,"Currency")
Else
Format(0,"Currency")
End

If the Status is Null and the Goal is a formatted value this would have caused the type mismatch error. This is why we're returning a formatted 0 instead.

GOAL:

Format(300,"Currency") //Temporary goal

STATUS:

Case
When IsEmpty( KpiValue( "Average Customer Contribution" ) )
Then Null
When KpiValue( "Average Customer Contribution" ) /
KpiGoal ( "Average Customer Contribution" ) >= .90
Then 1
When KpiValue( "Average Customer Contribution" ) /
KpiGoal ( "Average Customer Contribution" ) < .85
And
KpiValue( "Average Customer Contribution" ) /
KpiGoal ( "Average Customer Contribution" ) >= .80
Then 0
Else -1
End

TREND:

Case
When [Date].[Calendar Year Hierarchy].CURRENTMEMBER.LEVEL Is
[Date].[Calendar Year Hierarchy].[(All)]
Then 0
When
VBA!ABS(
KpiValue( "Average Customer Contribution" ) -
(KpiValue ( "Average Customer Contribution" ),
[Date].[Month].CurrentMember.PrevMember)
/
(KpiValue ( "Average Customer Contribution" ),
[Date].[Month].CurrentMember.PrevMember)
) <=.05
Then 0
When
KpiValue( "Average Customer Contribution" ) -
(KpiValue ( "Average Customer Contribution" ),[Date].[Month].CurrentMember.PrevMember)
/
(KpiValue ( "Average Customer Contribution" ),[Date].[Month].CurrentMember.PrevMember)
>.05
Then 1
Else -1
End

We're currently developing on SP2 because of the LastNonEmpty performance problems in SP1. In several cases, our KPIs are just a calculated measures that have Format_String="Percent". To use them in the KPI and have the resulting KPI formatted as a percent, we have to multiple the calculated measure by 100 before the second format is applied. Analysis Services doesn't seem to know the underlying measure's format.

Thanks for your help.

|||

It may be bad practice, but AdventureWorks and all of the books we have show examples of using it for KPIs.

I went over all the KPIs in AdventureWorks cube, and I didn't see any one using Format function. Could you please point out which KPI uses it, and I will file a bug for it to be fixed in the next release of the sample. Or perhaps it is already fixed and we are using different versions of AdventureWorks ? I also would like to know which book shows such examples. You can contact me by mail if you don't want this to be published in the forum.

Now to your scenario. It seems like you want 'Currency' to be formatting of KPI's Value property. Using VBA!Format in the Value expression makes it return a string. Therefore all other properties which try to do arithmetic operations with KPIValue operate with strings instead. It is almost a miracle, but AS actually does support arithmetics on strings to some degree by converting them to numbers when possible. But this is a slippery road. For example, you will find that "300" - "100" = 200, but "300" + "100" = "300100", and not 400 !!! And there are, of course, all other problems when you work with strings that you have noticed already.

Here is how I would've done it. In the MDX Script you can add the following snippet (it also fixes couple of other minor problems with your expression))

CREATE HIDDEN MyKPIValue = IIF ( [Measures].[Average Customers] <> 0, [Measures].[Annualized Contribution]/[Measures].[Average Customers], NULL );

FORMAT_STRING(MyKPIValue) = 'Currency';

This calculated measure will be created as hidden, and then inside the Value expression of your KPI, you simply reference [Measures].[MyKPIValue].

HTH,

Mosha (http://www.mosha.com/msolap)

|||

I went through our current copy of AdventureWorks and didn't find it either. I may have seen it in an earlier version, or I may just be remembering incorrectly. I know I've seen it in other online articles. There's also a sample showing the use of VBA!ABS at DataBaseJournal.

Thanks for you explanation of strings in the KPIs. The type mismatch error makes sense now.

I think what we were missing here is that the value and goal really need to be created in the script and not in the KPI designer. We create a number of percentage ratios as KPIs where we may divide a currency amount by a count (just like ROA in AdventureWorks.) Using Format() seemed to be the only way to show this as a percent. We should be doing this calculation in the script and use Format_String. I just read another post of yours on solve order that suggests creating all the calculations in the script and only referring to them in the KPI designer is the right way to go.

It would be great to have documented best practices from Microsoft that keep us newbies away from problems like this. KPIs seem to be one of the least documented features.

Getting back to Terry's original question, is there a way of using annotations to pass additional info to the client for custom features? We plan on implementing spark lines and bullet graphs and it would be great if we could pass additional data to the client.

Thanks again for your help!

|||

> There's also a sample showing the use of VBA!ABS at DataBaseJournal.

VBA!ABS - is kosher to use, since it's a math function, and its return data type is number. And, BTW, the MDX articles in DataBaseJournal by William Pearson are usually very good - so this is a source I would trust.

> Getting back to Terry's original question, is there a way of using annotations to pass additional info to the client for custom features? We plan on implementing spark lines and bullet graphs and it would be great if we could pass additional data to the client.

Yes - it is certainly possible. Assuming you create your cubes and KPIs using AMO - here is the link to AMO documentation about how to add annotations to any AS object.

http://msdn2.microsoft.com/en-us/library/microsoft.analysisservices.modelcomponent.annotations.aspx

HTH,

Mosha (http://www.mosha.com/msolap)

|||

There's an open source project called BIDS Helper which is a Visual Studio Add-in. One feature lets you edit annotations on Analysis Services objects within BIDS:

http://www.codeplex.com/bidshelper/Wiki/View.aspx?title=Show%20Extra%20Properties&referringTitle=Home

|||I just looked at BIDs Helper. That is exactly what we were looking for. The other features will be very helpful as well. Thanks!!!
Posted by depredationnmqp at 2:41 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: adomd, annotations, collection, database, field, item, kpi, microsoft, mysql, oracle, properties, property, server, sql

KPI Annotations property field

If you look through the the properties collection of a KPI in ADOMD, the last item is called "Annotations". Does anyone know how to set this property through BIDS?

We need to pass additional data to our client app for each KPI in order to make up for incomplete functionality and bugs in Analysis Services in regards to formatting, and we would like to use this field if possible. "Annotations" is not the same as "Description" by the way. We may have to prepend XML data to the description field if there is not an alternative.

Any help would be appreciated.

Thanks,

Terry

and bugs in Analysis Services in regards to formatting

Can you please provide more details about bugs in formatting of KPIs ? I beleive any formatting issue can be solved without going to annotations.

|||

Terry and I work together and I'm replying on his behalf...

The issue we have happens when the KPI value and goal are evaluated in the status or trend expression. For example, if both are formatted (using the Format function) as percent, the KPI status expression shows an error message of "type mismatch for the / operator." We've been getting around this by formatting them as "standard" in the KPI and formatting them in the client app by checking for values that don't start with a "$".

Recently, we came across another issue where the value returned was null. The KPI expression was checking for divide by zero errors but not for null numerators. The status expression blew up with the same error, presumably because the goal was still a formatted value. Removing the format from the Value and Goal or returning a formatted 0 instead of a null both resolve the problem.

It seems that the KPI framework is very sensitive to how values are formatted. This is why we've been thinking about moving the formatting to the client side by passing a format string in Current Time Member or by using Annotations. It seems it would be better to format the end result instead of worrying about how AS handles formats in Status and Trend. Following all the examples we've seen, we're using KPIValue and KPIGoal in the status expression instead of repeating the Value calculation multiple times.

Any advice would be greatly appreciated.

|||

Can you please explain a little more about "if both are formatted (using the Format function)". Do you mean that you use VBA's Format function in the expression of KPI ? If so - this is really bad practice, it has all kinds of problems associated with it. Why wouldn't you want to rely on standard MDX formatting capabilities - I cannot think of scenario where MDX won't be able to do what Format function can do.

It would be best if you will provide some examples of KPI expressions that you are using, and expected formatting.

Thanks,

Mosha (http://www.mosha.com/msolap)

|||

Yes, we are using VBA's Format in KPIs. We're using Format_String in calculations. It may be bad practice, but AdventureWorks and all of the books we have show examples of using it for KPIs. It would be great if there's a better way to do this. Here's sample code for one of the KPIs:

VALUE:

Case
When (Not IsEmpty( ([Measures].[Average Customers]) ))
And (Not IsEmpty( [Measures].[Annualized Contribution]))
Then Format(
([Measures].[Annualized Contribution])
/
([Measures].[Average Customers])
,"Currency")
Else
Format(0,"Currency")
End

If the Status is Null and the Goal is a formatted value this would have caused the type mismatch error. This is why we're returning a formatted 0 instead.

GOAL:

Format(300,"Currency") //Temporary goal

STATUS:

Case
When IsEmpty( KpiValue( "Average Customer Contribution" ) )
Then Null
When KpiValue( "Average Customer Contribution" ) /
KpiGoal ( "Average Customer Contribution" ) >= .90
Then 1
When KpiValue( "Average Customer Contribution" ) /
KpiGoal ( "Average Customer Contribution" ) < .85
And
KpiValue( "Average Customer Contribution" ) /
KpiGoal ( "Average Customer Contribution" ) >= .80
Then 0
Else -1
End

TREND:

Case
When [Date].[Calendar Year Hierarchy].CURRENTMEMBER.LEVEL Is
[Date].[Calendar Year Hierarchy].[(All)]
Then 0
When
VBA!ABS(
KpiValue( "Average Customer Contribution" ) -
(KpiValue ( "Average Customer Contribution" ),
[Date].[Month].CurrentMember.PrevMember)
/
(KpiValue ( "Average Customer Contribution" ),
[Date].[Month].CurrentMember.PrevMember)
) <=.05
Then 0
When
KpiValue( "Average Customer Contribution" ) -
(KpiValue ( "Average Customer Contribution" ),[Date].[Month].CurrentMember.PrevMember)
/
(KpiValue ( "Average Customer Contribution" ),[Date].[Month].CurrentMember.PrevMember)
>.05
Then 1
Else -1
End

We're currently developing on SP2 because of the LastNonEmpty performance problems in SP1. In several cases, our KPIs are just a calculated measures that have Format_String="Percent". To use them in the KPI and have the resulting KPI formatted as a percent, we have to multiple the calculated measure by 100 before the second format is applied. Analysis Services doesn't seem to know the underlying measure's format.

Thanks for your help.

|||

It may be bad practice, but AdventureWorks and all of the books we have show examples of using it for KPIs.

I went over all the KPIs in AdventureWorks cube, and I didn't see any one using Format function. Could you please point out which KPI uses it, and I will file a bug for it to be fixed in the next release of the sample. Or perhaps it is already fixed and we are using different versions of AdventureWorks ? I also would like to know which book shows such examples. You can contact me by mail if you don't want this to be published in the forum.

Now to your scenario. It seems like you want 'Currency' to be formatting of KPI's Value property. Using VBA!Format in the Value expression makes it return a string. Therefore all other properties which try to do arithmetic operations with KPIValue operate with strings instead. It is almost a miracle, but AS actually does support arithmetics on strings to some degree by converting them to numbers when possible. But this is a slippery road. For example, you will find that "300" - "100" = 200, but "300" + "100" = "300100", and not 400 !!! And there are, of course, all other problems when you work with strings that you have noticed already.

Here is how I would've done it. In the MDX Script you can add the following snippet (it also fixes couple of other minor problems with your expression))

CREATE HIDDEN MyKPIValue = IIF ( [Measures].[Average Customers] <> 0, [Measures].[Annualized Contribution]/[Measures].[Average Customers], NULL );

FORMAT_STRING(MyKPIValue) = 'Currency';

This calculated measure will be created as hidden, and then inside the Value expression of your KPI, you simply reference [Measures].[MyKPIValue].

HTH,

Mosha (http://www.mosha.com/msolap)

|||

I went through our current copy of AdventureWorks and didn't find it either. I may have seen it in an earlier version, or I may just be remembering incorrectly. I know I've seen it in other online articles. There's also a sample showing the use of VBA!ABS at DataBaseJournal.

Thanks for you explanation of strings in the KPIs. The type mismatch error makes sense now.

I think what we were missing here is that the value and goal really need to be created in the script and not in the KPI designer. We create a number of percentage ratios as KPIs where we may divide a currency amount by a count (just like ROA in AdventureWorks.) Using Format() seemed to be the only way to show this as a percent. We should be doing this calculation in the script and use Format_String. I just read another post of yours on solve order that suggests creating all the calculations in the script and only referring to them in the KPI designer is the right way to go.

It would be great to have documented best practices from Microsoft that keep us newbies away from problems like this. KPIs seem to be one of the least documented features.

Getting back to Terry's original question, is there a way of using annotations to pass additional info to the client for custom features? We plan on implementing spark lines and bullet graphs and it would be great if we could pass additional data to the client.

Thanks again for your help!

|||

> There's also a sample showing the use of VBA!ABS at DataBaseJournal.

VBA!ABS - is kosher to use, since it's a math function, and its return data type is number. And, BTW, the MDX articles in DataBaseJournal by William Pearson are usually very good - so this is a source I would trust.

> Getting back to Terry's original question, is there a way of using annotations to pass additional info to the client for custom features? We plan on implementing spark lines and bullet graphs and it would be great if we could pass additional data to the client.

Yes - it is certainly possible. Assuming you create your cubes and KPIs using AMO - here is the link to AMO documentation about how to add annotations to any AS object.

http://msdn2.microsoft.com/en-us/library/microsoft.analysisservices.modelcomponent.annotations.aspx

HTH,

Mosha (http://www.mosha.com/msolap)

|||

There's an open source project called BIDS Helper which is a Visual Studio Add-in. One feature lets you edit annotations on Analysis Services objects within BIDS:

http://www.codeplex.com/bidshelper/Wiki/View.aspx?title=Show%20Extra%20Properties&referringTitle=Home

|||I just looked at BIDs Helper. That is exactly what we were looking for. The other features will be very helpful as well. Thanks!!!
Posted by depredationnmqp at 2:40 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: adomd, annotations, collection, database, field, item, kpi, microsoft, mysql, oracle, properties, property, server, sql

KPI and report deployment on WSS 3.0

Not sure if I really have the correct forum for this posting so appologies if it is not. My question refers to the basic functionality of the new Sharepoint 3.0 both WSS and MOSS.

In version 2.0 of Sharepoint Services reports were displayed in Sharepoint using Report Explored to navigate and Report Viewer to display the report. Also KPI's were displayed in a web part which came from Business Scorecard Manager 2005.

I have been investingation both WSS3.0 and MOSS and have installed WSS3.0 to test. I notice that I can connect to reporting services with CTP2.0 for sql server. I can upload reports into document lists and run them from there. My question is has the old idea of using the report explorer gone as when you have report manager running in sharepoint integration it has no website to upload files or manage permissions. Is the document upload method the new way or am I missing something.

More importantly though is the display of KPI's is this now only available in MOSS 2007 and no longer a function of WSS3.0 as you cannot install Business Scorecard manager on WSS3.0 but it appears this is built in to MOSS.

Any guidelines to this new functionality would be greatly appreciated

W.r.t. to SharePoint integration, you may find the following blog useful. In SP2 SharePoint integration mode, the Report Manager and Management Studio are not supported. Instead, you can deploy reports to WSS libraries from SharePoint, Report Designer in VS.NET, or programatically.

MOSS has a basic built-in support for creating and importing KPIs but it has less features than BSM, e.g. doesn't support scorecards. You can still use BSM (the 2007 version is currently under way) and integrate its scorecards with WSS 3.0.

|||Thanks for the Low Down that is a great help with planning deployment
Posted by depredationnmqp at 2:39 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: appologies, basic, database, deployment, functionality, kpi, microsoft, mysql, oracle, posting, refers, report, server, sql, wss

KPI and MDX in Goal-Expression

Hi,

Why does a MDX-Expression like

([Dim Time].[CalendarYear].PrevMember, [Measures].[Sales Amount - Fact Reseller Sales])

not work within a KPI-Goal-Expression ?

Is there a work-around for that?

Best whishes,
Manfred

Hi Manfred,

what does it means "not work within a KPI-Goal-Expression"

Simply you don't see data or you receive an error message?

If you simply don't see data maybe the "CurrentMember" for "[Dim Time].[CalendarYear]" is "All Periods" in your KPI-Goal-Expression context so AS can't find a PreviousMember.

sql
Posted by depredationnmqp at 2:39 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: amount, calendaryear, database, dim, fact, goal-expression, kpi, mdx, mdx-expression, measures, microsoft, mysql, oracle, prevmember, reseller, sales, server, sql, time

KPI Aggregation

I am new to using SQL 2005 Analysis Services and am spinning my wheels with something which is seemingly very basic. I have a view which already aggregates data into a comparison for the current month (i.e. Projected Sales, Actual Sales, Type of Sale). When I attempt to use the KPIs to simply use indicators to show which goals have been met, I'm only able to compare the grand totals of all sales and not break it down by specific Sale Type (which the table already does). How can I set things up so that the KPIs will keep the aggregations based on Sale Type instead of combining everything?

Thanks in advance!

Could you provide a more complete picture of your scenario? You mentioned a view (presumably relational?) and KPI's, but what kind of AS 2005 cube do you have in between - and does it have a "Sale Type" dimension? And are the KPI's created in the cube, or defined only in a client tool, like Proclarity or Business Scorecard Manager?|||Thanks for your reply...I have created a relational view which does all the aggregation I need. However, I haven't been able to create the "sale type" dimension successfully, it seems as though it's not a possible option even though this data is clearly pulled in the data source view. I am trying to create the KPIs directly in the cube and not using any client tools.|||So I think that the 1st step you need to take is to create a "Sale Type" dimension for the cube - you can then use it to slice cube data and KPI's by. What problems are preventing you from doing this?
Posted by depredationnmqp at 2:38 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: aggregation, analysis, basic, database, kpi, microsoft, mysql, oracle, seemingly, server, services, spinning, sql, view, wheels

KPI - Sales Trend

Hi,

I am trying to create a Sales Trend KPI, where the value expression is last month sales (Identify last month based on current system date) and target expression is last month previous year sales amount times 1.04.

Is there a way to accomplish this using MDX in KPI.

Thanks,

Ravi

Identifying the lastest month of data is the trickiest part. One technique to do this is to create a calculated member named CurrentMonth that uses the VBA!Date() and VBA!DatePart() to construct a member reference that can then be resolved with StrToMember. Another techinique is to again create a CurrentMonth calculation with a hard coded reference to a date and then update the definition of this calculation each time a new month of data is loaded. (See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvbadev/html/pullingpiecesapart.asp for some help on the VBA functions.)

Once you have this CurrentMonth member, you can use the ParallelPeriod MDX function (http://msdn2.microsoft.com/en-us/library/ms145500(SQL.90).aspx) to calculate the lat month of the previous year.

|||Thanks Matt.
Posted by depredationnmqp at 2:38 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: based, create, current, database, date, expression, identify, kpi, microsoft, mysql, oracle, sales, server, sql, system, trend, value

KPI

Hi all,

I've created a KPI and it is working correctly, however, I don't see it in the cube browser under the measures group? Where can I set the property to have it appear?

Thanks,

Mark

You can see KPI on "Browser View" mode on KPI's tab or sending an MDX query from the SQL Server Management Studio.

Francesco

|||Thanks Francesco, I do see it there. How can I get it to render via an Excel (2007) pivot table? I recall having generated one when I was using the Beta version of 2007.
Posted by depredationnmqp at 2:37 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: browser, correctly, created, cube, database, group, kpi, measures, microsoft, mysql, oracle, server, sql, working

Korean wording appear as ? in PDF

Can anyone help me ?
My question is :
My report contains some Korean wording. When I export to PDF, the Korean
word appear as ?. Then I export the report in Excel format, there is no
problem in the Korean wording. But when I try to print it, the default page
orientation is 'Landscape' and there is default left and right margin no
matter how I adjust the report size in reporting services.Make sure the font you're using exists on both the server and the client
viewing the PDF.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
news:17D5F204-6D94-4ECA-93A1-E287442C8C5D@.microsoft.com...
> Can anyone help me ?
> My question is :
> My report contains some Korean wording. When I export to PDF, the Korean
> word appear as ?. Then I export the report in Excel format, there is no
> problem in the Korean wording. But when I try to print it, the default
> page
> orientation is 'Landscape' and there is default left and right margin no
> matter how I adjust the report size in reporting services.
>
Posted by depredationnmqp at 2:37 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: appear, contains, database, export, korean, microsoft, mysql, oracle, pdf, report, server, sql, word, wording

Konesans File Watcher Tasks

Hello All

Just curious if there are any tutorials/help files/forums on using this and other Konesans control Flow and data flow task? most import the flow watcher task.

thanks

Karen

No is the honest answer. We write the documentation pages on the SQLIS site for each component, but as free components we have not gone that far on documentation. Questions pop up here about them or you can contact us direct (http://www.konesans.com/contact.aspx), we are happy to help.
Posted by depredationnmqp at 2:35 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: alljust, control, curious, database, file, files, flow, import, konesans, microsoft, mysql, oracle, server, sql, task, tasks, tutorials

known, expected or weird behavior ?

Hi all,
Please have a look at a script below:
USE tempdb
DECLARE @.t TABLE (c1 uniqueidentifier, c2 uniqueidentifier)
INSERT @.t (c1, c2)
SELECT y.id, NULL
FROM ( SELECT 1 UNION
SELECT 2 UNION
SELECT 3 UNION
SELECT 4 UNION
SELECT 5
) x (id)
CROSS JOIN
( SELECT NEWID() UNION
SELECT NEWID() UNION
SELECT NEWID() UNION
SELECT NEWID() UNION
SELECT NEWID()
) y (id)
UPDATE t
SET c2 = y.c2
FROM @.t t,
( SELECT c1, NEWID()
FROM ( SELECT DISTINCT c1
FROM @.t
) x (c1)
) y (c1, c2)
WHERE t.c1 = y.c1
SELECT * FROM @.T
I would expect c2 column value to be the same accross all records where c1
column value is the same.
But in fact c2 column is unique accross the table. I looked at plan and can
see what it's doing and I can rewrite it in a proper way but question
remains, - why is that? Can comeone explain that behavior?
Thank a lot in advance
AlexThat's the way functions work. They are executed for each row of the final
result.
What are you trying to do? If you need uniqueidentifier values for each
integer value, insert them into a temporary table (i.e. table variable)
before issuing the update.
ML
http://milambda.blogspot.com/|||my colleague came accros this piece of code. She reworked it with use of
temp table, and I could find a workaround with derived table. But why the
function is executed in the final set? The code imlies newid() should be
called inside derived table y, and then derived table y joins the table var?
"ML" <ML@.discussions.microsoft.com> wrote in message
news:BBDCFC04-63E4-4408-B153-26A1C5A9EB2B@.microsoft.com...
> That's the way functions work. They are executed for each row of the final
> result.
> What are you trying to do? If you need uniqueidentifier values for each
> integer value, insert them into a temporary table (i.e. table variable)
> before issuing the update.
>
> ML
> --
> http://milambda.blogspot.com/|||We'll know this for sure as soon as we find another system function that
produces as random results as NEWID(). :)
Have you tried using a user-defined function that returns a random result?
ML
http://milambda.blogspot.com/|||Interesting, I used RAND() and float instead of NEWID() and
uniqueidentifier, and in this case RAND() was applied to the final result
set too, but the difference seems to be that RAND() was called only once
since ALL records have the same float value.
No, I didn't used UDF yet, maybe later today when I have time.
"ML" <ML@.discussions.microsoft.com> wrote in message
news:FDDC2357-937A-42DF-8358-CFF69860095B@.microsoft.com...
> We'll know this for sure as soon as we find another system function that
> produces as random results as NEWID(). :)
> Have you tried using a user-defined function that returns a random result?
>
> ML
> --
> http://milambda.blogspot.com/|||NEWID is special. It is called for every row in a query. All other function
(the I know of) are
called only once in a query. Hence the difference between RAND and NEWID.
USE northwind
SELECT
NEWID() AS myNEWID
,RAND() AS myRand
,CURRENT_TIMESTAMP AS myTS
FROM "Order Details"
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Alex" <alex_remove_this_mak@.telus.net> wrote in message news:dB6Ef.153384$6K2.43614@.edtnps
90...
> Interesting, I used RAND() and float instead of NEWID() and uniqueidentifi
er, and in this case
> RAND() was applied to the final result set too, but the difference seems t
o be that RAND() was
> called only once since ALL records have the same float value.
> No, I didn't used UDF yet, maybe later today when I have time.
>
> "ML" <ML@.discussions.microsoft.com> wrote in message
> news:FDDC2357-937A-42DF-8358-CFF69860095B@.microsoft.com...
>|||This is the expected behaviour of RAND.
ML
http://milambda.blogspot.com/|||I was wondering whether getdate() is called for each row or for the set...
Would it show on a big enough set?
ML
http://milambda.blogspot.com/|||thanks guys a lot
"ML" <ML@.discussions.microsoft.com> wrote in message
news:D44C180C-8F26-461D-A552-9365B4DA27C9@.microsoft.com...
> This is the expected behaviour of RAND.
>
> ML
> --
> http://milambda.blogspot.com/|||Getdate() is normally only called once.
However, Itzik Ben-Gan came up with a really clever workaround for both
rand() and getdate().
Normally, you can't put getdate() or rand() in a User Defined Function, but
you can put them in a view, and then have your function select from the
view. You can then put your function in the select list, to have the
getdate() or rand() regenerated for each row.
Note that it might not look like getdate() is called for every single row,
because of the precision of the datatype. The function might be called
repeatedly more quickly than the getdate() value changes. But if you have
enough rows, you'll see that they aren't ALL the same, even though there
could be duplication.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"ML" <ML@.discussions.microsoft.com> wrote in message
news:30C35A84-706B-48F3-8C41-69ECB598DA13@.microsoft.com...
>I was wondering whether getdate() is called for each row or for the set...
> Would it show on a big enough set?
>
> ML
> --
> http://milambda.blogspot.com/
>
Posted by depredationnmqp at 2:35 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: behavior, belowuse, database, expected, insert, known, microsoft, mysql, oracle, script, select, server, sql, table, tempdbdeclare, uniqueidentifier, weird

Known sp3a bugs.

Hello everyone,
We have upgraded to SQL Server 2000/sp2. When a service
pack comes, generally companies wait for sometime before
they apply. This is just to avoid potential new bugs and
find out some information.
My question is: Are there any known issues with SP3a? If
yes, what they are and whether its safe to apply the
patch.
Thanks in advance,
mzeeshanWe've had it installed on a dozen servers for awhile now with no problems. I
really think the practice of releasing patches has changed in that now they
are pretty thoroughly tested prior to public release. The problem with
waiting to install it is MS releases the bug fixes in the service pack once
they release the service pack and virus writers quickly write programs to
attach the patched holes knowing that admins are reluctant to patch the
systems right away. Not sure how to combat that but it is a problem
HTH.
--
Ray Higdon MCSE, MCDBA, CCNA
--
"mzeeshan" <mzeeshan@.yahoo.com> wrote in message
news:0fbe01c38a88$c3912300$a401280a@.phx.gbl...
> Hello everyone,
> We have upgraded to SQL Server 2000/sp2. When a service
> pack comes, generally companies wait for sometime before
> they apply. This is just to avoid potential new bugs and
> find out some information.
> My question is: Are there any known issues with SP3a? If
> yes, what they are and whether its safe to apply the
> patch.
> Thanks in advance,
> mzeeshan|||Thanks for your reply. I know the problems, the SQL
slammer worm was created by someone based on a CERT
advisory. And, if I am not wrong, the patch was already
there but not installed by users till it became the
problem. Fortunately, we were spared as all our boxes
were inaccessible from outside.
The flip side is the creation of new problems generated
by service packs themselves. If I can recall, there was a
service pack (may be 4 or 5) with WindowsNT that created
so many problems that a new one (sp6) was quickly
released.
Its good to hear that MS is more careful now.
Thanks anyway,
mzeeshan
>--Original Message--
>We've had it installed on a dozen servers for awhile now
with no problems. I
>really think the practice of releasing patches has
changed in that now they
>are pretty thoroughly tested prior to public release.
The problem with
>waiting to install it is MS releases the bug fixes in
the service pack once
>they release the service pack and virus writers quickly
write programs to
>attach the patched holes knowing that admins are
reluctant to patch the
>systems right away. Not sure how to combat that but it
is a problem
>HTH.
>--
>Ray Higdon MCSE, MCDBA, CCNA
>--
>"mzeeshan" <mzeeshan@.yahoo.com> wrote in message
>news:0fbe01c38a88$c3912300$a401280a@.phx.gbl...
>> Hello everyone,
>> We have upgraded to SQL Server 2000/sp2. When a service
>> pack comes, generally companies wait for sometime
before
>> they apply. This is just to avoid potential new bugs
and
>> find out some information.
>> My question is: Are there any known issues with SP3a?
If
>> yes, what they are and whether its safe to apply the
>> patch.
>> Thanks in advance,
>> mzeeshan
>
>.
>|||Didn't mean to sound insensitive to the concerns of reluctant admins, just
pointing it out, there's wisdom in waiting if you can afford to..everything
in one way or another is a cost-benefit analysis :)
GL
--
Ray Higdon MCSE, MCDBA, CCNA
--
"mzeeshan" <mzeeshan@.yahoo.com> wrote in message
news:2052f01c38a9e$01b99030$a601280a@.phx.gbl...
> Thanks for your reply. I know the problems, the SQL
> slammer worm was created by someone based on a CERT
> advisory. And, if I am not wrong, the patch was already
> there but not installed by users till it became the
> problem. Fortunately, we were spared as all our boxes
> were inaccessible from outside.
> The flip side is the creation of new problems generated
> by service packs themselves. If I can recall, there was a
> service pack (may be 4 or 5) with WindowsNT that created
> so many problems that a new one (sp6) was quickly
> released.
> Its good to hear that MS is more careful now.
> Thanks anyway,
> mzeeshan
> >--Original Message--
> >We've had it installed on a dozen servers for awhile now
> with no problems. I
> >really think the practice of releasing patches has
> changed in that now they
> >are pretty thoroughly tested prior to public release.
> The problem with
> >waiting to install it is MS releases the bug fixes in
> the service pack once
> >they release the service pack and virus writers quickly
> write programs to
> >attach the patched holes knowing that admins are
> reluctant to patch the
> >systems right away. Not sure how to combat that but it
> is a problem
> >
> >HTH.
> >
> >--
> >Ray Higdon MCSE, MCDBA, CCNA
> >--
> >"mzeeshan" <mzeeshan@.yahoo.com> wrote in message
> >news:0fbe01c38a88$c3912300$a401280a@.phx.gbl...
> >> Hello everyone,
> >>
> >> We have upgraded to SQL Server 2000/sp2. When a service
> >> pack comes, generally companies wait for sometime
> before
> >> they apply. This is just to avoid potential new bugs
> and
> >> find out some information.
> >>
> >> My question is: Are there any known issues with SP3a?
> If
> >> yes, what they are and whether its safe to apply the
> >> patch.
> >>
> >> Thanks in advance,
> >> mzeeshan
> >
> >
> >.
> >|||SP3 has all of MS's security fixes for SQL Server as well... I'd advise
going to it as quickly as you feel comfortable.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"mzeeshan" <mzeeshan@.yahoo.com> wrote in message
news:0fbe01c38a88$c3912300$a401280a@.phx.gbl...
> Hello everyone,
> We have upgraded to SQL Server 2000/sp2. When a service
> pack comes, generally companies wait for sometime before
> they apply. This is just to avoid potential new bugs and
> find out some information.
> My question is: Are there any known issues with SP3a? If
> yes, what they are and whether its safe to apply the
> patch.
> Thanks in advance,
> mzeeshan
Posted by depredationnmqp at 2:34 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: apply, bugs, companies, database, generally, known, microsoft, mysql, oracle, pack, server, service, sp2, sp3a, sql, upgraded

Known SMTP bug in .NET 2.0?

Hi All,

A while back I posted a message referring to an inability to send e-mail from SQL 2005 Database mail; the error being "Command not supported" - which appeared to be coming back from the Exchange Server.

Looking on the SQL Sentry forums (SQL Sentry having its own alerting function) they report the same errro testing their smtp code, with the post

This is the result of a known bug in .NET 2.0. when working with a server that does not support ESMTP. Microsoft will provide a fix in their next release.

Can anyone from MS confirm that this is a bug, and tell me how to either work round it, or enable ESMTP on the Exchange server?

Regards,

Richard

Just to close out this thread, should anyone be reading it in the future:

It appears that the exchange server is set up using non-standard ports to receive on, and also McAfee security is running to block data on all but the narrowly specified ports. Our exchange people kindly ommitted to tell us this, but the upshot is that nothing can send mail out through the Exchange server. The error message is a bit confusing, but the root cause is security, not SQL or the client.

Regards,

Rich

Posted by depredationnmqp at 2:33 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: back, bug, database, e-mail, error, inability, known, mail, message, microsoft, mysql, net, oracle, quotcommand, referring, server, smtp, sql

Known SMTP bug in .NET 2.0?

Hi All,

A while back I posted a message referring to an inability to send e-mail from SQL 2005 Database mail; the error being "Command not supported" - which appeared to be coming back from the Exchange Server.

Looking on the SQL Sentry forums (SQL Sentry having its own alerting function) they report the same errro testing their smtp code, with the post

This is the result of a known bug in .NET 2.0. when working with a server that does not support ESMTP. Microsoft will provide a fix in their next release.

Can anyone from MS confirm that this is a bug, and tell me how to either work round it, or enable ESMTP on the Exchange server?

Regards,

Richard

Just to close out this thread, should anyone be reading it in the future:

It appears that the exchange server is set up using non-standard ports to receive on, and also McAfee security is running to block data on all but the narrowly specified ports. Our exchange people kindly ommitted to tell us this, but the upshot is that nothing can send mail out through the Exchange server. The error message is a bit confusing, but the root cause is security, not SQL or the client.

Regards,

Rich

sql
Posted by depredationnmqp at 2:33 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: back, bug, database, e-mail, error, inability, known, mail, message, microsoft, mysql, net, oracle, quotcommand, referring, server, smtp, sql

Known issues of upgrading from SQL 2000 to SQL 2005

We are looking at upgrading from SQL 2000 ent to SQL 2005 ent and was wondering if there are any known issues, hotfixes, and compatibility with code that was done in VB6. If any one has any information on what known issues are out there that would be great.

Should work fine. If you'd like to see a list of known issues/workarounds/notes/etc. for SQL 2005, go to the support.microsoft.com site and search for SQL Server 2005 articles. There are some considerations to take into account when migrating from 2000 to 2005, but those are more on the server side of things, not the client.

Obviously, there is no guarantee, but this is definately supported and being done elsewhere, so implement a sound testing plan prior to rollout and you should be good to go.

HTH

Posted by depredationnmqp at 2:32 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: code, compatibility, database, ent, hotfixes, known, microsoft, mysql, oracle, server, sql, upgrading

Known Issues for SQL Server 2000 SP4

Hi All,
I am looking for known issues for SQL Server Service Pack 4 before I apply
Service pack 4.
If anybody has URL or list of problems, please let me know.
Thanks,
MunirThe only issue that was found, that I'm aware of, was a bug where only
half of the physical memory in the box could be used by SQL Server when
using AWE on a 32-bit instance.
There is a hotfix for this now:
http://support.microsoft.com/defaul...kb;en-us;899761
*mike hodgson*
blog: http://sqlnerd.blogspot.com
Munir wrote:

>Hi All,
>I am looking for known issues for SQL Server Service Pack 4 before I apply
>Service pack 4.
>If anybody has URL or list of problems, please let me know.
>Thanks,
>Munir
>
Posted by depredationnmqp at 2:32 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: applyservice, database, known, microsoft, mysql, oracle, pack, server, service, sp4, sql, url

Known Issues for SQL Server 2000 SP4

Hi All,
I am looking for known issues for SQL Server Service Pack 4 before I apply
Service pack 4.
If anybody has URL or list of problems, please let me know.
Thanks,
Munir
The only issue that was found, that I'm aware of, was a bug where only
half of the physical memory in the box could be used by SQL Server when
using AWE on a 32-bit instance.
There is a hotfix for this now:
http://support.microsoft.com/default...b;en-us;899761
*mike hodgson*
blog: http://sqlnerd.blogspot.com
Munir wrote:

>Hi All,
>I am looking for known issues for SQL Server Service Pack 4 before I apply
>Service pack 4.
>If anybody has URL or list of problems, please let me know.
>Thanks,
>Munir
>
Posted by depredationnmqp at 2:31 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: applyservice, database, known, microsoft, mysql, oracle, pack, server, service, sp4, sql, url

Known Issues for SQL Server 2000 SP4

Hi All,
I am looking for known issues for SQL Server Service Pack 4 before I apply
Service pack 4.
If anybody has URL or list of problems, please let me know.
Thanks,
MunirThis is a multi-part message in MIME format.
--050601080709030205010702
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
The only issue that was found, that I'm aware of, was a bug where only
half of the physical memory in the box could be used by SQL Server when
using AWE on a 32-bit instance.
There is a hotfix for this now:
http://support.microsoft.com/default.aspx?scid=kb;en-us;899761
--
*mike hodgson*
blog: http://sqlnerd.blogspot.com
Munir wrote:
>Hi All,
>I am looking for known issues for SQL Server Service Pack 4 before I apply
>Service pack 4.
>If anybody has URL or list of problems, please let me know.
>Thanks,
>Munir
>
--050601080709030205010702
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>The only issue that was found, that I'm aware of, was a bug where
only half of the physical memory in the box could be used by SQL Server
when using AWE on a 32-bit instance.<br>
<br>
There is a hotfix for this now:<br>
<a class="moz-txt-link-freetext" href="http://links.10026.com/?link=http://support.microsoft.com/default.aspx?scid=kb;en-us;899761</a></tt><br>">http://support.microsoft.com/default.aspx?scid=kb;en-us;899761">http://support.microsoft.com/default.aspx?scid=kb;en-us;899761</a></tt><br>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2">blog:</font><font face="Tahoma" size="2"> <a
href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
Munir wrote:
<blockquote cite="midCB8919B9-0FFF-4C42-80EC-984815FCE563@.microsoft.com"
type="cite">
<pre wrap="">Hi All,
I am looking for known issues for SQL Server Service Pack 4 before I apply
Service pack 4.
If anybody has URL or list of problems, please let me know.
Thanks,
Munir
</pre>
</blockquote>
</body>
</html>
--050601080709030205010702--|||You should also read the readme files and the addendum to the readme
files:
http://www.microsoft.com/downloads/details.aspx?familyid=8E2DFC8D-C20E-4446-99A9-B7F0213F8BC5&displaylang=en#filelist
http://support.microsoft.com/kb/884525/
Razvan
Posted by depredationnmqp at 2:31 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: apply, database, known, microsoft, mysql, oracle, pack, server, service, sp4, sql, url

Known fields are not returned by using a stored procedure

Hi,
I am trying to use a stored procedure to get data, but I can't get it right.
So far I have done this:
1) In the "Edit selected dataset" dialogue in the query tab I have entered
the name of the stored procedure.
2) In the Parameter tab I have entered the parameters for the stored
procedure, e.g. "@.UserId" etc.
3) I have added report parameters to the report and related them to the sql
parameters by selecting them in the parameter tab of the "Edit selected
dataset" dialogue.
For report parameters that should be null, I have checked "allow null" and
set default parameter to "None".
4) In the field tab of the "Edit selected dataset" I have entered field
names of fields, that I know that this stored procedure will return.
When I try to preview the report, I get an error message saying that there
are no fields corresponding to the field names I have entered. I have tried
query analyzer with the same parameters, and I know which fiels should be
there.
What am I doing wrong?
Thanks for any help.
DorteGoing against SQL Server I have yet seen the need to enter the fields by
hand (although it should have worked). What back end are you going against?
Have you tried clicking on the refresh field list button (it is the button
on the right of the ... that looks like the refresh button for IE)? Do you
get any data back when you execute it in the data tab. RS has to run the
stored procedure to be able to get the list. If you have a parameter then
when you do this (execute it from the data tab) it should prompt you for a
value.
Bruce L-C
"Dorte" <Dorte@.discussions.microsoft.com> wrote in message
news:ED389036-E3CC-4DF5-9BBB-17C133BC7A89@.microsoft.com...
> Hi,
> I am trying to use a stored procedure to get data, but I can't get it
right.
> So far I have done this:
> 1) In the "Edit selected dataset" dialogue in the query tab I have entered
> the name of the stored procedure.
> 2) In the Parameter tab I have entered the parameters for the stored
> procedure, e.g. "@.UserId" etc.
> 3) I have added report parameters to the report and related them to the
sql
> parameters by selecting them in the parameter tab of the "Edit selected
> dataset" dialogue.
> For report parameters that should be null, I have checked "allow null" and
> set default parameter to "None".
> 4) In the field tab of the "Edit selected dataset" I have entered field
> names of fields, that I know that this stored procedure will return.
>
> When I try to preview the report, I get an error message saying that there
> are no fields corresponding to the field names I have entered. I have
tried
> query analyzer with the same parameters, and I know which fiels should be
> there.
> What am I doing wrong?
> Thanks for any help.
> Dorte|||Now it works!
I'm using SQL server 2000, and I did allready enter the fields by hand, but
apparently that wasn't enough! But your advice to push the refresh button did
the
trick!!
Thanks a lot!
Dorte
"Bruce Loehle-Conger" wrote:
> Going against SQL Server I have yet seen the need to enter the fields by
> hand (although it should have worked). What back end are you going against?
> Have you tried clicking on the refresh field list button (it is the button
> on the right of the ... that looks like the refresh button for IE)? Do you
> get any data back when you execute it in the data tab. RS has to run the
> stored procedure to be able to get the list. If you have a parameter then
> when you do this (execute it from the data tab) it should prompt you for a
> value.
> Bruce L-C
> "Dorte" <Dorte@.discussions.microsoft.com> wrote in message
> news:ED389036-E3CC-4DF5-9BBB-17C133BC7A89@.microsoft.com...
> > Hi,
> > I am trying to use a stored procedure to get data, but I can't get it
> right.
> > So far I have done this:
> >
> > 1) In the "Edit selected dataset" dialogue in the query tab I have entered
> > the name of the stored procedure.
> >
> > 2) In the Parameter tab I have entered the parameters for the stored
> > procedure, e.g. "@.UserId" etc.
> >
> > 3) I have added report parameters to the report and related them to the
> sql
> > parameters by selecting them in the parameter tab of the "Edit selected
> > dataset" dialogue.
> > For report parameters that should be null, I have checked "allow null" and
> > set default parameter to "None".
> >
> > 4) In the field tab of the "Edit selected dataset" I have entered field
> > names of fields, that I know that this stored procedure will return.
> >
> >
> > When I try to preview the report, I get an error message saying that there
> > are no fields corresponding to the field names I have entered. I have
> tried
> > query analyzer with the same parameters, and I know which fiels should be
> > there.
> >
> > What am I doing wrong?
> >
> > Thanks for any help.
> >
> > Dorte
>
>sql
Posted by depredationnmqp at 2:30 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: database, dataset, fields, known, microsoft, mysql, oracle, procedure, returned, selected, server, sql, stored

known error with Transfer SQL Server Objects Task...

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=127100

I don't believe that the fix to the above issue has made its way into an SP yet. Can anyone confirm/refute this, and/or state when the fix will become publicly available &/or give a workaround?

Thanks,

Tamim.

This issue was fixed in SP1.
Posted by depredationnmqp at 2:29 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: aspxfeedbackid127100i, believe, connect, database, error, fix, https, known, microsoft, mysql, objects, oracle, server, sql, sqlserver, task, transfer, viewfeedback

Known assembly FileIOPermission error, still no solution

I'm trying to write to a text file from my custom assembly and I keep
getting FileIOPermission. The only way I can get it to work is by
changing the PermissionSetName of the whole CodeGroup from Nothing to
FullTrust. The assembly itself is very simple and all it does is it
writes one line to a text file.
Here is what I did so far:
1. I asserted the permission in my code.
2. I put the text file and my assembly into ReportSevrer bin folder and
changed the text file's security to allow "NETWORK SECURITY" (it
is IIS6) and just in case "Everyone" to write to it.
3. I added CodeGroup just after the code group with Url="$CodeGen$/*"
to the rssrvpolicy.config file with PermissionSetName="FullTrust".
I even installed Visual Studio 2005 to get access to PermCalc tool.
All it showed me was that my dll needs FileIOPermission with
Unrestricted="true" and SecurityPermission with
Flags="Assertion" in the CodeGroup which I also tried by creating a
seperate PermissionSet.
What else can I possibly try?
My Code:
private void WriteLogFile(String msg)
{
FileIOPermission perm1 = new
FileIOPermission(FileIOPermissionAccess.Write, @."C:\Program
Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin\ReportLogger.log");
perm1.Assert();
FileStream fs = new FileStream(@."C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer\bin\ReportLogger.log",
FileMode.OpenOrCreate, FileAccess.ReadWrite);
StreamWriter w = new StreamWriter(fs);
w.BaseStream.Seek(0, SeekOrigin.End);
w.Write("{0} {1} ", DateTime.Now.ToLongTimeString(),
DateTime.Now.ToLongDateString());
w.Write(msg + "\r\n");
w.Flush();
w.Close();
}
My CodeGroup:
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="CGReportHelper"
Description="Allow execution of ReportHelper.dll">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="file://C:/Program Files/Microsoft SQL Server/MSSQL/Reporting
Services/ReportServer/bin/ReportHelper.dll"/>
</CodeGroup>
My Error:
w3wp!processing!2aa8!10/05/2005-16:47:17:: e ERROR: Failed to load
expression host assembly. Details: Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
at
System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken, CodeAccessPermission demand, StackCrawlMark& stackMark,
Int32 checkFrames, Int32 unrestrictedOverride)
at
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access)
at ReportHelper.ConfirmationStatement.WriteLogFile(String msg)
at ReportHelper.ConfirmationStatement..ctor(Int32 futureBatchSetId)
at CustomCodeProxy.OnInit()
at Microsoft.ReportingServices.ReportProcessing.ExprHostObjectModel.
CustomCodeProxyBase..ctor(IReportObjectModelProxyForCustomCode
reportObjectModel)
at ReportExprHostImpl..ctor(Boolean parametersOnly, Object
reportObjectModel)
The state of the failed permission was:
<IPermission class="System.Security.Permissions.FileIOPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
version="1"
Read="C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer\bin\ReportLogger.log"
Write="C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer\bin\ReportLogger.log"/>
w3wp!processing!2aa8!10/05/2005-16:47:17:: e ERROR: Throwing
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
Exception of type
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException
was thrown., ;
Info:
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
Exception of type
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException
was thrown.
w3wp!library!2aa8!10/05/2005-16:47:17:: i INFO: Initializing
EnableExecutionLogging to 'True' as specified in Server system
properties.
w3wp!webserver!2aa8!10/05/2005-16:47:17:: e ERROR: Reporting Services
error Microsoft.ReportingServices.Diagnostics.Utilities.RSException:
Failed to load expression host assembly. Details: Request for the
permission of type System.Security.Permissions.FileIOPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 failed. -->
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
Failed to load expression host assembly. Details: Request for the
permission of type System.Security.Permissions.FileIOPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 failed.Hi,
See this article....
http://www.c-sharpcorner.com/Code/2005/June/CustomAssemblyinRS.asp
If still you have the issue, write to me bkkrishnan [at] hotmail [dot] com
Balaji
Siwy wrote:
>I'm trying to write to a text file from my custom assembly and I keep
>getting FileIOPermission. The only way I can get it to work is by
>changing the PermissionSetName of the whole CodeGroup from Nothing to
>FullTrust. The assembly itself is very simple and all it does is it
>writes one line to a text file.
>Here is what I did so far:
>1. I asserted the permission in my code.
>2. I put the text file and my assembly into ReportSevrer bin folder and
>changed the text file's security to allow "NETWORK SECURITY" (it
>is IIS6) and just in case "Everyone" to write to it.
>3. I added CodeGroup just after the code group with Url="$CodeGen$/*"
>to the rssrvpolicy.config file with PermissionSetName="FullTrust".
>I even installed Visual Studio 2005 to get access to PermCalc tool.
>All it showed me was that my dll needs FileIOPermission with
>Unrestricted="true" and SecurityPermission with
>Flags="Assertion" in the CodeGroup which I also tried by creating a
>seperate PermissionSet.
>What else can I possibly try?
>My Code:
>private void WriteLogFile(String msg)
>{
> FileIOPermission perm1 = new
>FileIOPermission(FileIOPermissionAccess.Write, @."C:\Program
>Files\Microsoft SQL Server\MSSQL\Reporting
>Services\ReportServer\bin\ReportLogger.log");
> perm1.Assert();
> FileStream fs = new FileStream(@."C:\Program Files\Microsoft SQL
>Server\MSSQL\Reporting Services\ReportServer\bin\ReportLogger.log",
>FileMode.OpenOrCreate, FileAccess.ReadWrite);
> StreamWriter w = new StreamWriter(fs);
> w.BaseStream.Seek(0, SeekOrigin.End);
> w.Write("{0} {1} ", DateTime.Now.ToLongTimeString(),
> DateTime.Now.ToLongDateString());
> w.Write(msg + "\r\n");
> w.Flush();
> w.Close();
>}
>My CodeGroup:
><CodeGroup class="UnionCodeGroup"
> version="1"
> PermissionSetName="FullTrust"
> Name="CGReportHelper"
> Description="Allow execution of ReportHelper.dll">
> <IMembershipCondition class="UrlMembershipCondition"
> version="1"
>Url="file://C:/Program Files/Microsoft SQL Server/MSSQL/Reporting
>Services/ReportServer/bin/ReportHelper.dll"/>
></CodeGroup>
>My Error:
>w3wp!processing!2aa8!10/05/2005-16:47:17:: e ERROR: Failed to load
>expression host assembly. Details: Request for the permission of type
>System.Security.Permissions.FileIOPermission, mscorlib,
>Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
>failed.
>System.Security.SecurityException: Request for the permission of type
>System.Security.Permissions.FileIOPermission, mscorlib,
>Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
>failed.
> at
>System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
>grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
>PermissionToken permToken)
> at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
>permToken, CodeAccessPermission demand, StackCrawlMark& stackMark,
>Int32 checkFrames, Int32 unrestrictedOverride)
> at
>System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
>cap, StackCrawlMark& stackMark)
> at System.Security.CodeAccessPermission.Demand()
> at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
>access, FileShare share, Int32 bufferSize, Boolean useAsync, String
>msgPath, Boolean bFromProxy)
> at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
>access)
> at ReportHelper.ConfirmationStatement.WriteLogFile(String msg)
> at ReportHelper.ConfirmationStatement..ctor(Int32 futureBatchSetId)
> at CustomCodeProxy.OnInit()
> at Microsoft.ReportingServices.ReportProcessing.ExprHostObjectModel.
>CustomCodeProxyBase..ctor(IReportObjectModelProxyForCustomCode
>reportObjectModel)
> at ReportExprHostImpl..ctor(Boolean parametersOnly, Object
>reportObjectModel)
>The state of the failed permission was:
><IPermission class="System.Security.Permissions.FileIOPermission,
>mscorlib, Version=1.0.5000.0, Culture=neutral,
>PublicKeyToken=b77a5c561934e089"
> version="1"
> Read="C:\Program Files\Microsoft SQL
>Server\MSSQL\Reporting Services\ReportServer\bin\ReportLogger.log"
> Write="C:\Program Files\Microsoft SQL
>Server\MSSQL\Reporting Services\ReportServer\bin\ReportLogger.log"/>
>w3wp!processing!2aa8!10/05/2005-16:47:17:: e ERROR: Throwing
>Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
>Exception of type
>Microsoft.ReportingServices.ReportProcessing.ReportProcessingException
>was thrown., ;
> Info:
>Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
>Exception of type
>Microsoft.ReportingServices.ReportProcessing.ReportProcessingException
>was thrown.
>w3wp!library!2aa8!10/05/2005-16:47:17:: i INFO: Initializing
>EnableExecutionLogging to 'True' as specified in Server system
>properties.
>w3wp!webserver!2aa8!10/05/2005-16:47:17:: e ERROR: Reporting Services
>error Microsoft.ReportingServices.Diagnostics.Utilities.RSException:
>Failed to load expression host assembly. Details: Request for the
>permission of type System.Security.Permissions.FileIOPermission,
>mscorlib, Version=1.0.5000.0, Culture=neutral,
>PublicKeyToken=b77a5c561934e089 failed. -->
>Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
>Failed to load expression host assembly. Details: Request for the
>permission of type System.Security.Permissions.FileIOPermission,
>mscorlib, Version=1.0.5000.0, Culture=neutral,
>PublicKeyToken=b77a5c561934e089 failed.
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-reporting/200510/1|||I finally figured it out.
The problem was with assertion in my code. I changed it from
FileIOPermissionAccess.Write to FileIOPermissionAccess.AllAccess and it
worked.
I guess when you open a file with FileAccess.ReadWrite then assertion
FileIOPermissionAccess.Write is not enough.
Regards,|||Hi,
I'm custom assemblie to access the registry and get some data..
i'm getting a error of "Requested registry access is not allowed"
I followed all the steps that you mentioned but i still get the same error..
but in case of File access it works im not getting any error but for
Registry acccess im getting that error. did you tried using registry. i even
gave "FullTrust" in the the permission policy file.
Please let me know if any one have tried registree.
Thanks
Bava
"BALAJI K via SQLMonster.com" wrote:
> Hi,
> See this article....
> http://www.c-sharpcorner.com/Code/2005/June/CustomAssemblyinRS.asp
> If still you have the issue, write to me bkkrishnan [at] hotmail [dot] com
> Balaji
>
> Siwy wrote:
> >I'm trying to write to a text file from my custom assembly and I keep
> >getting FileIOPermission. The only way I can get it to work is by
> >changing the PermissionSetName of the whole CodeGroup from Nothing to
> >FullTrust. The assembly itself is very simple and all it does is it
> >writes one line to a text file.
> >
> >Here is what I did so far:
> >
> >1. I asserted the permission in my code.
> >2. I put the text file and my assembly into ReportSevrer bin folder and
> >changed the text file's security to allow "NETWORK SECURITY" (it
> >is IIS6) and just in case "Everyone" to write to it.
> >3. I added CodeGroup just after the code group with Url="$CodeGen$/*"
> >to the rssrvpolicy.config file with PermissionSetName="FullTrust".
> >
> >I even installed Visual Studio 2005 to get access to PermCalc tool.
> >All it showed me was that my dll needs FileIOPermission with
> >Unrestricted="true" and SecurityPermission with
> >Flags="Assertion" in the CodeGroup which I also tried by creating a
> >seperate PermissionSet.
> >
> >What else can I possibly try?
> >
> >My Code:
> >
> >private void WriteLogFile(String msg)
> >{
> > FileIOPermission perm1 = new
> >FileIOPermission(FileIOPermissionAccess.Write, @."C:\Program
> >Files\Microsoft SQL Server\MSSQL\Reporting
> >Services\ReportServer\bin\ReportLogger.log");
> > perm1.Assert();
> >
> > FileStream fs = new FileStream(@."C:\Program Files\Microsoft SQL
> >Server\MSSQL\Reporting Services\ReportServer\bin\ReportLogger.log",
> >FileMode.OpenOrCreate, FileAccess.ReadWrite);
> > StreamWriter w = new StreamWriter(fs);
> > w.BaseStream.Seek(0, SeekOrigin.End);
> > w.Write("{0} {1} ", DateTime.Now.ToLongTimeString(),
> > DateTime.Now.ToLongDateString());
> > w.Write(msg + "\r\n");
> > w.Flush();
> >
> > w.Close();
> >}
> >
> >My CodeGroup:
> >
> ><CodeGroup class="UnionCodeGroup"
> > version="1"
> > PermissionSetName="FullTrust"
> > Name="CGReportHelper"
> > Description="Allow execution of ReportHelper.dll">
> > <IMembershipCondition class="UrlMembershipCondition"
> > version="1"
> >Url="file://C:/Program Files/Microsoft SQL Server/MSSQL/Reporting
> >Services/ReportServer/bin/ReportHelper.dll"/>
> ></CodeGroup>
> >
> >My Error:
> >
> >w3wp!processing!2aa8!10/05/2005-16:47:17:: e ERROR: Failed to load
> >expression host assembly. Details: Request for the permission of type
> >System.Security.Permissions.FileIOPermission, mscorlib,
> >Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
> >failed.
> >System.Security.SecurityException: Request for the permission of type
> >System.Security.Permissions.FileIOPermission, mscorlib,
> >Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
> >failed.
> > at
> >System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
> >grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
> >PermissionToken permToken)
> > at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
> >permToken, CodeAccessPermission demand, StackCrawlMark& stackMark,
> >Int32 checkFrames, Int32 unrestrictedOverride)
> > at
> >System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
> >cap, StackCrawlMark& stackMark)
> > at System.Security.CodeAccessPermission.Demand()
> > at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
> >access, FileShare share, Int32 bufferSize, Boolean useAsync, String
> >msgPath, Boolean bFromProxy)
> > at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
> >access)
> > at ReportHelper.ConfirmationStatement.WriteLogFile(String msg)
> > at ReportHelper.ConfirmationStatement..ctor(Int32 futureBatchSetId)
> > at CustomCodeProxy.OnInit()
> > at Microsoft.ReportingServices.ReportProcessing.ExprHostObjectModel.
> >CustomCodeProxyBase..ctor(IReportObjectModelProxyForCustomCode
> >reportObjectModel)
> > at ReportExprHostImpl..ctor(Boolean parametersOnly, Object
> >reportObjectModel)
> >
> >The state of the failed permission was:
> ><IPermission class="System.Security.Permissions.FileIOPermission,
> >mscorlib, Version=1.0.5000.0, Culture=neutral,
> >PublicKeyToken=b77a5c561934e089"
> > version="1"
> > Read="C:\Program Files\Microsoft SQL
> >Server\MSSQL\Reporting Services\ReportServer\bin\ReportLogger.log"
> > Write="C:\Program Files\Microsoft SQL
> >Server\MSSQL\Reporting Services\ReportServer\bin\ReportLogger.log"/>
> >
> >w3wp!processing!2aa8!10/05/2005-16:47:17:: e ERROR: Throwing
> >Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
> >Exception of type
> >Microsoft.ReportingServices.ReportProcessing.ReportProcessingException
> >was thrown., ;
> > Info:
> >Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
> >Exception of type
> >Microsoft.ReportingServices.ReportProcessing.ReportProcessingException
> >was thrown.
> >w3wp!library!2aa8!10/05/2005-16:47:17:: i INFO: Initializing
> >EnableExecutionLogging to 'True' as specified in Server system
> >properties.
> >w3wp!webserver!2aa8!10/05/2005-16:47:17:: e ERROR: Reporting Services
> >error Microsoft.ReportingServices.Diagnostics.Utilities.RSException:
> >Failed to load expression host assembly. Details: Request for the
> >permission of type System.Security.Permissions.FileIOPermission,
> >mscorlib, Version=1.0.5000.0, Culture=neutral,
> >PublicKeyToken=b77a5c561934e089 failed. -->
> >Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
> >Failed to load expression host assembly. Details: Request for the
> >permission of type System.Security.Permissions.FileIOPermission,
> >mscorlib, Version=1.0.5000.0, Culture=neutral,
> >PublicKeyToken=b77a5c561934e089 failed.
>
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-reporting/200510/1
>
Posted by depredationnmqp at 2:28 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: assembly, changing, custom, database, error, file, fileiopermission, known, microsoft, mysql, oracle, server, solution, sql, text, write

Knowlege transfer Template

Hi All,
I would need to do a Knowledge transfer to my client. So I require
Knowledge transfer Template or Knowledge transfer plan for SQL Server
DBA role. Please guide me on this or please send me any useful
documents or useful links?
Thanks and regards
Hi
I don't know of this being written anywhere but here are a few suggestions:
Write down what should be general or expected knowledge needed
Write down where he can find out about this in more detail e.g. web sites,
recommended courses/books etc...
Make sure system(s) are fully documented in an form where the information
can be found and understood.
Write down specific knowledge needed
Write down a framework for documentation/tutorials etc that can be used to
transfer this information
Write down a plan for how this will be transferred including what the client
needs to know before you start and the timescales involved.
Agree the above with the client and execute it, making sure that you note
any additional information that is required whilst carrying out the plan.
Agree any additional support needs required including leaving your contact
details.
John
"Praveen" wrote:

> Hi All,
> I would need to do a Knowledge transfer to my client. So I require
> Knowledge transfer Template or Knowledge transfer plan for SQL Server
> DBA role. Please guide me on this or please send me any useful
> documents or useful links?
> Thanks and regards
>
Posted by depredationnmqp at 2:28 AM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: client, database, knowledge, knowlege, microsoft, mysql, oracle, plan, requireknowledge, server, serverdba, sql, template, transfer
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

KDC Problem

Blog Archive

  • ▼  2012 (488)
    • ▼  March (398)
      • KPI that compares the growth over years
      • KPI measure and dimension
      • KPI List Web Part in MOSS 2007 - How Do I Display ...
      • KPI List Web Part in MOSS 2007 - How Do I Display ...
      • KPI in SQL 2005
      • KPI in SQL 2005
      • KPI in SQL 2005
      • KPI in Reporting Service
      • KPI in Reporting Service
      • KPI Help Required-I want a revenue report with ave...
      • KPI graphic in RS2005
      • KPI Goals from dimension attributes.
      • KPI Goals from dimension attributes.
      • KPI Goal Value doesn't change after filtering the ...
      • KPI for each member of a dimension
      • KPI design and implementation
      • KPI Annotations property field
      • KPI Annotations property field
      • KPI and report deployment on WSS 3.0
      • KPI and MDX in Goal-Expression
      • KPI Aggregation
      • KPI - Sales Trend
      • KPI
      • Korean wording appear as ? in PDF
      • Konesans File Watcher Tasks
      • known, expected or weird behavior ?
      • Known sp3a bugs.
      • Known SMTP bug in .NET 2.0?
      • Known SMTP bug in .NET 2.0?
      • Known issues of upgrading from SQL 2000 to SQL 2005
      • Known Issues for SQL Server 2000 SP4
      • Known Issues for SQL Server 2000 SP4
      • Known Issues for SQL Server 2000 SP4
      • Known fields are not returned by using a stored pr...
      • known error with Transfer SQL Server Objects Task...
      • Known assembly FileIOPermission error, still no so...
      • Knowlege transfer Template
      • Knowlege transfer Template
      • Knowlege transfer Template
      • Knowledgeable yet simple book for database modelli...
      • Knowledge Base-article - 829386 - Hotfix where to ...
      • Knowledge Base Article - 815154 Configure SQL Serv...
      • knowledge about SQL Server Express
      • knowing which jobs/dts/SSIS affect which tables
      • Knowing when <NULL>
      • Knowing what is grouped?!
      • knowing the 'result' of a, INSERT/UPDATE/DELETE
      • knowing the 'result' of a, INSERT/UPDATE/DELETE
      • knowing the 'result' of a, INSERT/UPDATE/DELETE
      • Knowing how many connections are open?
      • Knowing current database
      • Know the "country version" of SQL Server
      • know nothing about MsSQL
      • know nothing about MsSQL
      • Know list database and table in SQL Server
      • know if DB has been restored
      • Knickers in a Loop
      • Knickers in a Loop
      • Knickers in a Loop
      • Kishore
      • Kirk: Importing/Exporting with column ErrorCode, E...
      • Kirk Haselden New book
      • kiran
      • Kinder garden question about datatype
      • Kinda urgent Connection error messages
      • Kinda new to SQL, have a few questions
      • Kind of simple join question. Not sure if its that
      • Kind of Replication will work ?
      • Kind of Important. Connection String
      • Kind of cross-tab query
      • Kind Attention: MSFT
      • Kind Attention: MSFT
      • Kimball Templates
      • Kimball Templates
      • Killing xp_cmdshell
      • Killing timed out connections
      • Killing the process automatically
      • killing the duplicates from a table using sql
      • killing sqlservr.exe from sqlclr code
      • killing SQLmail
      • killing SQLmail
      • killing SQLmail
      • Killing SPIDs
      • Killing SPIDs
      • Killing SPIDs
      • Killing Sleeping Processes
      • Killing Sleeping Processes
      • Killing Remote Application
      • killing process
      • killing process
      • Killing mupltiple batches
      • Killing Locks by Object - SS2005
      • Killing bug in ASP.Net 2, Report server is dead, 1...
      • Killing automatically crashed sessions ??
      • Killing an active connection
      • Killing an active connection
      • Killing an active connection
      • Killing all sleeping processes
      • Killing active connections before detaching a data...
      • Killing a user/login
    • ►  February (90)

About Me

depredationnmqp
View my complete profile
  • loan
  • sql
  • sql server
  • sql
  • sql server
  • sql
  • imwebhost