Showing posts with label call. Show all posts
Showing posts with label call. Show all posts

Friday, March 23, 2012

Refresh problem in Crystal Viewer control

Dear Guru's
I am using Crystal viewer control in my VC++ application project. Here i am facing report refresh problem. If i call viewer control Refresh method directly the application is crashing. I am calling that inside OnPaint( ) .

The problem is the report data is not displaying first time the user has to click refresh button.

Please help me how to use "Refresh " method.

Thanks
arunNot sure if this will help, but make sure 'Save Data with Report' is NOT checked. Otherwise, have you tried calling Refresh as soon as the report is displayed (instead of waiting for the user to do it)?|||I am trying to refresh the report through code only using Viewer control 'Refresh' method.
If report displayed with blank then how user came to know that he has to refresh the report by clicking refresh button.

Monday, March 12, 2012

reference member in user hierarchy

hi,

I have a user hierarchy in my Date Dimension such as [Calendar]->[Years]->[Quarters]

And I can access the member by directly call the memeber name, for example:

select [Date].[Calendar].[Years].[2006].[Q2] on columns, ...................................

The results will be correct. However, if I use reference to call the member, for example:

select [Date].[Calendar].[Years].[2006].&[2] on columns, ...................................

There will be nothing in my results.

Would you please tell me what shall I do to enable the reference call to my hierarchy member? Thanks.

With "select [Date].[Calendar].[Years].[2006].&[2] on columns, you are referencing the keys for the member.

"[Date].[Calendar].[Years].&[2006].&[2]" might help.

Another method is [Date].[Calendar].[Years].Lastchild.Lastchild. With this method you will always find the last quarter of the last year in your time dimension.

Regards

Thomas Ivarsson

|||

Hi, Thomas

Thanks a lot for your answer. I have also tried "[Date].[Calendar].[Years].&[2006].&[2]" but no use. I still get nothing from that.

I was forced to use the format: "[Date].[Calendar].[Years].&[2006].&[2]" because this is a fixed format in a third-part software. I guess maybe there is sth wrong about the settings of my user hierarchy?

|||

It can be a problem with key for the Quarter member. Are you using integers like 1,2,3,4 for Quarters? In that case you can make a combination by year and quarter for the quarter key. Check also your attribute relation between quarter and year in the dimension editor.

Regards

Thomas

|||

Hi, Thomas,

Thanks and would you please give me a little bit more details?

Do you mean that I should use 1,2,3,4 as the quarter key for Quarters?

And do you mean that I should build the attribute relation between quarter and year? I have tried both with/without attribute relation but it did not work. Thx.

|||

No. You should use a composite key with both the year and the quarter. A quarter key like 1,2,3,4 is not unique. If you klick on the key-column, for the level, in the properties(dimension editor) you can add year to quarter(in the key) and create a collection. This is in the dataitem collection editor.

Regards

Thomas Ivarsson

|||

hi, Thomas,

Thanks and I have tried to add a composite key (year+quarter) according to your steps.

But during processing, there is an error message: The key columns of the Quarter measure group attribute do not match in either number or data types to the key columns of the source attribute.

Would you please tell me how to deal with this problem? Thanks a lot.


|||

Hello. Make a new column, for either year or quarter, and use the TSQL convert och cast-function to change the data type to something common.

You can also simply use the datepart function for year and quarter and return two integer fields.

Regards

Thomas Ivarsson

|||

hi, Thomas

I have checked that in the AS2005, my Year and Quarter are in the format: Integar.

And in the data source view, I see that the source columns of the key column are both: System.Int32

However, the error still exists, do you have any idea about this? Thanks.

|||

BTW, do I also need to change the Name Column (or the value column) to the integer column I defined in the source?

|||

hi, Thomas,

I have finally get the result I want ([Date].[Calendar].&[2005].&[2] is available).

And the step follows: 1. Remove any attribute relationship in dimension date. 2. Build a new integer column (1,2,3,4) as the source of the key column for Quarter. 3. Specify the key column of Quarter to that new integer column.

I do not know if this will cause any other problems. Anyway, thanks a lot for your help.

|||

I realized this now. So you have a join on one of the levels in your time hierarchy above the leaf level? In the dimension usage tab for the cube you must use the same combination as in your composite key. You do not have to change the name column.

