Showing posts with label key. Show all posts
Showing posts with label key. Show all posts

Thursday, March 29, 2012

Error: duplicate key row

What might cause the following error when inserting rows in tables that have primary keys defined as IDENTITY (1,1)?

duplicate key row in object 'aa' with unique index 'aa'

I have seen this happen frequently when data has been bulk loaded sometime in the past into a table that has an IDENTITY key. This is especially common when you have a test environment in which some production data was bulk loaded to give some "good test data." To me it means that an identity number has "already been used" as a record key.


Dave

|||The rows are inserted one at a time using the parent IDENTITY key as a FK constraint in the child table which also has an IDENTITY KEY. However, this scenario does not sound like it would cause an error.|||

Can you post the table structures? That would help us to see what your problem might be.

If you can post a few statements that cause the duplicates, that would even be better.

|||

If you have the property NOT FOR REPLICATION enabled for the identity column.

Merging changes would allow the exact id values to be inserted rather than a new value that would give the error if same id value exists in the participating server.

similarly, if you are trying to insert manually using SET IDENTITY_INSERT table ON...

Tuesday, March 27, 2012

Error: Attribute key cannot be found

Helo, I have the following problem

I have one fact-table in my cube
And I have one dimension table

When I process the cube I get the following error:

"Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_fbi_analytic_journals, Column: journals_key, Value: 306."

I understand the error, and I know why I get the error, but how can I solve the error

In the fact-table there is a record with key 306, but this key is not found in the dimension table. What I want is that in the cube are all the record that are in the fact-table with a reference in the dimension table, so the record with key 306 must not be in the cube

Anyone an idea ?

Thx

Look at your processing options. On the "Dimension key errors" tab select "Use custom error configuration" and change the setting to "Convert to unknown".

|||

I have this same situation. But where are the processing options found? I don't see it!

thx,

Marilyn

|||found it! thanks.|||

Is there a way to set the "Dimension key errors" to automatically use the 'Use Custom error configuration' without having to set it each time processing is performed?

thx,

-Marilyn

|||

It is also possible to set ErrorConfiguration on the partitoin, measure group or on the cube.

Take a look at the properties dialog for cube or partition in SQL Management Studio, you will find a Error Configuraiton tab there.

In BI Dev Studio look at the properties panel and find ErrorConfiguration property. Once you set it to "Custom", you will be able to set individual error configuration properties.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

right-click on the cube in the solution explorer pane.

select 'process...'

press the 'change settings' button.

select the 'dimension key errors' tab

select the radio button 'use custom error configuration'

|||

Your settings won't "stick" in the Analysis designer itself for some reason... you must create an Analysis Services Task in BI Studio to run against the cube you've created.

|||

Hello,

I get the same error msg but here's the situation

I create a new project, with a data source and a data source view with only one table

I create a dimension base on this table and try to process it

There's no cube, only a dimension and it failed with attribute key not found error

After many test I discover that the lines causing the error where random and the error line are same as those that work

I understand the reason why this error is thrown when a cube reference to an item that doesn't in the dimension but in my situation I really can't understand what happen !!

Can somebody help me with this one

thank you

Billy

|||make sure you process your dimensions before your CUBE.

Error: Attribute key cannot be found

Helo, I have the following problem

I have one fact-table in my cube
And I have one dimension table

When I process the cube I get the following error:

"Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_fbi_analytic_journals, Column: journals_key, Value: 306."

I understand the error, and I know why I get the error, but how can I solve the error

In the fact-table there is a record with key 306, but this key is not found in the dimension table. What I want is that in the cube are all the record that are in the fact-table with a reference in the dimension table, so the record with key 306 must not be in the cube

Anyone an idea ?

Thx

Look at your processing options. On the "Dimension key errors" tab select "Use custom error configuration" and change the setting to "Convert to unknown".

|||

I have this same situation. But where are the processing options found? I don't see it!

thx,

Marilyn

|||found it! thanks.|||

