Skip to Content
author's profile photo Former Member
Former Member

mssql server error 9004

Hi Basis people

I have a problem in the database the error is "could not create database create databse aborted.mssql server error 9004" I think the database has been correpted. i am stuck at this point kindly help me out.Suitable answer would be awarded.

thanks in advance

Ajit

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 06:44 AM

    Hi,

    You have two options:

    1. You can create an empty database with the same name and physical file layout, shut down the server, swap in the files you want to attach in place of the empty DB files, and start the server. The database should come up in suspect mode. You can then ALTER DATABASE <foo> SET EMERGENCY to put it in emergency mode, and then run DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS. This will pull as much data as possible out of the log to make the database consistent, but may have to delete some data in order to make the database consistent. This is the option which is most likely to get the maximum data back.

    2. You can attempt to use the CREATE DATABASE FOR ATTACH_REBUILD_LOG to see if that will bring it back. If the database was cleanly shut down, you MIGHT be able to succeed. There is also the chance that the database will be inconsistent or corrupt if there are transactions which could not be rolled back. You should in any event run DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS to make your database consistent. In this event, SQL Server will make no attempt to mine information from the log. It will ignore the contents of the log. If there were transactions in process no rollback will be possible, so the ALLOW_DATA_LOSS will be required.

    regards,

    kaushal

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.