Check the Adventure Works Demo project that is part of the installation. Have a look at the date.dim there(and the attribute month_name(properties)) and check the relation between the date dim and sales targets measure group in the Adventure Works cube.

Regards

Thomas Ivarsson

|||

Nice that it works. Without attribute relations you will not get any aggregations on the time dimension. Another problem is that your calculations can be wrong. What you needed to do was to add 2006(Year) to the quarters(1,2,3,4) so that their collection will point to year and quarter, at the same time. Actually you combine each year with each of their quarter in this way. Quarter(1,2,3,4) will not point to a specific year if you do not do this(ie add the year key to each quarter key).

Regards

Thomas Ivarsson

|||

Hi, Thomas

Thanks a lot for your response! I have several questions about your answer.

First, what do you mean by have a join on one of the levles above the leaf levels? And how can I see that?

Second, I have seen the AdventureWorks cube and see the attribute month_name has a combination key column of year + month. But in the dim usage table, I do not know how to modify my own project. I can see a RED line under my date dimension and I think that indicates error. However, if I add an attribute relationship between Quarter and Year, the dim usage table will automaticlly add this relationship to itself. (In other words, I can not find the place to add sth about the combination key in the dim usage table)

|||

Hello again Jeremy. If you scroll out to the right, in the dimension usage tab of the cube editor(In the Adventure Works demo cube), you will find a box where the dimension date intersect with the measure group Sales Targets. All the other relations between date and the measure groups in this cube are at the lowest(leaf level) or the box empty(no relation). Click the box(date dim and Sales Targets) There you can see the granularity attribute for the relation, thats the level that is used in the join between the measure group and the dimension.

Check here that you join on the correct column to avoid the error message you talked about before: "The key columns of the Quarter measure group attribute do not match in either number or data types to the key columns of the source attribute." You will only have to this if you have changed the key column for the Quarter member in your time dimension.

Regards

Thomas Ivarsson

reference member in user hierarchy

hi,

I have a user hierarchy in my Date Dimension such as [Calendar]->[Years]->[Quarters]

And I can access the member by directly call the memeber name, for example:

select [Date].[Calendar].[Years].[2006].[Q2] on columns, ...................................

The results will be correct. However, if I use reference to call the member, for example:

select [Date].[Calendar].[Years].[2006].&[2] on columns, ...................................

There will be nothing in my results.

Would you please tell me what shall I do to enable the reference call to my hierarchy member? Thanks.

With "select [Date].[Calendar].[Years].[2006].&[2] on columns, you are referencing the keys for the member.

"[Date].[Calendar].[Years].&[2006].&[2]" might help.

Another method is [Date].[Calendar].[Years].Lastchild.Lastchild. With this method you will always find the last quarter of the last year in your time dimension.

Regards

Thomas Ivarsson

|||

Hi, Thomas

Thanks a lot for your answer. I have also tried "[Date].[Calendar].[Years].&[2006].&[2]" but no use. I still get nothing from that.

I was forced to use the format: "[Date].[Calendar].[Years].&[2006].&[2]" because this is a fixed format in a third-part software. I guess maybe there is sth wrong about the settings of my user hierarchy?

|||

It can be a problem with key for the Quarter member. Are you using integers like 1,2,3,4 for Quarters? In that case you can make a combination by year and quarter for the quarter key. Check also your attribute relation between quarter and year in the dimension editor.

Regards

Thomas

|||

Hi, Thomas,

Thanks and would you please give me a little bit more details?

Do you mean that I should use 1,2,3,4 as the quarter key for Quarters?

And do you mean that I should build the attribute relation between quarter and year? I have tried both with/without attribute relation but it did not work. Thx.

|||

No. You should use a composite key with both the year and the quarter. A quarter key like 1,2,3,4 is not unique. If you klick on the key-column, for the level, in the properties(dimension editor) you can add year to quarter(in the key) and create a collection. This is in the dataitem collection editor.

Regards

Thomas Ivarsson

|||

hi, Thomas,

Thanks and I have tried to add a composite key (year+quarter) according to your steps.

But during processing, there is an error message: The key columns of the Quarter measure group attribute do not match in either number or data types to the key columns of the source attribute.

Would you please tell me how to deal with this problem? Thanks a lot.


|||

Hello. Make a new column, for either year or quarter, and use the TSQL convert och cast-function to change the data type to something common.

You can also simply use the datepart function for year and quarter and return two integer fields.