Is there a way to set the "Dimension key errors" to automatically use the 'Use Custom error configuration' without having to set it each time processing is performed?

thx,

-Marilyn

|||

It is also possible to set ErrorConfiguration on the partitoin, measure group or on the cube.

Take a look at the properties dialog for cube or partition in SQL Management Studio, you will find a Error Configuraiton tab there.

In BI Dev Studio look at the properties panel and find ErrorConfiguration property. Once you set it to "Custom", you will be able to set individual error configuration properties.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

right-click on the cube in the solution explorer pane.

select 'process...'

press the 'change settings' button.

select the 'dimension key errors' tab

select the radio button 'use custom error configuration'

|||

Your settings won't "stick" in the Analysis designer itself for some reason... you must create an Analysis Services Task in BI Studio to run against the cube you've created.

|||

Hello,

I get the same error msg but here's the situation

I create a new project, with a data source and a data source view with only one table

I create a dimension base on this table and try to process it

There's no cube, only a dimension and it failed with attribute key not found error

After many test I discover that the lines causing the error where random and the error line are same as those that work

I understand the reason why this error is thrown when a cube reference to an item that doesn't in the dimension but in my situation I really can't understand what happen !!

Can somebody help me with this one

thank you

Billy

|||make sure you process your dimensions before your CUBE.

Error: Attribute key cannot be found

Helo, I have the following problem

I have one fact-table in my cube
And I have one dimension table

When I process the cube I get the following error:

"Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_fbi_analytic_journals, Column: journals_key, Value: 306."

I understand the error, and I know why I get the error, but how can I solve the error

In the fact-table there is a record with key 306, but this key is not found in the dimension table. What I want is that in the cube are all the record that are in the fact-table with a reference in the dimension table, so the record with key 306 must not be in the cube

Anyone an idea ?

Thx

Look at your processing options. On the "Dimension key errors" tab select "Use custom error configuration" and change the setting to "Convert to unknown".

|||

I have this same situation. But where are the processing options found? I don't see it!

thx,

Marilyn

|||found it! thanks.|||

Is there a way to set the "Dimension key errors" to automatically use the 'Use Custom error configuration' without having to set it each time processing is performed?

thx,

-Marilyn

|||

It is also possible to set ErrorConfiguration on the partitoin, measure group or on the cube.

Take a look at the properties dialog for cube or partition in SQL Management Studio, you will find a Error Configuraiton tab there.

In BI Dev Studio look at the properties panel and find ErrorConfiguration property. Once you set it to "Custom", you will be able to set individual error configuration properties.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

right-click on the cube in the solution explorer pane.

select 'process...'

press the 'change settings' button.

select the 'dimension key errors' tab

select the radio button 'use custom error configuration'

|||

Your settings won't "stick" in the Analysis designer itself for some reason... you must create an Analysis Services Task in BI Studio to run against the cube you've created.

|||

Hello,

I get the same error msg but here's the situation

I create a new project, with a data source and a data source view with only one table

I create a dimension base on this table and try to process it

There's no cube, only a dimension and it failed with attribute key not found error

After many test I discover that the lines causing the error where random and the error line are same as those that work

I understand the reason why this error is thrown when a cube reference to an item that doesn't in the dimension but in my situation I really can't understand what happen !!

Can somebody help me with this one

thank you

Billy

|||make sure you process your dimensions before your CUBE.

Error: Attribute key cannot be found

Helo, I have the following problem

I have one fact-table in my cube
And I have one dimension table

When I process the cube I get the following error:

"Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_fbi_analytic_journals, Column: journals_key, Value: 306."

I understand the error, and I know why I get the error, but how can I solve the error

In the fact-table there is a record with key 306, but this key is not found in the dimension table. What I want is that in the cube are all the record that are in the fact-table with a reference in the dimension table, so the record with key 306 must not be in the cube

Anyone an idea ?

Thx

Look at your processing options. On the "Dimension key errors" tab select "Use custom error configuration" and change the setting to "Convert to unknown".

|||

