ssms

How to remove a list of accidently deleted databases from Sql Server Management Studio's tree-like list?

纵饮孤独 提交于 2019-12-13 16:41:01
问题 I have accidently deleted my database files using Windows Explorer. Now I want to remove these databases from SQL Server Management Studio' tree-like list. The following screenshot shows the database names (musics and silverlight) I want to remove. I attempted to delete them one by one but I got an error for each attempt. The following screenshot just shows my attempt to delete musics: These orphan names really upsets my eyes and can produce misunderstanding in the future. Is there any way to

Inserting 1000s of rows to SQL table using SSMS

独自空忆成欢 提交于 2019-12-13 13:33:22
问题 I have a sql script with insert statements to insert 1000s of rows (12000 approx.). When i try running the script in SSMS, it throws 'Out of memory' exception after a while. "An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown." I have SQL Server 2008 on Vista with 3gb RAM. Any thoughts or pointers would be appreciated! 回答1: This is an old post but no one seems to have identified the obvious issue. So I wanted to post a reply

SSMS connection to Sybase ASE

喜欢而已 提交于 2019-12-13 13:18:00
问题 Is there a way to connect to a Sybase (ASE) database instance using Sql Server Management Studio 2008? I tried using other tools to connect but they are very limited and would like to use SSMS. 回答1: You can use this tool: SqlDbx It's great. 回答2: As far as i know there is no way to use Microsoft's Server Management Studio. And if you are honest it doesnt make a lot sense either. why should sybase/sap design their servers to work with an application provided from a competitor. personally i

Invalid Object Name - Stored Procedure

此生再无相见时 提交于 2019-12-13 12:56:58
问题 I am creating a stored procedure in SQL Server via SSMS. I have written the stored procedure below, however when I click execute it am given the error: Msg 208, Level 16, State 6, Procedure NewQuestion, Line 11 Invalid object name 'hgomez.NewQuestion'. the table is ownership is correct. (hgomez.Questions) USE [devworks_oscar] GO /****** Object: StoredProcedure [hgomez].[NewQuestion] Script Date: 10/23/2011 23:55:08 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE

Create an insert script from select results

落爺英雄遲暮 提交于 2019-12-13 12:55:29
问题 Using SQL Server Management Studio is there a way I can select one or more rows in the grid of select results and have SQL Server Mangement Studio generate one or more insert statements (one for each row selected) which would insert that data into a table with the same schema? Edit: I know how to create one manually, but I was hoping there would be something that would create it automatically for me. If you are familiar with Toad there is a way to have Toad generate inserts based on data in

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

痞子三分冷 提交于 2019-12-13 11:44:39
问题 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

Convert varchar list to int in Sql Server

ε祈祈猫儿з 提交于 2019-12-13 09:08:23
问题 I need a way to have the @listOfPageIds be recognized as a list of numbers instead of strings. I have tried casting, removing the single quotes... I really don't want to do a loop in sql. Declare @listOfPageIds varchar(50) ; Set @listofPageIds = '2, 3, 4, 5, 6, 7, 14, 15'; select * from mytable p where p.PageId in( @listOfPageIds); 回答1: Well on production server I'd write some table valued function for splitting lists, but if you need quick ad-hoc query, this xml trick could work declare

How can I use SQLCMD with Windows Authentication (-E,) but without elevated permissions

ぐ巨炮叔叔 提交于 2019-12-13 08:36:35
问题 I'm going to create a script to execute numerous SQL files. I've chose to use SQLCMD instead of ADODB because it provides logging information quickly, and we're executing T-SQL. I'm testing out SQLCMD.exe before putting it into the script . Connecting to the database using SQLCMD.exe, I utilize -E for Windows Authentication. This means that I need to use my network account, which does not have elevated access on any given machine. However, SQLCMD.exe requires elevated access in order to

Cannot Connect to Plesk v12 SQL Server Remotely from SQL Server Management Studio

孤街浪徒 提交于 2019-12-13 04:38:34
问题 I am difficult to understand why the mssql.anggalisdiyanto.net domain is can be accessed and i can login successfully from ASP.NET Enterprise Manager via browser, but not from SQL Server Management Studio. It is error like in below figure : Help me, thanks in advance. 回答1: What is MSSQL instance name you are using? If you don't specify instance name and connect like "server.com" than default instance name is used "MSSQLSERVER", but instance name of your MSSQL server may be "MSSQLSERVER2012"

The backend version is not supported to design database diagrams or tables

久未见 提交于 2019-12-13 03:59:23
问题 I'm trying to add a table to my newly created database through SQL Server Management Studio. However I get the error: the backend version is not supported to design database diagrams or tables To see my currently installed versions I clicked about in SSMS and this is what came up: What's wrong here? 回答1: This is commonly reported as an error due to using the wrong version of SSMS(Sql Server Management Studio). Use the version designed for your database version. You can use the command select