Regards

Thomas Ivarsson

|||

hi, Thomas

I have checked that in the AS2005, my Year and Quarter are in the format: Integar.

And in the data source view, I see that the source columns of the key column are both: System.Int32

However, the error still exists, do you have any idea about this? Thanks.

|||

BTW, do I also need to change the Name Column (or the value column) to the integer column I defined in the source?

|||

hi, Thomas,

I have finally get the result I want ([Date].[Calendar].&[2005].&[2] is available).

And the step follows: 1. Remove any attribute relationship in dimension date. 2. Build a new integer column (1,2,3,4) as the source of the key column for Quarter. 3. Specify the key column of Quarter to that new integer column.

I do not know if this will cause any other problems. Anyway, thanks a lot for your help.

|||

I realized this now. So you have a join on one of the levels in your time hierarchy above the leaf level? In the dimension usage tab for the cube you must use the same combination as in your composite key. You do not have to change the name column.

Check the Adventure Works Demo project that is part of the installation. Have a look at the date.dim there(and the attribute month_name(properties)) and check the relation between the date dim and sales targets measure group in the Adventure Works cube.

Regards

Thomas Ivarsson

|||

Nice that it works. Without attribute relations you will not get any aggregations on the time dimension. Another problem is that your calculations can be wrong. What you needed to do was to add 2006(Year) to the quarters(1,2,3,4) so that their collection will point to year and quarter, at the same time. Actually you combine each year with each of their quarter in this way. Quarter(1,2,3,4) will not point to a specific year if you do not do this(ie add the year key to each quarter key).

Regards

Thomas Ivarsson

|||

Hi, Thomas

Thanks a lot for your response! I have several questions about your answer.

First, what do you mean by have a join on one of the levles above the leaf levels? And how can I see that?

Second, I have seen the AdventureWorks cube and see the attribute month_name has a combination key column of year + month. But in the dim usage table, I do not know how to modify my own project. I can see a RED line under my date dimension and I think that indicates error. However, if I add an attribute relationship between Quarter and Year, the dim usage table will automaticlly add this relationship to itself. (In other words, I can not find the place to add sth about the combination key in the dim usage table)

|||

Hello again Jeremy. If you scroll out to the right, in the dimension usage tab of the cube editor(In the Adventure Works demo cube), you will find a box where the dimension date intersect with the measure group Sales Targets. All the other relations between date and the measure groups in this cube are at the lowest(leaf level) or the box empty(no relation). Click the box(date dim and Sales Targets) There you can see the granularity attribute for the relation, thats the level that is used in the join between the measure group and the dimension.

Check here that you join on the correct column to avoid the error message you talked about before: "The key columns of the Quarter measure group attribute do not match in either number or data types to the key columns of the source attribute." You will only have to this if you have changed the key column for the Quarter member in your time dimension.

Regards

Thomas Ivarsson

reference member in user hierarchy

hi,

I have a user hierarchy in my Date Dimension such as [Calendar]->[Years]->[Quarters]

And I can access the member by directly call the memeber name, for example:

select [Date].[Calendar].[Years].[2006].[Q2] on columns, ...................................

The results will be correct. However, if I use reference to call the member, for example:

select [Date].[Calendar].[Years].[2006].&[2] on columns, ...................................

There will be nothing in my results.

Would you please tell me what shall I do to enable the reference call to my hierarchy member? Thanks.

With "select [Date].[Calendar].[Years].[2006].&[2] on columns, you are referencing the keys for the member.

"[Date].[Calendar].[Years].&[2006].&[2]" might help.

Another method is [Date].[Calendar].[Years].Lastchild.Lastchild. With this method you will always find the last quarter of the last year in your time dimension.

Regards

Thomas Ivarsson

|||

Hi, Thomas

Thanks a lot for your answer. I have also tried "[Date].[Calendar].[Years].&[2006].&[2]" but no use. I still get nothing from that.

I was forced to use the format: "[Date].[Calendar].[Years].&[2006].&[2]" because this is a fixed format in a third-part software. I guess maybe there is sth wrong about the settings of my user hierarchy?

|||

It can be a problem with key for the Quarter member. Are you using integers like 1,2,3,4 for Quarters? In that case you can make a combination by year and quarter for the quarter key. Check also your attribute relation between quarter and year in the dimension editor.

Regards

Thomas