I have this same situation. But where are the processing options found? I don't see it!

thx,

Marilyn

|||found it! thanks.|||

Is there a way to set the "Dimension key errors" to automatically use the 'Use Custom error configuration' without having to set it each time processing is performed?

thx,

-Marilyn

|||

It is also possible to set ErrorConfiguration on the partitoin, measure group or on the cube.

Take a look at the properties dialog for cube or partition in SQL Management Studio, you will find a Error Configuraiton tab there.

In BI Dev Studio look at the properties panel and find ErrorConfiguration property. Once you set it to "Custom", you will be able to set individual error configuration properties.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

right-click on the cube in the solution explorer pane.

select 'process...'

press the 'change settings' button.

select the 'dimension key errors' tab

select the radio button 'use custom error configuration'

|||

Your settings won't "stick" in the Analysis designer itself for some reason... you must create an Analysis Services Task in BI Studio to run against the cube you've created.

|||

Hello,

I get the same error msg but here's the situation

I create a new project, with a data source and a data source view with only one table

I create a dimension base on this table and try to process it

There's no cube, only a dimension and it failed with attribute key not found error

After many test I discover that the lines causing the error where random and the error line are same as those that work

I understand the reason why this error is thrown when a cube reference to an item that doesn't in the dimension but in my situation I really can't understand what happen !!

Can somebody help me with this one

thank you

Billy

|||make sure you process your dimensions before your CUBE.

Error: Attribute key cannot be found

Helo, I have the following problem

I have one fact-table in my cube
And I have one dimension table

When I process the cube I get the following error:

"Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_fbi_analytic_journals, Column: journals_key, Value: 306."

I understand the error, and I know why I get the error, but how can I solve the error

In the fact-table there is a record with key 306, but this key is not found in the dimension table. What I want is that in the cube are all the record that are in the fact-table with a reference in the dimension table, so the record with key 306 must not be in the cube

Anyone an idea ?

Thx

Look at your processing options. On the "Dimension key errors" tab select "Use custom error configuration" and change the setting to "Convert to unknown".

|||

I have this same situation. But where are the processing options found? I don't see it!

thx,

Marilyn

|||found it! thanks.|||

Is there a way to set the "Dimension key errors" to automatically use the 'Use Custom error configuration' without having to set it each time processing is performed?

thx,

-Marilyn

|||

It is also possible to set ErrorConfiguration on the partitoin, measure group or on the cube.

Take a look at the properties dialog for cube or partition in SQL Management Studio, you will find a Error Configuraiton tab there.

In BI Dev Studio look at the properties panel and find ErrorConfiguration property. Once you set it to "Custom", you will be able to set individual error configuration properties.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

right-click on the cube in the solution explorer pane.

select 'process...'

press the 'change settings' button.

select the 'dimension key errors' tab

select the radio button 'use custom error configuration'

|||

Your settings won't "stick" in the Analysis designer itself for some reason... you must create an Analysis Services Task in BI Studio to run against the cube you've created.

|||

Hello,

I get the same error msg but here's the situation

I create a new project, with a data source and a data source view with only one table

I create a dimension base on this table and try to process it

There's no cube, only a dimension and it failed with attribute key not found error

After many test I discover that the lines causing the error where random and the error line are same as those that work

I understand the reason why this error is thrown when a cube reference to an item that doesn't in the dimension but in my situation I really can't understand what happen !!

Can somebody help me with this one

thank you

Billy

|||make sure you process your dimensions before your CUBE.

sql

Error: Attribute key cannot be found

Helo, I have the following problem

I have one fact-table in my cube
And I have one dimension table

When I process the cube I get the following error:

"Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_fbi_analytic_journals, Column: journals_key, Value: 306."

I understand the error, and I know why I get the error, but how can I solve the error

In the fact-table there is a record with key 306, but this key is not found in the dimension table. What I want is that in the cube are all the record that are in the fact-table with a reference in the dimension table, so the record with key 306 must not be in the cube

Anyone an idea ?

