Specified cast is not valid

Undo for SQL Server.

Moderator: eddie davis

Specified cast is not valid

Postby csco1550 » Thu Oct 20, 2005 11:52 pm

:shock:
When I test the log rescue, got this error message on one table / update
\"Specified cast is not valid\"

Please help.

Here is the table :

CREATE TABLE [WeeklySalesReport] (
[WeeklySalesReportGUID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_WeeklySalesReport_WeeklySalesReportGUID] DEFAULT (convert(uniqueidentifier,(convert(binary(10),newid()) + convert(binary(6),getdate())))),
[dtCreated] [datetime] NOT NULL CONSTRAINT [DF_WeeklySalesReport_dtCreated] DEFAULT (getdate()),
[dtLastEdit] [datetime] NOT NULL CONSTRAINT [DF_WeeklySalesReport_dtLastEdit] DEFAULT (getdate()),
[SalesRepID] [int] NOT NULL ,
[LocationID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[SubmittedByID] [int] NOT NULL ,
[WeekEndingGUID] [uniqueidentifier] NOT NULL ,
[DollarsSold] [money] NOT NULL CONSTRAINT [DF_WeeklySalesReport_DollarsSold] DEFAULT (0),
[AccountsSold] [money] NOT NULL CONSTRAINT [DF_WeeklySalesReport_AccountsSold] DEFAULT (0),
[OnSiteVisits] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_OnSiteVisits] DEFAULT (0),
[Appointments] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_Appointments] DEFAULT (0),
[CallBacks] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_CallBacks] DEFAULT (0),
[TrialsPlaced] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_TrialsPlaced] DEFAULT (0),
[NewPresentations] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_NewPresentations] DEFAULT (0),
[PhoneHours] [float] NOT NULL CONSTRAINT [DF_WeeklySalesReport_PhoneHours] DEFAULT (0),
[Dialings] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_Dialings] DEFAULT (0),
[DecisionMakerContacts] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_DecisionMakerContacts] DEFAULT (0),
[AppointmentsScheduled] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_AppointmentsScheduled] DEFAULT (0),
[TargetContacts] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_TargetContacts] DEFAULT (0),
[TargetAppointments] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_TargetAppointments] DEFAULT (0),
[UninstalledBusiness] [money] NOT NULL CONSTRAINT [DF_WeeklySalesReport_UninstalledBusiness] DEFAULT (0),
[ActualDollarsSold] [money] NOT NULL CONSTRAINT [DF_WeeklySalesReport_ActualDollarsSold] DEFAULT (0),
[DaysWorked] [int] NOT NULL CONSTRAINT [DF_WeeklySalesReport_DaysWorked] DEFAULT (5),
[NoActivity] [bit] NOT NULL CONSTRAINT [DF_WeeklySalesReport_NoActivity] DEFAULT (0),
[ISRReport] [bit] NOT NULL CONSTRAINT [DF_WeeklySalesReport_ISRReport] DEFAULT (0),
[wsr_dtWeekEnding] [datetime] NULL ,
[sum_UninstalledBusiness] [money] NOT NULL CONSTRAINT [DF_sum_UninstalledBusiness] DEFAULT (0),
[sum_amr_RouteRideDollarsSold_beforeStart] [money] NOT NULL CONSTRAINT [DF_sum_amr_RouteRideDollarsSold_beforeStart] DEFAULT (0),
[sum_amr_RouteRideDollarsSold_afterStart] [money] NOT NULL CONSTRAINT [DF_sum_amr_RouteRideDollarsSold_afterStart] DEFAULT (0),
[sum_amr_RouteRideAccountsSold_beforeStart] [money] NOT NULL CONSTRAINT [DF_amr_RouteRideAccountsSold_beforeStart] DEFAULT (0),
[sum_amr_RouteRideAccountsSold_afterStart] [money] NOT NULL CONSTRAINT [DF_sum_amr_RouteRideAccountsSold_afterStart] DEFAULT (0),
[sum_amr_InstalledBusiness_beforeStart] [money] NOT NULL CONSTRAINT [DF_sum_amr_InstalledBusiness_beforeStart] DEFAULT (0),
[sum_amr_InstalledBusiness_afterStart] [money] NOT NULL CONSTRAINT [DF_sum_amr_InstalledBusiness_afterStart] DEFAULT (0),
[sum_src_ActualDollarsSold_beforeStart] [money] NOT NULL CONSTRAINT [DF_sum_src_ActualDollarsSold_beforeStart] DEFAULT (0),
[sum_src_ActualDollarsSold_afterStart] [money] NOT NULL CONSTRAINT [DF_sum_src_ActualDollarsSold_afterStart] DEFAULT (0),
[sum_amr_Adjustments_beforeStart] [money] NOT NULL CONSTRAINT [DF_sum_amr_Adjustments_beforeStart] DEFAULT (0),
[sum_amr_Adjustments_afterStart] [money] NOT NULL CONSTRAINT [DF_sum_amr_Adjustments_afterStart] DEFAULT (0),
[sum_amr_MaySanis] [money] NOT NULL CONSTRAINT [DF_sum_amr_MaySanis] DEFAULT (0),
[sum_amr_MaySanisAdjustments] [money] NOT NULL CONSTRAINT [DF_sum_amr_MaySanisAdjustments] DEFAULT (0),
[flag_userSubmit] [bit] NOT NULL CONSTRAINT [DF_WeeklySalesReport_flag_userSubmit] DEFAULT (1),
CONSTRAINT [PK_WeeklySalesReport] PRIMARY KEY NONCLUSTERED
(
[WeeklySalesReportGUID]
) WITH FILLFACTOR = 90 ON [PRIMARY] ,
CONSTRAINT [FK_WeeklySalesReport_FiscalWeek] FOREIGN KEY
(
[WeekEndingGUID]
) REFERENCES [FiscalWeek] (
[FiscalWeekGUID]
),
CONSTRAINT [FK_WeeklySalesReport_users] FOREIGN KEY
(
[SalesRepID]
) REFERENCES [users] (
[userID]
),
CONSTRAINT [FK_WeeklySalesReport_users1] FOREIGN KEY
(
[SubmittedByID]
) REFERENCES [users] (
[userID]
)
) ON [PRIMARY]
GO
csco1550
 
Posts: 6
Joined: Thu Oct 20, 2005 11:30 pm

Postby Brian Donahue » Fri Oct 21, 2005 10:22 am

Sorry --

What is the query that Log Rescue is trying to run?
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby csco1550 » Fri Oct 21, 2005 6:55 pm

after log rescure finish processing backup files, it pop-ups the error dialog, it points the first row on the main screen , that's an update event.

When I click it, I got the same error pop-up.
There are many updates on this table, all result same error when you click them.

BTW, those updates are generated by a nightly scheduled job.

I also noticed some of them are identified as user : DBO, some are identified as user: Unrecorded(-1).

I am pretty sure they are all updated by the job at 11:20PM.

Is there any way I can send you a screen shot?

Thanks.
csco1550
 
Posts: 6
Joined: Thu Oct 20, 2005 11:30 pm

I am so disappointed

Postby csco1550 » Mon Oct 31, 2005 8:41 pm

:( I am so disappointed that no one answer my questions, the trial version is expiring, Does anyonehere know similar product which I can try? I heard logviewer or something...
csco1550
 
Posts: 6
Joined: Thu Oct 20, 2005 11:30 pm

Postby Brian Donahue » Tue Nov 01, 2005 3:19 pm

Can you please send the screenshot to support@red-gate.com?

Thanks.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Log Rescue

Who is online

Users browsing this forum: No registered users and 0 guests