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
14
votes
2 answers

Outer Apply Returning columns unexpectedly NOT NULL when no match

I'm hitting some weird behavior on a table valued function when used with OUTER APPLY. I have a simple inline function that returns some simple calculations based on a row in another table. When the input values for the TVF are hard-coded scalars,…
CDC
  • 593
  • 4
  • 16
14
votes
3 answers

How to grant users read-only access to all databases

I want a group of users to have read-only access to all tables and views on all databases on SQL Server (I'm using SS2008). I'd like those users to have read-only access to all future tables and view. How would you set that up?
Craig
  • 4,111
  • 9
  • 39
  • 49
14
votes
1 answer

beginner's tutorial for report viewer?

I am using VSTS 2008 + C# + .Net 3.5 + SQL Server 2008 + ASP.Net + IIS 7 to develop web application. Any quick and easy to learn tutorial for report viewer -- I want to generate report based on data from SQL Server 2008. Basic design and…
George2
  • 44,761
  • 110
  • 317
  • 455
14
votes
1 answer

Threading and SqlFileStream. The process cannot access the file specified because it has been opened in another transaction

I am extracting content of the Files in SQL File Table. The following code works if I do not use Parallel. I am getting the following exception, when reading sql file stream simultaneously (Parallel). The process cannot access the file specified…
Zuhaib
  • 1,420
  • 3
  • 18
  • 34
14
votes
1 answer

Loop Join in SQL Server 2008

I'm not clear about working difference between queries mentioned below. Specifically I'm unclear about the concept of OPTION(LOOP JOIN). 1st approach: it's a traditional join used, which is most expensive than all of below. SELECT * FROM [Item…
Vikrant
  • 4,920
  • 17
  • 48
  • 72
14
votes
2 answers

SQL query times out when run from C#, fast in SQL Server Management Studio

I have a C# program that executes a SQL query, using the code listed below. I've been using this code for a while with no problems until the other day. I'm passing a query string to SQL that includes a list of strings, which are stock identifiers.…
freckles
  • 143
  • 1
  • 6
14
votes
5 answers

Does SQL Server guarantee sequential inserting of an identity column?

In other words, is the following "cursoring" approach guaranteed to work: retrieve rows from DB save the largest ID from the returned records for later, e.g. in LastMax later, "SELECT * FROM MyTable WHERE Id > {0}", LastMax In order for that to…
balpha
  • 50,022
  • 18
  • 110
  • 131
14
votes
6 answers

A reliable way to verify T-SQL stored procedures

We're upgrading from SQL Server 2005 to 2008. Almost every database in the 2005 instance is set to 2000 compatibility mode, but we're jumping to 2008. Our testing is complete, but what we've learned is that we need to get faster at it. I've…
Cᴏʀʏ
  • 105,112
  • 20
  • 162
  • 194
14
votes
1 answer

Group By and Order By with UNION ALL

I have a stored procedure with the following query: SELECT (sum(addition)) AS [COUNT], MAX(CONVERT(VARCHAR(12),CREATED,102)) as [date] FROM [TABLE_ONE] WHERE convert(VARCHAR(12),CREATED,102) BETWEEN CONVERT(date,@startdate) AND…
HelpASisterOut
  • 3,085
  • 16
  • 45
  • 89
14
votes
5 answers

How to insert multiple select statements into a temp table

I am having three tables with different data and i need to insert into one TEMP table and return that table in StoredProcedure. I tried as: -- To get last 10 Days Letters count SELECT col1,col2,1 AS Type, LettersCount INTO #temp FROM tblData -- To…
Dinesh Reddy Alla
  • 1,677
  • 9
  • 23
  • 47
14
votes
2 answers

SQLServer get top 1 row from subquery

In a huge products query, I'm trying to get the prices for the last buy for every element. In my first approach, I added a sub-query, on the buys table ordering by date descendant and only getting the first row, so I ensure I got the latest row. But…
Sergio
  • 1,383
  • 2
  • 13
  • 28
14
votes
1 answer

Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query

I have the below select statement from a stored procedure: ALTER PROCEDURE [dbo].[Test] --Params @SolutionId INT ,@APIKey varbinary(256) AS SELECT SK.SolutionID ,SK.APIKey ,SK.Enabled …
user505210
  • 1,362
  • 11
  • 28
  • 50
14
votes
3 answers

Proper Install Order For Visual Studio 2010 with SQL Server 2008 and Office 2007?

I want to create a Windows 7 64-bit (Ultimate) virtual machine with: Visual Studio 2010 (Ultimate) Office 2007 Enterprise (with Visio 2007) SQL Server 2008 (with SSIS and SSRS) but I am not sure if there is a correct order to install those items…
14
votes
3 answers

How to find ALL descendants using HierarchyID for SQL Server

I need to find all descendants of a category using HierarchyID for SQL Server. I know how to find direct children but I would like to find children of children of children and so on. Is there a way to do this using the HierarchyID?
Luke101
  • 63,072
  • 85
  • 231
  • 359
14
votes
1 answer

EXEC to USE Database

I have written a script that generates a database backup file name, backs up the database, and then restores it as a copy with the new database name. The name is based on some date/time data. I then need to USE that database, in the script, and then…
Craig
  • 18,074
  • 38
  • 147
  • 248