sql-management-studio

Setting SQL database Permissions for Visual Studio Data Config Wizard

Hello, Stackoverflow! I'm new to SQL. I have created a new database in SQL Server Management Studio, and am now trying to attach it to a windows forms project in Visual Studio via the built in Data Configuration Wizard. Currently, whenever I try to attach the database file, I get a permissions error: "You don't have permission to open...

See queries that hit SQL

Is there a way using sql 2008 Management Studio to look at the queries that hit the server? I'm trying to debug a program and I get messages like "Incorrect syntax near the keyword 'AND'". Since the queries are being dynamically generated it's a hassle to figure out what is going to the server. Any help is appreciated! ...

How to enable automatic transaction scoping on SQL Server Management Studio?

I'm used to work with tools like Toad or PL/Sql Developer for Oracle and every SQL statement I run on the query window runs automatically under a trasaction scope. So, if my SQL statement is not correct, or even if I miss something on the SQL script I can rollback only by clicking on a button at the UI. If everything worked as expected, ...

Managing an SQL 2005 instance from management studio that ships with SQL Server 2008 R2

Is there any one using the management studio that comes with SQL Server 2008 R2 to manage an SQL server 2005 SP3 instance?. Are there any issues to watch out for? Any recommendations? Thanks. ...

SQL Server Mgmt Studio messing up my Database!

This has effectively ruined my day. I have a larger number of tables with many FK relationships in between. One of the tables (lets call it table A) has a computed column, which is computed via a UDF with schemabinding and is also fulltext indexed. If I edit any table (lets call it table B) that in any way is related (e.g via FK) to the...

Change default displayed values in SQL Server Management Studio properties page

IS there any way to change what values in the properties page are expanded by default? I'm examining a DB schema designed by someone else and since the FK names aren't always convenient for IDing what table they're from every time I select a relationship in the diagram I have to expand the Tables And Columns Specified group in the prope...

SQL Server Management Studio 2008 -- Differences between what is seen and what is really in DB?

I altered a stored procedure in SQL Server Management Studio database and everything appeared as expected. When my ASP.NET website called that stored procedure, it complained of invalid arguments. After running the alter procedure and then drop/create procedure the website continued to complain of invalid arguments. Furthermore, after re...

Automate Generate Scripts Wizard in SQL2008

Problem: how to automate a Generate Scripts in SQL2008 Management Studio: ie right click on database, Tasks, Generate Scripts All Tables All Stored Procs Create drop statements Don't use USE statement Generate data This is a 20sec process to do by hand.. needs automating :-) I don't really want to code it in C# in SQL Server Manag...

SQL Server Management Objects

Hi Am getting the same error on the code below using either trusted or SQL logins: VS2010, Console app .NET4, Win XP. SQL2005 Full. Bombs on the transfer.TransferData ERROR : errorCode=-1073548784 description=Executing the query "" failed with the following error: "Retrieving the COM class factory for component with CLSID {19E353EF-D...

SQL 2005 Management Studio throwing syntax errors while trying to save changes to a table in Design view

Just recently, SQL 2005 Management Studio started throwing syntax errors while trying to save changes to tables. These are tables being made in Design view, not as TSQL scripts. 'Build_Group' table - Unable to create index 'PK_Build_Group'. Incorrect syntax near ','. Based on the error, it seems that the recreation of the clustered in...

Automatically Set SQLCMD mode in script

We're using Visual Studio Database Professional and it makes heavy use of SQLCMD variables to differentiate between environments while deploying. I know there's several directives available for setting context (like :connect for server name). Is there a way within the script itself to force SQLCMD mode for execution? Part of our deploym...

SQL Server Management Studio 2008: save database diagrams without applying tables just yet

Can you create a database diagram for a database and save it without creating the actual tables? You know, so the boss can check it out before you apply it? ...

Find storedProcedure by name

Hello, Is there any way I can find in SQL Server Management studio StoredProcedure by name or by part of the name ? (on active database context) Thanks for help ...

How to remove shortcut command Ctrl+E in Management Studio

I'm really frustrated by this shortcut because I commonly use both Emacs and Management Studio for different projects. However accidentally pressing CTRL+E in MS and expecting cursor to move to the end of the line, which it does in my Emacs configuration, can be really bad in MS if you are programming modifications to a database and, say...

Unable to connect to SQL Server 2005

I am trying to connect to SQL Server 2005 express edition from SQL Server Management. From the server configuration manager, I found the SQL Server Service to be running and within bracket, it's written(SQLEXPRESS). I understand SQLEXPRESS is the instance name, therefore I have to use following string for server name: \SQLEXPRESS. I am...

SQL Management Studio Insert statement confliction

I'm working on creating a development database for my boss. I have the SQL script that creates all the tables, but now I have loads of data to import. There are 5 tables total in the database, and their ID's are related to eachother like so: Note: I'm not allowed to share info like database/table names Table1 +-- Table2 +-- Table3 ...