Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-08-14 : 08:13:19
|
| Muhammad writes "If have a problem with sp excution time it takes min. 5 hours and max. 15 hours to execute on 400,000 records to be compared with 100,000 records.Problems are:1. I have to use cursor2. When I ran DBCC CHECKDB it returnedServer: Msg 8905, Level 16, State 1, Line 1Extent (1:78232) in database ID 19 is marked allocated in the GAM, but no SGAM or IAM has allocated it.Server: Msg 8906, Level 16, State 1, Line 1Page (1:1098) in database ID 19 is allocated in the SGAM (1:3) and PFS (1:1), but was not allocated in any IAM. PFS flags 'MIXED_EXT ALLOCATED 0_PCT_FULL'.Please someone advise how should I repair DB. I have triedDBCC NEWALLOC with repair_build but I did not repaired the DB. These messages use to come whenever I run DBCC CheckDBRegards" |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-14 : 11:17:23
|
quote: Originally posted by AskSQLTeam Problems are:1. I have to use cursor
Um, no you don't. Post your code and someone here will be able to rewrite it for you. quote: Originally posted by AskSQLTeam 2. When I ran DBCC CHECKDB it returnedServer: Msg 8905, Level 16, State 1, Line 1Extent (1:78232) in database ID 19 is marked allocated in the GAM, but no SGAM or IAM has allocated it.Server: Msg 8906, Level 16, State 1, Line 1Page (1:1098) in database ID 19 is allocated in the SGAM (1:3) and PFS (1:1), but was not allocated in any IAM. PFS flags 'MIXED_EXT ALLOCATED 0_PCT_FULL'.Please someone advise how should I repair DB. I have triedDBCC NEWALLOC with repair_build but I did not repaired the DB. These messages use to come whenever I run DBCC CheckDB
You could try the different repair options available with DBCC CHECKDB, but I think that your database is beyond repair. You are most likely going to need to restore the database from your last full backup.Tara |
 |
|
|
|
|
|
|
|