Αναγν. άρθρου: 923247 - Τελευταία αναθεώρηση: Παρασκευή, 24 Δεκεμβρίου 2010 - Αναθεώρηση: 2.0 Αντιμετώπιση προβλημάτων σφάλματος DBCC 2570 του SQL Server 2005
Σε αυτήν τη σελίδαΕΙΣΑΓΩΓΗΑυτό το άρθρο περιγράφει το σφάλμα SQL Server 2570, τι προκαλεί το σφάλμα και τον τρόπο επίλυσης του προβλήματος. Περισσότερες πληροφορίεςΈλεγχοι DATA_PURITYΣτον SQL Server 2005, έχει προστεθεί μια νέα επιλογή, DATA_PURITY, τις εντολές CHECKDB DBCC και CHECKTABLE DBCC. Κατά την εκτέλεση μιας εντολής CHECKDB DBCC ή CHECKTABLE DBCC με την επιλογή αυτή ενεργοποιημένη, η εντολή θα εκτελέσει τις επικυρώσεις "καθαρότητα δεδομένα" κάθε τιμή στήλης σε όλες τις γραμμές του πίνακα ή των πινάκων στη βάση δεδομένων. Αυτές οι νέες επιταγές εκτελούνται για να εξασφαλίσετε ότι οι τιμές που είναι αποθηκευμένες στις στήλες είναι έγκυρη (δηλαδή, ότι οι τιμές δεν είναι εκτός περιοχής για τον τομέα σχετίζεται με τον τύπο δεδομένων αυτής της στήλης). Η φύση της η επικύρωση πραγματοποιείται εξαρτάται από τον τύπο δεδομένων της στήλης. Η παρακάτω λίστα δεν είναι εκτενές σας παρέχει μερικά παραδείγματα:Σύμπτυξη αυτού του πίνακα
Οι έλεγχοι επικύρωσης καθαρότητα δεδομένα δεν ενεργοποιούνται αυτόματα για όλες τις βάσεις δεδομένων. Οι έλεγχοι ενεργοποιούνται ανάλογα με διάφορους παράγοντες:
ΣυμπτώματαInvalid or out-of-range data may have been stored in the SQL Server database in earlier versions for the following reasons:
Some of the symptoms you may notice due to the presence of invalid data include (but are not limited to):
DATA_PURITY Problem ReportWhen you execute a DBCC CHECKDB or DBCC CHECKTABLE command with the DATA_PURITY option enabled (or the data purity checks are run automatically), and invalid data exists in the tables checked by the DBCC commands, the DBCC output includes additional messages that indicate the problems with the data. Some sample error messages that indicate data purity problems are shown below:DBCC results for
"account_history". Msg 2570, Level 16, State 2, Line 1 Page (1:1073), slot 33 in object ID 1977058079, index ID 0, partition ID 129568478265344, alloc unit ID 129568478265344 (type "In-row data"). Column "account_name_japan" value is out of range for data type "nvarchar". Update column to a legal value. Msg 2570, Level 16, State 2, Line 1 Page (1:1156), slot 120 in object ID 1977058079, index ID 0, partition ID 129568478265344, alloc unit ID 129568478265344 (type "In-row data"). Column "account_name_japan" value is out of range for data type "nvarchar". Update column to a legal value. There are 153137 rows in 1080 pages for object "account_history". CHECKDB found 0 allocation errors and 338 consistency errors in table "account_history" (object ID 1977058079). CHECKDB found 0 allocation errors and 338 consistency errors in database 'BadUnicodeData'. DBCC execution completed. If DBCC printed error messages, contact your system administrator. DBCC results for 'table1'. Msg 2570, Level 16, State 3, Line 1 Page (1:154), slot 0 in object ID 2073058421, index ID 0, partition ID 72057594038321152, alloc unit ID 72057594042318848 (type "In-row data"). Column "col2" value is out of range for data type "real". Update column to a legal value. There are 4 rows in 2 pages for object "table1". CHECKDB found 0 allocation errors and 1 consistency errors in table 'table1' (object ID 2073058421). CHECKDB found 0 allocation errors and 1 consistency errors in database 'realdata'. DBCC execution completed. If DBCC printed error messages, contact your system administrator. DBCC results for 'table2'. Msg 2570, Level 16, State 3, Line 1 Page (1:155), slot 0 in object ID 2105058535, index ID 0, partition ID 72057594038452224, alloc unit ID 72057594042449920 (type "In-row data"). Column "col2" value is out of range for data type "decimal". Update column to a legal value. There are 4 rows in 1 pages for object "table2". CHECKDB found 0 allocation errors and 1 consistency errors in table 'table2' (object ID 2105058535). CHECKDB found 0 allocation errors and 1 consistency errors in database 'realdata'. DBCC execution completed. If DBCC printed error messages, contact your system administrator. DBCC results for 'table3'. Msg 2570, Level 16, State 3, Line 1 Page (1:157), slot 0 in object ID 2121058592, index ID 0, partition ID 72057594038517760, alloc unit ID 72057594042515456 (type "In-row data"). Column "col2" value is out of range for data type "datetime". Update column to a legal value. There are 3 rows in 1 pages for object "table3". CHECKDB found 0 allocation errors and 1 consistency errors in table 'table3' (object ID 2121058592). CHECKDB found 0 allocation errors and 1 consistency errors in database 'realdata'. DBCC execution completed. If DBCC printed error messages, contact your system administrator. Fixing the Data Purity ProblemThe 2570 errors cannot be repaired using any of the DBCC repair options. This is because it is impossible for DBCC to determine what value should used to replace the invalid column value. Thus, the column value must be manually updated.To perform a manual update, you have to find the row that has the problem. There are two ways to accomplish this.
Αφού βρείτε τη σωστή γραμμή, μια απόφαση χρειάζεται να γίνει την νέα τιμή που θα χρησιμοποιηθεί για να αντικαταστήσετε τα υπάρχοντα δεδομένα δεν είναι έγκυρη. Αυτή η απόφαση πρέπει να γίνουν πολύ προσεκτικά με βάση σχετικά με το εύρος των τιμών που εργάζονται για την εφαρμογή καθώς και τι νόημα λογική για αυτή τη συγκεκριμένη γραμμή δεδομένων. Οι επιλογές που έχετε είναι οι εξής:
Εύρεση γραμμών με μη έγκυρων τιμών χρησιμοποιώντας ερωτήματα T SQLΟ τύπος ερωτήματος που πρέπει να εκτελεστούν για την εύρεση γραμμών που διαθέτουν μη έγκυρες τιμές εξαρτάται από τον τύπο δεδομένων της στήλης που ανέφερε ένα σφάλμα. Αν εξετάσετε το μήνυμα λάθους 2570, θα παρατηρήσετε δύο σημαντικά στοιχεία των πληροφοριών που θα σας βοηθήσει με αυτό. Στο παρακάτω παράδειγμα, η τιμή της στήλης "account_name_japan" είναι εκτός περιοχής για τον τύπο δεδομένων "nvarchar." Εμείς να αναγνωρίσετε εύκολα τη στήλη που έχει το πρόβλημα, καθώς και τον τύπο δεδομένων της στήλης που συμμετέχουν. Έτσι, όταν γνωρίζετε τον τύπο δεδομένων και που εμπλέκονται στη στήλη, να διατύπωση του ερωτήματος για την εύρεση γραμμών που περιέχουν μη έγκυρες τιμές για αυτήν τη στήλη, επιλέγοντας τις στήλες απαιτείται για την αναγνώριση αυτής της γραμμής (όπως τα κατηγορήματα σε έναν όρο WHERE) για οποιαδήποτε περαιτέρω ενημέρωσης ή διαγραφής.Τύπος δεδομένων Unicode: Date Time data type: You will need to execute two different queries to identify the rows that contain invalid values for date time column. Finding rows with invalid value using the physical location:You can use this method if you are unable to find the rows of interest using the T-SQL method discussed above. In the 2570 error message, the physical location of the row that contains the invalid value is printed. For example, look at the following message:Page (1:157),
slot 0 in object ID 2121058592, index ID 0, partition ID 72057594038517760,
alloc unit ID 72057594042515456 (type "In-row data"). Column "col2" value is
out of range for data type "datetime". Update column to a legal
value.
ΠΡΟΣΟΧΗWe recommend that you use the first method (that is, use T-SQL queries to find the required information). Use the DBCC PAGE command only as a last resort. Take utmost care while you use this command in a production environment. It is advisable to restore the production database on a test server, then get all the required information using DBCC PAGE, and then do the updates on the production server. As always, make sure to keep a backup ready in case something goes wrong and you need to revert to an earlier copy of the database. ΑναφορέςFor more information about the DBCC CHECKDB statement, see
the "DBCC CHECKDB (Transact-SQL)" topic on the following Microsoft Developer
Network (MSDN) Web site: http://msdn2.microsoft.com/en-us/library/ms176064.aspx
(http://msdn2.microsoft.com/en-us/library/ms176064.aspx)
For more information about known
issues in SQL Server 2000, click the following article number to view the
article in the Microsoft Knowledge Base:900335
(http://support.microsoft.com/kb/900335/
)
FIX: The SQL Server 2000 automatic database recovery operation may not succeed if an index contains a FLOAT data type or a REAL data type, and this data type contains a NaN value For more information about RPC events, see the
"Calling a Stored Procedure (OLE DB)" topic on the following MSDN Web site:http://msdn2.microsoft.com/en-us/library/aa198358(SQL.80).aspx
(http://msdn2.microsoft.com/en-us/library/aa198358(SQL.80).aspx)
For more information about the different data types, see the
"Calling a Stored Procedure (OLE DB)" topic on the following MSDN Web site:http://msdn2.microsoft.com/en-us/library/ms187752.aspx
(http://msdn2.microsoft.com/en-us/library/ms187752.aspx)
For more information about floating point value conventions, visit
the following Intel Web site:http://www.intel.com/design/pentiumii/manuals/243191.htm
(http://www.intel.com/design/pentiumii/manuals/243191.htm)
Η Microsoft παρέχει πληροφορίες επικοινωνίας με άλλους κατασκευαστές, για να σας βοηθήσει να βρείτε τεχνική υποστήριξη.
Αυτές οι πληροφορίες επικοινωνίας ενδέχεται να αλλάξουν χωρίς προειδοποίηση. Η Microsoft δεν εγγυάται την ακρίβεια αυτών των πληροφοριών επικοινωνίας με άλλους κατασκευαστές.Οι πληροφορίες σε αυτό το άρθρο ισχύουν για:
Μηχανικά μεταφρασμένοΣΗΜΑΝΤΙΚΟ: Αυτό το άρθρο είναι προϊόν λογισμικού μηχανικής μετάφρασης της Microsoft και όχι ανθρώπινης μετάφρασης. Η Microsoft σάς προσφέρει άρθρα που είναι προϊόντα ανθρώπινης αλλά και μηχανικής μετάφρασης έτσι ώστε να έχετε πρόσβαση σε όλα τα άρθρα της Γνωσιακής Βάσης μας στη δική σας γλώσσα. Ωστόσο, ένα άρθρο που έχει προκύψει από μηχανική μετάφραση δεν είναι πάντα άριστης ποιότητας. Ενδέχεται να περιέχει λεξιλογικά, συντακτικά ή γραμματικά λάθη, όπως ακριβώς τα λάθη που θα έκανε ένας μη φυσικός ομιλητής επιχειρώντας να μιλήσει τη γλώσσα σας. Η Microsoft δεν φέρει καμία ευθύνη για τυχόν ανακρίβειες, σφάλματα ή ζημίες που προκύψουν λόγω τυχόν παρερμηνειών στη μετάφραση του περιεχομένου ή χρήσης του από τους πελάτες της. Επίσης, η Microsoft πραγματοποιεί συχνά ενημερώσεις στο λογισμικό μηχανικής μετάφρασης. Η αγγλική έκδοση αυτού του άρθρου είναι η ακόλουθη:923247
(http://support.microsoft.com/kb/923247/en-us/
)
| Άλλοι πόροι Tοποθεσίες υποστήριξης
ΚοινότηταΆμεση λήψη βοήθειαςΜεταφράσεις άρθρων
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email


Επιστροφή στην αρχή
