SQL Native Client Linked Server Error On Uninstall Only

We are using SQL Native Client to connect to on-premises SQL Server 2005 from a Borland application. It will be great for selection, insertion and updating. When we delete, we get an error:

Could not find server SERVERNAME\SQLEXPRESS

in sys.servers. Make sure the server name is correct. If necessary, run the stored procedure sp_addlinkedserver to add a server for sys.servers

The default instance, the only instance, is SERVERNAME\SQLEXPRESS

and we are not using linked servers. Any ideas? I believe we moved the MDF and LDF files to the new server for this DB and then reconnected it.

Update 1

No SQL. All this happens through programmatic interaction with cursors. It is an ODBC driver using ADO. You run TableObj-> Delete to delete the entry.

+1


source to share


1 answer


Got it. I ran

SELECT @@servername

      

This returned the old hostname. What did I run

sp_dropserver 'OLDHOSTNAME\SQLEXPRESS'
go
sp_addserver 'NEWHOSTNAME\SQLEXPRESS', local

      

Then I got

NEWHOSTNAME \ SQLEXPRESS server is not configured to access DATA



I ran

sp_serveroption 'ICS-POS3-NEW\SQLEXPRESS', 'data access' , 'true'

      

This caused the error

Transaction context used by another Session

It has to do with connected servers. I found that the local option on the add server had no effect until I restarted the server. I restarted, then it just worked.

0


source







All Articles