Thx

Look at your processing options. On the "Dimension key errors" tab select "Use custom error configuration" and change the setting to "Convert to unknown".

|||

I have this same situation. But where are the processing options found? I don't see it!

thx,

Marilyn

|||found it! thanks.|||

Is there a way to set the "Dimension key errors" to automatically use the 'Use Custom error configuration' without having to set it each time processing is performed?

thx,

-Marilyn

|||

It is also possible to set ErrorConfiguration on the partitoin, measure group or on the cube.

Take a look at the properties dialog for cube or partition in SQL Management Studio, you will find a Error Configuraiton tab there.

In BI Dev Studio look at the properties panel and find ErrorConfiguration property. Once you set it to "Custom", you will be able to set individual error configuration properties.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

right-click on the cube in the solution explorer pane.

select 'process...'

press the 'change settings' button.

select the 'dimension key errors' tab

select the radio button 'use custom error configuration'

|||

Your settings won't "stick" in the Analysis designer itself for some reason... you must create an Analysis Services Task in BI Studio to run against the cube you've created.

|||

Hello,

I get the same error msg but here's the situation

I create a new project, with a data source and a data source view with only one table

I create a dimension base on this table and try to process it

There's no cube, only a dimension and it failed with attribute key not found error

After many test I discover that the lines causing the error where random and the error line are same as those that work

I understand the reason why this error is thrown when a cube reference to an item that doesn't in the dimension but in my situation I really can't understand what happen !!

Can somebody help me with this one

thank you

Billy

|||make sure you process your dimensions before your CUBE.

Friday, February 24, 2012

Error while updating INDEXES

I was updating few indexes in one of my database tables when I got this warning message:
"Warning! The maximum key length is 900 bytes. The index 'IX_cc_statusText' has maximum length of 1024 bytes. For some combination of large values, the insert/update operation will fail."

Can anyone help me out as to:
1. Why this warning was thrown?
2. What are the implications of the same?
3. How to rectify this?

Here is the script I was using to update the indexes:

CREATE INDEX [cc_programEnrollment14] ON [dbo].[cc_programEnrollment]([cc_company_uid]) ON [PRIMARY]
GO

CREATE INDEX [IX_cc_program_uid] ON [dbo].[cc_programEnrollment]([cc_program_uid]) ON [PRIMARY]
GO

CREATE INDEX [IX_cc_status_uid] ON [dbo].[cc_programEnrollment]([cc_status_uid]) ON [PRIMARY]
GO

CREATE INDEX [IX_cc_CompanyID] ON [dbo].[cc_programEnrollment]([cc_CompanyID]) ON [PRIMARY]
GO

CREATE INDEX [IX_cc_statusText] ON [dbo].[cc_programEnrollment]([cc_statusText]) ON [PRIMARY]
GO

CREATE INDEX [IX_cc_initiatedDate] ON [dbo].[cc_programEnrollment]([cc_initiatedDate]) ON [PRIMARY]
GO

CREATE INDEX [IX_cc_initiatedBy_uid] ON [dbo].[cc_programEnrollment]([cc_initiatedBy_uid]) ON [PRIMARY]
GO

CREATE INDEX [IX_cc_SponsorID] ON [dbo].[cc_programEnrollment]([cc_SponsorID]) ON [PRIMARY]
GO

CREATE INDEX [IX_cc_SponsorDistributor_uid] ON [dbo].[cc_programEnrollment]([cc_SponsorDistributor_uid]) ON [PRIMARY]
GO

CREATE INDEX [IX_cc_programEnrollment] ON [dbo].[cc_programEnrollment]([cc_isDealerEligible], [cc_uid]) ON [PRIMARY]
GO

Thanks in advance
DexterHey Dexy,

you're index creation is failing because your column cc_statusText is longer than 900 bytes. You should try and create your indexes on the smaller columns, as I'm quite positive larger columns will take a bit longer to look up in the index.

Have a look here...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da_0ldf.asp

Regards,
-Kilka