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

Pages in Buffer Cache

0
0
Hey folks -While I was discussing the concept of SQL Server loading the data into Buffer for modification, a doubt troubled me -Knowing that based on WHERE predicate of UPDATE, the Storage Engine loads all those Pages that has rows that satisfied the WHERE filter. Implication is that Engine loads complete Page even if that Page has only 1 Row that matched, along with several other non-matched rows.So, the question is - after the Query Processor completes modifying the data of that 1 Row, does entire Page gets flushed back to disk or that only 1 Row that was modified ?Am confused.. and if you are too, I will re-phrase my question :-D--In 'thoughts'...

DBCC CHECKDB

0
0
hello all.I checked my Db with DBCC CHECKDB('DBName') WITH NO_INFOMSGS, ALL_ERRORMSGSand I got this errors:Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:5177860) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).what should I do?

Seems like my SQL database is corrupted

0
0
I restarted my VPS box ( manually/hard restart ) and ever since, mysql fails to start for whatever reason. Can provide (if necessary) the error log. (It’s too large)So please tell me how to recover my database?PS - I did not make any updates to mysql. Version is mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2.I did a tail /var/log/syslog and I get this:Feb 20 11:49:33 kyrgyznews mysqld[11461]: ) ;InnoDB: End of page dump575 Feb 20 11:49:33 kyrgyznews mysqld[11461]: 110220 11:49:33 InnoDB: Page checksum 1045788239, prior-to-4.0.14-form checksum 236985105576 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: stored checksum 1178062585, prior-to-4.0.14-form stored checksum 236985105577 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: Page lsn 0 10651, low 4 bytes of lsn at page end 10651578 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: Page number (if stored to page already) 3,579 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0580 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: Database page corruption on disk or a failed581 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: file read of page 3.582 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: You may have to recover from a backup.583 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: It is also possible that your operating584 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: system has corrupted its own file cache585 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: and rebooting your computer removes the586 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: error.587 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: If the corrupt page is an index page588 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: you can also try to fix the corruption589 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: by dumping, dropping, and reimporting590 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: the corrupt table. You can use CHECK591 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: TABLE to scan your table for corruption.592 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: See also InnoDB: http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html593 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: about forcing recovery.594 Feb 20 11:49:33 kyrgyznews mysqld[11461]: InnoDB: Ending processing because of a corrupt database page.595 Feb 20 11:49:33 kyrgyznews mysqld_safe[11469]: ended596 Feb 20 11:49:47 kyrgyznews /etc/init.d/mysql[12228]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in597 Feb 20 11:49:47 kyrgyznews /etc/init.d/mysql[12228]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed598 Feb 20 11:49:47 kyrgyznews /etc/init.d/mysql[12228]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'599 Feb 20 11:49:47 kyrgyznews /etc/init.d/mysql[12228]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!600 Feb 20 11:49:47 kyrgyznews /etc/init.d/mysql[12228]:601 Feb 20 11:49:56 kyrgyznews mysqld_safe[13437]: started602 Feb 20 11:49:56 kyrgyznews mysqld[13440]: InnoDB: The log sequence number in ibdata files does not match603 Feb 20 11:49:56 kyrgyznews mysqld[13440]: InnoDB: the log sequence number in the ib_logfiles!604 Feb 20 11:49:56 kyrgyznews mysqld[13440]: 110220 11:49:56 InnoDB: Database was not shut down normally!605 Feb 20 11:49:56 kyrgyznews mysqld[13440]: InnoDB: Starting crash recovery.606 Feb 20 11:49:56 kyrgyznews mysqld[13440]: InnoDB: Reading tablespace information from the .ibd files...607 Feb 20 11:49:56 kyrgyznews mysqld[13440]: InnoDB: Restoring possible half-written data pages from the doublewrite608 Feb 20 11:49:56 kyrgyznews mysqld[13440]: InnoDB: buffer...609 Feb 20 11:49:56 kyrgyznews mysqld[13440]: InnoDB: Database page corruption on disk or a failed610 Feb 20 11:49:56 kyrgyznews mysqld[13440]: InnoDB: file read of page 3.611 Feb 20 11:49:56 kyrgyznews mysqld[13440]: InnoDB: You may have to recover from a backup.

Corrupted innodb table crashing mysql instance how to recover table?

