Hi there, I would like to know how does SQL Server determine whether precedence between synonyms and system objects.
For example, I've created a synonym [SchemaA].[sp_tables] and the base object is a user defined stored procedure, and SchemaA is the default schema for UserA. My intention is to call a user defined stored procedure when UserA executes "EXEC sp_tables".
But in my testing, when I logon using UserA and execute "EXEC sp_tables", the sys.sp_tables was called instead.
Anyone can enlighten me??
Thank you.