ssms

Import / Export database with SQL Server Server Management Studio

I thought this would be trivial, but it isn't... I'm sure there is a simple way to do it but I can't manage to find it. Shame on me. I want to import/export the database itself, the tables, the constraints (foreign keys and so on). I'd rather not get the data with it, but I can get rid of it after if there's no other way. So... how do ...

Easy way to convert exec sp_executesql to a normal query?

When dealing with debugging queries using Profiler and SSMS, its pretty common for me to copy a query from Profiler and test them in SSMS. Because I use parameterized sql, my queries are all sent as exec sp_executesql queries. exec sp_executesql N'/*some query here*/', N'@someParameter tinyint', @ someParameter =2 I'll take this ...

SSMS - Edit data from result grid

I would like to edit data directly from result grid in ssms. eg: When I execute SELECT TOP 10 * FROM some_table, I want to edit data directly from result grid. I don't want to open some_table and edit from there. I know that result grid is read-only, but maybe someone written addin for it. ...

In SSMS, when editing a stored proc, how to get the line and error numbers to match?

Terribly worded question above (trying to be short). Lets try that again: In Microsoft SQL Server Management Studio, when you are editing an SP and execute the sp in the same window, errors show up at the bottom of the screen you can double click to highlight the code causing the error. However, this never lines up, usually being anywh...

In Visual Studio 2008, Right-Click on a Data Connection in Server Explorer > New Query, Can I change it to open a T-SQL Editor?

I hate the standard Query window that comes up when you select new query on a data connection in server explorer, I'd much rather have a T-SQL Editor come up. Is this possible? Maybe not replace that functionality but a shortcut key or something that would bring up a T-SQL editor? ...

Best T/SQL Formatting Add-In for SQL Server Management Studio

Does anyone know of a real good SSMS Add-In that beautifies T/SQL, isn't too expensive and also does things around best practices for T/SQL formatting? I'm well aware of Red Gate's tool, but ~$300 is quite a killer amount. http://www.red-gate.com/products/SQL_Refactor/index.htm I've seen this Add-In, but it's purely about indentation....

Using the result of the SQL "Messages" pane

I have an existing SQL 2005 stored procedure that for some reason, outputs its results in the Messages pane in SSMS instead of the Results pane. (Its actually a CLR procedure already compiled and deployed to all our servers, and used for another daily process. So I can't change it, I just want to use its output.) For the sake of discuss...

Microsoft.SqlServer.SqlTools.VSIntegration reference problem/oddities in Visual Studio 2010

SQL Server Edition: 2008 Enterprise Visual Studio: 2010 w/ .NET 4.0 SSMS 2008 Addin - Data Scripter project source code on CodePlex references Microsoft.SqlServer.SqlTools.VSIntegration.dll I have referenced the DLL under <<Microsoft SQL Server install location>>\100\Tools\Binn\VSShell\Common7\IDE But here is the oddity. Microsoft.S...

SQL Server Management Studio SSMS tries to "save to file" instead of execute on F5

This happens intermittently and seems to be related to accidentally hitting a key. Any ideas what causes this? ...

Case Sensitivity in SSMS

My SQL Server Management Studio suddenly went case sensitive on me. The database and server are both set to case insensitive SQL_Latin1_General_CP1_CI_AS I run queries like Select * From mytable and I get "invalid object name" but if i run select * from MyTable i get data!! I created a new database and created a dummy table a...

Stop SSMS from scripting SPs using sp_executesql?

When I use SSMS to script a stored procedure, it wraps the script in a sp_executesql statement which bugs me. Is there a way to stop SSMS from doing this and use a straight CREATE PROCEDURE...? EDIT: I meant SSMS not SSIS ...

Creating a CHANGE script in sql server management studio?

Hi there, i was wondering if there is a way to automatically append to a script file all the changes i am making to my columns, tables, relationships etc... The thing is i am doing a lot of different changes on a TEST db and the idea will be to apply this change script when i move the test db to production .. hence keeping production d...

SSMS in SQLCMD mode - Incorrect Syntax

It is my day for weird errors. I use a database project and as a part of Post Deployment, we use SQL Scripts to populate data in our tables. alter authorization on database::atlas to sa; go ALTER DATABASE ATLAS SET MULTI_USER WITH ROLLBACK IMMEDIATE; GO :r C:\Scripts\Script.DisableTriggers.sql :r C:\Scripts\dbo\Script.dbo.PaymentMeth...

[SSMS 2005] CVS plugin?

Currently, I produce various .sql scripts (sprocs mainly) and have to copy them to another location where I had originally checked out a CVS project before I can add/update/remove the CVS repository accordingly (using TortoiseCVS). It's tedious, so I've been tasked with investigating if SSMS could use CVS natively. I've been googling a...

Keyboard shortcut to close a tab in SQL Server Managament Studio?

Is there a keyboard shortcut to close a tab in SQL Server Managament Studio 2008? like Alt-W in Firefox. ...

Script to automatically open SQL Server Management Studio 2005 from another interface

Hi everybody, Please I need help with a script that can help me open the SQL Server Management Studio 2005 from a button in an another interface. Thanks Roger ...

Script to automatically open SQL Server Management Studio 2005 from another interface

Hi everybody, Please I need help with a script that can help me open the SQL Server Management Studio 2005 from a button in an another interface. Thanks Roger ...

Intermittant problems connecting to SQL 2000 servers from SSMS 2008

We're having some intermittant connection problems connecting to our few SQL 2000 servers, but only seemingly from our SSMS 2008 workstations - there don't appear to be any actual business applications that aren't able to connect. Most of the time, SSMS connects just fine, but sometimes, I'll need to manually set the connection protocol ...

Management Studio 2008 Express Install issue

Hi there, I have some trouble installing Management Studio 2008 Express through C#-Code. The code looks like this: using (Process MMSInstall = new Process()) { var psi = new ProcessStartInfo(PathExe.FullName, "/qs /Features=SSMS /Action=Install"); MMSInstall.StartInfo = psi; MMSInstall.Start(); MMSInstall.WaitForExit()...

How to: usage-based performance optimization in SQL Server 2008 Express

How can I do usage-based perfromance optimization if I am running SQL Server 2008 Express and using SQL Server Management Studio Express? ...