By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
In VB.NET, I am trying to execute a stored procedure that tries to insert values into a table using a SELECT statement. The SELECT statement uses tables from this database and also uses a view containing this database's tables and a table from a different database. When I try to execute the procedure, I get an error message that the user ID in my connection string does not have rights to the different database. What would be the solution to this problem?
The thing to investigate here that will allow access across databases is cross-database ownership chaining. The behavior of this function was modified in SQL Server 2000's Service Pack 3. Take a look at the entry in Books Online called
"Cross DB Ownership Chaining option."
Make sure you have an updated copy of Books Online too.
Dig Deeper on SQL Server Stored Procedures
Related Q&A from Greg Low
Should developers be granted permissions to production queue in a SQL Server environment? See why expert Greg Low suggests proc access by WITH ...continue reading
A SQL Server application that needs user permission to create and modify tables in SQL Server 2005 may be handled best via a schema.continue reading
Find how to save stored procedure output to the network drive via SQL Server Management Studio.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.