Quantcast
Channel: SQLServerCentral » SQL Server 2008 » Data Corruption (SS2K8 / SS2K8 R2) » Latest topics
Viewing all 223 articles
Browse latest View live

checkdb on Prod

0
0
Hi all, I just want a confirmation, i was told that running checkdb on a db that has not had checkdb run in sometime, can cause problems if corruption is found. Is this true?Some of our DB's, integrity checks are not done on a regular basis and i want to perform integrity checks on a daily basis.

String or binary data would be truncated. Error when inserting empty table results into TEMP table

0
0
Has someone ran into something strange like this where no data is being inserted but this error happens.Msg 8152, Level 16, State 14, Line 1String or binary data would be truncated.In our production environment there is a Temp table created where "id" column is defined as varchar(15)along with other columns defined. There is a large query 5 table join ...that "inserts" into the temp table.There is a table part of the large query that has a column called table1.ID to simplify. Looking at the defined column. "table1.id" is defined as char(25)** I didn't write the code, it's odd even how it was implemented. Anyhow recently developers mentioned an ssis job had been failiing..(only recently past 4 days... we checked the data and we've had records in the system last month with character size more than 15 so maybe not a data issue... could it be data corruption or maybe I'm just missing something) he found the fix, but it requires changing it to "varchar(25)" in the TEMP Table.. but I'm still stumped at the reason why it fails. Wanted to ask if someone could help explain. The actual query is joining about 5 tables.Psuedo code:insert into #TEMPTTABLEselect columns join table1 join table2 join table3 join table4 join table5Where Some Criteria= SUCCESS (500,000 records inserted)insert into #TEMPTTABLEselect columns join table1 join table2 join table3 join table4 join table5Where Some Criteria AND len(ID) > 15 -- insert records > 15 characters in length= FAILED ERROR "String or binary data would be truncated."Let's find the suspect records select columns join table1 join table2 join table3 join table4 join table5Where Some Criteria AND len(ID) > 15 -- insert records > 15 characters in length= RESULTS RETURNED ZERO ROWS... I thought that was oddSo in summary:An insert into yielded with the multi-table join = works, inserts recordsAn insert into yielded with the multi-table join adding criteria records > 15 char = Fails error msg.A "select" to research suspect records with id's > 15 ... using the mult-table join (omitting the Insert #TEMPTABLE) but adding criteria records > 15 = Returns NO records... but fails to insert (0 records - since the select yields zero records) when combined with #TEMPTABLE insert.... but displays error msg:Any thoughts?

What 3rd Party Recovery Tool to Use When DBCC Fails ? Real World Experience

0
0
Hi Everyone,I'm looking to buy one or more recovery tool software, but it's very difficulty to find real world experiences on the internet.Most of the 'tips' are from the manufacturers, advertising on forums as fake users/specialists.The rest are just resulted from some googling and grabbing the first results links.Thats's not what I'm looking for.I want you (fellows, experts, MVPs, MCM), to share your personal real world experiencies with low level 3rd party recovery software, to be used on those situatons where everything else was tried and failed (including emergency mode, DBCC CHECKDB/CHECKTABLE REPAIR_ALLOW_DATA_LOSS, and so on).DBCC is a very limited tool and when we didn't have any alternative options left, something recovered / partial recovery may be better than nothing.There are many situations where one of the last rows of a critical system table (like sysrscols) gets corrupted in a large database.So most of your database could be saved.Other times, the size of the database files, for some odd reason are different on the metadata and on the disk, so SQL Server continues to read the file after the end of the file and aborts the connection.This is something that could be fixed (the metadata information) and a good tool, should report any orphan allocation on metadata, beyond that point, giving us the option to accept that kind os data loss and fix it !More than that, its very likely that the information on the page header of the actual data page is intact, so an incorret metadata about allocation could be corrected, even in that chaotic situation.But I didn't found a tool with this kind of simple logic, but precise/detailed error reporting.Most of them just prints how many rows were successfully read from each table with no reports, on what was wrong, what was fixed, what was lost, and so on (like DBCC actually does on many situations).This kind of report can make us confident and able to agree an acceptable level of loss with the user or the client.Bad experiences with some marketed tools are very useful too.If we don't know what to buy, information on what TO DO NOT Buy is better than nothing.Links to articles about unsupported system tables fixing/editing, using Dedicated Administration Connection, allowing updates on system tables,... and so on, are also very welcome.Please no discussion or warnings. I'm aware about the risks, but as I told you before, I'm looking for solutions to exceptional situations where everything else was tried.I'm sure it will help many of us.No advertising, please !

Blockages In New Production Server

0
0
After upgrading we are getting blockages issues daily in New Production Server that upgraded to SQL Server 2008 Enterprise R2 RTM from SQL 2005 Enterprise SP3. before upgrading we did not get blockages issues.is this issue because SP not installed in New Prod Server (SQL Server 2008 R2 RTM).if it is required shall we go with SP2 ? which one is better SP1 or SP2 ?

Difference Between Corruption and Inconsistancy

