sql-server-management-stu

What's the difference between SQL Server Management Studio and the Express version?

I'm using Express currently. What extra features do I get with the full version? ...

Is there a way to make SQL Management Studio never generate USE [database-name] in scripts?

Is there a way to turn this 'feature' off? ...

SQL Server Management Studio 2008 Intellisense

I just installed SQL Server Express 2008 because of intellisense feature. It worked at first but than it stopped working. Looking for the option to check and later consulting Google I have found that it looks like Microsoft disabled intellisense if you connect to SQL Server 2005 databases. Is this absolutely correct ? Is there any solu...

Is there danger of corruption in SQL Server 2000 databases when using SQL Server 2005 Management Studio?

In an interview for a SQL DBA position a while back, I mentioned I prefer the SQL 2005 Management Studio app vs. the old 2000 versions of Enterprise Manager / Query Analyzer. The DBA who was interviewing me said that they had experienced some sort of database corruption in their 2000 databases when making changes from the 2005 MS, so the...

Accelerator key for a date stamp

Hello all, Here's an open ended question. I work on a lot of mssql files, and I like to have a date stamp on each. This is so I can know just by looking at the source of a stored procedure whether it's up to date or not. I'd like to have a shortcut autocomplete key, that, if i type say, d-tab-tab, I get the current date printed to the ...

SQL Command Add Database Diagramming

Is there a tsql command on sqlserver 2008 which can be run in order to enable Database Diagramming instead of this dialog appearing: This database does not have one or more of the support objects required to use database diagramming. Do you wish to create them? ...

Sql Server Case Statement gives me errors in user-defined function

I want to use a case statement in my user defined functions because I need to match on a number of terms. I could use a table for the matches but then I wouldn't be able to put it inside the Computed Column definition. This works with IF statements: CREATE FUNCTION MaraSizeNumber ( @ms varchar ) RETURNS varchar AS BEGIN IF ms ...

Deterministic Scalar Functions

I want to index a computed column in my database table which uses a number of user defined functions. However I just learned that my column is non-deterministic. Without indexing its going to be way to slow to run queries that I need. What's the best way of tracing through user defined functions to determine whether they are determinis...

Removing the remembered login and password list in SQL Management Studio

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 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 will use the laptop from u...

SQLServer2005: Save complete results of query in a file for some long text data types

Lets say a have a table t (id int, someVeryLongText text) and want to store the result of a query: select someVeryLongText from t where id = 1 in the file. In Managemant Studio when I select Tools->Options->QueryResults and choose Results to File It seems that only the first 8192 characters are written to the file. Is there an op...

SQL Studio - "Modify Stored Procedure" Script Errors

In MS SQL Server Management Studio 2005: If you have the setting Tools|Options|Scripting|"Include IF NOT EXISTS clause" set to true, modifying a stored procedure will create a strange script that doesn't even work. It looks something like the following: (ellipsis used for brevity) SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS [...] B...

Missing drive when attaching database in SQL Management Studio 2005

I'm trying to attach an external mdf file to my SQLEXPRESS instance from within the SQL Management Studio 2005. However, I'm unable to see the drive that the database file resides in under the directory browser within the "Locate Database Files" prompt. Is there anything that is preventing the Management Studio or the SQL instance from ...

SQL Formatter for SQL Management Studio

I was wondering if there is a plugin/tool for SQL Server Management Studio that will format your SQL? I'm working with some large-ish stored procs that are a mangled mess of poorly formatted SQL and it'd be nice if I could just go "Select All -> Format SQL" ...

Sql Server management studio how to auto capitalize

Is there any FREE "build-in" way to capitalize the "keywords" in the SQL 2005/2008 management studio when you write a sql query? i.e truncate table x should be automatically changed to: TRUNCATE TABLE x ...

SQL Server Mgt Studio not showing table?

I have a table in SQL Server 2000 Standard Edition called "dbo.T668" (don't blame me for the naming convention). I'm working on the server using SQL Server Management Studio 2005, and for some strange reason, I can't see the table at all in the list of tables. I see all the other tables, but not this one. If I open up a query editor a...

Modifying cells in SQL Server Management Studio 2005 without a mouse

I'm always making manual changes to a lot of data as part of my job. One thing I've noticed is that I can use the arrow keys to browse around to different cells when viewing the data. But when I go to a new cell, the entire text in it is highlighted. How can I use my keyboard to say I want a cursor so I can modify the text without clicki...

Can't Attach ASPNETDB.MDF on Vista

I can't connect to the ASPNETDB.MDF file in the App_Data that is created by the ASP.NET MVC Beta project from Visual Studio 2008 or SQL Management Studio 2008 Express on Vista. The project is in C:\Users\Matthew\Documents\Visual Studio 2008\Projects\MVCTest so the MDF file is in C:\Users\Matthew\Documents\Visual Studio 2008\Projects\MVCT...

Restoring a Backup to a different Server - User Permissions

I have backed up and restored a MS SQL Server 2005 database to a new server. What is the best way of recreating the login, the users, and the user permissions? On SQL Server 2000's Enterprise Manager I was able to script the logins, script the users and script the user permissions all seperately. I could then run one after the other a...

How can I manually enter my credentials in SQL Server management Studio 2008 when using Windows Authentication ?

Usually, when using Windows Authentication, the software (eg Internet Explorer) tries to use Windows Authentication, and if it doesn't succeed (because the domain is untrusted, or because the credentials are not ok for example), it just popups a login window so that you can input your domain, login and password. With sql Server Manageme...

Obtaining the Following Error in SQL Server 2005 <The server principal "XYuser" is not able to access the database "Ydb" under the current security context.>

System Specifications... Microsoft SQL Server Management Studio 9.00.4035.00 Microsoft Analysis Services Client Tools 2005.090.4035.00 Microsoft Data Access Components (MDAC) 2000.085.1132.00 (xpsp.080413-0852) Microsoft MSXML ...