The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
SetUser 'sysdba'
Posted: 07 Mar 07 11:32 PM
|
fiogf49gjkf0d Are you tired of prefixing all of your table names with sysdba when using Query Analyzer? Doesn't it suck when you connect with Windows authentication and try to paste a SQL query from a SalesLogix group and it bombs? Me too! Thanks to Chris Lee and Stu Carnie for pointing me to the OH SO VALUABLE setuser function/procedure/whatever for SQL Server. Books Online tells us not to use it but screw that. If you connect with sa, your windows authentication, or any other non-sysdba admin user just run the following SQL in Query Analyzer and you no longer need to prefix tables:
SETUSER 'sysdba'
Voila.
Thanks again Chris and Stu!
Timmus |
|
|
|
Re: SetUser 'sysdba'
Posted: 08 Mar 07 8:02 AM
|
fiogf49gjkf0d Or just login as sysdba.
I always forget and end up logged in as sa, particularly since SQL 2005 allows you to "remember password" - so I know I'll be making using of that trick!
Thanks for sharing that - it will be helpful.
Jeff
|
|
|
|
Re: SetUser 'sysdba'
Posted: 13 Mar 07 12:27 PM
|
fiogf49gjkf0d Handy hint! Typically em is logged in as sa.. and this certainly helps! Also, handy when switching to QA. -- rjl |
|
|
|
Re: SetUser 'sysdba'
Posted: 14 Mar 07 4:53 AM
|
fiogf49gjkf0d We've just changed our policy so that all developers must log on to SQL in using windows authentication. This is an awesome tip, and should save me a fair bit of extra typing!
|
|
|
|
Re: SetUser 'sysdba'
Posted: 19 Mar 07 4:32 PM
|
fiogf49gjkf0d In SQL Server 2005, the SETUSER command is deprecated. Use EXECUTE AS instead:
execute as login = 'sysdba' |
|
|
| |
|
Re: SetUser 'sysdba'
Posted: 20 Mar 07 11:46 AM
|
fiogf49gjkf0d It's the little things...
Thanks guys - I will certainly find employment for this command...
Carla |
|
|
|