How to call procedure/function without schema name | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to call procedure/function without schema name

Hi All,
I have created a function in sqlserver,but while calling i have give like schema.function name.
Like
User Name – sanjay
procedure Name – Last_Date
Then I have to call like sanjay.Last_date but I want to call my procedure or function without giving my schema name like Last_date.So, please advice me how to call as I am calling this in my SELECT QUERY.
Thanks for your help in advance Sanjay Kumar
FYI, MS recommend that a stored procedure is called using the schema name. Thus a stored procedure called StoredProcedure should be called by dbo.StoredProcedure. This avoids a compile lock being acquired on the stored procedure. In addition, it is good practice not to use a schema name other than dbo. Cheers,
Harry
Thanks Harry,that means there is no way to call procedure/function without giving schema name before procedure/function. Harry,sorry but actually I m oracle guy just came into sqlserver so it is new for me so may be this is very basic doubts,but appericiate ur help on the same.
regards,
Sanjay Sanjay Kumar
Books online for SQL server has got valuable tips and information for newbie’s, worth referring to it. Satya SKJ
For best performance, it is always a good idea to use the owner_name.object_name format. If you do this, SQL Server won’t have to manually resolve the object owner’s name, which saves a little bit of overhead.
——————
Brad M. McGehee
Webmaster
SQL-Server-Performance.Com
]]>