Questions tagged [sql-server-2008]

Use this tag for questions specific to the 2008 version of Microsoft's SQL Server.

Extended support for SQL Server 2008 and 2008 R2 have ended on July 9, 2019. That means the end of regular security updates. (source: SQL Server 2008 End of Support.)

If you're still using SQL Server 2008, you should seroiusly consider upgrading your SQL Server to a supported version.

SQL Server 2008 (codename Katmai, version number 10.00) was released on August 6 2008, and aims to make data management self-tuning, self organizing, and self-maintaining with the development of SQL Server Always On technologies, to provide near-zero downtime. SQL Server 2008 also includes support for structured and semi-structured data, including digital media formats for pictures, audio, video, and other multimedia data. In current versions, such multimedia data can be stored as BLOBs (binary large objects), but they are generic bitstreams. Intrinsic awareness of multimedia data will allow specialized functions to be performed on them. According to Paul Flessner, Senior Vice President, Server Applications, Microsoft Corp., SQL Server 2008 can be a data storage backend for different varieties of data: XML, email, time/calendar, file, document, spatial, etc as well as perform search, query, analysis, sharing, and synchronization across all data types.

Other new data types include specialized date and time types and a Spatial data type for location-dependent data. Better support for unstructured and semi-structured data is provided using the new FILESTREAM data type, which can be used to reference any file stored on the file system. Structured data and metadata about the file is stored in the SQL Server database, whereas the unstructured component is stored in the file system. Such files can be accessed both via Win32 file handling APIs as well as via SQL Server using T-SQL; doing the latter accesses the file data as a BLOB. Backing up and restoring the database backs up or restores the referenced files as well. SQL Server 2008 also natively supports hierarchical data and includes T-SQL constructs to directly deal with them, without using recursive queries.

The Full-text search functionality has been integrated with the database engine. According to a Microsoft technical article, this simplifies management and improves performance. Spatial data will be stored in two types. A "Flat Earth" (GEOMETRY or planar) data type represents geospatial data which has been projected from its native, spherical, coordinate system into a plane. A "Round Earth" data type (GEOGRAPHY) uses an ellipsoidal model in which the Earth is defined as a single continuous entity which does not suffer from the singularities such as the international dateline, poles, or map projection zone "edges". Approximately 70 methods are available to represent spatial operations for the Open Geospatial Consortium Simple Features for SQL, Version 1.1.

SQL Server includes better compression features, which also helps in improving scalability. It enhanced the indexing algorithms and introduced the notion of filtered indexes. It also includes Resource Governor that allows reserving resources for certain users or workflows. It also includes capabilities for transparent encryption of data (TDE) as well as compression of backups. SQL Server 2008 supports the ADO.NET Entity Framework and the reporting tools, replication, and data definition will be built around the Entity Data Model. SQL Server Reporting Services will gain charting capabilities from the integration of the data visualization products from Dundas Data Visualization, Inc., which was acquired by Microsoft. On the management side, SQL Server 2008 includes the Declarative Management Framework which allows configuring policies and constraints, on the entire database or certain tables, declaratively. The version of SQL Server Management Studio included with SQL Server 2008 supports IntelliSense for SQL queries against a SQL Server 2008 Database Engine. SQL Server 2008 also makes the databases available via Windows PowerShell providers and management functionality available as Cmdlets, so that the server and all the running instances can be managed from Windows PowerShell.

Source

53837 questions
15
votes
4 answers

Is neccessary to encapsulate a single merge statement (with insert, delete and update) in a transaction?

I'm unable to test it and get the solution by myself right now, and i haven't found the information on MSDN nor at google. I was questioned if a merge statement that inserts, deletes and updates records in a given table need to be encapsulated in a…
15
votes
4 answers

Sql Server using DateTime as Primary Key

Hi my questions is similar to: MySQL: Using DATETIME as primary key But I'm specifically interested in Sql Server and I want to approach the question practically with a specific scenario in mind rather than theoretically as in the other post. I want…
Jonathon Kresner
  • 2,793
  • 5
  • 29
  • 40
15
votes
6 answers

SQL Server 2008 Backup Compression Standard Edition

I'm trying to backup a database in SQL Server 2008 and have the database compressed using the new compression feature. However, when I run the following code, I get a weird error message: Backup Database To Disk 'C:\Backup' With…
GateKiller
  • 74,180
  • 73
  • 171
  • 204
15
votes
3 answers

How do you read XML column in SQL Server 2008?

I have never used XML in SQL Server 2008, I need to extract a list of customers into a variable table how do you do it? Given that I have a column called CustomerList in a Sales table that looks like something like below how do I extract the list of…
user9969
  • 15,632
  • 39
  • 107
  • 175
15
votes
2 answers

Save result of stored procedure in a Table variable

Possible Duplicate: How to SELECT * INTO [temp table] FROM [stored procedure] I have a nested stored procedure call In one of the stored procedures I want to save the result into a table variable likt this : INSERT INTO @myTable EXEC…
Jan
  • 9,858
  • 7
  • 26
  • 33
15
votes
2 answers

sql server 2008 management studio not checking the syntax of my query

As always, there will be a reasonable explanation for my surprise, but till then.... I have this query delete from Photo where hs_id in (select hs_id from HotelSupplier where id = 142) which executes just fine (later i found out that the entire…
Michel
  • 23,085
  • 46
  • 152
  • 242
15
votes
2 answers

SQL Server completely slows down after occupying full memory

On our server with 32 GB RAM we have an instance of SQL Server running that is capped with max Memory at 80%. Everything works fine when the memory utilization is low. See screenshot below But as time passes, 3-4 days hence SQL will utilize the…
Sunny
  • 932
  • 8
  • 22
15
votes
1 answer

Force the TCP/IP protocol in connection string

I have a database driven website written in asp.net. I'd like to modify the connection string to force protocol TCP. Please advise.
PW2
  • 791
  • 2
  • 9
  • 17
15
votes
3 answers

How to add tracing/debug output to stored procedures in Sql Server (2008)

What is the closest to being able to add log4net style debug information to a set of stored procedures? Some of procedures delegate work to other procedures and I want trace information from both. I've sprinkled print and select statements through…
Tim Abell
  • 11,186
  • 8
  • 79
  • 110
15
votes
5 answers

How to Find Rows which are Duplicates by a Key but Not Duplicates in All Columns?

I am working with a table which is an extract of a set of other tables. All of the rows of the extract table should be unique according to keys D1, D2 and D3. They are not. It appears that an earlier developer attempted to solve this problem by…
John Saunders
  • 160,644
  • 26
  • 247
  • 397
15
votes
5 answers

Same Row_Number for Same Values

I need to have row numbering where the ROW_NUMBER is the same for same value column: MFGPN (Same MFGPN will always be in sequence). I also need to maintain the original sequence by No. Here's my table No MFGPN 1 Z363700Z01 2 …
Bobbit
  • 329
  • 1
  • 2
  • 9
15
votes
3 answers

NHibernate HiLo generator generates duplicate Id's

I have an application running on nHibernate v4.0.4.4000 - it is running in production on three seperate webservers. For ID-generation, I'm using the default HiLo implementation (unique id across tables). Sometimes, it generates duplicate Id's when…
Goblin
  • 7,970
  • 3
  • 36
  • 40
15
votes
3 answers

How to commit and rollback transaction in sql server?

I have a huge script for creating tables and porting data from one server. So this sceipt basically has - Create statements for tables. Insert for porting the data to these newly created tables. Create statements for stored procedures. So I have…
Vishal
  • 12,133
  • 17
  • 82
  • 128
15
votes
1 answer

SQL Server recursive query

I am new to SQL Server development. Most of my experience has been done with Oracle. suppose I have the following table that contains Appointments objects CREATE TABLE [dbo].[Appointments]( [AppointmentID] [int] IDENTITY(1,1) NOT NULL, …
Lorenzo
  • 29,081
  • 49
  • 125
  • 222
15
votes
1 answer

SQL Server 2008: Fill multiple T-SQL variables from one SELECT query?

To fill one variable with a value from a query I can write following: SET @TargetID = (SELECT TOP 1 ID FROM @bigDataSet ORDER BY date DESC) To fill multiple variables from this query, eg. something like: SET (@TargetID, @TargetName) = ....(SELECT…
littlegreen
  • 7,290
  • 9
  • 45
  • 51