CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105)

前端 未结 25 2232
梦毁少年i
梦毁少年i 2020-12-13 23:44

I have a database file .mdf from MS SQL EXPRESS in folder:

C:\\Program Files\\Microsoft SQL Server\\MSSQL10.SQLEXPRESS\\MSSQL\\DATA
25条回答
  •  离开以前
    2020-12-14 00:24

    Here is what happened in my case. I was asked to attach files for a database. I was given the file names as follows

    • devdb.mdf and devdb.ldf

    I proceeded to attach the files and kept getting the files are in use by another process.

    I ran a query against the system view select name, physical_name from sys.master_files; and saw that the exact file names were already in use by another database, thus each time I tried to attach the files, I kept getting the error the files are in use by another process(sql server)

    Thus if you are getting such a message, then also query against the system view sys.master_files and see which database may already be using the same name files. Hereafter you will figure out what to do.

    thanks.

提交回复
热议问题