問題描述
我正在從 VB 6 應用程序運行 SQL Server 2005 數據庫.我連接到數據庫通過 ODBC DSN.
I'm running a SQL Server 2005 database from a VB 6 Application. I connect to the database through an ODBC DSN.
我將運行 SQL 服務器默認實例的計算機從軟件"重命名為IT".然后我運行 sp_dropserver
和 sp_addserver
存儲過程來重命名實例.
I renamed the computer on which I'm running the default instance of SQL server from 'Software' to 'IT'. I then ran the sp_dropserver
and sp_addserver
stored procedures to rename the instance.
重新啟動 SQL Server 服務后,服務器能夠使用新的 SQL Server 名稱.
On restarting the SQL Server service, the server was able to pick up on the new SQL Server name.
將ODBC數據源名稱配置為新名稱后,連接正常.我能夠運行我的應用程序并通過 ADO 記錄集讀取記錄.但是我無法使用 .Update
方法更新任何記錄集.我收到以下錯誤... SQL Server 未配置數據訪問
After configuring the ODBC data source name to the new name, the connection was Ok. I'm able to run my application and read records through ADO record sets. However I'm unable to update any recordset using the .Update
method. I get the following error instead ... SQL Server not configured for data access
如何在重命名的服務器實例上啟用數據訪問?
How can I enable data access on the renamed server instance?
推薦答案
如何:重命名承載 SQL Server 2005 獨立實例的計算機
您應該能夠在任何鏈接服務器上運行它,但不能.它不是鏈接服務器.這是本地的.
You should be able to run this but not against any linked server. It's not a linked server. It's local.
EXEC sp_serveroption 'YourServer', 'DATA ACCESS', TRUE
這篇關于未針對數據訪問配置 SQL Server的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!