sql-server-2008-r2

SQL max for previous rows

I have Ticker, Dt, [Open], Volume for the input table Dt is yyyy-mm-dd I want to return every row where ticker = 'IBM' and also returns the Ticker, Dt, [Open], Volume fields and then include a max column for only say for the previous x days. Let's say 3 days for the sake of not posting too much data. But I don't know how to get the ...

Can I upgrade from sql server 2008 Nov 2009 CTP to sql server 2008 r2 express

Can I upgrade from sql server 2008 Nov 2009 CTP to sql server 2008 r2 express without losing data? I can't even FIND my data. ...

How should i setup an Active Directory on WinServer 2008r2 to use with TFS in extranet?

I'm trying to deploy Moss and tfs for extra net at home with win server 2008 r2. How should i configure win server active directories? Web server + Active Directory + SqlServer + MOSS + tfs is it enough for successful config? ...

How do you create a SSRS 2008 R2 versioned Report?

I'm using VS 2008 with SQL Server 2008 R2 BIDS installed. My target Server version is SQL Server 2008 R2 I was looking at the RDL files today and noticed I have a mix of schemas. Some of my reports have: <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserve...

Is it possible to figure out if a specific field has been updated, in a Sql Server Trigger?

Hi folks, if i have a simple table and I want to do something (say .. execute a stored proc) when a field (and i know the field i wish to look at) has changed. Is this possible? Version: Sql Server 2008 R2. Example table :- ID INTEGER PRIMARY KEY Name NVARCHAR(100) NOT NULL Age TINYINT NOT NULL HairColour TINYINT NOT NULL So .. if...

Analysis Services for SQL Server 2008 R2 Express

Is it really to add Analysys Services for existing instance of SQL Server 2008 R2 Express? ...

Poor man's SQL pipeline service for SQL express 2008 R2

Hi everyone, I have a basic/simple need to create a pipeline transfer process from one SQL express 2008 database to another server (equally SQL 2008 express). Basically: I have one table on SERVER A which has data coming in, and a default field called 'downloaded' which is again, by default set to 'N' I have the same table schema on ...

Problem with using transaction in delphi when calling to MS SQL SERVER 2008 R2 ?

I need to call some Stored Procedures from Delphi and because they are related I have to use transactions. But It always returns an error when called : 'Transaction cannot have multiple recordsets with this cursor type. Change the cursor type ,commit the transaction, or close one of the recordsets.' And this error only occurs for...

Why isn't SQL Server 2008 R2 using all available RAM?

We have an analytics database server running SQL 2008 R2 with 192 GB of physical RAM. However, we're noticing that during analytics process, the server only uses around 70 GB, but tempdb swells to 300+ GB. The current Maximum Memory is set to 2147483647 MB. The server is running Windows 2008 R2. Is there a way to make SQL Server use more...

SQL Server Express 2008 R2 Installation error at Windows 7

Hello, I created install script that will install SQL Server 2008 R2 on windows XP SP3, windows vista and windows 7. One of the command that i used in the installation is for silent installation of SQL Server 2008 R2. When i install it on windows XP everything works just fine but when i try to install it on Windows 7 i get an error. ...

High Plan Count in SQL Server 2008 Activity Monitor

I have a MERGE query to create an upsert operation on my database with data entered through my application. When I go to call it to save my data on large transactions (>5000) it takes a very long time (~20-40 seconds). Here's my MERGE statement MERGE TestTable AS target USING (SELECT @Guid) AS source (target.Guid = source.Guid) WHEN M...

Database reads varying dramatically on a query with indexes

I have a query that has appropriate indexes and is shown in the query plan with an estimated subtree cost of circa 1.5. The plan shows an Index Seek, followed by Key Lookup - which is fine for a query expected to return 1 row from a set of between 5 and 20 rows (i.e. the Index Seek should find between 5 and 20 rows, and after 5 - 20 Key...

Fastest way to computing Checksum and Better Sql Server data-type to save that

In the my application, i save urls content into specific table of database. to have minimum duplication, i want to compute checksum for each content. so what is best sqlserver data-type for saving checksum's? and fastest way to computing checksum's for contents(html) of urls? ...

Entity Framework 4 and SQL Server 2008 R2 Change Data Capture Not Playing Nicely Together

When I try to use these two features together, I get a compilation error on my model (note, I've renamed the entity for my _CT table "ContentHistory" and my SL4 Unit Test project is called "DomainServices.UnitTest": Error 39 Property 'DomainServices.Web.ContentHistory.C___seqval' is marked as a key property and is of Type 'System.Byte[]...

Deadlock issue in SQL Server 2008 R2 (.Net 2.0 Application)

The Sql Server 2008 R2 instance in question is a heavy load OLTP production server. The deadlock issue came up a few days back and is still unresolved. We received the Xml deadlock report that listed the stored procedures involved in the deadlock and some other details. I'll try to list down the facts from this xml first: Two stored pro...

SQL Tuning process exited unexpectedly.

I've run profiler on sql 2000 database and generated a 3.6 gig trace. Now I'm running this trace into Tunning Advisor (2008r2) and its running for about 3 days and just spilled this error: Tuning process exited unexpectedly. By the way this trace was taken from a sql 2008 r2 x64 to a 32 bit sql 2000 instance, I replaced the database I...

SQL Server 2008 R2 Calculated Field Issue

I am trying to create a calculated field in one of my database tables, but I keep getting the error Error Validating the formula for column FullName I am not trying to incorporate other calculated fields so this should work. I'm using SSMS 2008 R2 with a SS2005 back end. So in the formula field I've tried: Trim([dbo].[Contact...

Sql Server 2008 r2 does not recognize process when triggered

Hi Everyone. i've installed SQL Server 2008 R2 On my machine (my machine runs windows server 2003) some of the tables inside my db are fireing triggers (when insert,delete,update occurs) the trigger result supposed to reach some process (triggersReceiver.exe via shared memory) that waits for the triggers. the problem is that the SQL Serv...

Reading and checking .csv file and then uploading it to the sql server 2008 r2

Hi, I have got a page in which there is a file upload option where I have to upload/import the csv file. What I want to do is to check if the correct format of file is uploaded for instance if any other than csv file is uploaded, the system should give an error message. Also what I need to do is to check certain fields of the csv file f...

Simple trigger in SQL Server 2008

Hi. Can anybody tell me how can I update a column of a record when it is inserted to the database. Here's the pseudocode that I want. if( mytable.OriginalId == null ) mytable.OriginalId = Scope_Identity(); ...