Recover unsaved SQL query scripts
How to recover the unsaved scripts if the SSMS crashes / unsaved tab gets accidentally closed? 16 Answers 16
How to recover the unsaved scripts if the SSMS crashes / unsaved tab gets accidentally closed? 16 Answers 16
I just installed SQL Server 2008 Express on my Vista SP1 machine. I previously had 2005 on here and used it just fine with the old SQL Server Management Studio Express. I was able to connect with no problems to my PC-NAME\SQLEXPRESS instance (no, PC-NAME is not my computer name ;-). I uninstalled 2005 and … Read more
How do you view ALL text from an NTEXT or NVARCHAR(max) in SQL Server Management Studio? By default, it only seems to return the first few hundred characters (255?) but sometimes I just want a quick way of viewing the whole field, without having to write a program to do it. Even SSMS 2012 still … Read more
I’m looking for a way to generate a “Create and insert all rows” script with SQL Management Studio 2008 R2. I know that I can create a “create table” script. I can also create an “insert in” script, but that will only generate a single row with placeholders. Is there a way to generate an … Read more
I’m trying to write a script that will completely empty a SQL Server database. This is what I have so far: USE [dbname] GO EXEC sp_msforeachtable ‘ALTER TABLE ? NOCHECK CONSTRAINT all’ EXEC sp_msforeachtable ‘DELETE ?’ When I run it in the Management Studio, I get: Command(s) completed successfully. but when I refresh the table … Read more
When I submit a batch (e.g., perform a query) in SSMS, I see the time it took to execute in the status bar. Is it possible to configure SSMS to show the query time with millisecond resolution? Here is the bar I am talking about with the section of interest circled in red: 8 Answers … Read more
This question already has answers here: Closed 10 years ago. Possible Duplicate: Lost the IntelliSense SQL Server 2008 Intellisense problem I’m new to SQL Server, so this is probably an easy fix. In SQL Server 2008 R2, I’ve just imported a new data table and/or renamed fields in an existing table (it happens either way). … Read more
I’ve recently used our company’s spare laptop (that has a general user set up) while mine was being repaired. I’ve checked the “Remember password” option in SQL Server Management Studio when logging in to the database. I need to clear the login and password information that I have used to prevent the next person that … Read more
CREATE TABLE [dbo].[user]( [userID] [int] IDENTITY(1,1) NOT NULL, [fcode] [int] NULL, [scode] [int] NULL, [dcode] [int] NULL, [name] [nvarchar](50) NULL, [address] [nvarchar](50) NULL, CONSTRAINT [PK_user_1] PRIMARY KEY CLUSTERED ( [userID] ASC ) ) ON [PRIMARY] GO How do I add a unique constraint for columns fcode, scode, dcode with t-sql and/or management studio? fcode, scode, … Read more
How do I clear the value from a cell and make it NULL? 6 Answers 6