mercredi 31 décembre 2014

Unable to connect to or create SQL Server database using asp.net


In my asp.net project I have SQL Server database with some tables. Unfortunately my PC was not properly shut down and and after that I am unable to connect to my database from Visual Studio (I am using version 2012): this is the error message:



The attempt to attach to the database failed with the following information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.)



The log file in Microsoft SQL Server Local DB11\Instances\v11.0 suggested that master.mdf database is corrupted. After research I tried to restore it by using rebuildm.exe but my attempts were not successful. Originally this tool was not present on my PC so after downloading all .exe, .dll, and .rll files. I am not sure if it even works properly.


I tried also Windows system restore but it was unable to be performed (some issues with my antivirus program)


I tried reinstalling all Microsoft SQL Server features available in Windows Programs and Features and VS too but this error is still present. My project dead line is getting closer and I lost all day trying to fix this problem. I have little knowledge about VS or SQL Server. Any suggestions will be highly appreciated!





Aucun commentaire:

Enregistrer un commentaire