The SQL SERVER 9003 Error Resolution method is only available for SQL2000

Source: Internet
Author: User
Tags microsoft sql server

SQL Server 9003 Error resolution applies only to SQL2000 (SQL2000 only) "Cannot open new database ' POS '." CREATE DATABASE abort. (Microsoft SQL Server, Error: 9003) "Look at the 9003 error, the thought might be due to the log file, and then look at the database file may be corrupted, and then think of the DBCC CHECKDB directive." The method is as follows: 1. We use the default method to establish a database (such as POS) for recovery use. can be established within SQL Server Enterprise Manager. 2. Shut down the database server. 3. Pos_log.ldf Delete the log file for the database you just generated, overwriting the database data file pos_data.mdf that you just generated with the database MDF file you want to recover. 4. Start the database server. You will see that the status of database pos is "suspect". No action can be made on this database at this time. 5. Set the database to allow direct operating system tables. You can select the database server in SQL Server Enterprise Manager, right-click, select Properties, and in the Server Settings page, select the Allow direct modification to system directory. You can also use the following statement to implement. Use master go exec sp_configure "allow updates", 1 go reconfigure with override go 6. Set POS for Emergency Repair mode update sysdatabases set status=-32768 where dbid=db_id (' pos ')
Go at this point in SQL Server Enterprise Manager can see that the database is in "read \ suspect \ offline \ Emergency mode" can see the table inside the database, but only the system table 7. The following performs a true recovery operation, rebuilding the database log file DBCC REBUILD_LOG (' pos ', ' D:\Program Files\Microsoft SQL Server\mssql\data\pos_log.ldf ') Go execution process , if you encounter the following prompt: Server: Msg 5030, Level 16, State 1, line 1 failed to lock the database to perform the operation. DBCC execution is complete. If DBCC outputs an error message, contact your system administrator. Indicates that your other program is using the database and if you have just opened the system table for the POS library using SQL Server Enterprise Manager in 6 steps, exit SQL Server Enterprise Manager. The correct execution of the completion prompt should resemble the following: Warning: The Log for database ' POS ' has been rebuilt. The consistency of the transaction has been lost. You should run DBCC CHECKDB to verify physical consistency. You will have to reset the database options, and you may need to delete the extra log files. DBCC execution is complete. If DBCC outputs an error message, contact your system administrator. When you open the SQL Server Enterprise Manager, you see that the status of the database is "only for dbo use." You can now access the user tables in the database. 8. Verifying database consistency (can be omitted) DBCC CHECKDB (' POS ')
The go general execution results are as follows: CHECKDB found 0 allocation errors and 0 conformance errors (in database ' POS '). DBCC execution is complete. If DBCC outputs an error message, contact your system administrator. 9. Set the database to the normal state of exec sp_dboption ' pos ', ' dbo using only ', ' false ' go if there is no error, then congratulations, now you can normally use the restored database. 10. In the final step, we will restore the "allow direct modification to the system directory" setting in step e. Because the direct operating system table is a relatively dangerous thing. Of course, we can recover from SQL Server Enterprise Manager, or we can complete exec sp_configure ' allow updates ' using the following statement, 0 go reconfigure with Override Go

The SQL SERVER 9003 Error Resolution method is only available for SQL2000

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.