ssms

SQL Server Management Studio connection defaults to 'master' when selecting a database-specific object

旧时模样 提交于 2019-12-04 23:51:13
In SQL Server 2008 R2 Management Studio, if I right-click on an object inside a specific database and choose "Select top 1000 rows ..", the database connection for the query window always opens on 'master' while the table name is fully qualified as [database].[dbo].[table]. This makes it impossible to jump in and tweak out this query and insert joins, etc., to the statement without also fully-qualifying everything I add, or add a USE statement, or select the database from the drop-down menu. Is there a setting or something that will make query windows open with a database connection of the

SQL Server Management Studio disconnected after a period of inactivity

。_饼干妹妹 提交于 2019-12-04 23:22:16
I got a nice new fresh pc and installed SQL Server Management Studio on it. I have a "problem" that when I am inactive for about 30 minutes that I lose connection to the database servers where I had connected to. The query screen show the messages "not connected". On my former pc I could be inactive the whole weekend and it was no problem. I can't find a "setting" or something to change this. Does anybody know how I can restore the old situation? Ionic Well this may have some different causes. First of all, I just guess that - since you mentioned your fresh new PC and the fact that you

Marking persisted computed columns NOT NULL in SQL Server Management Studio

☆樱花仙子☆ 提交于 2019-12-04 23:03:48
It is possible in SQL Server 2005 to create a computed column that is both persisted and is defined as NOT NULL (cannot contain a null value). The 2nd attribute is of importance when using libraries like Linq2Sql if we want to avoid a lot of manual work to assure our code that the column 'always' has a value. With straight SQL this is very simple: ALTER TABLE Sales ADD Total AS (Price + Taxes) PERSISTED NOT NULL When viewed in the design window of SQL Server Management studio this column is correctly shown as a computed column with no checkmark for 'allows nulls'. However I run into a problem

SSIS script task fail version 15.0 script?

天大地大妈咪最大 提交于 2019-12-04 18:05:45
I have a 2012 SSIS project that runs on SQL Server 2016. I have SSDT 2015 on both my dev machine and server. Everything works fine except for script tasks - I made a change to an existing script task and rebuilt and redeployed the project and I receive the following error: Script task uses version 15.0 script that is not supported in this release of integration services. To run the package, create a new script. I've tried the following: upgrading the project to 2016 creating a new script object created script on the server It runs fine through SSDT 2015, but once it is deployed it fails with

SSMS SQL SERVER Management Studio 2012 startup freeze

我的梦境 提交于 2019-12-04 16:12:03
问题 I have a strange situation. IT installed SSMS on my laptop and it runs well the first time, connected to my SQL servers remotely etc. But then it's frozen. I forced quit and then started SSMS again. Now it's totally frozen, no popup window at all to enter the server-connection text string. Then I did a force quit and got a pop up window (see it here ). Microsoft SQL Server Management Studio has detected that an operation is blocking user input. This can be caused by an active modal dialog or

Error while using SSMS 2016 : Object cannot be cast from DBNull to other types

左心房为你撑大大i 提交于 2019-12-04 15:36:05
Can anyone resolve this issue: SQL Server Management Studio 2016 CTP3 (13.0.900.73) on a Windows 10 Laptop Object Explorer > Server > Databases > Database Right Click - Properties Instead of getting the Database Properties dialogue box I instead get this pop-up: TITLE: Microsoft SQL Server Management Studio Cannot show requested dialog. ADDITIONAL INFORMATION: Cannot show requested dialog. (SqlMgmt) Object cannot be cast from DBNull to other types. (mscorlib) BUTTONS: OK Edit: Issue is occuring on-Prem with both physical and virtual machines. It is also happening on Amazon RDS servers. If I

How to connect to SQL Server CE file using SSMS

懵懂的女人 提交于 2019-12-04 15:36:00
问题 I am using SSMS 2012 and trying to connect to the SDF created by Orchard. According to this answer, I should be able to select SQL Server Compact Edition as the Server type when connecting my object browser, but that isn't an option. Is there something I need to install? Did I miss part of the install originally (when setting up SSMS)? 回答1: SQL Server Compact is no longer supported in SSMS 2012, I have a list of available tools from Microsoft and others here: http://erikej.blogspot.dk/2009/04

SQL Server Management Studio won't work after Windows Update

白昼怎懂夜的黑 提交于 2019-12-04 15:29:38
Came to work this morning, my PC (Win7 x64) had force rebooted by Windows Update. Now, SQL Server Management Studio (SQL Server 2008 r2) fails when connecting to a database and trying to expand the tree view, citing: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following error: No such interface supported (Exception from HRESULT:0x80004002 (E_NOINTERFACE

Debugging in SQL Management Studio 2012

只谈情不闲聊 提交于 2019-12-04 12:58:15
I'm using Management Studio 2012 but I'm not able to debug any SQL code. After I hit the Debug button I'm not getting any green arrow on the left side and none of my SQL object are being loaded to the memory. I'm getting this message when I move my cursor over the breakpoint I set: The breakpoint will not currently be hit. Unable to bind SQL breakpoint at this time. Object containing the breakpoint not loaded. I followed a youtube video demonstrating how to debug in Studio 2012: http://www.youtube.com/watch?v=_jsFM_PUPgA&feature=relmfu The guy in the video around 4:30 writes a small SQL query,

How to insert a NEWID() / GUID / UUID into the code editor?

非 Y 不嫁゛ 提交于 2019-12-04 10:24:14
问题 Many code editors have a built-in menu item or keyboard function to get a UUID, for example when I press CTRL + SHIFT + G in Delphi it inserts a GUID at the current position in the source code. I know that I can use SELECT NEWID() to generate a UUID, but I have to go to the query result, copy the generated UUID to my clipboard (killing whatever was in there before) and then go back to the code and replace the query which is an awful way of dealing with this. Is there any function (maybe using