我現在的服務器名稱是AVI-PC\SQLEXPRESS
,它正在工作,我想將其他主機添加到SQL Server。我想添加sqllocalhost\SQLEXPRESS
。SQL Server添加主機連接字符串
所以我去等/主機,並添加以下行:
127.0.0.1 sqllocalhost
,但我無法連接。
所以我ping到AVI-PC
,我得到了以下地址:fe80::bdc4:33a7:b403:d7f6%10
。
於是,我就添加
fe80::bdc4:33a7:b403:d7f6%10 sqllocalhost
,但仍不能工作。
(我已重新啓動服務器和PC)。
編輯
這是配置:
這是個例外:
===================================
Cannot connect to sqllocalhost.
===================================
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
謝謝,但我得到同樣的例外(看我的文章) – SexyMF
謝謝,現在它正在工作! – SexyMF