ssms

error when running any query in sql server management studio: the file exists

好久不见. 提交于 2019-12-03 22:09:54
When I run any query in sql server management studio, I get the following error: An error occurred while executing batch. Error message is: The file exists. Restarting SSMS didn't help. Neither did rebooting the machine. The only thing I found on Google was someone saying "report the bug to microsoft" :P (Windows XP Pro x64, SSMS 2005) I've been struggling with this one for while and when I recently installed Toad for MySQL I got the same issue. I installed sysInternals process monitor tool to try and work out which file was causing the issue. The answer is temp files. Both SQL server

Mac alternative to SQL server management studio? [closed]

别等时光非礼了梦想. 提交于 2019-12-03 22:09:49
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am on Windows so SQL server management studio works fine for me. However, my application is hosted and my client needs to make some entries in DB and he has Mac. How can we get over this issue? Is there any MAC option for SSMS? Thanks! DbVisualizer is OS independent using java. http://www.dbvis.com/download/ I use RazorSQL. It works on OS X, Windows and Linux so you can use one tool across all

Could not write value to key \\SOFTWARE is displayed for SSMS Install in a Windows 7 machine with an Administrator account

核能气质少年 提交于 2019-12-03 20:26:02
I have the following error when installing SQL Server 2014: Could not write value to key \SOFTWARE. Verify that you have sufficient access to that key, or contact your support personnel. It happens when it tries to install the SSMS and my machine has Windows 7 running. I have done the following things in order to make it work: • Run the set up as an admin • Reinstall the machine I found this on a Microsoft link and doesn’t work either • Click Start, click Run, type control userpasswords, and then click OK. • Create a new computer administrator account. • Click Start, click Run, type regedit,

MSSQL Server Management Studio (SSMS) 2005 New Query Template

99封情书 提交于 2019-12-03 16:11:05
How do I change a default "New Query" template in SSMS 2005? Posted this question as a reference, I did some googling, and found a simple way of doing it. All you need to do is to edit SQLFile.sql located here: <%= your SQL install dir %>\90\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\SQL\SQLFile.sql Also, Ctrl+Alt+T will show you all the other templates in SSMS; and check out Free SQL Server tools while you're at it. 来源: https://stackoverflow.com/questions/593047/mssql-server-management-studio-ssms-2005-new-query-template

SQL Query Using Entity Framework Runs Slower, uses bad query plan

余生长醉 提交于 2019-12-03 15:18:08
am using entity framework generally successfully, but one query is running remarkably slowly. The query (generated by EF) is as follows: exec sp_executesql N'SELECT [Project1].[downtimeId] AS [downtimeId], CASE WHEN ([Extent12].[downtimeStart] > @p__linq__7) THEN [Extent13].[downtimeStart] ELSE @p__linq__8 END AS [C1], CASE WHEN ([Extent14].[equipmentID] IS NULL) THEN 0 ELSE [Extent15].[equipmentID] END AS [C2], CASE WHEN ([Extent16].[equipmentID] IS NULL) THEN N''Unit Overhead'' ELSE [Extent18].[equipmentCode] END AS [C3], CASE WHEN ( CAST( [Project1].[downtimeEquipmentStart] AS datetime2) >

SQL Server copy all rows from one table into another i.e duplicate table

十年热恋 提交于 2019-12-03 14:55:00
问题 I want to keep a table as history and replace it with an empty one. How can I do this through Management Studio? 回答1: Duplicate your table into a table to be archived: SELECT * INTO ArchiveTable FROM MyTable Delete all entries in your table: DELETE * FROM MyTable 回答2: Don't have sql server around to test but I think it's just: insert into newtable select * from oldtable; 回答3: select * into x_history from your_table_here; truncate table your_table_here; 回答4: Either you can use RAW SQL: INSERT

SQL Server Express 'NEW TRIGGER' BUTTON IS DISABLED

会有一股神秘感。 提交于 2019-12-03 14:51:05
问题 I am new to SQL Server Express and I want to create a new trigger on my table. But I found that the 'New trigger' button in my table's trigger folder shows Disabled. When I right click on trigger folder it shows 'New trigger' button disabled and in gray color. I am using SQL Server 2014 Express and Management Studio 2014. Does anybody have any idea why it is happening? Please suggest me some way out. 回答1: This a known issue (bug) with SSMS 2014. Reference : https://connect.microsoft.com

Duplicating a TABLE using Microsoft SQL Server Mangement

て烟熏妆下的殇ゞ 提交于 2019-12-03 14:37:30
问题 Need to duplicate a TABLE using Microsoft SQL Management Studio 2008 The TABLE needs to duplicate all table row (Primary Key) ID as well. Thanks. 回答1: In SSMS open a new query window and then do something like SELECT * INTO NewTable FROM OldTable change NewTable to the name that the new table should have, change OldTable to the name of the current table this will copy over the basic table structure and all the data...it will NOT do any of the constraints, you need to script those out and

Grid control in SSMS

和自甴很熟 提交于 2019-12-03 10:41:18
I notice in SSMS (SQL Server Management Studio 2016), the query results return within a blink of a second (above 10k+ rows). The result table/grid scroll perfectly smooth, and have an extremely low memory footprint (~80MB) on SSMS. This grid/view-like control way out perform either ListView (~200MB, 2-3 seconds) and DataGrid (~600MB, 8-10 seconds). Even if I turn off all visualization or tweak cancententscroll or fix its height to optimize the speed, they still perform far behind the grid in SSMS, still with sluggish scrolling and GUI operation. What is behind the grid control used in SSMS

Cannot connect to SQL Server express from SSMS

梦想的初衷 提交于 2019-12-03 10:25:40
I have installed SQL Server Management Studio 2005. I can't find my server name when I click browse for more but i know that my server name will be the same as the user name as in the picture below. Use . or (local) or localhost for server name if you installed the server as default instance. Use .\sqlexpress or localhost\sqlexpress if you have SQL Express. The server name syntax is Servername\InstanceName If the instance is default you use just Servername. For SQL Express, instance name is sqlexpress by default. Please see: SQL Server 2005 Connectivity Issue Troubleshoot 来源: https:/