It's all about the answers!

Ask a question

BF: bfschema produces errors in 7.1.2


Benjamin Chodroff (8985231) | asked Nov 11 '10, 2:01 a.m.
After upgrading to 7.1.2, I ran a <bf_home>/Platform/bfschema -R to reindex my DB2 database. These were the errors I received. Are they of any concern?



alter table BUILD.bf_logs drop primary key
DBD::DB2::db do failed: [IBM][CLI Driver][DB2/LINUX] SQL0539N Table or nickname "BUILD.BF_LOGS" does not have a "PRIMARY" key. SQLSTATE=42888
BuildForge::DB::Schema::Creator : /PerlApp/BuildForge/DB/Schema/Creator.pm : 321[IBM][CLI Driver][DB2/LINUX] SQL0539N Table or nickname "BUILD.BF_LOGS" does not have a "PRIMARY" key. SQLSTATE=42888
Thu 11 Nov 2010 01:04:01 AM CST Database: 4115: CRRBF0555E: Problem performing Database Operation [do] : DBD::DB2::db do failed: [IBM][CLI Driver][DB2/LINUX] SQL0539N Table or nickname "BUILD.BF_LOGS" does not have a "PRIMARY" key. SQLSTATE=42888
Query was [alter table BUILD.bf_logs drop primary key]

Thu 11 Nov 2010 01:04:03 AM CST Database: 4115: CRRBFEEEEE: -539 : [IBM][CLI Driver][DB2/LINUX] SQL0539N Table or nickname "BUILD.BF_LOGS" does not have a "PRIMARY" key. SQLSTATE=42888

Thu 11 Nov 2010 01:04:03 AM CST Database: 4115: CRRBF0551I: StackTrace from Process id [4115] called from [
BuildForge::DB::Schema::Creator(./PerlApp/BuildForge/DB/Schema/Creator.pm:321)
BuildForge::DB::Schema::Creator(./PerlApp/BuildForge/DB/Schema/Creator.pm:320)
BuildForge::DB::Schema::Creator(./PerlApp/BuildForge/DB/Schema/Creator.pm:351)
main(.bfschema.pl:107)
]
[alter table BUILD.bf_logs drop primary key]
Thu 11 Nov 2010 01:04:03 AM CST Database: 4115: CRRBF1445E: Error creating table alter table BUILD.bf_logs drop primary key: -539 : [IBM][CLI Driver][DB2/LINUX] SQL0539N Table or nickname "BUILD.BF_LOGS" does not have a "PRIMARY" key. SQLSTATE=42888

Error creating table alter table BUILD.bf_logs drop primary key: -539 : [IBM][CLI Driver][DB2/LINUX] SQL0539N Table or nickname "BUILD.BF_LOGS" does not have a "PRIMARY" key. SQLSTATE=42888
ALTER table BUILD.bf_logs ALTER COLUMN bf_result_ID SET NOT NULL
drop index idx_bf_logs
CALL SYSPROC.ADMIN_CMD('REORG TABLE BUILD.bf_logs')
alter table BUILD.BF_LOGS add primary key (BF_RESULT_ID, BF_SEQ)

DBD::DB2::db do failed: [IBM][CLI Driver][DB2/LINUX] SQL0673N A primary or unique key index cannot be created because the table contains rows which are duplicates with respect to the values of the identified primary or unique key columns of constraint "BF_RESULT_ID...". SQLSTATE=23515
BuildForge::DB::Schema::Creator : /PerlApp/BuildForge/DB/Schema/Creator.pm : 321[IBM][CLI Driver][DB2/LINUX] SQL0673N A primary or unique key index cannot be created because the table contains rows which are duplicates with respect to the values of the identified primary or unique key columns of constraint "BF_RESULT_ID...". SQLSTATE=23515
Thu 11 Nov 2010 01:06:18 AM CST Database: 4115: CRRBF0555E: Problem performing Database Operation [do] : DBD::DB2::db do failed: [IBM][CLI Driver][DB2/LINUX] SQL0673N A primary or unique key index cannot be created because the table contains rows which are duplicates with respect to the values of the identified primary or unique key columns of constraint "BF_RESULT_ID...". SQLSTATE=23515
Query was [alter table BUILD.BF_LOGS add primary key (BF_RESULT_ID, BF_SEQ)]

