sql-server-2008

ADOMD.NET 9.0 Redistributable?

Got a problem with ADOMD.NET 8.0, SQL2008 and our app. It isn't giving us the right metadata. I can't find anywhere to download the ADOMD.NET 9.0 redistributable. Only way I can get it is by installing 2008 and grabbing the DLL. Any clues? ...

With SQL 2008 spatial functions, how can I construct a LINESTRING representing the line between two (or more) POINT instances?

Define a couple of points as follows: declare @p1 geography, @p2 geography set @p1 = 'POINT(1 2)' set @p2 = 'POINT(6 8)' Now I'd like to obtain the shortest line between these two points. What function can I use to get this line? (i.e., it should output a LINESTRING(1 2, 6 8) or LINESTRING(6 8, 1 2)) I know I could do this by formatt...

Thoughts on index creation for SQL Server for missing indexes

I'm working on performance tuning my SQL Server 2008 database and am using the output from various DMVs to identify missing indexes, indexes that aren't being used, etc. I am mainly using these 3 scripts (from SQLServerCentral.com) that rely on DMV data that SQL Server provides: The Ultimate Missing Index Finder The Ultimate Duplicate...

How to create Sql Synonym or "Alias" for Database Name?

I'm using ms sql 2008 and trying to create a database name that references another database. For example 'Dev', 'Test', 'Demo' would be database names that i could reference from my multiple config files, but each name would point to another database such as 'db20080101' or 'db20080114'. [Edit]Some of the configs are for applications t...

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...

SQL 2008 Mirroring, in "restoring" state

I'm testing SQL Server 2008 mirroring with a principal, a mirror and a witness. I've gone through the examples, restoring the mirror WITH NORECOVERY. The principal says it is synchronized. But the mirror still shows it is in a "restoring..." state. Am I supposed to just leave it like that? Should I run a RESTORE WITH RECOVERY? ...

Can you import a SQL file into a SQL 2005/8 script?

Hi If I have scripts in multiple files, and I would like to execute each one in a known sequence, can I simply import them into a T-SQL script and execute them, or must I run sqlcmd or similar against each file? I'm sure Oracle has a feature to import/include script content from another file (maybe with @@ ?). I want all of the scripts...

IIS7, SQL 2008 and ASP.NET MVC security

I have an ASP.NET MVC application that I'm working on. I've been developing it on Windows Server 2003 with IIS6 and SQL 2008 Express, and everything was working great. I recently decided to try out the Windows 7 beta, so now I'm using IIS7, and have run into a problem with connectivity to my database that I can't seem to figure out. I c...

Full text search on calculated columns

I need to allow full-text searching on two fields that are concatenated together. In this case, FullName = FirstName + ' ' + LastName. The simple approach seems to be to create a FullName calculated column then include that as a column in the full-text indexing. Is this an acceptable approach? How would you do it? UPDATE and INSERT happ...

SQL CLR Objects for Heavy Operations

Here is my scenario: I have implemented set logic in my C# framework. Sets can contain a large quantity of objects, perhaps even up to 1 million in the worse case. Assume sets just contain lists of objects called Doc. Because of the potential large number of objects, I would like to give the developer a choice of how to create and us...

How to change a column without dropping a table in SQL 2008

Why does SQL 2008 all of a sudden want to drop my tables when I go to change the column type from say int to real? This never happened in SQL 2005 to my knowledge. Any insight would be helpful please. ...

SQL2008: MSOLAP & SSRS Class not registered error with certain dimension.

Our product leverages Analysis Services combined with Reporting Services, we recently made some changed to add compatability for SQL2008. Everything works great except with certain dimensions, drillthroughs or measures added to a report we suddenly get this following error: Server: The operation has been cancelled. Errors in the hi...

Filter Rows returned from SQL Query by XML type field using Xquery

I have a table that stores data about errors that occur (via SSIS) , the main column that has information is stored as XML. I want to be able to query name/value pairs in this column. To explain in SQL->(Select * from #tmp Where seq='7406834') CREATE TABLE #tmp(id INT, category varchar(10), details xml) INSERT INTO #tmp(id,category,d...

Is there a performance hit by added nonenforced foreign keys to a SQL Server 2008 database?

I'm working with a database and I want to start using LINQ To SQL with it. The database doesn't have any FKs inside of it right now for performance reasons. We are inserting millions of rows at a time to the DB which is why there aren't any FKs. So I'm thinking I'm going to add nonenforced FKs to the database to describe the relationshi...

Any SQL Server 2008 Database Change Management (MIgrations) Tools Available?

We were running Tarantino (http://code.google.com/p/tarantino/wiki/DatabaseChangeManagement) in a Nant build script but we're getting some new hardware and using the opportunity to upgrade to SQL Server 2008. Unfortunately Tarantino won't work with SQL 2K8 so I'm looking for an alternative. Any ideas? ...

Error - SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

I've been using this piece of code I've written and it's working in this most unclear manner. I wish to insert a row into the database which includes two columns of DateTime: myrow.ApprovalDate = DateTime.Now myrow.ProposedDate = DateTime.Now And yet, when I update the database I receive this error: SqlDateTime overflow. Must be b...

How to use server aliases in SSAS 2008?

I'm having trouble getting Microsoft Analysis Services 2008 to recognize a host alias that I created (even though the database engine recognizes it). Here's the deal: we have some code that looks for an analysis services server called PRODUCTION. For testing purposes we would like to have PRODUCTION point to localhost. Under SQL Serve...

Using Change Data Capture for Small Desktop Applications?

A new client of mine has a small VB/Access database application written in 2002 that he wants rewritten to bring it more up to date and to support new features he has been wanting for some time. So, I'm going to convert it over to use C#.NET 2008 and SQL Server Express 2008 on the local machine with the ability to scale to using WCF and ...

How do you work with SQL Server CE and SQL Server 2008 Express?

I have installed: Visual C# 2008 Express Visual Web Developer 2008 Express Visual Studio 2008 SQL Server 2008 Express SQL Server Management Studio In Visual C# 2008 Express, I can "Add Item" and create a "Local Database" (.sdf file) or a "Service Based Database" (.mdf file). Visual Studio 2008 is the same as Visual C# 2008 for appl...

TFS 2008: Does it come with a license for SQL Server 2008?

When you buy TFS 2008, you get a license to run SQL Server 2005 as the data repository for TFS. With SP1 of TFS 2008, SQL Server 2008 is now supported. Does any one know if the TFS 2008 license allows us to install SQL Server 2008 instead of SQL Server 2005? Are there any advantages using SQL Server 2008 over SQl Server 2005 as the dat...