Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, February 19, 2025 
 
slxdeveloper.com Community Forums  
   
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!
 Data & Imports Forums - T-SQL & Queries
Forum to discuss general T-SQL questions and help with queries related to SalesLogix data. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to T-SQL & Queries | New ThreadView:  Search:  
 Author  Thread: SetUser 'sysdba'
Timmus Agersea
Posts: 328
 
SetUser 'sysdba'Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: SetUser 'sysdba'Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: SetUser 'sysdba'Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Eric Hobbs
Posts: 28
 
Re: SetUser 'sysdba'Your last visit to this thread was on 1/1/1970 12:00:00 AM
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!
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: SetUser 'sysdba'Your last visit to this thread was on 1/1/1970 12:00:00 AM
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'
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: SetUser 'sysdba'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 07 4:47 PM
fiogf49gjkf0d
Awesome. Good to know. Thanks Phil!
[Reply][Quote]
Carla Tillman
Posts: 290
 
Re: SetUser 'sysdba'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Mar 07 11:46 AM
fiogf49gjkf0d
It's the little things...

Thanks guys - I will certainly find employment for this command...

Carla
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 2/19/2025 4:37:44 PM