sql-server-2008

SQL Server 2008: Very slow query performance when dealing with specific date boundary

Right, this is an odd one. We have a web service that returns data to a silverlight client. The queries are generated against a SQL Server 2008 database using the entity framework. Most of these queries are date range based - pull results between this date and that, for example. Also, a view is used to make things a little easier. We h...

Grouping dates by month in an sql server query (stored procedure)

Im having a bit of a mental block on this one. I got booking system for hotel rooms and it contains a table as so BookingRoomLink BookingId (FK) RoomId (FK) Start_Date End_Date I'd like to query the data to extract occupancy levels for each month. I could do this manually (ie for the past month do something like this). SELECT Book...

SoapExceptions error: The property 'Name' is read-only and cannot be modified or deleted. (SSRS)

Hi, I have created a Windows Application based UI using C# to enable users to manage the items of the Reporting Server. One of the functionalities I have implemented was to right-click on the name of the folder (in the UI TreeView hierarchy) and choose the 'Rename' option from the menu, which will then call the ReportingServices2005.Set...

Restore SQL Server 2008 database to SQL Server 2000

I have to move an entire database from a SQL Server 2008 machine to a SQL Server 2000 machine. I created a backup using Management Studio 2008, copied it to the hard drive of the 2000 box, and from withing Management Studio 2008, I choose Restore Database to the 2000 box. I get an error message stating, "The media family on device ... ...

SSRS 2008 - Uniform Chart Legends for multi-chart report

Okay, I have a report with multiple charts in it. I have tried a few different ways to get these charts to format the legend the same way, but i have failed. My goal is to make the legends have the same color scheme and ordering across the different charts. Example, my chart show the count of projects in each of the following fundin...

ssis sql server 2008 for access .mdb database

I want to know how to import .mdb (MS Office 07) file into Sql server 2008 by SSIS. I need to run this ETL packet in such a way that it checks for duplicates, and if any doesnt re-insert them, but only inserts new records. If someone has a tutorial link or can explain here in steps would be very helpful ...

isnull(email,'') = '' is NOT interpreted by it self as (email is null or email = '')?

Hi, as a fact of performance which one is better? Is there a difference between the actual 3 three versions of sql-server (2000 / 2005 / 2008)? ...

Allow anonymous access to SQL Server 2008

I need to set up a "throw-away" instance of SQL Server 2008 for students to test a program for a few weeks. SQL Server 2008 is running on a virtual instance of Windows Server 2008. The server is not a member of the domain. The client computers that need to connect to the SQL Server are domain members, as are the student accounts. The cli...

Visual Studio 2008 Template for SQL Agent Jobs ?

I was looking for a template to create and manage SQL agent jobs on a SQL instance. In the project template "SQL Server 2008 Server Project" I couldn't find any and neither in the "SQL Server 2008 Database Project". I would like to manage my SQL agent job definitions as scripts within TFS like all the other database/server objects. ...

Will creating a nonclustered index break change tracking on my database (SQL Server 2008)?

I have been investigating some performance issues with my database (SQL Server 2008). SQL Management studio suggested that I use this code to add a nonclustered index which will decrease processing time by over 90%. USE [DatabaseName] GO CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>] ON [dbo].[tblAnswers] ([QuestionID]) ...

Changes to sysusers and sysxlogins in SQL 2008

Hi all, I am currently updating a MS SQL 2000 server to SQL 2008. One of the issues highlighted by the Upgrade advisor is that the undocumented table sysxlogins has been removed. I currently have a procedure that is run by a user 'foo' to determine if the user 'bar' exists in the database blah. If the user exists the user's password is...

Query Problem in SQL Server

Hi All, I have a problem writing a query. At the moment I can retrieve an hourly recording of percentages for each machine running and I've got a table which shows, on a daily basis, each percentage recorded for each machine per hour. The code looks like this: ....... WHERE (tblCheckResult.DateTime >= @DateFrom) AND (tblCheckResu...

SQL: Inner joining two massive tables

Good afternoon, I have two massive tables with about 100 million records each and I'm afraid I needed to perform an Inner Join between the two. Now, both tables are very simple; here's the description: BioEntity table: BioEntityId (int) Name (nvarchar 4000, although this is an overkill) TypeId (int) EGM table (an auxiliar table, in...

How risky is development against SQL Server 2008 with production on SQL Server 2005

My dev environment has SQL Server 2008 installed. I have an asp.net 1.1 site in production using SQL Server 2005. I'd rather not install SQL Server 2005 on my development environment. How risky would this be? What kinds of things might cause problems? ...

SQL Server full text search error: Full-text crawl manager has not been initialized.

I'm just trying out full text search in SQL Server 2008 and am failing at the first hurdle. I've created an index, but when I try to populate it using: ALTER FULLTEXT INDEX ON TableName SET CHANGE_TRACKING AUTO; I get the following error: Msg 7644, Level 17, State 1, Line 1 Full-text crawl manager has not been initialized. An...

Should a Sequential Guid primary key column be a clustered index?

The goal of using a sequential guid is so you can use clustered indexes without the high levels of fragmentation that would normally exist in a clustered index if it was a regular guid, correct? ...

Recursive same-table query in SQL Server 2008

I have the following table in a SQL Server 2008 database: Id Name ParentFolder -- ---- ------------ 1 Europe NULL 2 Asia NULL 3 Germany 1 4 UK 1 5 China 2 6 India 2 7 Scotland 4 ParentFolder is a FK to Id in the same table. I would like to create a view that results in somet...

Searching and ranking short phrases (e.g. movie titles)

I'm trying to improve our search capabilities for short phrases (in our case movie titles) and am currently looking at SQL Server 2008 Full Text Search, which provides some of the functionality we would like: Word stemming (e.g. "saw" also means "see", "seen", etc.) Synonyms (e.g. "6" is synonymous with "VI") However the ranking algo...

Is there an efficient way to index inside words in SQL server 2008?

We have a a few queries in our system that use LIKE '%'+@SomeCriteria+'%' to search a for a person's name. We are talking VARCHAR(50) fields in this case. We would really like to allow our users the ability to search within names. The way I understand it, indexing the field will only make this faster if we search for the first part of...

Which are the best Variables in Storeprocs

Hi, i'm often dealing with some interfaces between two systems with data-import or data-export. Therefore i'm programming some t-sql procedures. It's is often necessary to use some vaiables inside the procedure, to hold some values or single records. The last time i set up some temp-tables e.g. one with name #tmpGlobals and another name...