Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Sysnonym for system objects.

$
0
0

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.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>