0
0
Hello,Running a simple query against corrupted innodb table is crashing mysql instance .[code="plain"]table test.xyz got corrupt during crash and truncate table command was in progressing when mysql crash , nowrunning a simple select * query is also crashing db .mysql> use test;Database changedmysql> select * from xyz;ERROR 2013 (HY000): Lost connection to MySQL server during querymysql>mysql>mysql> select * from xzy;ERROR 2006 (HY000): MySQL server has gone awayNo connection. Trying to reconnect...ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)ERROR:Can't connect to the server[/code]Error Log :[code="plain"][ERROR] Build InnoDB index translation table for Table ./test/xyz failed[ERROR] Table ./test/xyz has no primary key in InnoDB data dictionary, but has one in MySQL! If you created the table with a MySQL version < 3.23.54 and did not define a primary key, but defined a unique key with all non-NULL columns, then MySQL internally treats that key as the primary key. You can fix this error by dump + DROP + CREATE + reimport of the table.[Warning] Table ../test/xyz key_used_on_scan is 0 even though there is no primary key inside InnoDB.[ERROR] Innodb could not find key n 0 with name PRIMARY from dict cache for table test.xyz[/code]Any suggestion on how to recreate table will be highly appreciated .

Can someone explain some Indexing questions?

0
0
When I rebuild indexes, I expected some of the smaller ones to fully defragment, but it seems that they are left untouched. Why is that? This is more of a semantic question, since I know they will generally be in memory (where fragmentation means squat) but I'm curious why REBUILD still doesn't clean up those fragments. I told it to, dang it!

CHECKDB fails, then succeeds after restore to another instance

0
0
HiOccasionally (once every 3 months or so) CHECKDB fails on our busiest database on our VMware management SQL Server instance (this is a VM itself 10.0.5775). No other VMs give problems.To troubleshoot recovery options, I then restore the database from a backup taken after the CHECKDB failed (using Symantec NetBackup) to another instance (physical 10.0.5828), but when I run CHECKDB on the restored database, it returns no errors whatsoever.Can anyone perhaps shed any light on why CHECKDB might succeed on the restored copy, after the (corrupt) DB is restored to another instance? Thank you!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 (3:89710) 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 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (3:89711) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).CHECKDB found 0 allocation errors and 2 consistency errors not associated with any single object.Msg 8928, Level 16, State 1, Line 1Object ID 1401772051, index ID 1, partition ID 72057603137601536, alloc unit ID 72057616695885824 (type In-row data): Page (3:89709) could not be processed. See other errors for details.Msg 8939, Level 16, State 98, Line 1Table error: Object ID 1401772051, index ID 1, partition ID 72057603137601536, alloc unit ID 72057616695885824 (type In-row data), page (3:89709). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 29493257 and -4.Msg 8928, Level 16, State 1, Line 1Object ID 1401772051, index ID 1, partition ID 72057603137601536, alloc unit ID 72057616695885824 (type In-row data): Page (3:89710) could not be processed. See other errors for details.Msg 8928, Level 16, State 1, Line 1Object ID 1401772051, index ID 1, partition ID 72057603137601536, alloc unit ID 72057616695885824 (type In-row data): Page (3:89711) could not be processed. See other errors for details.CHECKDB found 0 allocation errors and 4 consistency errors in table 'VPX_HIST_STAT2_8' (object ID 1401772051).CHECKDB found 0 allocation errors and 6 consistency errors in database 'VCDB'.repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (VCDB).DBCC execution completed. If DBCC printed error messages, contact your system administrator.

CHECKDB reported consistency errors, but second run is clean

