.MDF file issue.

hi team,
we have one old database, this old database we don't  have any backup.
here problem is this database datafile(.MDF) file was corrupted unable to access the this database, what we can do how we access the this database.

here we don't have any database backup,that is the problem .
how we can resolve this issue, this issue happen past 5 days on words,
You resolve this issue by restoring a clean backup, and if you don't have any you are in serious trouble, at least if this database is critical to you.
Well, you "only" have a checksum error. This could mean that the data is largely correct. This is the scope about the checksum: When SQL Server writes a page to disk, it computes a checksum which it stores on the disk.
When SQL Server reads the page, it recomputes the checksum and compares with what is stored on the page. If there is a mismatch, it sounds the alarm, becuase it indicates that the data has been altered when it was supposed to be at rest on the disk.
First, run DBCC CHECKDB, to see how wide the range of corruption is. I don't know for sure, but I suppose that it will produce an error for page with an incorrect checksum. It may also produce more errors, if the bits that have been flipped are in the
internal page structure.
I could go on, but I have not performed this sort of exercise myself, and I don't want to give half-hearted advice in a potentially serious situation. I would recommend that you open a case with Microsoft. They will not repair your database, but they
may help you with the process how to copy data out of the database. They should also help you with interpreting the error messages, so you that can judge exactly how critical these pages are.
And keep in mind that these errors do not come out of the blue. You should consider the hardware on which you have this file to be suspect and replace it. And you should make sure that if you have other databases that are dear to you that they are backed
up properly...
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • SQL Server 2008 .MDF File attaching issue

    Hy all guys here is big Happy news about the SQL Server 2008 database.mdf file attaching issue on Windows 8.1 and SQL Server 2008
    I found the solution like this
    first you go to the directory of your computer and go to that folder where your database and other files are like
    folder having database and files then > Right click and > security > then give full rights from which user you LOGIN and then apply > ok after that go to SQL Server 2008 > Right Click > run as administrator
    Hurray your problem will be resolve I Resolved my issue too  thanks to providing every solution
    if you guys find solution please give me best regards thanks  

    Hi Farhan-Islam,
    Glad to hear that your issue had been solved by yourself. Thank you for your sharing which will help other forum members who have the similar issue.
    Regards,
    Lydia Zhang

  • How to attach .mdf file to sql server 2008 EXPRESS

    I have .mdf files created using SQL SERVER management studio 2012 in another computer and wish to attach the same to SQL SERVER 2008 EXPRESS in another computer. How should I do so? I tried this method :How
    to: Attach a Database File to SQL Server Express but then it shows an error that the database cannot be created due to compatibility issues.
    Msg 948: The database xyz cannot be opened because it is version 706. This server supports version 655 and earlier. A downward path is not supported..
    Any help??

    I have .mdf files created using SQL SERVER management studio 2012 in another computer and wish to attach the same to SQL SERVER 2008 EXPRESS in another computer. How should I do so? I tried this method :How
    to: Attach a Database File to SQL Server Express but then it shows an error that the database cannot be created due to compatibility issues.
    Msg 948: The database xyz cannot be opened because it is version 706. This server supports version 655 and earlier. A downward path is not supported..
    Any help??
    You are trying to attach SQL Server 2012  database files to SQL Server 2008 R2 which is not allowed, you either need to upgrade your SQL Server 2008 to 2012 or alternatively you can generate all scripts from SQL Server 2012 and execute it in SQL Server
    2008 R2.
    You can refer below link to how to generate script.
    http://blog.sqlauthority.com/2012/07/18/sql-server-generate-script-for-schema-and-data-sql-in-sixty-seconds-021-video/
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 |
    My Blog | My Page

  • Connecting to a local SQL server .mdf file

    Hi all,
    In doing some prototyping of my database I started working with a local copy of an SQL Server database since it so conveniently integrated with the Visual Studio .NET tools I use. Now that I have spent far too much time working on a local prototype, I would very much like to migrate it to our in-house database rather than rewrite the whole thing (it is quite large in terms of tables and constraints and none of our in-house tools generate code from ER diagrams).
    Seeing that SQL Developer had a migration utility I pounced at a chance to use it. I installed it as well as the recommended JDBC driver; however, it occurs to me that I have no idea how to connect to a local database file using the host name and port fields given to me. Is there some convenient way to configure SQL Server 2005 to forward this file to some kind of local host? Or is there any other driver for use with a local .mdf file? Help would be greatly appreciated.

    While it does come with a copy of SQL Server with it, visual studio suspiciously just asks for a file name, so I would assume it reads directly from the .mdf
    I have a copy of SQL Server 05 on the machine, but I haven't done anything in the way of server side configuration before, so I can't even guess how to direct it to serve the file.
    All software packages involved are:
    Windows XP
    SQL Server 2005
    Visual Studio .NET 2005
    SQL Developer 1.5.1
    Oracle client 10g connecting to an Oracle 9i release 2 server
    Any pointers to the right direction or alternate migration solutions would be great.
    Edit: I am highly suspicious that Visual Studio was connecting to this file through SQL Server Express and not my standard edition copy, and it is therefore not attached to the database, the solution is not looking entirely easy, so an alternate migration may be a better choice. Thanks in advance for any help.
    Edit: Well my suspicions were confirmed. I attempted several solutions. First of which being the MS SQL Express publishing wizard so that I could publish to SQL and run the script via Toad or SQL Plus; however, it only targets MS SQL Server 2000 or 2005 which would result in a lot of hand editing in terms of migration. Attempting to find a script converter did not help as they all either failed outright or demanded a connection to the datbase via ODBC or JDBC (which doesn't support SQL Express' less than clever attach on connection ideas). This led me to the alternate solution of trying to attach the file to my main database and connect to it; however, the SQL Server command prompt has some sort of permissions issue with my office security setting (though I can edit files fine) and results in failure.
    I think it is about time to throw in the towel and just work it out by hand. This would be greatly expedited by any visual database tools that generate code from ER diagrams if you happen to know of a freeware solution. We lack an internal copy of Oracle Designer and the free license only permits a single prototype. So any suggestions on the front of freebie visual object relational tools and alternate migration ideas would be of great help. Until then I'll be grinding through it with moderate dissatisfaction.
    Thanks again.

  • How to recover database from .mdf file

    create a database of
    equal size to the one you're trying to attach
    shutdown the server (Stop)
    swap in the old mdf file (replace new .mdf file with .mdf file to be recovered )
    Location: C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA
    bring up the server (start) and let the database attempt to be recovered and then go into suspect mode
    put the database into emergency mode with ALTER DATABASE
    run DBCC CHECKDB (dbname, REPAIR_ALLOW_DATA_LOSS) which will rebuild the log and run full repair
    Your database will be available again but you'll have lost data and the data won't be transactionally consistent
    USE [master]
    GO
    ALTER DATABASE [RdmStoreInformation] SET EMERGENCY
    GO
    ALTER DATABASE [RdmStoreInformation] SET SINGLE_USER
    GO
    DBCC CHECKDB ([RdmStoreInformation], REPAIR_ALLOW_DATA_LOSS)
    GO
    ALTER DATABASE [RdmStoreInformation] SET MULTI_USER
    GO
    ALTER DATABASE [RdmStoreInformation] SET ONLINE
    GO
    This is a issue I had to fix and it's solution listed here for your reference(I gathered all the In-formations by surfing web)

    Interesting, did you get any errors trying to attach the .mdf file?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Opening MDF files in Diadem generated with Vector CANape v7.0?

    Hi all,
    I have a Vector CANape v7.0 data aquisition system that generates files in MDF format.  I found the Diadem data plugin for MDF files and installed it.  I can open the files, see the parameter names, but all the data is 0 (and it should not be).
    The plugin looks up to date and the description mentions MDF version 3.0 & 3.2.  We have CANape version 7.0.  How do those numbers correspond?  How can I open this file correctly?
    Plugin Description: 
    This DataPlugin supports reading / importing of Bosch MDF data files, ETAS INCA® MDF data and Vector CANape® and other products from Vector. The DataPlugin supports MDF files up to version 3.2. The MDF DataPlugin also supports writing of MDF 3.0 and 3.2 files. Writing behavior is controlled by the root property 'version'; set version to "MDF 3.2" to write MDF 3.2 files.
    The Measure Data Format (MDF) is well established in the automotive industry for recording, exchanging, and post-measurement analysis. MDF files are produced by eg. INCA® from ETAS, and by CANape® and other products from Vector.
    Thanks- Dshow
    P.S.  I have tried this on Diadem v10.1 and 11 with the same results.  Thx
    Message Edited by Dshow on 07-13-2009 02:12 PM
    Solved!
    Go to Solution.

    Hello Dshow,
    Since I don' have any MDF files to test this with, I can't help with your immediate question. I can offer up an alternative though:
    With version 11.1, DIAdem has gained the ability to load CAN files directly through the "CAN Converter" that can be found in the NAVIGATOR "File" menu. You can test this with the free evaluation version that can be found at http://www.ni.com/diadem/ - this might take care of the issue you are having. It also offers a number of additional features you might be interested in ...
    Best regards,
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • How to restore .MDF file to other instance

    Hi All
    I need your help, one of my sql cluster crashed. I rebuild SQL Cluster with same instance name and cluster name. I want to know how to restore one of our user database .MDF database file. By mistaken i deleted .LDF file. And now i'm facing challenge
    to restore .MDF file.
    If anyone face this issue, please share you experience.
    Regards
    Rinks

    I entirely agree with Dan that you should restore the database from a clean backup.
    Since the cluster crashed, I suspect that the database was not shut down cleanly and in this case you will not be able to attach the MDF with the suggestions Dan made.
    It is possible to what Paul Randall calls a "hackattach", but I am not going to describe this here. You will be able to access the database, but the database may be full of corruptions. So I really hope that you have a backup.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Cannot navigate to some folders when attempting to attach .MDF files to database in Management Studio

    Hello,
    I have Windows 7 ultimate, SP1 and login to a SBS2003 R2 domain as administrator.
    I use SQL Server Management Studio 10.50.2500.0 to connect to a local instance of SQL Server 2008 R2 using Windows Authentication.
    When I attempt to attach a database .MDF file that is not in the C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA folder, the Locate Database Files dialog box will not allow me to navigate to other folders to find databases.
    It does not give an error, it simply does not open the selected folder.
    How do I allow the Locate Database Files dialog box to navigate to other folders to locate other .MDF files?
    Any help would be grate fully appreciated.
    Thanks,
    Tony
    Stop The World, I want To Get Off! ........... Life Isn't About Waiting For The Storm To Pass ... It's About Learning To Dance In The Rain.

    Hello Naomi.
    I’m not sure of what you mean by “the rights”, but I can see all folders and files on all machines when using Windows Explorer.  I cannot navigate to them through the Locate Database Files
    dialog box.
    Also, this has nothing to do with the server.  This issue involves my local computer.
    Thanks,
    Tony
    Additionally, your question came to me as an email from
    [email protected]  I tried to reply to it and it came back as undeliverable.  So, I posted my reply here
    Stop The World, I want To Get Off! ........... Life Isn't About Waiting For The Storm To Pass ... It's About Learning To Dance In The Rain.

  • If tempdb .mdf file out of disk space and we do nothing to fix, what could happen? Will anything crash?

    Will anything crash or stop working if tempdb .mdf file out of disk space?

    It might crash, sql server will stop responding or you may not able to perform any action until space allocated to tempdb.
    Running out of disk space in tempdb can cause significant disruptions in the SQL Server production environment and can prohibit applications that are running from completing operations.
    Refer below article to troubleshoot Temp db out of disk issue
    http://technet.microsoft.com/en-us/library/ms176029(v=sql.105).aspx
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • Error No. 11 Cannot open .MDF file

    Hello,
    I am using DIAdem 12.0.0f4911 TDM and I cannopt seem to open this particular .MDF file.  The Error I get is  "XXXXXX.MDF" file has an invalid format.  (error no. 11)
    I have opened other .MDF files without issue however this particular file is nearly 3 gigs in size.  Is it possible the file size it is too large?
    Tim
    Solved!
    Go to Solution.

    Thanks
    I loaded the MDF plugin and started DIAdem.
    I have since loaded the data into the Data portal but DIAdem is cycling between "Not Responding" and "Responding" and has been doing so for over 2 hours now.  I am not sure if it is working, but I will give it some more time before I kill the process.
    Thanks for your help nonetheless.
    Tim

  • Connecting to sql server database mdf file without installing sql server on client machine?

    I am creating a window application that need to use sql server database. I want to install this application to client machine without installing sql server so that my application can still connect to a database i.e mdf file that i will be providing at client
    system.
    How can i connect to a database(mdf) on client machine through my window application without installing sql server. ? I dont know is it possible or not.
    If possible what will be the connection string in that case. Database need not be used in network.

    you cant connect and view the internals of mdf file unless it being attached to a sql server instance as a database.
    The sql server instance can be installed in any box which is in the same domain and then you can connect from your application to it.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Problem attaching mdf file in sql server 2008

    hi...!
    I have an mdf file of sql server 2005 database now i want it to attach in sql server 2008 R2 but when i try to attach it, it gave me error saying.
       Fail to retrieve data for this request. 
     An exception occur while executing a Transact-SQL statement or batch.(Microsoft.sqlServer.connectionInfo)
    C:\program files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\file6.mdf is not a primary database file. (Microsoft SQL Server, Error:5171)
    Thanks in advance

    hi...!
    I have an mdf file of sql server 2005 database now i want it to attach in sql server 2008 R2 but when i try to attach it, it gave me error saying.
       Fail to retrieve data for this request. 
     An exception occur while executing a Transact-SQL statement or batch.(Microsoft.sqlServer.connectionInfo)
    C:\program files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\file6.mdf is not a primary database file. (Microsoft SQL Server, Error:5171)
    Thanks in advance
    Hello,
    As the message says the file is not primary data file ,i guess it must be ndf(secondary data file) or some other file you might have selected by mistake.PLease select primary data file and try attching you will succed
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Need help changing from SQL dbo to mdf file

    My project was started using dbo is there a way to change this to an mdf without changing out the database.

    I think you answered my question the datasets in my project are connected to sqlexpress instance, Iwant to remove this connection and add a connection to an MDF file in my project. Maybe this will help explain my question better. 
    You cannot directly add connection to mdf file.But you can achieve this by first attching this MDF file to SQL express( this has some limitations like max of  4 Gfile can be attached to Sql server 2008 and 10 G for 2012).Is this you want to achieve ?
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Existing Replica MDF file size is increased in size than the New replica install

    Please I need help here.I really really appreciate your help.
    Here are my scenarios:
    We have an application with replicated environment setup on sql server 2012 . Users will have a replica on their machines and they will replicate to the master database. It has 3 subscriptions subscribed to
    the publications on the master db.
    1) We set up a replica(which uses sql server 2012) on a machine with no sql server on it. After the initial synchronization(used replmerge tool) the mdf file has grown to 33gigs and ldf has grown to 41 gigs.
    I went to sql server management studion . Right click and checked the properties of the local database. over all size is around 84 gb with little empty free space available.
    2) We set up a replica(which uses sql server 2012) on a machine with sql server 2008 on it. After the initial synchronization(used replmerge tool) the mdf file has grown to 49 gigs and ldf has grown to 41 gigs.
    I went to sql server management studio , Right click and checked the properties of the local database. over all size is around 90 gb with 16 gb free space available.
    3) We set up a replica(which uses sql server 2012) on a machine with sql server 2012 on it. We have dropped the local database and recreated the local db and did the initial synchronization using replmerge tool.
    The mdf file has grown to 49 gigs and ldf has grown to 41 gigs. I went to sql server management studio , Right click and checked the properties of the local database. over all size is around 90 gb with 16 gb free space available.
    Why it is allocating the space differently? This is effecting our initiall replica set up times. Any input will be greatly appreciated.
    Thanks,
    Asha.

    https://technet.microsoft.com/en-us/library/ms151791(v=sql.110).aspx

  • Creating mdf file from a database project in Visual Studio for Web

    I am very new to database programming in Visual Studio and SQL Server Express LocalDB. I went through a walk through of setting up a database project (using visual studio express 2013 for web and SQL Server Express LocalDB), adding tables and entering data
    and everything worked fine:
    http://msdn.microsoft.com/en-us/library/ms233763.aspx
    Then I wanted to move on to trying to build a simple application to access this database so I looked into the following tutorial:
    http://msdn.microsoft.com/en-us/library/ms171890.aspx
    In a nutshell the tutorial says to add a new datasource and navigate to the database file, and it is looking for an .mdf file. 
    The database project that I created does not have an mdf file in it, only sql file, visual studio project, dbmdl file, options file, source browser database, etc.
    How do I create this .mdf file, that step didn't seem to be explained in the first tutorial. I tried running the project, but didn't see any build options for creating the .mdf file. Again, sorry for the absolute beginner question. 

    Thanks edencorbin
    I am glad to hear that it was helpful and you succeed :-)
    With that said, It is time to close the thread :-)
    please mark responses that were part of the answer as the answer in order to close the thread. once at least one of the responses in a thread is marked as answer, the thread Icon changed into V and the thread look like it is close(you can continue working
    on a thread after this point, but usually new supporters will not check this thread).
    Have a good day :-)
    [Personal Site] [Blog] [Facebook]

