ssms

MSSQL Server Management Studio (SSMS) 2005 New Query Template

How do I change a default "New Query" template in SSMS 2005? ...

Script Size Limit in SQL Server Management Studio

For example: how many lines of insert into foo ( '1','2' ) could one have in a file. I remember it being around 100k but searching with google has proved fruitless thus far. ...

How to remove SQL Server Compact Edition from SQL Server Management Studio?

Once upon a time I installed SQL Server Compact Edition v3.1 on my box. As a result when I open SSMS 2005 (SQL Server Management Studio) and go to Connect to Server dialog, I see a "SQL Server Compact Edition" entry under the Server Type dropdown. I've uninstalled SQL Server Compact Edition v3.1, but the "SQL Server Compact Edition" en...

SQL Server 2005: How to automatically include database name and brackets in queries

Good day, In SQL Server 2005, when I write a new query, I like to drap and drop table and column names from the object explorer. However, when I drag and drop a table, is there a way to automatically include the database name? (example: when I drag and drop the table Table1 in the query designer, I would like to have Database1.dbo.Ta...

sql server: import operation won't copy full schema

I recall that the import tool in sql server 2000 would copy indexes, relationships, etc. In sql server 2005/2008 the import tool in SSMS will only create the tables, copy the data, but the keys, indexes, relationships are missing. I can find no option in the import wizard to enable this? What am I missing here? Is this not possible anym...

Is there a command line option like devenv.exe /Edit for Sql Server Management Studio

I'm using visual studio's external tools to open .sql scripts in Sql Server Management Studio (SSMS). The problem is, each time I use the external tools command to open a .sql file from visual studio, it opens a new instance of SSMS. Visual Studio has a switch /Edit that will do this, is there one for SQL Server Management Studio? ...

Add "Select top 1000" command to toolbar in SSMS

I am using SQL server management studio (2008) quite a lot these days. If it had a "Select top 1000" command in the toolbar,(or a shortcut key) it would make my life a lot easier. Is there any way i can do it. I tried looking in the customize dialog, but cant find that command there. ...

How do you stop SSMS from inserting the date when scripting the DB?

When scripting a DB using SQL Server Management Studio (SSMS) it generates line like: /****** Object: ForeignKey [FK_NoteLinkAssociation_Link] Script Date: 04/24/2009 10:04:46 ******/ Is there a way to stop it from generating that line or the date part of that line? Reason: The DB is being scripted and stored in source control an...

Add Custom Columns to Object Explorer Details for Views in SQL Server 2008 Studio

I am using "Object Explorer Details", and when I am on "Tables", I can select many columns, particularly "Create Date". However, when I am on "Views" or most any other part of the database, I only have a choice of columns "Name" and "Policy Health State". I really want to also have the "Create Date" (like I used to have in SQL Server 2...

Can SSMS display empty space as a character?

Right now I'm working on a dataset where I would like to return records where a certain field is NOT NULL. The dataset is result of a table join. My resulting set is still returning records where the field I told not to return NULL look empty. I'd like to see what the true value in these records are since they don't seem to be true NULL...

To Find the registry of SQL Server 2005 Management Studio

hi all.. i want the registry value SQL Server 2005 Management Studio (because our application is dependent;) before installing our application i am checking whether SQL Server 2005 Management Studio is present or not and i have cross checked that for SQL Server Management Studio with Express Edition it is having different registry value...

SQL Server Management Studio 2005 and Source Control

I have all my SQL stored in source control in the following structure Database Tables Stored Procs Views Static Data I'd like to tie my source control into SSMS, which seemingly supports source control, but SSMS wants to put all the scripts into one folder, which is a non-starter for me. Is it possible to get SSMS to ...

How to shorten long underlines from query results in sql server 2005

Hi, I am scheduling the a query to a table for each database in a particular instance. The query and table for each database are similar. I direct the query results to text file. Before the query results, I include the database where the particular query is being made. In my test in AdventureWorks, however, the result I got is a databas...

How to order project solution content in SQL Server Management Studio

In SQL Server Management Studio (SSMS) running against SQL Server 2005, I have a solution which contains a number of views. These views are not sorted alphabetically. Can anyone provide either an explanation of why, or a solution to order them alphabetically ? ...

Query times out in .Net SqlCommand.ExecuteNonQuery, works in SQL Server Management Studio

Update: Problem solved, and staying solved. If you want to see the site in action, visit Tweet08 I've got several queries that act differently in SSMS versus when run inside my .Net application. The SSMS executes fine in under a second. The .Net call times out after 120 seconds (connection default timeout). I did a SQL Trace (and col...

SQL Server 2005 Clustered Index Query Speed

Our sites are getting pounded pretty hard so we're taking a look into optimizing some of our existing queries. While looking into this we ran across several queries whose execution plan was about 4-5 times faster when a simple reference of the clustered index is in the query... for example If this was the old query: SELECT ... FROM my...

Is there any way to expand the Processes pane in Sql Server 2008 Activity Monitor?

This should possibly be a Microsoft support question, but does anyone know if there's a way to expand the Processes (or any of the other panes) in SSMS 2008 Activity Monitor? All i actually want to see is a list of running processes, but even if i collapse all the other panes i can't expand one to fit the screen. It seems like such a s...

Printing SQL Server Diagrams (from SQL Server Management Studio Express)

I am having trouble printing my diagrams, I seem to be getting portions of the diagram blocked out, etc. I've tried several different computers, printers, and databases, so it seems to be a problem with SSMS Express itself. Is this just the way it is? Are there any decent workarounds, or does anyone use a 3rd party product (preferably...

Tidy for SQL

I'm looking for a tool that that I can use to clean up (formatting, tabs etc...) my stored procedures and views. Is there anything like html's tidy, but for SQL which is free/open source? ...

SQL Server: Quick way to grant Exec permissions to DB role for many stored procs

Consider the scenario where a database has a SQL Database Role or Application Role. The task is to grant Execute permissions to n stored procedures. When using SQL Management Studio, there's a nice screen to help apply permissions to objects for a Role. Here are the steps to apply permissions: select the object that you want to gra...