0
0
I ran dbcc checkdb with no_infomsgs, all_errormsgs from a scheduled job and got this in the Stack Dump file:DBCC RESULTS--------------------<DbccResults> <Dbcc ID="0" Error="8928" Severity="16" State="1">Object ID 95651734, index ID 1, partition ID 72057604988862464, alloc unit ID 72057605012324352 (type In-row data): Page (1:5770272) could not be processed. See other errors for details.</Dbcc> <Dbcc ID="1" Error="8939" Severity="16" State="98">Table error: Object ID 95651734, index ID 1, partition ID 72057604988862464, alloc unit ID 72057605012324352 (type In-row data), page (1:5770272). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 12716041 and -4.</Dbcc> <Dbcc ID="2" Error="8976" Severity="16" State="1">Table error: Object ID 95651734, index ID 1, partition ID 72057604988862464, alloc unit ID 72057605012324352 (type In-row data). Page (1:5770272) was not seen in the scan although its parent (1:7287343) and previous (1:5770127) refer to it. Check any previous errors.</Dbcc> <Dbcc ID="3" Error="8978" Severity="16" State="1">Table error: Object ID 95651734, index ID 1, partition ID 72057604988862464, alloc unit ID 72057605012324352 (type In-row data). Page (1:5770273) is missing a reference from previous page (1:5770272). Possible chain linkage problem.</Dbcc> <Dbcc ID="4" Error="8990" Severity="10" State="1">CHECKDB found 0 allocation errors and 4 consistency errors in table 'APDISTRIB' (object ID 95651734).</Dbcc> <Dbcc ID="5" Error="8928" Severity="16" State="1">Object ID 814938275, index ID 1, partition ID 72057605271519232, alloc unit ID 72057605294981120 (type In-row data): Page (1:516276) could not be processed. See other errors for details.</Dbcc> <Dbcc ID="6" Error="8976" Severity="16" State="1">Table error: Object ID 814938275, index ID 1, partition ID 72057605271519232, alloc unit ID 72057605294981120 (type In-row data). Page (1:516276) was not seen in the scan although its parent (1:14556151) and previous (1:516275) refer to it. Check any previous errors.</Dbcc> <Dbcc ID="7" Error="8978" Severity="16" State="1">Table error: Object ID 814938275, index ID 1, partition ID 72057605271519232, alloc unit ID 72057605294981120 (type In-row data). Page (1:516277) is missing a reference from previous page (1:516276). Possible chain linkage problem.</Dbcc> <Dbcc ID="8" Error="8990" Severity="10" State="1">CHECKDB found 0 allocation errors and 3 consistency errors in table 'PAYDEDUCTN' (object ID 814938275).</Dbcc> <Dbcc ID="9" Error="8989" Severity="10" State="1">CHECKDB found 0 allocation errors and 7 consistency errors in database 'TEST'.</Dbcc> <Dbcc ID="10" Error="8957" Severity="-1" State="1">DBCC CHECKDB (TEST) WITH all_errormsgs, no_infomsgs executed by KENNEDY\sqladmin found 7 errors and repaired 0 errors. Elapsed time: 0 hours 57 minutes 14 seconds. Internal database snapshot has split point LSN = 0006452a:00000253:0001 and first LSN = 0006452a:00000252:0001.</Dbcc> <Dbcc ID="11" Error="8958" Severity="10" State="1">repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (TEST).</Dbcc> </DbccResults> **Dump thread - spid = 0, EC = 0x00000000CE292080 ***Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\LOG\SQLDump0001.txt I then ran DBCC CHECKTABLE for the two tables in the results above (APDISTRIB and PAYDEDUCTN) in Query Analyzer and both ran clean:DBCC results for 'PAYDEDUCTN'.There are 25095197 rows in 1411311 pages for object "PAYDEDUCTN".DBCC execution completed. If DBCC printed error messages, contact your system administrator.DBCC results for 'APDISTRIB'.There are 650068 rows in 70844 pages for object "APDISTRIB".DBCC execution completed. If DBCC printed error messages, contact your system administrator.I then ran DBCC CHECKDB again and it ran clean:... CHECKDB found 0 allocation errors and 0 consistency errors in database 'TEST'.DBCC execution completed. If DBCC printed error messages, contact your system administrator.I'm confused. Should I still be concerned?Thanks all.

823 Error but DBCC clean

0
0
This morning on one of our virtual servers I saw that the differential backup job failed. The job does an integrity check and then backs up databases. There were no reindexing or other jobs running at the same time and it's a pretty low activity point for the server. Upon looking into it, I saw the following error messages:Error 823, Severity 24, State 7"Operating system error 'stale page (a page read returned a log sequence number (LSN) (2148:976:1) that is older than the last one that was written (0:0:0))' resulted from attempt to read the following: sort run page (1:588496), in file 'E:\tempdb.mdf', in database with ID 2. Sort is retrying the read."and then directly after that is:"DBCC CHECKDB (<userdb>) WITH no_infomsgs executed by (<user>) found 1 errors and repaired 0 errors. Elapsed time: 0 hours 8 minutes 27 seconds. Internal database snapshot has split point LSN = 000c1737:000001b3:0001 and first LSN = 000c1737:000001b2:0001."All the other DBCC CHECKDB commands processed with 0 errors found. I've been looking through other posts on how to handle this. The first thing I did is run DBCC CHECKDB WITH ALL_ERRORMESSAGES, NO_INFOMSGS. I expected the database from last nights issue to have corruption. However, that database and all the others came back fine. I reached out to my SAN admins and they checked the SAN, SAN switch and ESX host the server is on and they did not see any errors in the logs. They've offered to move the datastore if I'd like, but I'm not sure where to proceed. I'm kind of stumped on why it would throw an 823 error but all the databases came back ok. Could it be something intermittent? If so, why wouldn't it show up in any of the storage logs?The server is running SQL Server 2008 (10.0.5500.0)

