Why Sql 2005 requires to prefix the Owner name with Object name?

  • Hi,

    I am currently in the process of migrating my SPs from Sql 2000 to Sql 2005. My Sql 2000 SP calls are currently running with out prefixing it's owner name (Exec Sp_name). How ever, if I try the same in Sql 2005, it throws error as 'Object doesn't exist' and works only when I prefix with Owner name (Exec Owner.Sp_name).

    Are there any changes in 2005 to insist Owner name perfixing while using any DB objects? I also heard like there is a new concept called Schema in 2005. Does that come into picture in my case?

    Thanks in advance,

    Suresh

    Regards,
    Suresh Arumugam

  • You shouldnt be calling Stored procs without the Object/Schema qualifier. It has performance impact. Be it 2000 or 2005.

    -Roy

  • Yeah, you're probably running into schema issues. If the schema defining the object is anything other than the default schema for the connection, you can't simply call the proc.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks for the quick reply.

    I understand the importance of using schema along with object names. How ever, still trying to understand why it was working in Sql 2000 for me but not in Sql 2005.

    Thanks,

    Suresh

    Regards,
    Suresh Arumugam

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply