We have an Accounting software that uses a SQL Server back-end. When certain events occur in the Accounting software, we want the Accounting software to execute a stored procedure. The stored procedure is in the Accounting SQL Server database, but makes updates to another SQL Server database called dbCofA.
When we execute the stored procedure directly from the SQL Server management studio, everything runs great. When we attempt to execute it from the Accounting software we get the following message:
Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server] The server principal "sa" is not able to access the database "dbCofA" under the current security
context.
The accounting software company is telling us that the stored procedure should be executed from their software using an Application Role. We are both confused as to why the message states that the sa account is being used. Both the Application Role and the sa account have permissions to update the dbCofA database.
Any ideas how to get this to work?
Can you review the connection strings in your application? The connections should be a non-sa user (your DBA should be able help with what this user should be).