SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
BugReport - Popup not working for non-SystemAdmin account

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
BugReport - Popup not working for non-SystemAdmin account
Author Message
AndersChan



Joined: 01 Feb 2007
Posts: 2

Post BugReport - Popup not working for non-SystemAdmin account Reply with quote
In SQL Query Analyzer or Microsoft SQL Management Studio, if you connect to the SQLServer database using an account WITHOUT System Admin role, the pop up will not come up automatically after you type 'SELECT [Space]' or even after you hit [CTRL][SPACE].
e.g.


You have to at least provide the database name in order for the pop up to come up:



However, if the account you are using has the System Admin role, pop up will appear right after you type 'SELECT [Space]':



I ran a SQL profiler trace and it appears to me that SQLAssistant is issuing the following SQL statement to determine the current username.

select serverproperty('ServerName'), system_user, db_name(), user_name()

For a SystemAdmin account, the user_name() function by default will return 'dbo'. For a non-SystemAdmin account, the user_name() function will return whatever the current user's username which may not be 'dbo':



Unfortunately it appears to me that this SQLStatement is not configuable.

I hope this bug report helps.

Anders
Thu Feb 01, 2007 11:14 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6500

Post Reply with quote
Hi ,

Thanks for the detailed information. We will look into this and check what can be done quickly to fix this issue. For now, if you usually login with the same login, I suggest you customize the "Objects (MSSQL)" query in SQL Assistant options and basically hard-code it to return objects from your schema. In line "and uid = ?" replace it with something like "and uid = user_id('your name') and ? is not null"

The "DB Options" tab page in the Options provides you with nearly complete control over SQL Assistant database interactions and behavior

Thanks,
SysOp
Fri Feb 02, 2007 1:43 am View user's profile Send private message
AndersChan



Joined: 01 Feb 2007
Posts: 2

Post Reply with quote
Thank you for the fast response. Keep up the good work. I do like SQLAssistant better than SQLPrompt because of performance and configurability reasons.

I tried your suggestion and it does fix some of my issues.

For some databases, where I actually have an individual account, changing the "Objects (MSSQL)" query to what you have suggested works. For those databases,

select user_name() will return my username.
select user_id() will return a value > 0 (ie. one of the sysusers)


This is good. Thanks for your suggestion.

However, for other databases, where I indirectly have access via a NT User Group, I still could not get it to work. I even removed the whole uid = .... criteria so that it reads

select
name, xtype, id
from
/*db.*/dbo.sysobjects
where
xtype in ('U','S','V','P','X','RF','FN','TF','IF')
and not (name = 'dtproperties')
and not (name like 'dt%' and xtype = 'P')


But that doesn't do the trick. If I execute the above modified query directly in SQL query analyser, it will return all the objects fine. So I guess SQLAssistant is doing some extra filterings after it gets all the objects from this query.

I might be wrong but I think it might have something to do with the fact that I don't actually have an account directly on this database. In other words, my NT username 'AD\anchan' does not exist in the sysusers table.


Anyway, hope this information helps. Thanks.

Anders
Fri Feb 02, 2007 6:08 pm View user's profile Send private message
oliverdbw



Joined: 03 Apr 2007
Posts: 3
Country: United Arab Emirates

Post No pop up after installation while using SQL PLUS for Oracle Reply with quote
Hi, after installing the sql assistant, i run SQL PLUS for oracle. i was able to logon to the server but when i was creating a script (i.e SELECT * .....) after the 'Select' word, an error message would appear.

Wed Apr 04, 2007 4:08 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6500

Post Reply with quote
Hi,

This is a known issue in SQL Assistant. Here is what you can do.
Close SQL*Plus
Close SQL Assistant - right-click on its system tray icon and then choose Exit command from the icon menu.
Download and run build #77 http://www.softtreetech.com/sqlassist/builds/sqlassist_setup.77.exe or use build #70 http://www.softtreetech.com/sqlassist/builds/sqlassist_setup.70.exe
Start SQL Assistant and then start SQL*Plus

Please note that build 77 supports more features-but hasn't gone through full testing cycle, while build 70 supports less features, yet it has been fully tested.
Wed Apr 04, 2007 7:55 am View user's profile Send private message
oliverdbw



Joined: 03 Apr 2007
Posts: 3
Country: United Arab Emirates

Post Reply with quote
Hi,

Thanks for this reply. I have one query though, I can only install one of the fix right? If I install both, it will overide the previous installation.
Wed Apr 04, 2007 11:42 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6500

Post Reply with quote
Newest builds overwrite oldest builds, updating modified files, but not the opposite. To have an oldest build installed you need first to uninstall the current build or simply delete the files then install the needed build. Try #77 first, if doesn't work or you don't like it just delete the files and install #70.
Thu Apr 05, 2007 12:02 am View user's profile Send private message
oliverdbw



Joined: 03 Apr 2007
Posts: 3
Country: United Arab Emirates

Post Reply with quote
Hi,

Thanks. I will try first build 70 since it has been fully tested, Im new to sql assistant so i will try this build first.
Thu Apr 05, 2007 12:12 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.