|||

Hi, Thomas,

Thanks and would you please give me a little bit more details?

Do you mean that I should use 1,2,3,4 as the quarter key for Quarters?

And do you mean that I should build the attribute relation between quarter and year? I have tried both with/without attribute relation but it did not work. Thx.

|||

No. You should use a composite key with both the year and the quarter. A quarter key like 1,2,3,4 is not unique. If you klick on the key-column, for the level, in the properties(dimension editor) you can add year to quarter(in the key) and create a collection. This is in the dataitem collection editor.

Regards

Thomas Ivarsson

|||

hi, Thomas,

Thanks and I have tried to add a composite key (year+quarter) according to your steps.

But during processing, there is an error message: The key columns of the Quarter measure group attribute do not match in either number or data types to the key columns of the source attribute.

Would you please tell me how to deal with this problem? Thanks a lot.


|||

Hello. Make a new column, for either year or quarter, and use the TSQL convert och cast-function to change the data type to something common.

You can also simply use the datepart function for year and quarter and return two integer fields.

Regards

Thomas Ivarsson

|||

hi, Thomas

I have checked that in the AS2005, my Year and Quarter are in the format: Integar.

And in the data source view, I see that the source columns of the key column are both: System.Int32

However, the error still exists, do you have any idea about this? Thanks.

|||

BTW, do I also need to change the Name Column (or the value column) to the integer column I defined in the source?

|||

hi, Thomas,

I have finally get the result I want ([Date].[Calendar].&[2005].&[2] is available).

And the step follows: 1. Remove any attribute relationship in dimension date. 2. Build a new integer column (1,2,3,4) as the source of the key column for Quarter. 3. Specify the key column of Quarter to that new integer column.

I do not know if this will cause any other problems. Anyway, thanks a lot for your help.

|||

I realized this now. So you have a join on one of the levels in your time hierarchy above the leaf level? In the dimension usage tab for the cube you must use the same combination as in your composite key. You do not have to change the name column.

Check the Adventure Works Demo project that is part of the installation. Have a look at the date.dim there(and the attribute month_name(properties)) and check the relation between the date dim and sales targets measure group in the Adventure Works cube.

Regards

Thomas Ivarsson

|||

Nice that it works. Without attribute relations you will not get any aggregations on the time dimension. Another problem is that your calculations can be wrong. What you needed to do was to add 2006(Year) to the quarters(1,2,3,4) so that their collection will point to year and quarter, at the same time. Actually you combine each year with each of their quarter in this way. Quarter(1,2,3,4) will not point to a specific year if you do not do this(ie add the year key to each quarter key).

Regards

Thomas Ivarsson

|||

Hi, Thomas

Thanks a lot for your response! I have several questions about your answer.

First, what do you mean by have a join on one of the levles above the leaf levels? And how can I see that?

Second, I have seen the AdventureWorks cube and see the attribute month_name has a combination key column of year + month. But in the dim usage table, I do not know how to modify my own project. I can see a RED line under my date dimension and I think that indicates error. However, if I add an attribute relationship between Quarter and Year, the dim usage table will automaticlly add this relationship to itself. (In other words, I can not find the place to add sth about the combination key in the dim usage table)

|||

Hello again Jeremy. If you scroll out to the right, in the dimension usage tab of the cube editor(In the Adventure Works demo cube), you will find a box where the dimension date intersect with the measure group Sales Targets. All the other relations between date and the measure groups in this cube are at the lowest(leaf level) or the box empty(no relation). Click the box(date dim and Sales Targets) There you can see the granularity attribute for the relation, thats the level that is used in the join between the measure group and the dimension.

Check here that you join on the correct column to avoid the error message you talked about before: "The key columns of the Quarter measure group attribute do not match in either number or data types to the key columns of the source attribute." You will only have to this if you have changed the key column for the Quarter member in your time dimension.

Regards

Thomas Ivarsson

Friday, March 9, 2012

RefCount dismatch on Row Count components

Has anyone seen this error?

messageText:
A call to the ProcessInput method for input 507 on component "CNT RowsInput"

(505) unexpectedly kept a reference to the buffer it was passed. The refcount on

that buffer was 4 before the call, and 5 after the call returned.

dataCode: -2147192599
dataBytes:

The CNT RowsInput transformation is right between the oledb source and the derive transformation. It is the 2nd transformation in the data flow.