Maybe you are looking for

  • Image looks different in Acrobat after exporting to PDF

    I just created an image in InDesign. I exported it as a PDF and viewed it in Acrobat. There are two things going on here that I'm not sure about. First of all, there appears to be a broken edge on the right side of the image when viewed in Acrobat. I

  • IPhone Signal Issues on Orange UK/Wi-Fi Dropping Out

    I have noticed an issue with my iPhone 4 that seems to be unique to Orange/T-Mobile UK customers. I'm sure you are all aware that Orange and T-Mobile customers in the UK can now share their respective networks which is all fine and dandy until there

  • Website Software?

    Okay. I know this question is not an FCP question, but FCP and Logic is pretty much ALL I've used the past few years leading up to the completion of a feature film of mine, and I haven't used anything else. Now that I have to deal with the prospects

  • Ok, what did Sun break now?  (hello... have you heard of QA?)

    smpatch analyze shows a few patches and no details on a system that was working fine and has had no new patches applied since last good smpatch analyze. This occurs on Solaris 10 both sparc and x64 Solaris 8/9 don't seem affected by this. # smpatch a

  • Search no mapped unicode characters as question mark

    No mapped unicodes characters are replace by question mark. I want to search/detect these characters to correct them (i may spend too much time to find the character "?" in a big document, because of real question mark). How can i do ?