|
Home > Archive > Commerce Server General > June 2004 > Discount Migration has failed
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Discount Migration has failed
|
|
| Phil de Joux 2004-06-26, 10:49 am |
| Discount Migration has failed with the following log and nothing extra in the event log :-(
INFO 0x8C: Migration Start Time : Wednesday, 23 June 2004 11:17:54 p.m.
INFO 0x8E: Target Migration Site : BlankSite
INFO 0x8F: Migrate In Quiet Mode : False
INFO 0x90: Log File Path And Name : DiscountMigration.log
INFO 0x91: Accept Non-Fatal Errors : False
INFO 0x92: Add Campaign Constraints : True
INFO 0x80: Successfully Connected to the 'Campaigns' Resource.
INFO 0x80: Successfully Connected to the 'Biz Data Service' Resource.
INFO 0x80: Successfully Connected to the 'Marketing' Resource.
INFO 0x8A: Added 'CHECK' Constraint ('CHECK_customer_i_customer_id') to Table 'customer'.
INFO 0x8A: Added 'CHECK' Constraint ('CHECK_campaign_i_camp_id') to Table 'campaign'.
INFO 0x8A: Added 'CHECK' Constraint ('CHECK_campaign_item_i_campitem_id') to Table 'campaign_item'.
INFO 0x8A: Added 'CHECK' Constraint ('CHECK_order_discount_i_disc_id') to Table 'order_discount'.
INFO 0x85: Successfully Added Constraints to Legacy 'Campaigns' Tables.
INFO 0x82: Successfully created an instance of the Migration Object.
INFO 0xA7: The legacy 'Campaigns' resource version number is: '4.5'
INFO 0x7C: The Default Customer ID in the 'Marketing' resource is: '1000000000'
INFO 0x83: Successfully initialized the Migration Object.
INFO 0x81: Successfully Migrated the following Tables:
campaigns -> mktg_campaigns
INFO 0x81: Successfully Migrated the following Tables:
es_exprinfo, es_exprprofdeps -> mktg_expression
es_exprexprdeps -> mktg_expression_depends
ERROR 0x9C: An Unexpected Error occurred during migration. Exception Message: Data is Null. This method or property cannot be called on Null values..
INFO 0x79: Exception Details: System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at System.Data.SqlTypes.SqlInt32.get_Value()
at System.Data.SqlClient.SqlDataReader.GetInt32(Int32 i)
at Microsoft.CommerceServer.Marketing.DiscountMigrationTool.Migration.CreateDiscountData(SqlDataReader reader)
at Microsoft.CommerceServer.Marketing.DiscountMigrationTool.Migration.MigrateCampaignItems()
at Microsoft.CommerceServer.Marketing.DiscountMigrationTool.DiscountMigrate.Main(String[] args)
INFO 0x94: The Migration Tool exited with Errors. Number of Errors: 1
INFO 0x8D: Migration End Time : Wednesday, 23 June 2004 11:17:57 p.m.
The discounts were originally added using an sql script;
/*
Coupon Creation Script
NOTICE : This script can only be run once on a database before it will no longer work and start to cause problems.
*/
declare @custid int
declare @campid int
declare @creaid int
declare @caitid int
declare @discid int
-- setup coupons
-- Create a customer
exec sp_InsertCustomer NULL, N'AllCustomers', N' ', N' ', N' ', 2, N' ',N' ',N' ',N' ',N' ', @custid output
-- Creat the campaign
exec sp_InsertCampaign 'Aug 23 2003 12:00:00:000AM', 'Dec 23 3000 12:00:00:000AM', N'Coupons', 1, 0, 1, @custid, N' ', 1, N' ', @campid output
/*
for each one -
change name in InsertCampaignItem
change details in InsertDiscount2
*/
--TEMPLATE FOR PERCENTAGE
--exec sp_InsertCreative @custid, 10, 1, 'Aug 23 2003 12:00:00:000AM', @creaid output
--exec sp_InsertCampaignItem @creaid, '138C5919-797F-4538-8B87-5BD085EA61C1', N'ABC123', 1, 0, 'Aug 23 2003 12:00:00:000AM', 'Dec 23 3000 12:00:00:000AM', 1, 'Aug 23 2003 12:00:00:000AM', N' ', N' ', @caitid output
--First is the foreach, second the value
--exec sp_InsertDiscount2 @caitid, 1, 0, 10, 1, 0, 1, NULL, 2, $1.0000, 0, NULL, 0, 2, $25.0000, 1, N'orderleveldiscount', N'.', 0, 0, 0, 0, @discid output
--exec sp_InsertDiscountMisc @discid, 3, 0
--exec sp_InsertPageGroup @caitid, 1
--TEMPLATE FOR VALUE
--exec sp_InsertCreative @custid, 10, 1, 'Aug 23 2003 12:00:00:000AM', @creaid output
--exec sp_InsertCampaignItem @creaid, '138C5919-797F-4538-8B87-5BD085EA61C1', N'XYZ789', 1, 0, 'Aug 23 2003 12:00:00:000AM', 'Dec 23 3000 12:00:00:000AM', 1, 'Aug 23 2003 12:00:00:000AM', N' ', N' ', @caitid output
--exec sp_InsertDiscount2 @caitid, 1, 0, 10, 1, 0, 1, NULL, 2, $25.0000, NULL, NULL, 0, 1, $5.0000, 1, N'orderleveldiscount', N'.', 0, 0, 0, 0, @discid output
--exec sp_InsertDiscountMisc @discid, 0, 0
--exec sp_InsertPageGroup @caitid, 1
Any ideas where to go from here?
I had two myself;
1. Try to find and remove the sql nulls
2. As there are not that many discounts, delete the discounts using bizdesk and re-add them using the new DiscountManager application.
--Phil
| |
| Andy Xu[MSFT] 2004-06-26, 10:49 am |
| Phil,
Looks like you are using a wrong campaign guid type in your original sql script. If you take a look at Campaigns database, campaign_item_types table, you will find out the correct
guid type for discount is {1E8A0072-48DC-11D2-9C52-00C04FC29CC1}. So I would change your call to sp_InsertCampaignItem from
sp_InsertCampaignItem @creaid, '138C5919-797F-4538-8B87-5BD085EA61C1', N'ABC123', 1, 0, 'Aug 23 2003 12:00:00:000AM', 'Dec 23 3000 12:00:00:000AM', 1, 'Aug 23 2003
12:00:00:000AM', N' ', N' ', @caitid output
To
sp_InsertCampaignItem @creaid, N'{1E8A0072-48DC-11D2-9C52-00C04FC29CC1}', N'ABC123', 1, 0, 'Aug 23 2003 12:00:00:000AM', 'Dec 23 3000 12:00:00:000AM', 1, 'Aug 23 2003
12:00:00:000AM', N' ', N' ', @caitid output
FP1 discount migration tool only migrates the discount type defined by Microsoft.
HTH,
Andy Xu [MSFT]
Commerce Server Team
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
--------------------
Thread-Topic: Discount Migration has failed
thread-index: AcRZZXlaIL4AIr04TgSBe0bJ57clHw==
X-WBNR-Posting-Host: 203.97.2.243
From: =?Utf-8?B?UGhpbCBkZSBKb3V4?= <notmyemailaddress@discussions.microsoft.com>
Subject: Discount Migration has failed
Date: Wed, 23 Jun 2004 14:03:03 -0700
Lines: 90
Message-ID: <72037CC1-569E-4C70-A269-8796E88D89DC@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14067
X-Tomcat-NG: microsoft.public.commerceserver.general
Discount Migration has failed with the following log and nothing extra in the event log :-(
INFO 0x8C: Migration Start Time : Wednesday, 23 June 2004 11:17:54 p.m.
INFO 0x8E: Target Migration Site : BlankSite
INFO 0x8F: Migrate In Quiet Mode : False
INFO 0x90: Log File Path And Name : DiscountMigration.log
INFO 0x91: Accept Non-Fatal Errors : False
INFO 0x92: Add Campaign Constraints : True
INFO 0x80: Successfully Connected to the 'Campaigns' Resource.
INFO 0x80: Successfully Connected to the 'Biz Data Service' Resource.
INFO 0x80: Successfully Connected to the 'Marketing' Resource.
INFO 0x8A: Added 'CHECK' Constraint ('CHECK_customer_i_customer_id') to Table 'customer'.
INFO 0x8A: Added 'CHECK' Constraint ('CHECK_campaign_i_camp_id') to Table 'campaign'.
INFO 0x8A: Added 'CHECK' Constraint ('CHECK_campaign_item_i_campitem_id') to Table 'campaign_item'.
INFO 0x8A: Added 'CHECK' Constraint ('CHECK_order_discount_i_disc_id') to Table 'order_discount'.
INFO 0x85: Successfully Added Constraints to Legacy 'Campaigns' Tables.
INFO 0x82: Successfully created an instance of the Migration Object.
INFO 0xA7: The legacy 'Campaigns' resource version number is: '4.5'
INFO 0x7C: The Default Customer ID in the 'Marketing' resource is: '1000000000'
INFO 0x83: Successfully initialized the Migration Object.
INFO 0x81: Successfully Migrated the following Tables:
campaigns -> mktg_campaigns
INFO 0x81: Successfully Migrated the following Tables:
es_exprinfo, es_exprprofdeps -> mktg_expression
es_exprexprdeps -> mktg_expression_depends
ERROR 0x9C: An Unexpected Error occurred during migration. Exception Message: Data is Null. This method or property cannot be called on Null values..
INFO 0x79: Exception Details: System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at System.Data.SqlTypes.SqlInt32.get_Value()
at System.Data.SqlClient.SqlDataReader.GetInt32(Int32 i)
at Microsoft.CommerceServer.Marketing.DiscountMigrationTool.Migration.CreateDiscountData(SqlDataReader reader)
at Microsoft.CommerceServer.Marketing.DiscountMigrationTool.Migration.MigrateCampaignItems()
at Microsoft.CommerceServer.Marketing.DiscountMigrationTool.DiscountMigrate.Main(String[] args)
INFO 0x94: The Migration Tool exited with Errors. Number of Errors: 1
INFO 0x8D: Migration End Time : Wednesday, 23 June 2004 11:17:57 p.m.
The discounts were originally added using an sql script;
/*
Coupon Creation Script
NOTICE : This script can only be run once on a database before it will no longer work and start to cause problems.
*/
declare @custid int
declare @campid int
declare @creaid int
declare @caitid int
declare @discid int
-- setup coupons
-- Create a customer
exec sp_InsertCustomer NULL, N'AllCustomers', N' ', N' ', N' ', 2, N' ',N' ',N' ',N' ',N' ', @custid output
-- Creat the campaign
exec sp_InsertCampaign 'Aug 23 2003 12:00:00:000AM', 'Dec 23 3000 12:00:00:000AM', N'Coupons', 1, 0, 1, @custid, N' ', 1, N' ', @campid output
/*
for each one -
change name in InsertCampaignItem
change details in InsertDiscount2
*/
--TEMPLATE FOR PERCENTAGE
--exec sp_InsertCreative @custid, 10, 1, 'Aug 23 2003 12:00:00:000AM', @creaid output
--exec sp_InsertCampaignItem @creaid, '138C5919-797F-4538-8B87-5BD085EA61C1', N'ABC123', 1, 0, 'Aug 23 2003 12:00:00:000AM', 'Dec 23 3000 12:00:00:000AM', 1, 'Aug
23 2003 12:00:00:000AM', N' ', N' ', @caitid output
--First is the foreach, second the value
--exec sp_InsertDiscount2 @caitid, 1, 0, 10, 1, 0, 1, NULL, 2, $1.0000, 0, NULL, 0, 2, $25.0000, 1, N'orderleveldiscount', N'.', 0, 0, 0, 0, @discid output
--exec sp_InsertDiscountMisc @discid, 3, 0
--exec sp_InsertPageGroup @caitid, 1
--TEMPLATE FOR VALUE
--exec sp_InsertCreative @custid, 10, 1, 'Aug 23 2003 12:00:00:000AM', @creaid output
--exec sp_InsertCampaignItem @creaid, '138C5919-797F-4538-8B87-5BD085EA61C1', N'XYZ789', 1, 0, 'Aug 23 2003 12:00:00:000AM', 'Dec 23 3000 12:00:00:000AM', 1, 'Aug 23
2003 12:00:00:000AM', N' ', N' ', @caitid output
--exec sp_InsertDiscount2 @caitid, 1, 0, 10, 1, 0, 1, NULL, 2, $25.0000, NULL, NULL, 0, 1, $5.0000, 1, N'orderleveldiscount', N'.', 0, 0, 0, 0, @discid output
--exec sp_InsertDiscountMisc @discid, 0, 0
--exec sp_InsertPageGroup @caitid, 1
Any ideas where to go from here?
I had two myself;
1. Try to find and remove the sql nulls
2. As there are not that many discounts, delete the discounts using bizdesk and re-add them using the new DiscountManager application.
--Phil
|
|
|
|
|