troubleshooting Question

SQL Server permission problem - External Application can't execute stored proc in another database

Avatar of yonbret
yonbretFlag for United States of America asked on
Microsoft SQL ServerSQL
3 Comments1 Solution43 ViewsLast Modified:
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

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?
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros