SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Troubleshooting shared connections in SQL Management Studio

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Troubleshooting shared connections in SQL Management Studio
Author Message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7841

Post Troubleshooting shared connections in SQL Management Studio Reply with quote
In case you are experiencing connectivity issues and database context issues when using SQL Assistant with SQL Server Management Studio or SQL Server Management Studio Express, perform the following troubleshooting steps to find and correct the root cause:


1. Make sure you installed SQL Assistant in Admin mode. Do not confuse running programs in Admin mode with being logged in as a user with administrative account. By default latest versions of Windows ignore your administrative privileges and attempt to run all programs in low-privileged user mode. As a result, configuration changes made in the registry or configuration files are erased after program run or logoff. To run the setup in Admin mode, right-click on the setup program and choose Run as Administrator from the popup menu. Note that location and name of this command differ in different Windows versions.


2. Make sure SQL Assistant for SQL Server Management Studio is properly registered. Check that the value in SQL Assistant options for the Add-on is set to Yes. If it is no, change it and restart SQL Server Management Studio. Verify the value is sticky and after the restart the value is still Yes (see picture)




3. If the above doesn't help, start SQL Server Management Studio in Administrator mode. Check if that resolves the problem. If yes, it means that the low-privileged account used to run SQL Server Management Studio is unable to see add-on settings in the registry and unable to load it. Another way to verify it is to close SQL Assistant running in the system tray and start SQL Server Management Studio. Open new code editor window. If the add-on is correctly installed, SQL Assistant menu should appear on top and in the right-click menu in the editor.



4. If none of the above helps. Start SQL Management Studio from the command line from the folder where it is installed using the following command
ssms.exe sa:traceloglevel:9

Please note different versions of SQL Management Studio have different name of the main executable file. If you don't have ssms.exe try it with SqlWb.exe or ssmse.exe.

You can check properties of SQL Management Studio shortcut in the Windows Programs menu to find out exact location and name of the executable file.

When running this command you should get a message that SQL Management Studio cannot open file sa:traceloglevel:9 Please ignore that message. Open edit window and type word SELECT then type space character. Switch the database and type another SELECT then type space character. Please post the the log file created in C:\Documents and Settings\[Current User Name]\Application Data\SQL Assistant\4.7 folder. Here [Current User Name] is used as a placeholder for your user name.


Please note that SQL Assistant's Connect to Database dialog should not appear when using SQL Assistant with SQL Management Studio. As long as you get that dialog, the connection is not shared. As a result, SQL Assistant is unable to see connection changes in SQL Management Studio and follow the database connection context in the editor.


Last edited by SysOp on Fri Apr 13, 2018 9:52 am; edited 1 time in total
Thu Sep 17, 2009 9:07 am View user's profile Send private message
rick_townsend



Joined: 12 Oct 2009
Posts: 14
Country: New Zealand

Post Tried all steps in this post, still not working Reply with quote
Hi,

I get this shared connection problem on my work laptop, where I've just installed MSSQL and SQL Assist on a fresh Vista install. I've tried each of the steps in this post, but none of them resolved the problem. The system is:
- SQL 2005 SP3
- Vista Ultimate SP1
- 4GB RAM, etc (let me know if you need more system specs)
- Default SQL instance (ie: not named instance)
- Also tried both Windows and SQL authentication for my query window connections, always with sysadmin rights on the server


As requested in the final step of the post, contents of SQL Assist log file follow:

13/10/2009 9:56:48 a.m. SqlWb.exe SA=4.7.11; Exe=C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\SqlWb.exe; Cmd=sqlwb.exe sa:traceloglevel:9; LogLvl=9; MsgLvl=0
13/10/2009 9:56:48 a.m. SqlWb.exe Client: Attach
13/10/2009 9:56:48 a.m. SqlWb.exe Client: Create
13/10/2009 9:56:49 a.m. SqlWb.exe Client: SetCbtHook
13/10/2009 9:56:49 a.m. SqlWb.exe Client: CreateTargetList
13/10/2009 9:56:49 a.m. SqlWb.exe SA=4.7.11; Exe=C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\SqlWb.exe; Cmd=sqlwb.exe sa:traceloglevel:9; LogLvl=9; MsgLvl=0
13/10/2009 9:56:49 a.m. SqlWb.exe Prefs: Attach
13/10/2009 9:56:49 a.m. SqlWb.exe TargetList: SetSuspend=0
13/10/2009 9:56:49 a.m. SqlWb.exe TargetList: Create: Rok=1
13/10/2009 9:56:49 a.m. SqlWb.exe TargetList: SetSuspend=0
13/10/2009 9:56:49 a.m. SqlWb.exe TargetList: EnumWnd (class=VsTextEditPane)
13/10/2009 9:56:59 a.m. SqlWb.exe Target: Create: Pref=MS Management Studio
13/10/2009 9:56:59 a.m. SqlWb.exe Target: Create: Code=4
13/10/2009 9:56:59 a.m. SqlWb.exe PopupInitBars: result=1
13/10/2009 9:57:06 a.m. SqlWb.exe fmConnect: Create
13/10/2009 9:57:13 a.m. SqlWb.exe fmConnect: Cancel
13/10/2009 9:57:13 a.m. SqlWb.exe fmConnect: Release
13/10/2009 9:57:24 a.m. SqlWb.exe fmConnect: Create
13/10/2009 9:57:27 a.m. SqlWb.exe fmConnect: Cancel
13/10/2009 9:57:27 a.m. SqlWb.exe fmConnect: Release
13/10/2009 9:57:39 a.m. SqlWb.exe Target: Destroy
13/10/2009 9:57:39 a.m. SqlWb.exe Client: CloseQuery
13/10/2009 9:57:39 a.m. SqlWb.exe TargetList: CloseQuery 1
13/10/2009 9:57:39 a.m. SqlWb.exe Prefs: Detach
13/10/2009 9:57:39 a.m. SqlWb.exe TargetList: Destroy
13/10/2009 9:57:39 a.m. SqlWb.exe TargetList: Save MS Management Studio
13/10/2009 9:57:39 a.m. SqlWb.exe Client: Destroy
13/10/2009 9:57:39 a.m. SqlWb.exe Client: Detach
Mon Oct 12, 2009 6:39 pm View user's profile Send private message
zxfwinder



Joined: 14 Oct 2009
Posts: 2
Country: China

Post Reply with quote
according the steps below:

> install v4.6.12
> uninstall v4.6.12
> install v4.7.*.

You'll find everything goes well ;)
Wed Oct 14, 2009 8:08 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7841

Post Reply with quote
That indicates a security related issue. Some values saved in HKEY_LOCAL_SYSTEM hive of the registry appear erased by Windows or anti-virus after the install is done. Registry update/read methods in 4.7 use different update sequencing, which is more sensitive to such issues.

In 4.8 we reverted to the same sequencing that was used in 4.6
Wed Oct 14, 2009 9:03 am View user's profile Send private message
rick_townsend



Joined: 12 Oct 2009
Posts: 14
Country: New Zealand

Post Reply with quote
zxfwinder wrote:
according the steps below:

> install v4.6.12
> uninstall v4.6.12
> install v4.7.*.

You'll find everything goes well ;)


You're right, that got it working! Also explains why 4.7 worked fine for all my coworkers who upgraded, but not for me with a clean install.

Cheers,

Rick
Wed Oct 14, 2009 4:12 pm View user's profile Send private message
aa1018



Joined: 05 Jan 2013
Posts: 1
Country: China

Post 2013/1/5 10:56:07 Ssms.exe Error: Message: Timeout &#261 Reply with quote
2013/1/5 10:56:07 Ssms.exe Error: Message: Timeout 时间已到。在操作完成之前超时时间已过或服务器未响应。
Context: Fetch

if @@version like 'Microsoft SQL Server 2005%'
or @@version like 'Microsoft SQL Server 2008%'
or @@version like '%SQL Server 2012%'
or @@version like '%Denali%'
select
name, CASE WHEN type = 'SN' THEN '^' +
CASE CAST(OBJECTPROPERTYEX(object_id,'BaseType') AS VARCHAR)
WHEN 'AF' THEN 'F'
WHEN 'FN' THEN 'F'
WHEN 'FS' THEN 'F'
WHEN 'FT' THEN 'U'
WHEN 'IF' THEN 'U'
WHEN 'IT' THEN 'T'
WHEN 'P' THEN 'P'
WHEN 'PC' THEN 'P'
WHEN 'S' THEN 'T'
WHEN 'SQ' THEN 'I'
WHEN 'TF' THEN 'U'
WHEN 'TT' THEN 'K'
WHEN 'U' THEN 'T'
WHEN 'V' THEN 'V'
WHEN 'X' THEN 'P'
ELSE ' '
END
ELSE type END,
object_id, create_date, modify_date
from
[TXERP_01B].sys.all_objects
where
type in ('U','S','V','P','X','RF','FN','TF','IF','SN','PC','FT','FS', 'TR')
and (
schema_id = @b0
or (
1 = @b1
and user_name() = 'dbo'
and schema_id = 4
and name in ('sysobjects','sysindexes','syscolumns','systypes','syscomments','sysfiles1','syspermissions','sysusers','sysproperties','sysdepends','sysreferences','sysfulltextcatalogs','sysindexkeys','sysforeignkeys','sysmembers','sysprotects','sysfulltextnotify','sysfiles','sysfilegroups')
)
)
and not (name = 'dtproperties')
and not (name like 'dt%' and type = 'P')
else
select
name, xtype, id, crdate, crdate
from
[TXERP_01B].dbo.sysobjects
where
xtype in ('U','S','V','P','X','RF','FN','TF','IF')
and uid = @b2
and not (name = 'dtproperties')
and not (name like 'dt%' and xtype = 'P')
Sat Jan 05, 2013 2:28 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7841

Post Reply with quote
Thank you for your message. Please reenter your message as a separate topic. It has nothing to do do with the subject of this message thread. I will reply to your new message.
Sat Jan 05, 2013 8:23 am View user's profile Send private message
sorcer



Joined: 02 May 2017
Posts: 2
Country: Lithuania

Post Reply with quote
Not work for Microsoft SQL Server Management Studio 17. No plugin menu.

Work only "Save documents" then close studio.
Tue May 02, 2017 7:46 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7841

Post Reply with quote
Which SQL Assistant version are you running? Which SSMS version, full number?
Tue May 02, 2017 8:12 am View user's profile Send private message
sorcer



Joined: 02 May 2017
Posts: 2
Country: Lithuania

Post Reply with quote
Sql assisst version 9.1.261

SQL Server Management Studio v17.0
Code:

Microsoft SQL Server Management Studio                  14.0.17099.0
Microsoft Analysis Services Client Tools                  14.0.513.48
Microsoft Data Access Components (MDAC)                  10.0.14393.0
Microsoft MSXML                  3.0 4.0 5.0 6.0
Microsoft Internet Explorer                  9.11.14393.0
Microsoft .NET Framework                  4.0.30319.42000
Operating System                  6.3.14393


SSMS from this url https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms

I try reinstall, do all 3 steps from 1st message, 4 step with "ssms.exe sa:traceloglevel:9" not work for SSMS 17
Product is work with older studio 2014 (Microsoft SQL Server Management Studio 12.0.4232.0)
Fri May 05, 2017 3:14 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7841

Post Reply with quote
Thank you for the details. I'm going to enter a separate topic for SSMS 2017 build 14.0.17099.0.
I'm going to download and test that build for compatibility. I will get back to you with my results. Please watch for separate topic dedicated to SSMS 2017 build 14.0.17099.0 support
Fri May 05, 2017 10:39 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.