Thu 11 Nov 2010 01:06:18 AM CST Database: 4115: CRRBFEEEEE: DBD::DB2::db do failed: [IBM][CLI Driver][DB2/LINUX] SQL0673N A primary or unique key index cannot be created because the table contains rows which are duplicates with respect to the values of the identified primary or unique key columns of constraint "BF_RESULT_ID...". SQLSTATE=23515

Thu 11 Nov 2010 01:06:18 AM CST Database: 4115: CRRBF0551I: StackTrace from Process id [4115] called from [
BuildForge::DB::Schema::Creator(./PerlApp/BuildForge/DB/Schema/Creator.pm:321)
BuildForge::DB::Schema::Creator(./PerlApp/BuildForge/DB/Schema/Creator.pm:320)
BuildForge::DB::Schema::Creator(./PerlApp/BuildForge/DB/Schema/Creator.pm:355)
main(.bfschema.pl:107)
]
[alter table BUILD.BF_LOGS add primary key (BF_RESULT_ID, BF_SEQ)]
Thu 11 Nov 2010 01:06:18 AM CST Database: 4115: CRRBF1445E: Error creating table alter table BUILD.BF_LOGS add primary key (BF_RESULT_ID, BF_SEQ): DBD::DB2::db do failed: [IBM][CLI Driver][DB2/LINUX] SQL0673N A primary or unique key index cannot be created because the table contains rows which are duplicates with respect to the values of the identified primary or unique key columns of constraint "BF_RESULT_ID...". SQLSTATE=23515

Error creating table alter table BUILD.BF_LOGS add primary key (BF_RESULT_ID, BF_SEQ): DBD::DB2::db do failed: [IBM][CLI Driver][DB2/LINUX] SQL0673N A primary or unique key index cannot be created because the table contains rows which are duplicates with respect to the values of the identified primary or unique key columns of constraint "BF_RESULT_ID...". SQLSTATE=23515
create unique index BUILD.idx_bf_logs on BUILD.bf_logs (bf_id)

4 answers



permanent link
Brent Ulbricht (2.5k11) | answered Nov 15 '10, 12:10 p.m.
JAZZ DEVELOPER
Hi,

Which release/build number have you been working with or upgrading from? It's possible that you started from a build that wasn't GA, and therefore has some things missing that were expected in GA release builds.

Brent Ulbricht
Build Forge Test

permanent link
Benjamin Chodroff (8985231) | answered Nov 15 '10, 12:39 p.m.
It's possible that you started from a build that wasn't GA, and therefore has some things missing that were expected in GA release builds.


Ah, you are right... there is a good possibility this was an upgrade from a 7.1.1.4 beta. I'm not sure which build it was. No problems have showed up....yet. Should I be concerned?

permanent link
Benjamin Chodroff (8985231) | answered Nov 15 '10, 3:30 p.m.
My BF_LOGS is at 1977252 rows with likely tons of duplicates.

I've decided it's easiest just to backup my projects to xml files, start fresh, and reimport these jobs. I think I could truncate BF_LOGS and run bfschema -R, but I'd rather start fresh.

permanent link
Brent Ulbricht (2.5k11) | answered Nov 15 '10, 4:02 p.m.
JAZZ DEVELOPER
My BF_LOGS is at 1977252 rows with likely tons of duplicates.

I've decided it's easiest just to backup my projects to xml files, start fresh, and reimport these jobs. I think I could truncate BF_LOGS and run bfschema -R, but I'd rather start fresh.


Hi,

Yes, the developer I was consulting with suggested purging all your build results (which would result in quite a reduction in BF_LOGS table) and then running bfschema -R, but if you can start fresh that would be best.

Best regards,

Brent Ulbricht
Build Forge Test

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.