sqlservermanagementstudio

SQL Server 2005: what LINQ generated query is better - with "Where()" or "Any()" ?

var query = from c in db.Customers select c; query = query.Where(c => c.Orders.Where(o => o.OrderItems.Where(oi => oi.SellerID == sellerID).Count() > 0).Count() > 0); that generates SQL: SELECT [t0].[CustomerID], [t0].[FirstName], [t0].[LastName], [t0].[Email], [t0].[Company], [t0].[BillingAddress1], [t0].[BillingAddress2], [t0].[Shi...

SQL Server Management Studio: See Object Explorer Details for objects in this folder

I am working with a database hosted at GoDaddy using Microsoft SQL Server Management Studio (version 10, for SQL Server 2008). I am getting this message: See Object Explorer Details for objects in this folder probably because they have more than 2500 databases there. I can still access everything from the Object Explorer Details, but...

Query cost in SQL Server Management Studio

How does SSMS calculate the query cost (relative to the batch) value that is displayed when you select to include the actual execution plan? Mainly, I have a few saved execution plan XML files that I want to compare with each other. It must be calculating that number somehow from the data in the XML files, but I am not seeing how this ...

Can you please tell importance of default databases provided by SQLserver?

In Sqlsever Enterprise manager, there are some default databases are provided like tempdb and etc. What is significance of those databases? ...

SQL Express connect after editing in SQL Management Studio

I have a web application with a SQLExpress 2008R2 database in the AppData folder. I wanted to make an update to the database manually so in IIS I took the site offline. On the server I opened SQL Management Studio (as Administrator) and attached the database file and made my edits. I then detached the database dropping all connections...

Problem with distributed Computing with mdf files

I am using SQL EXPRESS EDITION 2005 and Created mdf data file using vb.net 2008. now i want to use this datafile in lan. i modified connection string "Data Source=.\SQLEXPRESS;AttachDbFilename=\Server\Data\Data1.mdf;Integrated Security=True;User Instance=True;Connect Timeout=60" it is showing security info error i want to use single ...

Microsoft SQL Compact Edition rename column

Hy, I'm new with SQL Compact Edition and I am having problems renaming a column. I know that you can rename a table using sp_rename and this doesn't work with columns. I've searched for an alternative, but didn't find one. Can I delete a column and then add a new one after a specific column? If I delete the column and add it after t...

SQL Server: Importing database from .mdf?

I have an .mdf file on my local box. I have SQL Server 2008 Express and SQL Management Studio 2008 Express installed on my local box. How in the world do I import this .mdf file as a new database into my SQL Server? This seems like a ridiculously common task that must be performed thousands of times a day across the globe, and I canno...

GUI tools for mysql 5.0

Is their any GUI-interface for MySQL, like Microsoft SQL Server 2005 Server Management Studio provides? Because basically I am operating MySQL with command prompt interface. ...

Aliasing a linked server?

I have a server which I need to have as a linked server to another server, using sp_addLinkedServer. My server's name is in the format "DepartmentName.CompanyName.com", which I can usually change to [blah.blah.com], but which I can't use in the SQL Server Management Studio View creator, because it keeps deleting my square brackets... O...

Is there any way to avoid the 'saving changes is not permitted' error when trying to change the schema

I'm not a SQL server expert by any means, and I'm hoping this is something simple. The scenario: I create a new database with all the defaults, then add a table with a primary key and two nvarchar(max) fields, but I forget to set the identity specification on the key so I go back and try to change it the IsIdentity property from No to Y...