I use all defaults for the Data flow task and provide a valid BufferTempStoragePath.

The closest/detailed explaination I found

A call to the ProcessInput

method for input %1!d! on %2!s! unexpectedly kept a reference to the

buffer it was passed. The refcount on that buffer was %3!d! before the

call, and %4!d! after the call returned. The component is keeping

references to buffers it shouldn't. If it needs to keep the buffer, it

should make a copy of the buffer for itself by calling the Clone method.

from
http://wiki.sqlis.com/default.aspx/SQLISWiki/0x800470E9.html

Hi Tianyu

Did you find an answer on this?

I am getting exactly the same problem with a custom row count component I have written - I'm keen to find out the cause.

Thanks . . . Ed

|||

Hi, Allen

We don't have any answer to this yet. Last time I researched still nothing on it :(

Tianyu

|||I randomly get that same warning on different components... and its on fairly "simple" standard components (multicast is the most common one to get that error for me, followed by rowcount)|||

Tianyu / Chris

See this thread - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=705702&SiteID=1

Regards . . . Ed

|||

Yeah, I saw that... I figured it didn't really matter - but it doesn't help me much when I have a script in my Master package that looks for any warnings from any of the many packages the Master runs, compiles all the warnings and sends it to me and my boss. He of course in turn asks what is wrong and when I say not to worry about the buffer error he wants to know why he gets emails on it then.... LOL I haven't actually found an instance where the rowcount was wrong after one of those warnings.

Mailing all the warnings and errors has saved our butts - for example when someone changed a table that is used for lookups it caused the lookup to match multiple records we got a warning. So I highly recommend the practice but its kinda lame becuase people have started to ignore the warnings when about 50% of the time at least one of the daily packages will get that error about the buffers.

|||I found this warning too. Do I need to do something or just leave it?|||Tom, I'd say to just ignore it after spot checking your results a few times. In my package which emails warnings and errors I added code to explicitly ignore that error. In the hundreds of packages run everyday we've never had this warning result in incorrect data.

RefCount dismatch on Row Count components

Has anyone seen this error?

messageText:
A call to the ProcessInput method for input 507 on component "CNT RowsInput"

(505) unexpectedly kept a reference to the buffer it was passed. The refcount on

that buffer was 4 before the call, and 5 after the call returned.

dataCode: -2147192599
dataBytes:

The CNT RowsInput transformation is right between the oledb source and the derive transformation. It is the 2nd transformation in the data flow.

I use all defaults for the Data flow task and provide a valid BufferTempStoragePath.

The closest/detailed explaination I found

A call to the ProcessInput

method for input %1!d! on %2!s! unexpectedly kept a reference to the

buffer it was passed. The refcount on that buffer was %3!d! before the

call, and %4!d! after the call returned. The component is keeping

references to buffers it shouldn't. If it needs to keep the buffer, it

should make a copy of the buffer for itself by calling the Clone method.

from
http://wiki.sqlis.com/default.aspx/SQLISWiki/0x800470E9.html

Hi Tianyu

Did you find an answer on this?

I am getting exactly the same problem with a custom row count component I have written - I'm keen to find out the cause.

Thanks . . . Ed

|||

Hi, Allen

We don't have any answer to this yet. Last time I researched still nothing on it :(

Tianyu

|||I randomly get that same warning on different components... and its on fairly "simple" standard components (multicast is the most common one to get that error for me, followed by rowcount)|||

Tianyu / Chris

See this thread - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=705702&SiteID=1

Regards . . . Ed

|||

Yeah, I saw that... I figured it didn't really matter - but it doesn't help me much when I have a script in my Master package that looks for any warnings from any of the many packages the Master runs, compiles all the warnings and sends it to me and my boss. He of course in turn asks what is wrong and when I say not to worry about the buffer error he wants to know why he gets emails on it then.... LOL I haven't actually found an instance where the rowcount was wrong after one of those warnings.

Mailing all the warnings and errors has saved our butts - for example when someone changed a table that is used for lookups it caused the lookup to match multiple records we got a warning. So I highly recommend the practice but its kinda lame becuase people have started to ignore the warnings when about 50% of the time at least one of the daily packages will get that error about the buffers.

|||I found this warning too. Do I need to do something or just leave it?|||Tom, I'd say to just ignore it after spot checking your results a few times. In my package which emails warnings and errors I added code to explicitly ignore that error. In the hundreds of packages run everyday we've never had this warning result in incorrect data.