0
0
Hello All,I'm just wondering about the semantics here, so that I get this clear in my mind.What is the difference (if any) between a corrupt database and a database that is inconsistent.Are people using these words interchangeably or should we be more careful how we use them?Many thanks,Dave.

Backup detected log corruption in database

0
0
Last week we had some databases with a corrupt transaction log files. This happenend while our SAN operators were moving de databases to a new SAN (which didn't go well this time, although we took SQL Server offline first).I have resolved the problems with the help of the article below (thanks Gail):[url]http://www.sqlservercentral.com/Forums/Topic733084-266-1.aspx[/url]I detected the corrupt logfiles, because the log backups where failing with the error "Backup detected log corruption in database". DBCC CHECKDB didn't warn me.How can I check if my transaction logs are OK, because for databases that are using the Simple recovery model, you don't run a log backup.This week I failed the instance to another node and I discovered that the log of the master database was corrupt. So I had to rebuild and restore the master to get my SQL server up and running again. Master is using the simple recovery model, so how could I have known it's log was corrupted?Regards,Marco

legally installing sql express to my clients computers

0
0
I have a software company. I have made a desktop software in visual studio that uses SQL SERVER DATABASE at back-end.I want to sell my software. So i have to install sql server on my customers computer. Can i install SQL_SERVER_EXPRESS that can be directly downloaded from microsoft site ( i mean will that be legal? or will i be sued ?) Please give me appropriate suggestions. If it is illegal i will buy one. REgards

Dbcc checkdb says 0 errors but SQL error 823 produced

0
0
The db is working as normal, but in the SQL logs I see these 3 messagesThe operating system returned error incorrect checksum (expected: 0x1b0a0fbe; actual: 0x1b0a0fbe) to SQL Server during a read at offset 0x00000ae7e9c000 in file 'D:\Data\MyData.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.Error: 823, Severity: 24, State: 7.Operating system error 'incorrect checksum (expected: 0x1b0a0fbe; actual: 0x1b0a0fbe)' resulted from attempt to read the following: sort run page (3:5717838), in file 'D:\Data\MuData_data.mdf', in database with ID 23. Sort is retrying the read.I've run dbcc checkdb(MyData) but that said 0 errors found 0 errors repaired.This is a sql 2005 instance and the DB page verify is set to checksumAny ideas from a SQL viewpoint? whilst I also ask the infrastructure team to check the D: drive

sp_helpdb and sys.databases inconsistent for user_access

0
0
The Master database on one of our servers is showing in SSMS as Single-user mode. I have tried to change it back to multi-user, but am getting error "Option 'MULTI_USER' cannot be set in database 'master'". Weirdly, I am able to connect to the database and make changes to it.Sys.databases is reporting user_access as 'SINGLE_USER'However, sp_helpdb 'master' reports "user_access=MULTI_USER"DBCC CHECKDB returns nothing of interestThe error logs all look fine, too.I understand that another instance of SQL Server was installed on the same server recently, though that is used by another department, and I don't have access to that instance. Could this have caused this confusion?Our infrastructure providers are saying that this inconsistency is only a GUI issue, so we shouldn't be concerned. However, I am concerned that this could be indicative of a wider problem with the database and that they are trying to sweep it under the carpet.Can anyone shed any light on these inconsistencies?Thanks

page corruption found when enabling TDE, but DBCC CHECKDB ahows no errors

0
0
I need help with fixing corrupted page.I've got into this trouble yesterday , when it was required to enable TDE on one of the DB copies. The TDE encryption hanged with encryption_state=2 and percent_complete=0. Records were added into suspect_pages and backup with CHECKSUM failed with error.That's where I get so far and where I ran out of ideas how to recover the corrupted page: 1.Query "select * from msdb.dbo.suspect_pages" returns:[size="1"]database_id file_id page_id event_type error_count last_update_date5 1 19193 1 1 2014-02-17 23:19:47.9975 1 19193 3 1 2014-02-17 23:19:48.010[/size]2.dbcc traceon(3604) go dbcc page([MyDB],1,19193,3)go returns:[size="1"]DBCC execution completed. If DBCC printed error messages, contact your system administrator.PAGE: (121:7471201)BUFFER:BUF @0x00000000A1FEB300bpage = 0x00000000A1C88000 bhash = 0x0000000000000000 bpageno = (1:19193)bdbid = 11 breferences = 3 bcputicks = 0bsampleCount = 0 bUse1 = 3840 bstat = 0xc00809blog = 0x21432159 bnext = 0x0000000000000000 PAGE HEADER:Page @0x00000000A1C88000m_pageId = (121:7471201) m_headerVersion = 101 m_type = 0m_typeFlagBits = 0x2e m_level = 0 m_flagBits = 0x53m_objId (AllocUnitId.idObj) = 6881396 m_indexId (AllocUnitId.idInd) = 101Metadata: AllocUnitId = 28429423626944512 Metadata: PartitionId = 0Metadata: IndexId = -1 Metadata: ObjectId = 0 m_prevPage = (105:7536755)m_nextPage = (105:4456558) pminlen = 111 m_slotCnt = 99m_freeCnt = 111 m_freeData = 110 m_reservedCnt = 46m_lsn = (7536713:7143497:109) m_xactReserved = 117 m_xdesId = (98:6357108)m_ghostRecCnt = 108 m_tornBits = 3932261 Allocation StatusGAM (1:2) = ALLOCATED SGAM (1:3) = NOT ALLOCATED PFS (1:16176) = 0x40 ALLOCATED 0_PCT_FULL DIFF (1:6) = NOT CHANGEDML (1:7) = NOT MIN_LOGGED Msg 2514, Level 16, State 5, Line 3A DBCC PAGE error has occurred: Invalid page type - dump style 3 not possible.[/size]3. DBCC CHECKDB returns no errors.4. DB is verion is SQL2008R2.5. Db option "Page Verify" set to "TORN_PAGE_DETECTION".6. Database recovery is Simple. And I found that this page was corrupted since the beginning of the time. So I don't have a healthy copy or good backup for this DB.The database size is just about 8GB. Most likely it will not be a problem to dump database , recreate it and reload the whole db.Unfortunately I have about 15 instances of this database with all sorts of derived processes like replication,.. configured.It will take me forever to reload and setup all these instances. So best solution for me is to find out how to recover this page.My question is: Do I have a single chance to fix this page? Or maybe it is relatively safe to drop or even manually overwrite the page.Thanks,

Old records in suspect_pages

0
0
Hi All,I have some rows in suspect_pages where the last_update_date is in 2011, these are all before I was working as the DBA at my company. The vast majority of these are showing in tempdb; as the server has been restarted several times since then, I'm assuming I don't really need to worry about these as tempdb is recreated on restart? Can I simply delete these rows from the table?In addition, there are two user databases that have five rows each, both with page_id 1-3 and 6-7 listed.I run CHECKDB weekly against every database, and this is not showing any errors for these databases. Do I need to worry?At this point, I don't know whether to spend any more time investigating this or whether there's work that needs to be carried out to fix this? My biggest concern is that it's unlikely that a backup going back to 2011 is still available.Please let me know if more info is required and I'll happily post it.Regards,Matthew

sql server 2008r2

0
0
hi,SSMS - SQL Server Management Studio has encountered a problem and needs to close. We are sorry for the inconvenienceRegards,Prabu

Corrupted Database

0
0
I need help on fixing checkdb error.Here's the output of checkdb:Server: Msg 8909, Level 16, State 1, Line 1Table error: Object ID -1627389056, index ID 0, page ID (1:611861). The PageId in the page header = (14131:894586624).Server: Msg 8909, Level 16, State 1, Line 1Table error: Object ID 0, index ID 0, page ID (1:611862). The PageId in the page header = (0:0).Server: Msg 8909, Level 16, State 1, Line 1Table error: Object ID 0, index ID 0, page ID (1:611863). The PageId in the page header = (0:0).Server: Msg 8928, Level 16, State 1, Line 1Object ID 226099846, index ID 0: Page (1:611860) could not be processed. See other errors for details.Server: Msg 8939, Level 16, State 1, Line 1Table error: Object ID 226099846, index ID 0, page (1:611860). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.Server: Msg 8928, Level 16, State 1, Line 1Object ID 226099846, index ID 0: Page (1:611861) could not be processed. See other errors for details.Server: Msg 8928, Level 16, State 1, Line 1Object ID 226099846, index ID 0: Page (1:611862) could not be processed. See other errors for details.Server: Msg 8928, Level 16, State 1, Line 1Object ID 226099846, index ID 0: Page (1:611863) could not be processed. See other errors for details.CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object ID -1627389056)' (object ID -1627389056).CHECKDB found 0 allocation errors and 2 consistency errors not associated with any single object.CHECKDB found 0 allocation errors and 5 consistency errors in table 'REQ_ITEM' (object ID 226099846).CHECKDB found 0 allocation errors and 8 consistency errors in database 'PMM'.repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (PMM ).It's running on SQL 2000 SP3.Can I repair these errors with 'REPAIR_REBUILD'?Thanks in advance,David. Post #1392105 GilaMonster Posted Monday, December 03, 2012 12:51 PM SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever Group: General Forum Members Last Login: Today @ 12:05 AM Points: 40,830, Visits: 33,767 David Kang (12/3/2012)--------------------------------------------------------------------------------repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (PMM ).Since repair allow data loss is the minimum repair level necessary, running checkDB with any lesser repair level will be a waste of time. Minimum repair level is exactly that.You will lose data. Four pages of data from the table REQ_ITEM.I assume there's no good backup available... --------------------------------------------------------------------------------Gail ShawMicrosoft Certified Master: SQL Server 2008, MVPSQL In The Wild: Discussions on DB performance with occasional diversions into recoverabilityWe walk in the dark places no others will enterWe stand on the bridge and no one may pass Post #1392119 David Kang Posted Monday, December 03, 2012 1:10 PM SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie Group: General Forum Members Last Login: 2 days ago @ 1:59 PM Points: 30, Visits: 134 Gail! Thanks for quick response.So, can I run page level restore for this? or restore the whole DB to temp location then extract the 'REQ_ITEM' table?Thanks again,David. Post #1392123 GilaMonster Posted Monday, December 03, 2012 3:33 PM SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever Group: General Forum Members Last Login: Today @ 12:05 AM Points: 40,830, Visits: 33,767 If you have a clean backup (one without any corruption) and an unbroken chain of log backups up to present, you can do a page restore. Or you can restore the full backup over the DB followed by all log backups to bring the DB back to current time with no corruption (take a tail-log backup first).If the DB is not in full recovery or you don't have the necessary log backups, then you're looking at either losing data by restoring to the last good backup or by repairing. You can, in that case, try to repair then restore a copy of the DB elsewhere and sync in the missing data. --------------------------------------------------------------------------------Gail ShawMicrosoft Certified Master: SQL Server 2008, MVPSQL In The Wild: Discussions on DB performance with occasional diversions into recoverabilityWe walk in the dark places no others will enterWe stand on the bridge and no one may pass Post #1392167 jonmichel72 Posted Wednesday, December 05, 2012 12:15 AM Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie Group: General Forum Members Last Login: Thursday, February 07, 2013 5:14 AM Points: 4, Visits: 2 Now a Days, when you search on the Google, many companies providing a data recovery services as well as recovery software. In such types of software one is recoveryfix for sql repair software, this company offering a free trial version software, with the help of this trial version you can see the preview of recoverable data.Thanks Post #1392810 opc.three Posted Wednesday, December 05, 2012 11:13 PM SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable Group: General Forum Members Last Login: Yesterday @ 8:56 PM Points: 7,069, Visits: 12,512 Since you're on SQL 2000 you do not have the option of doing page restores. As Gail outlined, you can restore from backup that do not include the corruption (including tail-log) to bring the database to current or look into bringing up a parallel copy of the database that does not include the corruption to recover the data manually, or do the repair allowing for data loss. __________________________________________________________________________________________________There are no special teachers of virtue, because virtue is taught by the whole community. --PlatoBelieve you can and you're halfway there. --Theodore RooseveltEverything Should Be Made as Simple as Possible, But Not Simpler --Albert EinsteinThe significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy Post #1393328 David Kang Posted Monday, December 10, 2012 1:15 PM SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie Group: General Forum Members Last Login: 2 days ago @ 1:59 PM Points: 30, Visits: 134 Thanks both.After I ran the checkDB with allow data loss, there were 100 rows are missing on REQ_ITEM table.Since it was only affected single table, I was restore from last good backup and re-inserted missing data back to REQ_ITEM table.Thanks again,David. Post #1394766 bubby Posted Yesterday @ 4:27 PM SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran Group: General Forum Members Last Login: Yesterday @ 4:25 PM Points: 210, Visits: 288 Hello Help will be appreciated,When I try to run repair_allow_data_loss in the particular database it says no stored procedure,This is the result,There are 41752 rows in 1155 pages for object "cfgWFLogs".CHECKDB found 0 allocation errors and 69 consistency errors in table 'cfgWFLogs' (object ID 1810105489).DBCC results for 'cfgInvLoadConflictPolicies'.There are 12 rows in 1 pages for object "cfgInvLoadConflictPolicies".DBCC results for 'cfgLCObjectHistory'.There are 845 rows in 11 pages for object "cfgLCObjectHistory".DBCC results for 'Ticket_Closure_Code'.There are 39 rows in 1 pages for object "Ticket_Closure_Code".DBCC results for 'System_Images'.There are 1 rows in 1 pages for object "System_Images".DBCC results for 'cfgInvLoadConflicts'.There are 61 rows in 2 pages for object "cfgInvLoadConflicts".DBCC results for 'Status'.There are 163 rows in 3 pages for object "Status".DBCC results for 'cfgSecurityRoleViews'.There are 363 rows in 3 pages for object "cfgSecurityRoleViews".DBCC results for 'Ticket_Medium'.There are 5 rows in 1 pages for object "Ticket_Medium".DBCC results for 'cfgLCEmails'.There are 79 rows in 3 pages for object "cfgLCEmails".DBCC results for 'cfgInvLoadConflictMembers'.There are 61 rows in 1 pages for object "cfgInvLoadConflictMembers".DBCC results for 'sys.ifts_comp_fragment_1675153013_779'.There are 731 rows in 4 pages for object "sys.ifts_comp_fragment_1675153013_779".DBCC results for 'Ticket_Priority'.There are 16 rows in 1 pages for object "Ticket_Priority".DBCC results for 'Brands'.There are 668 rows in 8 pages for object "Brands".DBCC results for 'sys.queue_messages_1977058079'.There are 0 rows in 0 pages for object "sys.queue_messages_1977058079".DBCC results for 'cfgSPID'.There are 0 rows in 1 pages for object "cfgSPID".DBCC results for 'cfgCustDepends'.There are 85 rows in 1 pages for object "cfgCustDepends".DBCC results for 'sys.queue_messages_2009058193'.There are 0 rows in 0 pages for object "sys.queue_messages_2009058193".DBCC results for 'SLA'.There are 4 rows in 1 pages for object "SLA".DBCC results for 'sys.queue_messages_2041058307'.There are 0 rows in 0 pages for object "sys.queue_messages_2041058307".DBCC results for 'Person_Logins'.There are 914 rows in 8 pages for object "Person_Logins".DBCC results for 'sys.filestream_tombstone_2073058421'.There are 0 rows in 0 pages for object "sys.filestream_tombstone_2073058421".DBCC results for 'PO'.There are 67 rows in 8 pages for object "PO".DBCC results for 'HTML_Preview'.There are 23 rows in 1 pages for object "HTML_Preview".DBCC results for 'sys.syscommittab'.There are 0 rows in 0 pages for object "sys.syscommittab".DBCC results for 'Work_Calendar_Items'.There are 7 rows in 1 pages for object "Work_Calendar_Items".DBCC results for 'Solution_Ratings'.There are 116 rows in 2 pages for object "Solution_Ratings".DBCC results for 'sys.ifts_comp_fragment_510624862_769'.There are 683 rows in 4 pages for object "sys.ifts_comp_fragment_510624862_769".DBCC results for 'Email_Types'.There are 2 rows in 1 pages for object "Email_Types".DBCC results for 'sys.ifts_comp_fragment_510624862_770'.There are 19 rows in 1 pages for object "sys.ifts_comp_fragment_510624862_770".DBCC results for 'cfgMCJobOptions'.There are 9 rows in 1 pages for object "cfgMCJobOptions".DBCC results for 'Work_Calendars'.There are 3 rows in 1 pages for object "Work_Calendars".CHECKDB found 0 allocation errors and 1464 consistency errors in database 'AlloyNav'.repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (AlloyNav).DBCC execution completed. If DBCC printed error messages, contact your system administrator.

SQL2008R2 DBCC Checkdb ... contains an incorrect page ID in its page header. The PageId in the page header = (0:0)

0
0
Hi,After a SAN mishap last Friday, and of course this happens when one is out of the office, the post restore checkdb for one of my non-system databases resulted in a error message:[code="sql"]DBCC CHECKDB (mydb) WITH ALL_ERRORMSGS, EXTENDED_LOGICAL_CHECKS, NO_INFOMSGS [/code][quote]Table error:[b] Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:105144) contains an incorrect page ID in its page header.[/b] The PageId in the page header = (0:0). [SQLSTATE 42000] (Error 8909) Page errors on the GAM, SGAM, or PFS pages prevent allocation integrity checks in database ID 15 pages from (1:105144) to (1:113231). See other errors for cause. [SQLSTATE 42000] (Error 8998) DBCC results for 'mydb'. [SQLSTATE 01000] (Error 2536) CHECKDB found 2 allocation errors and 0 consistency errors not associated with any single object. [SQLSTATE 01000] (Error 8954) CHECKDB found 2 allocation errors and 0 consistency errors in database 'mydb'. [SQLSTATE 01000] (Error 8989) DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Error 2528). The step failed.[/quote][code="sql"]DBCC TRACEON (3604);GODBCC PAGE (mydb, 1, 105144, [b]3[/b]);GODBCC TRACEOFF (3604);go[/code][b]Result[/b][quote]DBCC execution completed. If DBCC printed error messages, contact your system administrator.Msg 8909, Level 16, State 1, Line 2Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:105144) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).PAGE: (0:0)BUFFER:BUF @0x0000000085FF61C0bpage = 0x0000000085E5A000 bhash = 0x0000000000000000 bpageno = (1:105144)bdbid = 15 breferences = 0 bcputicks = 0bsampleCount = 0 bUse1 = 55833 bstat = 0xc00809blog = 0x99999999 bnext = 0x0000000000000000 PAGE HEADER:Page @0x0000000085E5A000m_pageId = (0:0) m_headerVersion = 0 m_type = 0m_typeFlagBits = 0x0 m_level = 0 m_flagBits = 0x0m_objId (AllocUnitId.idObj) = 0 m_indexId (AllocUnitId.idInd) = 0 Metadata: AllocUnitId = 0Metadata: PartitionId = 0 Metadata: IndexId = -1 Metadata: ObjectId = 0m_prevPage = (0:0) m_nextPage = (0:0) pminlen = 0m_slotCnt = 0 m_freeCnt = 0 m_freeData = 0m_reservedCnt = 0 m_lsn = (0:0:0) m_xactReserved = 0m_xdesId = (0:0) m_ghostRecCnt = 0 m_tornBits = 0Allocation StatusGAM (1:2) = NOT ALLOCATED SGAM (1:3) = NOT ALLOCATED PFS (1:105144) = 0x0 0_PCT_FULLDIFF (1:6) = NOT CHANGED ML (1:7) = NOT MIN_LOGGED Msg 2514, Level 16, State 5, Line 2A DBCC PAGE error has occurred: Invalid page type - dump style 3 not possible.DBCC execution completed. If DBCC printed error messages, contact your system administrator.(208 row(s) affected)[/quote][code="sql"]DBCC TRACEON (3604);GODBCC PAGE (mydb, 1, 105144, 2);GODBCC TRACEOFF (3604);[/code]Result[quote]DBCC execution completed. If DBCC printed error messages, contact your system administrator.Msg 8909, Level 16, State 1, Line 1Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:105144) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).PAGE: (0:0)BUFFER:BUF @0x0000000085FF61C0bpage = 0x0000000085E5A000 bhash = 0x0000000000000000 bpageno = (1:105144)bdbid = 15 breferences = 0 bcputicks = 0bsampleCount = 0 bUse1 = 56390 bstat = 0xc00809blog = 0x99999999 bnext = 0x0000000000000000 PAGE HEADER:Page @0x0000000085E5A000m_pageId = (0:0) m_headerVersion = 0 m_type = 0m_typeFlagBits = 0x0 m_level = 0 m_flagBits = 0x0m_objId (AllocUnitId.idObj) = 0 m_indexId (AllocUnitId.idInd) = 0 Metadata: AllocUnitId = 0Metadata: PartitionId = 0 Metadata: IndexId = -1 Metadata: ObjectId = 0m_prevPage = (0:0) m_nextPage = (0:0) pminlen = 0m_slotCnt = 0 m_freeCnt = 0 m_freeData = 0m_reservedCnt = 0 m_lsn = (0:0:0) m_xactReserved = 0m_xdesId = (0:0) m_ghostRecCnt = 0 m_tornBits = 0Allocation StatusGAM (1:2) = NOT ALLOCATED SGAM (1:3) = NOT ALLOCATED PFS (1:105144) = 0x0 0_PCT_FULLDIFF (1:6) = NOT CHANGED ML (1:7) = NOT MIN_LOGGED DATA:Memory Dump @0x000000003210A000000000003210A000: 00000000 00000000 00000000 00000000 †................ 000000003210A010: 00000000 00000000 00000000 00000000 †................ ....000000003210BFE0: 00000000 00000000 00000000 00000000 †................ 000000003210BFF0: 00000000 00000000 00000000 00000000 †................ DBCC execution completed. If DBCC printed error messages, contact your system administrator.DBCC execution completed. If DBCC printed error messages, contact your system administrator.[/quote]Question:[b]Can this be repaired using the REPAIR_REBUILD ? ( or should I re-restore this database from an older backup ? ) [/b]

SQL Server detected a logical consistency-based I/O error

0
0
[b]First, when I run this sql : select * from mydatabase.dbo.mytable, I got this [u][/u][/b]Msg 824SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:2412; actual 0:0). It occurred during a read of page (1:2412) in database ID 5 at offset 0x000000012d8000 in file 'mydatabase.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.[b]Second, when I run DBCC CHECKDB ('mydatabase') WITH NO_INFOMSGS, ALL_ERRORMSGS, I got same message[u][/u][/b]Msg 824SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:2412; actual 0:0). It occurred during a read of page (1:2412) in database ID 13 at offset 0x000000012d8000 in file 'mydatabase.mdf:MSSQL_DBCC13'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.[b]Third, I right click on database, Properties, and [u][/u][/b]TITLE: Microsoft SQL Server Management Studio------------------------------Cannot show requested dialog.------------------------------ADDITIONAL INFORMATION:Cannot show requested dialog. (SqlMgmt)------------------------------Property Size is not available for Database 'mydatabase'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1540+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.PropertyCannotBeRetrievedExceptionText&EvtID=Size&LinkId=20476------------------------------BUTTONS:OK------------------------------[b]Can you suggest me to resolve this please…. I am using sql server 2008 r2Can you please let me know if you need any other details….Thank you in Advance…..[/b]

