Author |
Topic  |
|
Vincent
USA
20 Posts |
Posted - 09/21/2006 : 07:50:09
|
Hi, When trying to run any of the report usage report, I am getting the below error.
Invalid object name 'UsageLog'.; SQL: SELECT ISNULL(u.FirstName + ' ' + u.LastName, 'Removed User' + CONVERT(varchar, l.ReportId)) AS UserName, COUNT(*) AS RecordCount FROM UsageLog l LEFT OUTER JOIN AppUser u ON l.UserId = u.UserId GROUP BY ISNULL(u.FirstName + ' ' + u.LastName, 'Removed User' + CONVERT(varchar, l.ReportId)) ORDER BY COUNT(*) DESC SQL: SELECT ISNULL(u.FirstName + ' ' + u.LastName, 'Removed User' + CONVERT(varchar, l.ReportId)) AS UserName, COUNT(*) AS RecordCount FROM UsageLog l LEFT OUTER JOIN AppUser u ON l.UserId = u.UserId GROUP BY ISNULL(u.FirstName + ' ' + u.LastName, 'Removed User' + CONVERT(varchar, l.ReportId)) ORDER BY COUNT(*) DESC
|
|
admin
1645 Posts |
Posted - 09/21/2006 : 22:30:46
|
“UsageLog” table is created during the installation process (tables.sql). Is it possible that someone might have dropped this table from your database? You can recreate it by running this statement in query analyzer.
CREATE TABLE [dbo].[UsageLog] ( [UsageLogId] [int] IDENTITY (1, 1) NOT NULL , [ReportId] [int] NOT NULL , [UserId] [int] NOT NULL , [ActionId] [tinyint] NOT NULL , [LogDate] [datetime] NOT NULL ) ON [PRIMARY] go
CREATE TABLE [dbo].[UsageLogAction] ( [ActionId] [tinyint] NOT NULL , [ActionName] [varchar] (50) NULL ) ON [PRIMARY]
go
INSERT INTO UsageLogAction VALUES (1, 'Create') INSERT INTO UsageLogAction VALUES (2, 'Edit') INSERT INTO UsageLogAction VALUES (3, 'Read') INSERT INTO UsageLogAction VALUES (4, 'Snap') INSERT INTO UsageLogAction VALUES (5, 'Delete') INSERT INTO UsageLogAction VALUES (6, 'Security') INSERT INTO UsageLogAction VALUES (7, 'Approve') |
 |
|
|
Topic  |
|
|
|