sql server files showing as just files

  • hello guys, i have a question, i just checked my mdf, ndf and ldf files for my sql server database and they are all showing as just files. I tested my database and everything seems to be fine. Has anyone have this happened to them?

  • Explain just files?

    Also, if you say just files do you mean you are able to open them?

    At last see the properties of the database to check the file names whether they are the ones you talking about

    Thanks!!

    The_SQL_DBA
    MCTS

    "Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."

  • hi yes i checked and double check in the properties of the DB that i am checking the correct files.

    when i click on the file and you get a window that says

    Type: Sql server Database Primary File

    when i click in the ones i have it says

    Type: File

    help!

  • Well its fine if you click them until you are not able to open them. I reckon when we click on a database file be it mdf,ndf or ldf it says 'You are attempting to open a file of type SQL Server Data file(.ndf) These files are used by operating system and various program. Editing or modifying them may damage your system.

    if you still want to open click open with otherwise cancel'

    if this is what you see then you are fine if not you have to check why?

    Thanks!!

    The_SQL_DBA
    MCTS

    "Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."

  • For all my mdf, ndf, ldf files, I have Type: FILE

    they don't have file extensions in the names example: DBA_Files instead of DBA_Files.mdf, etc...

    when i double click the files it says:

    OPEN WITH

    Choose the program you want to use to open this file.

    I am not sure how this happened, checking the tables, views, sps, from Management studio everything seems to be ok.

    i also ran the DBCC CHECKDB and got 0 errors.

    do you think if i detach the dB and insert the file extensions into the names and retach will fix the problem?

    :crying:

  • Just out of curiosity, do you have the option to hide file extensions checked in Windows Explorer?

    The default is to hide known extensions (of which .mdf and the others you listed would be known as they are registered to SQL Server and other database programs). So, if the option hasn't been changed, you will see the file name listed as "DBA_file" in Windows Explorer instead of "DBA_file.mdf".

    Go into the folder options on Windows Explorer and click the View tab. There is an option called "Hide extensions for known files". Uncheck that and the files should show up properly in Windows Explorer with the proper extensions.

    Personally, I hate that option and always turn it off on any computer I operate.

    -- Kit

  • it is unchecked, also for my other Dbs, the extension do show correctly except for this one. .. :crying:

  • It sounds like someone created a database without the standard MS file extensions. The database will run fine without file extensions and SQL does not care what the file extensions are as long as you tell it which is the primary data file and which is the log.

    If you are worried about it you can detach the db, add the file extensions, and then attach the db.

  • I would think that your registry has lost (or more likely never had) the file association registry entries for .mdf, .ldf and .ndf (for example, in HKEY_CLASSES_ROOT). Since these are used by applications (mainly Explorer) when trying to open files to determine what the contents should be and hence what application to launch, etc.,and the SQL Server database engine doesn't use these registry entries (it just opens the files it 'knows' contain the actual database information), not having Explorer identify them should not cause a problem.

    Even when the extensions are known, double-clicking them just gets a warning that you shouldn't try opening them, since there is no front-end application to process these files in a supported way, so I'd be inclined to just forget about it.

    If you must fix it, then you probably need to do a setup/repair or partial reinstall.

    Derek

  • DBA (2/11/2009)


    it is unchecked, also for my other Dbs, the extension do show correctly except for this one. .. :crying:

    Sorry, I missed this extra information.

    Since your other database are shown correctly, the registry entries for .mdf, .ldf, and .ndf are there, so the conclusion is that you have Explorer option 'Hide extensions for known file types' set to ON and that these files, as mentioned, have been created without the right extensions.

    If everything works, I'd still be inclined to just forget it, but if you must fix it, you can probably do a detach/rename/attach as described above.

    Derek

  • Thank you so much guys! i did the detach, added the file extensions and attached again and everything is ok now. I was wondering how this could had happened the DB had been created a while ago with the correct extensions and all of a sudden they changed. I noticed because my maintenance plans started failing. Anyhow, i thank you all for all your help. 🙂

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply