Wednesday, March 28, 2012

Problem in DB

Trying to run the following query
SELECT COUNT(*) AS Expr1
FROM TableA INNER JOIN
TableB ON TableA.Id = TableB.Id
WHERE (TableB.EmployeeId = 15)
I get the error
"Attempt to fetch logical page 1:0 in database XXXXXXX belongs to object
'ALLOCATION', not to object 'TableA'
Also when I run the query
SELECT COUNT(*) AS Expr1
FROM TableA INNER JOIN
TableB ON TableA.Id = TableB.Id
I get the error
"Could not open FCB for invalid file ID 0 in database XXXXXXX"
It seems that there is something wrong with the specific DB
Any suggestions ?
Thanks
Yannis
Yannis
Run DBCC CHECKDB to fix some errors in the database
"Yannis Makarounis" <Yannis.Makarounis@.ace-hellas.gr> wrote in message
news:OlBD9QMZEHA.1480@.TK2MSFTNGP10.phx.gbl...
> Trying to run the following query
> SELECT COUNT(*) AS Expr1
> FROM TableA INNER JOIN
> TableB ON TableA.Id = TableB.Id
> WHERE (TableB.EmployeeId = 15)
> I get the error
> "Attempt to fetch logical page 1:0 in database XXXXXXX belongs to object
> 'ALLOCATION', not to object 'TableA'
> Also when I run the query
> SELECT COUNT(*) AS Expr1
> FROM TableA INNER JOIN
> TableB ON TableA.Id = TableB.Id
> I get the error
> "Could not open FCB for invalid file ID 0 in database XXXXXXX"
> It seems that there is something wrong with the specific DB
> Any suggestions ?
> Thanks
> Yannis
>

No comments:

Post a Comment