RefCount dismatch on Row Count components

Has anyone seen this error?

messageText:
A call to the ProcessInput method for input 507 on component "CNT RowsInput"

(505) unexpectedly kept a reference to the buffer it was passed. The refcount on

that buffer was 4 before the call, and 5 after the call returned.

dataCode: -2147192599
dataBytes:

The CNT RowsInput transformation is right between the oledb source and the derive transformation. It is the 2nd transformation in the data flow.

I use all defaults for the Data flow task and provide a valid BufferTempStoragePath.

The closest/detailed explaination I found

A call to the ProcessInput

method for input %1!d! on %2!s! unexpectedly kept a reference to the

buffer it was passed. The refcount on that buffer was %3!d! before the

call, and %4!d! after the call returned. The component is keeping

references to buffers it shouldn't. If it needs to keep the buffer, it

should make a copy of the buffer for itself by calling the Clone method.

from
http://wiki.sqlis.com/default.aspx/SQLISWiki/0x800470E9.html

Hi Tianyu

Did you find an answer on this?

I am getting exactly the same problem with a custom row count component I have written - I'm keen to find out the cause.

Thanks . . . Ed

|||

Hi, Allen

We don't have any answer to this yet. Last time I researched still nothing on it :(

Tianyu

|||I randomly get that same warning on different components... and its on fairly "simple" standard components (multicast is the most common one to get that error for me, followed by rowcount)|||

Tianyu / Chris

See this thread - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=705702&SiteID=1

Regards . . . Ed

|||

Yeah, I saw that... I figured it didn't really matter - but it doesn't help me much when I have a script in my Master package that looks for any warnings from any of the many packages the Master runs, compiles all the warnings and sends it to me and my boss. He of course in turn asks what is wrong and when I say not to worry about the buffer error he wants to know why he gets emails on it then.... LOL I haven't actually found an instance where the rowcount was wrong after one of those warnings.

Mailing all the warnings and errors has saved our butts - for example when someone changed a table that is used for lookups it caused the lookup to match multiple records we got a warning. So I highly recommend the practice but its kinda lame becuase people have started to ignore the warnings when about 50% of the time at least one of the daily packages will get that error about the buffers.

|||I found this warning too. Do I need to do something or just leave it?|||Tom, I'd say to just ignore it after spot checking your results a few times. In my package which emails warnings and errors I added code to explicitly ignore that error. In the hundreds of packages run everyday we've never had this warning result in incorrect data.

RefCount dismatch on Row Count components

Has anyone seen this error?

messageText:
A call to the ProcessInput method for input 507 on component "CNT RowsInput" (505) unexpectedly kept a reference to the buffer it was passed. The refcount on that buffer was 4 before the call, and 5 after the call returned.

dataCode: -2147192599
dataBytes:

The CNT RowsInput transformation is right between the oledb source and the derive transformation. It is the 2nd transformation in the data flow.

I use all defaults for the Data flow task and provide a valid BufferTempStoragePath.

The closest/detailed explaination I found

A call to the ProcessInput method for input %1!d! on %2!s! unexpectedly kept a reference to the buffer it was passed. The refcount on that buffer was %3!d! before the call, and %4!d! after the call returned. The component is keeping references to buffers it shouldn't. If it needs to keep the buffer, it should make a copy of the buffer for itself by calling the Clone method.

from
http://wiki.sqlis.com/default.aspx/SQLISWiki/0x800470E9.html

Hi Tianyu

Did you find an answer on this?

I am getting exactly the same problem with a custom row count component I have written - I'm keen to find out the cause.

Thanks . . . Ed

|||

Hi, Allen

We don't have any answer to this yet. Last time I researched still nothing on it :(

Tianyu

|||I randomly get that same warning on different components... and its on fairly "simple" standard components (multicast is the most common one to get that error for me, followed by rowcount)|||

Tianyu / Chris

See this thread - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=705702&SiteID=1

Regards . . . Ed

|||

Yeah, I saw that... I figured it didn't really matter - but it doesn't help me much when I have a script in my Master package that looks for any warnings from any of the many packages the Master runs, compiles all the warnings and sends it to me and my boss. He of course in turn asks what is wrong and when I say not to worry about the buffer error he wants to know why he gets emails on it then.... LOL I haven't actually found an instance where the rowcount was wrong after one of those warnings.

