management-studio

SQL Management Studio won't recognize a table exists after scripted create

So if I create a new table in the query editor in SQL Management Studio after hitting refresh on the DB I can see and work with that table. However if I want to run another query referencign that table from withen the query editor it doesn't reconize that table exists. I've tried hitting refresh at the DB level, and the table level but i...

Connect w/ Sql Server Management Studio to an domain server using domain credentials

Hi there, I have a machine that's not connected to a domain and I want to connect to server in that particular domain and I do have proper credentials to log on. I used runas command as follows: runas /netonly /user:domain\domain_username ssms.exe and I was able to connect to the server which otherwise I could not. The weird thing is...

SQL Server creating wrong table names, why ?

Question: when I create a table (T_TableName) using SQL Server Management-Studio, it always creates the table as Domain\UserName.T_TableName instead of dbo.T_TableName What's wrong ? ...

Restrict varchar() column to specific values?

Is there a way to specify, for example 4 distinct values for a varchar column in MS SQL Server 2008? For example, I need a column called Frequency (varchar) that only accepts 'Daily', 'Weekly', 'Monthly', 'Yearly' as possible values Is this possible to set within the SQL Server Management Studio when creating the table? ...

How do I view executed queries within SQL Server Management Studio?

I am new to SQL Server Management Studio and am wondering if there is a way to see what queries have been ran against a database. Surely there is a way to see these. In the Activity monitor, there is a "Recent Expensive Queries" but I'm guessing that isn't all of the queries since I'm not seeing the ones I have ran. I am running SQL S...

Decent simple SQL Server client

Hi, does anyone know of a very simple SQL Server client tool - that does the same basic functions as Management Studio (i.e. choose a database and run a query - doesn't need an Object Explorer, or anything fancy)? Ideally it would be great to have a single exe or zip file version that I could take around on a USB key - anything to avoid...

SQL Server 2008. I want to be able to edit multi line character data like I used to be able to in Enterprise Mgr

I want to be able to insert and update rows with embedded carriage returns even if the column if of type text or ntext. Since there seems to be no GUI way to do this, does anyone know of a free tool that does? ...

Unless I start Management Studio with "Run as administrator", I get a Login Failure (Error 18456)

I cannot connect to the SQL Server instance if I do not start management studio as a administrator. I am running windows 7, SQL Server 2008, and Management Studio 10.0. If I run as a normal user, the error I get is: Cannot connect to .. Additional information: login failed for user 'COMPUTERNAME\MyUserName'. (Microsoft SQL Server, E...

Easy plugin or procedure for sqlserver Management Studio to script row inserts.

I've never been able to find a good script or plugin for sql server Management Studio (2005 and or 2008) for a very common scripting need: specifying a few/all rows in a table and scripting their insert. You can guess my story: I've got some configuration data in my dev db and I need to script it for deployment to UAT and then product...

error when running any query in sql server management studio: the file exists

When I run any query in sql server management studio, I get the following error: An error occurred while executing batch. Error message is: The file exists. Restarting SSMS didn't help. Neither did rebooting the machine. The only thing I found on Google was someone saying "report the bug to microsoft" :P (Windows XP Pro x64, SSMS ...

SQL Server copy all rows from one table into another i.e duplicate table

I want to keep a table as history and replace it with an empty one. How can I do this through the management studio? --Jonesy ...

SQL 2008 Select Top 1000 and update the selected database drop-down

When you right click and do a Select top 1000 rows from a table in sql 2008, it opens a tab and writes the sql and then executes it. This is okay, however I'll erase the sql and use the same tab often to do other sql statements. What annoys me is that I have to go to the database drop-down at the top of the window and change it to the cu...

SQL Server 2008 Management Studio Basic and Express

Hi, what are the differences between the SQL Server 2008 Management Studio BASIC and SQL Server 2008 Management Studio EXPRESS? Do they are the same? THANKS! ...

Upload a file to a varbinary with SQL Management Studio

Is there any way to upload a file to a varbinary with SQL Management Studio without writting a manual SQL query ? ...

SQL Server Server Management Studio Error "Attempted to perform an unauthorized operation"

When I start Microsoft SQL Server Management Studio, I get an a .NET Framework error. It was installed as part of SQL Server Express. If I click "Continue", I get the usual "Connect to Server" dialog, but I am unable to connect to the local SQL Server. I am able to connect from Visual Studio, so I know its running. I can't figure out...

SQL Express 2008 R2 Server Management Studio duplicate toolbars

I've installed SQL Express 2008 on a 64-bit Windows 7 machine and have noticed that the Server Management Studio has duplicate toolbars, so that the standard toolbar shows, "File File Edit Edit" etc. The content of the toolbars is duplicated in a similar way. Has anyone else noticed similar issues? ...

SQL Server: how do I export entire database?

I need to export database from one server and import it into another server. How do I export the entire database to a file, or two files mdf, ldf (either option is fine) How do I import it into a new server using ssms? In the instructinos frmo ponies, it says: In the To a point in time text box, either retain the default (Most ...

Unique constraint on multiple columns

Hello, I have a table 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 can add uni...

Create a script in MMSE Express - question about certain part of script.

When I create a script with the Management Studio, it includes this part: WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 70 ) What are those options and are they required? Thanks :) ...

Strange issue in SQL Management Studio IDE with CR instead of CRLF

I've encountered a strange feature (that may be related to SQL Management Studio) with regard to the placement of return characters at the end of SQL Statements. Whilst the query runs just fine within the ID, the feature in question was breaking our deployment scripts. Essentially, for some reason, certain lines were being terminated by...