How to fast reinstatement new data and objects on a copy of a irreparable database

0
0
Hello,One of our database have several failures, we cant repair it.Actually all data and objects are available on the corrupted database.We are using : - sql server 2008 R2 (standard edition) - recovery model : Simple - compatibiliry level : SQL server 2005 (90)Shemas replication scripts have been generated (using ssms) and we write a piece of code for migrating data between the old and a new database.Our problem : We cant stop the old database during the copy.My question, during the maintenance some data will be written to the old database.What is the best/simple way to temporaly store this diferencial data for a post maintenance fast reinstatement ?If there's a best way to duplicate this corrupt database using some tools or other prodcedures, your suggestions are welcome :)

Reboot during large offline clustered index rebuild

0
0
Hello. Today I had a 3rd party software vendor ask me to reboot a production SQL Server that was busy doing an offline rebuild of a clustered index. The index was very large (approx 80GB - yes it is a SharePoint index) and had been rebuilding for more than 24 hours. The database was in full recovery mode and database index backups were being done every 30 minutes. I declined to do this as I wasn't sure if interrupting an index build in this way would result in database corruption. I am interested in knowing.1. If people think that this was likely to have caused corruption.2. If the offline index would have come back on line any sooner by rebooting the server.

checkdb - error but no issue?

0
0
Hello all and thanks for your time.I just added th Check Database Integrity Task to my daily maintenance plan yesterday, and this morning I got an alert from SQL:Microsoft(R) Server Maintenance Utility (Unicode) Version 10.0.5512 Report was generated on "myServer\myInstance".Maintenance Plan: 7 Day Retention Full BackupsDuration: 00:01:55Status: Warning: One or more tasks failed.Details:Check Database Integrity Task (myServer\myInstance) Check Database integrity on Local server connection Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped.Databases: All databasesInclude indexesTask start: 2014-03-14T01:00:01.Task end: 2014-03-14T01:00:11.Failed: (-1073548784) Executing the query "DBCC CHECKDB(N'myDatabase') WITH NO_INFOMSGS " failed with the following error: "Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.If i run the tsql manually, with no_infomsgs, i get:Msg 8921, Level 16, State 1, Line 1Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors.I checked TempDB, 35.13MB size with 30.98MB available, seems ok. When I viewed the msdb.suspect_pages table, I found an entry:database_id file_id page_id event_type error_count last_update_date8 1 458 2 7 2014-03-14 08:54:56.457I would have just restored from backup, but since I just added this task to the maint plan, I fear it's been going on for awhile. I don't see any issues in production, just this message.I'm wondering A. is something wrong? B. [i]What [/i]is wrong? C. Can I fix it without a backup?Thanks again for your input.Jason