DBCC CHECKDB Returns Different Consistency Errors on Subsequent Runs

0
0
We have restored a database to SAN storage as part of a migration. A scheduled run of DBCC CHECKDB failed after the restore. Repeated runs of DBCC CHECKDB are returning different results. Each run returns consistency errors, but the consistency errors show up on different pages and allocation units. When the database is restored to local storage, DBCC CHECKDB comes back clean. That points me to an issue with the SAN, but I am very confused by the changing DBCC CHECKDB results. Has anyone seen behavior like this before?Thanks,Frank

DTSX Changes Certain Datetime Values

0
0
We have a 2008 DTSX that takes a client XLS file and loads it. The file and our environments use non-US day-month format, ie: DD-MM-YYYY.Our Dev/Test environments are physical servers in our computer room running SQL2008, and we are in the process of moving to AWS RDS SQL2012 servers for Stage/Prod.We experienced an issue on Prod whereby dates that could be interpreted in US-style MM-DD-YYYY were done so, but other dates were kept in non-US-Style; that the DTSX loaded dates in both US and non-US styles. ie: 5-Aug-2014 would be loaded as 8-5-2014, but 13-Aug-2014 would be loaded as 13-8-2014. No "invalid date" errors were raised.Analysis showed that only the Prod copy of the DTSX had this behviour and refreshing the DTSX fixed this issue.My question: has anyone seen this behavior previously?

823 Error

0
0
I got an 823 error. I restored the last full backup to a new DB and am running Checkdb on it now.This database is 150gb and contains just one table. All the errors are in the same non-clustered index.So technically, I should be able to just drop the index, correct?Here's the errors:DBCC results for 'ABC_Hipaa'.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.Msg 8980, Level 16, State 1, Line 1Table error: Object ID 485576768, index ID 2, partition ID 72057594038976512, alloc unit ID 72057594047102976 (type In-row data). Index node page (1:2018313), slot 83 refers to child page (1:2360888) and previous child (1:1677418), but they were not encountered.Msg 8944, Level 16, State 12, Line 1Table error: Object ID 485576768, index ID 2, partition ID 72057594038976512, alloc unit ID 72057594047102976 (type In-row data), page (1:3690040), row 5. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 15 and 3.Msg 8944, Level 16, State 17, Line 1Table error: Object ID 485576768, index ID 2, partition ID 72057594038976512, alloc unit ID 72057594047102976 (type In-row data), page (1:3690041), row 4. Test (columnOffsets->offTbl [varColumnNumber] <= (nextRec - pRec)) failed. Values are 49 and 44.Msg 8944, Level 16, State 14, Line 1Table error: Object ID 485576768, index ID 2, partition ID 72057594038976512, alloc unit ID 72057594047102976 (type In-row data), page (1:3690042), row 5. Test (ColumnOffsets + (int)sizeof (COLOFF) <= (nextRec - pRec)) failed. Values are 22 and 21.Msg 8944, Level 16, State 17, Line 1Table error: Object ID 485576768, index ID 2, partition ID 72057594038976512, alloc unit ID 72057594047102976 (type In-row data), page (1:3690043), row 4. Test (columnOffsets->offTbl [varColumnNumber] <= (nextRec - pRec)) failed. Values are 47 and 44.Msg 8944, Level 16, State 12, Line 1Table error: Object ID 485576768, index ID 2, partition ID 72057594038976512, alloc unit ID 72057594047102976 (type In-row data), page (1:3690044), row 5. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 15 and 9.Msg 8944, Level 16, State 17, Line 1Table error: Object ID 485576768, index ID 2, partition ID 72057594038976512, alloc unit ID 72057594047102976 (type In-row data), page (1:3690045), row 4. Test (columnOffsets->offTbl [varColumnNumber] <= (nextRec - pRec)) failed. Values are 49 and 44.Msg 8944, Level 16, State 17, Line 1Table error: Object ID 485576768, index ID 2, partition ID 72057594038976512, alloc unit ID 72057594047102976 (type In-row data), page (1:3690046), row 4. Test (columnOffsets->offTbl [varColumnNumber] <= (nextRec - pRec)) failed. Values are 53 and 50.Msg 8944, Level 16, State 17, Line 1Table error: Object ID 485576768, index ID 2, partition ID 72057594038976512, alloc unit ID 72057594047102976 (type In-row data), page (1:3690047), row 4. Test (columnOffsets->offTbl [varColumnNumber] <= (nextRec - pRec)) failed. Values are 47 and 44.CHECKDB found 0 allocation errors and 9 consistency errors in table 'abc_hipaa' (object ID 485576768).CHECKDB found 0 allocation errors and 9 consistency errors in database 'ABC_Hipaa'.

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]

