解决方案 »

  1.   

    SQL什么版本?在控制面析—程序和功能—查看有没有SQL相关组件没有删除—在这里直接删除
      

  2.   

    手动把带sql的文件夹和注册表都删了
    --> 问题可能比较复杂,建议重装一下windows.
      

  3.   

    删注册表,还有sqlserver相关的文件,这个东西都得删,一点都不能留
      

  4.   

    Hi u012842664,Please confirm the SQL Server version you installed. Is it still 2008 r2?. Moreover, please verify if SQL Server is installed sucessfully by checking setup log. By default, it is located in C:\Program Files\Microsoft SQL Server\version number\Setup Bootstrap\Log. if it is installed unsuccessfully,  according to your SQL Server version, please check if your machince meet the installation requirements referring to the article: http://msdn.microsoft.com/en-us/library/ms143506(v=sql.105).aspx . what's more,please right click setup.exe and select run as administrator to complete your installation.If it is installed successfully, please post the error log. For how to check error log, please refer to the article: http://msdn.microsoft.com/en-us/library/ms187109(v=sql.105).aspx. To connect to SQL Server, for local connection, please ensure that sql server service is running, enable TCP/IP protocol (named pipes, or shared memory) in SQL Server Network Configuration node. For remote connection, you should also need paying attention to the points below:1. Network is workable and stable. You could test the Network connection using the PING grogram: ping <Server Name>.2. Make sure that TCP port number of the instance and UDP port number for SQL Server Browser Service are added to exceptions in firewall. For more information about the process, please refer to the article: http://technet.microsoft.com/en-us/library/ms175043.aspx3. Make sure that SQL Server Browser service is started in SSCM.4. Make sure that ‘Allow remote connections to this server’ is checked in Server Connections properties in SQL Server Management Studio (SSMS). For more information, please refer to the thread: https://social.technet.microsoft.com/Forums/en-US/46ff8cb6-2a22-4c0d-b740-e686ba11065d/sql-server-connection-error?forum=sqlsecurity.Based on my research, the reason why the MDF file couldn't be opened could be due to that the SQL Server service account has no access to the file. To solve this issue, you could right click the file, and selet 'Properties', and then in the Properties dialog box, click the Security tab. select the SQL Server service account, select the Allow check box for Full control. If the sql server service account is not in the list, you should add it and grant the full control permission.