SQLDUMPER_ERRORLOG and Index courrpted?

0
0
Hi,I received email alert as below messages: SQL Server Alert System: 'Sev21' occurred on \\SERVERNAMEDESCRIPTION: Unable to find index entry in index ID 1, of table 741577680, in database 'Model'. The indicated index is corrupt or there is a problem with the current update plan. Run DBCC CHECKDB or DBCC CHECKTABLE. If the problem persists, contact product support.External dump process return code 0x20000001. External dump process returned no errors. CPerIndexMetaQS::ErrorAbort - Index corruptionAlso attached error log file, Please suggestion what is the forwad path for resolve this issues?Database version:Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (Intel X86) Sep 22 2011 00:28:06 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition on Windows NT 6.0 <X86> (Build 6002: Service Pack 2) Thanksananda

Corrupt DB, and unable to repair

0
0
I had hoped to never need to post in this forum, but such things happen.First, while there may be a good backup of the DB I'm fighting with, it's going to be many, many months old.Second, this is from a Sharepoint 2010 install, thankfully the customer either hasn't noticed, or is aware of but worked around the problem.Third, I realize I *WILL* be losing data if I fix this.Fourth, I do have (and have had for some time) an Agent job running SpaghettiDBAs DBCC script weekly. For whatever reason (still haven't figured it out) it is unable to e-mail me from the SP SQL Server (but I can manually send DBMail fine, and it's working on other SQL servers with no problem.)Fifth, I am able to take a backup of the DB (without using the CHECKSUM option) and restore it on another server, that's the copy I've been working on.So, to the broken DB!Here's a snippet from the very long DBCC CHECKDB() output:[code="plain"]DBCC results for 'WSS_CONTENT_ORG_DLAW_20140325'.Service Broker Msg 9675, State 1: Message Types analyzed: 14.Service Broker Msg 9676, State 1: Service Contracts analyzed: 6.Service Broker Msg 9667, State 1: Services analyzed: 3.Service Broker Msg 9668, State 1: Service Queues analyzed: 3.Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.Msg 8939, Level 16, State 98, Line 1Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -8943937187254829056 (type Unknown), page (50944:61452520). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 12584969 and -1.Msg 8939, Level 16, State 98, Line 1Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -8943937187254829056 (type Unknown), page (50944:61452520). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 12584969 and -1.Msg 8939, Level 16, State 98, Line 1Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -8797764540885368832 (type Unknown), page (9292:-2034823424). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 12584969 and -14.Msg 8939, Level 16, State 98, Line 1...Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page (1:157328). Test (m_headerVersion == HEADER_7_0) failed. Values are 0 and 1.Msg 8939, Level 16, State 6, Line 1Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page (1:157328). Test ((m_type >= DATA_PAGE && m_type <= UNDOFILE_HEADER_PAGE) || (m_type == UNKNOWN_PAGE && level == BASIC_HEADER)) failed. Values are 0 and 0.Msg 8939, Level 16, State 7, Line 1Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page (1:157328). Test (m_freeData >= PageHeaderOverhead () && m_freeData <= (UINT)PAGESIZE - m_slotCnt * sizeof (Slot)) failed. Values are 0 and 8192.Msg 8909, Level 16, State 1, Line 1Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:157329) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).Msg 8909, Level 16, State 1, Line 1...Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 8603375161530122240 (type Unknown), page (1:779640). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 12584969 and -4.Msg 8939, Level 16, State 98, Line 1Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 9043239549262299136 (type Unknown), page (1104:-16684543). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 12584969 and -10.CHECKDB found 0 allocation errors and 1951 consistency errors not associated with any single object.DBCC results for 'sys.sysrscols'.There are 2710 rows in 54 pages for object "sys.sysrscols".DBCC results for 'sys.sysrowsets'.Msg 8909, Level 16, State 1, Line 1Table error: Object ID 5, index ID 1, partition ID 327680, alloc unit ID 327680 (type In-row data), page ID (1:146266) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).Msg 8909, Level 16, State 1, Line 1Table error: Object ID 5, index ID 1, partition ID 327680, alloc unit ID 327680 (type In-row data), page ID (1:146407) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).There are 321 rows in 7 pages for object "sys.sysrowsets".CHECKDB found 0 allocation errors and 2 consistency errors in table 'sys.sysrowsets' (object ID 5)....Msg 8939, Level 16, State 5, Line 1Table error: Object ID 64, index ID 1, partition ID 281474980904960, alloc unit ID 281474980904960 (type In-row data), page (1:146176). Test (m_headerVersion == HEADER_7_0) failed. Values are 77 and 1.Msg 8939, Level 16, State 7, Line 1Table error: Object ID 64, index ID 1, partition ID 281474980904960, alloc unit ID 281474980904960 (type In-row data), page (1:146176). Test (m_freeData >= PageHeaderOverhead () && m_freeData <= (UINT)PAGESIZE - m_slotCnt * sizeof (Slot)) failed. Values are 0 and 8192.Msg 8939, Level 16, State 8, Line 1Table error: Object ID 64, index ID 1, partition ID 281474980904960, alloc unit ID 281474980904960 (type In-row data), page (1:146176). Test (m_freeCnt <= PAGESIZE - PageHeaderOverhead ()) failed. Values are 0 and -20430.Msg 8909, Level 16, State 1, Line 1Table error: Object ID 64, index ID 1, partition ID 281474980904960, alloc unit ID 281474980904960 (type In-row data), page ID (1:146186) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).Msg 8909, Level 16, State 1, Line 1Table error: Object ID 64, index ID 1, partition ID 281474980904960, alloc unit ID 281474980904960 (type In-row data), page ID (1:146285) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).Msg 8909, Level 16, State 1, Line 1Table error: Object ID 64, index ID 1, partition ID 281474980904960, alloc unit ID 281474980904960 (type In-row data), page ID (1:146327) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).There are 20 rows in 1 pages for object "sys.sysclsobjs".CHECKDB found 0 allocation errors and 6 consistency errors in table 'sys.sysclsobjs' (object ID 64)....DBCC results for 'AllDocStreams'.Msg 8964, Level 16, State 1, Line 1Table error: Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057594043957248 (type LOB data). The off-row data node at page (1:40486), slot 0, text ID 1500446720 is not referenced.Msg 8964, Level 16, State 1, Line 1Table error: Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057594043957248 (type LOB data). The off-row data node at page (1:42455), slot 1, text ID 1412169728 is not referenced.Msg 8964, Level 16, State 1, Line 1Table error: Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057594043957248 (type LOB data). The off-row data node at page (1:43029), slot 1, text ID 694353920 is not referenced.Msg 8964, Level 16, State 1, Line 1Table error: Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057594043957248 (type LOB data). The off-row data node at page (1:43257), slot 1, text ID 373882880 is not referenced.Msg 8964, Level 16, State 1, Line 1Table error: Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057594043957248 (type LOB data). The off-row data node at page (1:43641), slot 0, text ID 1121386496 is not referenced.Msg 8964, Level 16, State 1, Line 1Table error: Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057594043957248 (type LOB data). The off-row data node at page (1:43744), slot 0, text ID 357236736 is not referenced.Msg 8964, Level 16, State 1, Line 1...Table error: Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057594043957248 (type LOB data). The off-row data node at page (1:146318), slot 0, text ID 1831534592 is referenced by page (1:30394), slot 0, but was not seen in the scan.Msg 8928, Level 16, State 1, Line 1Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057594043957248 (type LOB data): Page (1:146319) could not be processed. See other errors for details.Msg 8965, Level 16, State 1, Line 1Table error: Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057594043957248 (type LOB data). The off-row data node at page (1:146319), slot 0, text ID 1831534592 is referenced by page (1:30394), slot 0, but was not seen in the scan.Msg 8928, Level 16, State 1, Line 1Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057594043957248 (type LOB data): Page (1:146320) could not be processed. See other errors for details.Msg 8965, Level 16, State 1, Line 1...Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057612423528448 (type In-row data): Errors found in off-row data with ID 1952317440 owned by data record identified by RID = (1:1035785:1)Msg 8929, Level 16, State 1, Line 1Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057612423528448 (type In-row data): Errors found in off-row data with ID 957087744 owned by data record identified by RID = (1:1035785:6)Msg 8929, Level 16, State 1, Line 1Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057612423528448 (type In-row data): Errors found in off-row data with ID 373882880 owned by data record identified by RID = (1:1035787:12)Msg 8929, Level 16, State 1, Line 1Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057612423528448 (type In-row data): Errors found in off-row data with ID 842727424 owned by data record identified by RID = (1:1035791:22)Msg 8929, Level 16, State 1, Line 1Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057612423528448 (type In-row data): Errors found in off-row data with ID 2038890496 owned by data record identified by RID = (1:1035794:30)Msg 8929, Level 16, State 1, Line 1Object ID 293576084, index ID 1, partition ID 72057611895439360, alloc unit ID 72057612423528448 (type In-row data): Errors found in off-row data with ID 606928896 owned by data record identified by RID = (1:1035795:8)There are 22440 rows in 726 pages for object "AllDocStreams".CHECKDB found 0 allocation errors and 2924 consistency errors in table 'AllDocStreams' (object ID 293576084).[/code]I'll put the output from an attempt at DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS in the next post.
Viewing all 223 articles
Browse latest View live




Latest Images