Error when attaching a database to SQL Server. EventID 3415 in Event Viewer or Error 5123 in SQL Server Management Studio

If you see any of the following two errors when you attach a database to an SQL instance:


TITLE: Microsoft SQL Server Management Studio


Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

For help, click:


An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)


CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file ‘E:\_restore\MSSQL10_50.SHAREP\MSSQL\DATA\UPSA_Social.mdf’. (Microsoft SQL Server, Error: 5123)

For help, click:




Event ID: 3415 

Source: MSSQLServer

Level: Error


“Database ‘Your database’ cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.”

Then you should know it has nothing to do with the permissions to the database files you try to add, it is only because you need to start SQL Server Management Studio as administrator(Right click and select Run as Administrator).

Take a look at the error messages below.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s