Question on Auto Fill

plagueplague Posts: 10
edited June 19, 2008 10:36AM in SQL Prompt Previous Versions
Hi,

I know this may sound stupid but I was wondering if someone could help me. When I type the name of the table for example in the stored procedure, it puts dbo automatically before the table. Same with the columns of the tables as well. Is there anyway to disable this? Please let me know how.

Regards,
JB

Comments

  • You should quantify your object most of the time, if not all the time really, especially if you use schema

    But it is an interesting question, I wonder what happens if a user logs under a limited schema and calls a proc with dbo.xxx in it, it'll probably fail
    Jerry Hung
    DBA, MCITP
  • plague wrote:
    Hi,

    I know this may sound stupid but I was wondering if someone could help me. When I type the name of the table for example in the stored procedure, it puts dbo automatically before the table. Same with the columns of the tables as well. Is there anyway to disable this? Please let me know how.

    Regards,
    JB

    You can turn off qualification of object names from the options menu.
    [SQL Prompt menu - options - Inserted Candidates - Formatting - Uncheck both 'Qualify object names' and 'Qualify column names']

    Thanks,
    Tanya
    Project Manager
    Red Gate Software Ltd
  • Thank you for the response. I have disabled it now and it seems to work fine.
  • jerryhung wrote:
    You should quantify your object most of the time, if not all the time really, especially if you use schema

    But it is an interesting question, I wonder what happens if a user logs under a limited schema and calls a proc with dbo.xxx in it, it'll probably fail

    If dbo owns all the stored proc then you will need permission to execute the stored proc and due to 'ownership chaining' in SQL 2005 you can get away by not having direct permissions for tables!
    So, in response to your question - no permissions it should fail.

    Thanks,
    Tanya
    Project Manager
    Red Gate Software Ltd
Sign In or Register to comment.