Mailing all the warnings and errors has saved our butts - for example when someone changed a table that is used for lookups it caused the lookup to match multiple records we got a warning. So I highly recommend the practice but its kinda lame becuase people have started to ignore the warnings when about 50% of the time at least one of the daily packages will get that error about the buffers.

|||I found this warning too. Do I need to do something or just leave it?|||Tom, I'd say to just ignore it after spot checking your results a few times. In my package which emails warnings and errors I added code to explicitly ignore that error. In the hundreds of packages run everyday we've never had this warning result in incorrect data.

RefCount dismatch on Row Count components

Has anyone seen this error?

messageText:
A call to the ProcessInput method for input 507 on component "CNT RowsInput"

(505) unexpectedly kept a reference to the buffer it was passed. The refcount on

that buffer was 4 before the call, and 5 after the call returned.

dataCode: -2147192599
dataBytes:

The CNT RowsInput transformation is right between the oledb source and the derive transformation. It is the 2nd transformation in the data flow.

I use all defaults for the Data flow task and provide a valid BufferTempStoragePath.

The closest/detailed explaination I found

A call to the ProcessInput

method for input %1!d! on %2!s! unexpectedly kept a reference to the

buffer it was passed. The refcount on that buffer was %3!d! before the

call, and %4!d! after the call returned. The component is keeping

references to buffers it shouldn't. If it needs to keep the buffer, it

should make a copy of the buffer for itself by calling the Clone method.

from
http://wiki.sqlis.com/default.aspx/SQLISWiki/0x800470E9.html

Hi Tianyu

Did you find an answer on this?

I am getting exactly the same problem with a custom row count component I have written - I'm keen to find out the cause.

Thanks . . . Ed

|||

Hi, Allen

We don't have any answer to this yet. Last time I researched still nothing on it :(

Tianyu

|||I randomly get that same warning on different components... and its on fairly "simple" standard components (multicast is the most common one to get that error for me, followed by rowcount)|||

Tianyu / Chris

See this thread - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=705702&SiteID=1

Regards . . . Ed

|||

Yeah, I saw that... I figured it didn't really matter - but it doesn't help me much when I have a script in my Master package that looks for any warnings from any of the many packages the Master runs, compiles all the warnings and sends it to me and my boss. He of course in turn asks what is wrong and when I say not to worry about the buffer error he wants to know why he gets emails on it then.... LOL I haven't actually found an instance where the rowcount was wrong after one of those warnings.

Mailing all the warnings and errors has saved our butts - for example when someone changed a table that is used for lookups it caused the lookup to match multiple records we got a warning. So I highly recommend the practice but its kinda lame becuase people have started to ignore the warnings when about 50% of the time at least one of the daily packages will get that error about the buffers.

|||I found this warning too. Do I need to do something or just leave it?|||Tom, I'd say to just ignore it after spot checking your results a few times. In my package which emails warnings and errors I added code to explicitly ignore that error. In the hundreds of packages run everyday we've never had this warning result in incorrect data.

Wednesday, March 7, 2012

Redundancy requiring Identity columns on Subscriber - please help

Hi
I am just getting up to speed on replication so please forgive me if I
am missing something simple here......
Scenario
Application server (call it Test) that has SQL Server 2000 database
I am setting up replication for backup pupopses
(If Server A dies - point Application (Test) to Server B )
My Problem -
Many tables in the database have the identiy column set to YES
As the TEST operates, many rows uniquely added to the db using Identity
column as PKeys
I was using snapshot replication for test purposes....(no license for
Transactional)
On subscriber - created blank DB with YES (Not for Replication) option
set for the tables in question.
The Snapshot I created from Publisher, when I push to the subscriber -
it resets the Identify (YES - NFR) back to No
I redireecte dteh Aopplication server to Server B an dit fails to work
corrcectly.- cannot insert into row s where Identity column is set to
No
Identify needs to be set to YES (or YES not for Repl) in order for my
application server to work correctly.
Any ideas on how I could best achieve this?
Thanks in advance........
Kevha
right click on your publication, select properties, in the articles tab
select the browse button to the right of your tables. Click on the snapshot
tab. In the name conflicts section, select the keep delete existing data.
Now return to your subscriber, fix things the way you want them, and then
rereun your snapshot.
It should work this time.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<kevha@.hotmail.com> wrote in message
news:1132178886.227006.217160@.o13g2000cwo.googlegr oups.com...
> Hi
> I am just getting up to speed on replication so please forgive me if I
> am missing something simple here......
> Scenario
> Application server (call it Test) that has SQL Server 2000 database
> I am setting up replication for backup pupopses
> (If Server A dies - point Application (Test) to Server B )
> My Problem -
> Many tables in the database have the identiy column set to YES
> As the TEST operates, many rows uniquely added to the db using Identity
> column as PKeys
> I was using snapshot replication for test purposes....(no license for
> Transactional)
> On subscriber - created blank DB with YES (Not for Replication) option
> set for the tables in question.
> The Snapshot I created from Publisher, when I push to the subscriber -
> it resets the Identify (YES - NFR) back to No
> I redireecte dteh Aopplication server to Server B an dit fails to work
> corrcectly.- cannot insert into row s where Identity column is set to
> No
> Identify needs to be set to YES (or YES not for Repl) in order for my
> application server to work correctly.
> Any ideas on how I could best achieve this?
> Thanks in advance........
> Kevha
>
|||Hi Hilary
I still can't seem to get the problem solved.
Let me take it back a step -
Server A (source)
Server B (subscriber)
I want to replicate server A to server B
I set up Server A with Snapshot Replicationa sPublisher and
Distributor.
Database created on Server A - some tables with Columns set with
Identity = Yes
I set up Snapshot Replication
In the SnapShot Properties/ Articles I set 'Keep Existing Table
unchanged' option on.
I added a custom script in the Snapshot Properties tab that - Drops the
tables, recreates them with the IDENTITY NOT FOR REPLICATION option
included during table creation.
When I conduct the Synchronize - I get the following error -
Violation of Primary Key constraint 'x' insert duplicate key in object
'x'
My replication could happen once an hour (not real time critical so any
option that keeps the Identity filed intact appreciated)

Monday, February 20, 2012

Reduce function call in a Select statment

I have a stored procedure that is something like this :
SELECT TableA.*, value = dbo.functionA(TableA.id, x,x)
FROM TableA
WHERE TableA.id = 'SomeValue'
AND dbo.functionA(TableA.key, x,x) > 0
This procedure is executed over 1000 times in a hour, and the function calls
in the proc is called twice each time this procedure is called.
Is there a way to rewrite this statement so that the function call is only
made once'
Thanks
MikeSee if you can rewrite without the function - that's the fastest. Failing
that:
select
*
from
(
select
*
, value = dbo.functionA(id, x,x)
from
TableA
where
id = 'SomeValue'
) as x
where
value > 0
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Mike" <y4forums.t.mdgoyal@.xoxy.net> wrote in message
news:%23oPVPH4UGHA.2492@.TK2MSFTNGP11.phx.gbl...
I have a stored procedure that is something like this :
SELECT TableA.*, value = dbo.functionA(TableA.id, x,x)
FROM TableA
WHERE TableA.id = 'SomeValue'
AND dbo.functionA(TableA.key, x,x) > 0
This procedure is executed over 1000 times in a hour, and the function calls
in the proc is called twice each time this procedure is called.
Is there a way to rewrite this statement so that the function call is only
made once'
Thanks
Mike|||Thanks
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OJBQ%23N4UGHA.4348@.TK2MSFTNGP09.phx.gbl...
> See if you can rewrite without the function - that's the fastest. Failing
> that:
> select
> *
> from
> (
> select
> *
> , value = dbo.functionA(id, x,x)
> from
> TableA
> where
> id = 'SomeValue'
> ) as x
> where
> value > 0
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "Mike" <y4forums.t.mdgoyal@.xoxy.net> wrote in message
> news:%23oPVPH4UGHA.2492@.TK2MSFTNGP11.phx.gbl...
> I have a stored procedure that is something like this :
> SELECT TableA.*, value = dbo.functionA(TableA.id, x,x)
> FROM TableA
> WHERE TableA.id = 'SomeValue'
> AND dbo.functionA(TableA.key, x,x) > 0
> This procedure is executed over 1000 times in a hour, and the function
> calls
> in the proc is called twice each time this procedure is called.
> Is there a way to rewrite this statement so that the function call is only
> made once'
> Thanks
> Mike
>