Errors automatically fixed by other process?

0
0
The other morning an automated Integrity Check job produced the following message:DBCC CHECKDB (DBName) executed by TBECU\sqlservice found 2 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 11 seconds. Internal database snapshot has split point LSN = 0000f4c3:00005bec:0001 and first LSN = 0000f4c3:00005beb:0001.This is all the information I have on this. I ran DBCC CHECKDB manually the following day on this database and it came up clean. I learned from researching this that the "LSN =" part is simply the point at which the CHECKDB snapshot was created. Were the two errors random glitches, or minor corruption that was corrected by some other process before I ran CHECKDB the second time?

SQL Error 37000: Active Save Point

0
0
Hi Hopefully someone can help, I have a piece of software which is returning a SQL Error:37000: Cannot Promote the transaction to a distributed transaction because there is an active save point in this transaction.How can I find and/or clear this Active Save Point?I have tried running dbcc opentran but it returns No active open transactions.Many Thanks in Advance!!Martin

Rebuild Master database behaving a bit strange

0
0
I cant find anything that relates to the issue I am experiencing, and I am hoping I am not alone on this.Scenario:I have cloned a production database, but only the C:\ drive where the binaries exist. ie no user databases and no system databases.So now I want to rebuild master, and once successful, I will restore the master database from backup. I have changed the parameters in the sql server configuration services to point to the C:\ drive, as I would hope that it would create them there.from command prompt, as administrator, I execute this:Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=accountname /SAPWD= password123 /SQLCOLLATION=Latin1_General_CI_ASit fails with the following excerpt :Attempting to set directory full pathAttempting to normalize directory path E:\DataAttempting to check if directory E:\Data existsSQLEngine: : Checking Engine checkpoint 'CreateDataDir'SQLEngine: : Create E:\Data DirectoryAttempting to set directory full pathAttempting to normalize directory path E:\DataAttempting to check if directory E:\Data existsAttempting to create directory E:\DataAttempting to create directory E:\Data, security descriptor Attempting to set directory full pathAttempting to normalize directory path E:\DataDirectory 'E:\Data' already exists, skipping creation, moving to set security descriptor.Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigNonRC and scenario ConfigNonRC.The device is not ready.Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigNonRC and scenario ConfigNonRC.Microsoft.SqlServer.Configuration.Sco.ScoException: The device is not ready. ---> System.IO.IOException: The device is not ready. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost) at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) at Microsoft.SqlServer.Configuration.Sco.SqlDirectory.Create(ServiceContainer ctx, String directoryFullPath, String sddlString, Boolean overwriteSecurityDescriptor) --- End of inner exception stack trace --- at Microsoft.SqlServer.Configuration.Sco.SqlDirectory.Create(ServiceContainer ctx, String directoryFullPath, String sddlString, Boolean overwriteSecurityDescriptor) at Microsoft.SqlServer.Configuration.Sco.SqlDirectory.Create(ServiceContainer ctx, String directoryFullPath) at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.CreateAndProvisionDataDirectories(EffectiveProperties properties, IEnumerable`1 dataDirs, Boolean breakInheritance) at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.RebuildDatabase_ConfigNonRC(EffectiveProperties properties) at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.RebuildDatabase(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb) at Microsoft.SqlServer.Configuration.SqlConfigBase.PrivateConfigurationBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent) at Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent) at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId) at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)Exception: Microsoft.SqlServer.Configuration.Sco.ScoException.Source: Microsoft.SqlServer.Configuration.Sco.Message: The device is not ready..Inner exception: Exception: System.IO.IOException. Source: mscorlib. Message: The device is not ready.Watson Bucket 1Now, my question, is where on earth is it picking up the E:\Data from? Why is it looking for that particular drive? It is worth noting, that on the production server, the Database Default location is E:\Data, however, I would have thought when rebuilding, it scraps all that, and starts again.If anyone has seen this before, any ideas would be appreciated

Backup detected error - Checkdb returns errors

0
0
Last night's backup failed - message BACKUP detected an error on page (1:1337093).I ran Checkdb and got some errors. First this right at the top:DBCC results for 'NCVLive'.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 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:1337094) 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 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:1337095) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).CHECKDB found 0 allocation errors and 2 consistency errors not associated with any single object.Then these consistency errors on one table:DBCC results for 'ep_careplan'.Msg 8928, Level 16, State 1, Line 1Object ID 122483515, index ID 1, partition ID 72057595327348736, alloc unit ID 72057595334688768 (type In-row data): Page (1:1337093) could not be processed. See other errors for details.Msg 8939, Level 16, State 98, Line 1Table error: Object ID 122483515, index ID 1, partition ID 72057595327348736, alloc unit ID 72057595334688768 (type In-row data), page (1:1337093). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 12716041 and -4.Msg 8976, Level 16, State 1, Line 1Table error: Object ID 122483515, index ID 1, partition ID 72057595327348736, alloc unit ID 72057595334688768 (type In-row data). Page (1:1337093) was not seen in the scan although its parent (1:775941) and previous (1:1337092) refer to it. Check any previous errors.Msg 8928, Level 16, State 1, Line 1Object ID 122483515, index ID 1, partition ID 72057595327348736, alloc unit ID 72057595334688768 (type In-row data): Page (1:1337094) could not be processed. See other errors for details.Msg 8980, Level 16, State 1, Line 1Table error: Object ID 122483515, index ID 1, partition ID 72057595327348736, alloc unit ID 72057595334688768 (type In-row data). Index node page (1:775941), slot 169 refers to child page (1:1337094) and previous child (1:1337093), but they were not encountered.Msg 8928, Level 16, State 1, Line 1Object ID 122483515, index ID 1, partition ID 72057595327348736, alloc unit ID 72057595334688768 (type In-row data): Page (1:1337095) could not be processed. See other errors for details.Msg 8980, Level 16, State 1, Line 1Table error: Object ID 122483515, index ID 1, partition ID 72057595327348736, alloc unit ID 72057595334688768 (type In-row data). Index node page (1:775941), slot 170 refers to child page (1:1337095) and previous child (1:1337094), but they were not encountered.Msg 8978, Level 16, State 1, Line 1Table error: Object ID 122483515, index ID 1, partition ID 72057595327348736, alloc unit ID 72057595334688768 (type In-row data). Page (1:1337096) is missing a reference from previous page (1:1337095). Possible chain linkage problem.There are 2426647 rows in 38487 pages for object "ep_careplan".CHECKDB found 0 allocation errors and 8 consistency errors in table 'ep_careplan' (object ID 122483515).This: SELECT name FROM sys.indexes WHERE object_id = 122483515 and index_id = 1tells me index id 1 is the Primary Key clustered index.TX log backups are still running without error. My last good full is from two night ago. Last DBCC run clean was 3 days ago. Can this be fixed? Should I restore the last backup and logs elsewhere and bring the table over? Can I even do that? There are Fkeys and a trigger on this table? If necessary, shouldn't I be able to restore the FULL and all the logs up to now and not expect the errors to be present?Should I get the users off this application?Thanks all.

Restore from SQL2005 to SQL2008R2 results in DBCC Inconsistencies

0
0
Hi,fairly new to SQL, and being tasked with copying an SQL2005 DB to an SQL2008R2 Server.We are running daily full backups through SSMS on the SQL2005 server (OS is still Windows 2003), and I thought I'd simply import this into a new SQL2008R2 DB on a new Windows 2008R2 server. All systems are running virtualized on the same platform, storage is an FC-attached EMC VNX5300.The backups run without errors. Now after restoring the Backup into my SQL2008R2 instance I'm running a consistency check in SSMS, and get a huge number of Errors (any chance to retrieve then in english?): Fehler:(-1073548784) Fehler beim Ausführen der Abfrage 'DBCC CHECKDB(N'TESTDB') WITH NO_INFOMSGS': 'Objekt-ID 218744132, Index-ID 0, Partitions-ID 72057594234667008, Zuordnungseinheits-ID 72057594250133504 (In-row data-Typ): Seite (1:7118482) konnte nicht verarbeitet werden. Einzelheiten finden Sie in anderen Fehlermeldungen.Tabellenfehler: Objekt-ID 218744132, Index-ID 0, Partitions-ID 72057594234667008, Zuordnungseinheits-ID 72057594250133504 (In-row data-Typ), Seite (1:7118482). Fehler bei Test (IS_OFF (BUF_IOERR, pBUF->bstat)). Die Werte sind 12716041 und -4.Objekt-ID 218744132, Index-ID 0, Partitions-ID 72057594234667008, Zuordnungseinheits-ID 72057594250133504 (In-row data-Typ): Seite (1:7118487) konnte nicht verarbeitet werden. Einzelheiten finden Sie in anderen Fehlermeldungen.The total number of errors is 1570 on a DB of ~300GB:DBCC CHECKDB (TESTDB) WITH no_infomsgs executed by user-domain\dbuser found 1570 errors and repaired 0 errors. In desperation I've installed an SQL2005 instance on my new Windows 2008R2 server, and restored the database into this instance without errors, so I guess there's something wrong with my SQL2008R2 instance.Any idea what causes these inconsistencies?Kind regards,Andreas

log file does not match primary file

0
0
Hi,I have a question regarding the error "log file does not match primary file". last month, one of our 2005 databases ( lets call DB1 (simple mode) ) was moved to a 2008 R2 RTM x64 server. One of two people moved it by either restored .bak or copied .mdf & .ldf & attached, but I'm thinking the second. This past Saturday the server rebooted at 6:18am, not a planned reboot, immediately after the database became "inaccessible" and the error "log file does not match primary file" was in the log. We use a third party for backups, all we tried (which are in the form of .mdf & .ldf) would not attach and resulted in the same error. The network guy tried a direct restore through the software and that created a database in suspect mode. When I tried to update it to emergency mode, I got the same error. I tried two ways of creating the database with only the .mdf, both failed with the error message that "the database was not shut down cleanly and there were open transactions or that this could happen because the transaction log was deleted", so database would not create. My question is, can anyone shed any light on what may have caused this? Is there anything I could have done prior to trying the restore or to detect this issue earlier? Is it possible it was an issue from day one that did not pop up until the reboot? I ended up taking a backup of the original database and restoring it on the new server and ran CHECKDB, no errors. So we have data from a month ago, not a big deal for this database but would be a disaster if this happened to something else. Thank you for any guidance here,-karen

SQL 2005 to 2008 r2- Check data consistency

0
0
Hi Team,We are migrating our database from 2005 to 2008 r2. We are asked how are we making sure to check the data correctness post restoration. My thought is if the DB has been restored successfully, then there is no data corruption issue, I mean it wont be a case that certain data is corrupted and certain is not, or am I wrong here?.How can we check the data correctness post restoration?

Incorrect checksum error information describes a correct checksum?

0
0
I've been hitting a problem where a CREATE INDEX is failing. The debug error exception shows the error is invalid because expected and actual are a match, not a miss-match. This is killing me. I've flattened and re-created the entire database (file groups, files, tables) and can't get past this. Any tips on how to handle this? The server is Windows 2012 R2, Sql Server 2014 Enterprise w/sp1. Vertex 3 SSD's..NET Exception Message:The operating system returned error incorrect checksum ([b]expected: 0x2ca0d355; actual: 0x2ca0d355[/b]) to SQL Server during a read at offset 0x0000007605c000 in file 'h:\SqlSvr\Data\ClusterIdx.ndf'. 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.Could not create constraint or index. See previous errors.The statement has been terminated.Output from CHECKDB"CHECKDB found 0 allocation errors and 0 consistency errors in database 'EVRoute'.DBCC execution completed. If DBCC printed error messages, contact your system administrator."
Viewing all 223 articles
Browse latest View live




Latest Images