Discount Migration has failed
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > Discount Migration has failed




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Discount Migration has failed  
Phil de Joux


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 03:49 PM

Discount Migration has failed with the following log and nothing extra in th
e 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 Tab
le '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') t
o Table 'campaign_item'.
INFO  0x8A: Added 'CHECK' Constraint ('CHECK_order_discount_i_disc_id') to T
able '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: '1000000
000'
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: D
ata 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.Create
DiscountData(SqlDataReader reader)
at Microsoft.CommerceServer.Marketing.DiscountMigrationTool.Migration.Migrat
eCampaignItems()
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 lo
nger 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:0
00AM', 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', @crea
id 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, N
ULL, 0, 2, $25.0000, 1, N'orderleveldiscount', N'.', 0, 0, 0, 0, @discid out
put
--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', @crea
id 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, NUL
L, 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






[ Post a follow-up to this message ]



    RE: Discount Migration has failed  
Andy Xu[MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 03:49 PM

Phil,

Looks like you are using a wrong campaign guid type in your original sql scr
ipt. If you take a look at Campaigns database, campaign_item_types table, yo
u 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'ABC
123', 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:000A
M', 1, 'Aug 23 2003
12:00:00:000AM', N' ', N' ', @caitid output


FP1 discount migration tool only migrates the discount type defined by Micro
soft.

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 mess
age 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: examnotes <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 th
e 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 Tab
le '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') t
o Table 'campaign_item'.
INFO  0x8A: Added 'CHECK' Constraint ('CHECK_order_discount_i_disc_id') to T
able '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: '1000000
000'
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: D
ata 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.Create
DiscountData(SqlDataReader reader)
at Microsoft.CommerceServer.Marketing.DiscountMigrationTool.Migration.Migrat
eCampaignItems()
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 lo
nger 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:0
00AM', 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', @crea
id 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, N
ULL, 0, 2, $25.0000, 1, N'orderleveldiscount', N'.', 0, 0, 0, 0, @discid out
put
--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', @crea
id 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, NUL
L, 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








[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:46 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register