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
119
votes
4 answers

How to edit one specific row in Microsoft SQL Server Management Studio 2008?

In Microsoft SQL Server Management Studio 2008, is there a secret to be able to edit one row based on a key? There's an option to do "Edit Top 200 Rows", but what if I want to select some other row and edit it in the datagrid? I would rather do that…
NealWalters
  • 17,197
  • 42
  • 141
  • 251
118
votes
8 answers

Using SQL Server 2008 and SQL Server 2005 and date time

I've built a entity framework model against a 2008 database. All works ok against the 2008 database. When I try to update the entity on a 2005 database I get this error. The version of SQL Server in use does not support datatype 'datetime2 I…
117
votes
5 answers

Add column to SQL Server

I need to add a column to my SQL Server table. Is it possible to do so without losing the data, I already have?
Antarr Byrd
  • 24,863
  • 33
  • 100
  • 188
117
votes
4 answers

Replace Default Null Values Returned From Left Outer Join

I have a Microsoft SQL Server 2008 query that returns data from three tables using a left outer join. Many times, there is no data in the second and third tables and so I get a null which I think is the default for left outer join. Is there a way…
Brett Bim
  • 3,190
  • 4
  • 28
  • 26
116
votes
2 answers

How to force a SQL Server 2008 database to go Offline

How do I force my Database to go Offline, without regard to what or who is already using it? I tried: ALTER DATABASE database-name SET OFFLINE; But it's still hanging after 7 min. I want this because I need to test the scenario. If it's even…
radbyx
  • 9,352
  • 21
  • 84
  • 127
116
votes
4 answers

Restrict varchar() column to specific values?

Is there a way to specify, for example 4 distinct values for a varchar column in MS SQL Server 2008? For example, I need a column called Frequency (varchar) that only accepts 'Daily', 'Weekly', 'Monthly', 'Yearly' as possible values Is this possible…
Adam
  • 1,546
  • 2
  • 18
  • 23
116
votes
2 answers

SQL Server : GROUP BY clause to get comma-separated values

Possible Duplicate: SQL group_concat function in SQL Server I am looking to create a query but somehow I am unable to do so. Can anyone please help me out here? The original data ID ReportId Email 1 1 a@a.com 2 2 …
user867198
  • 1,588
  • 3
  • 16
  • 31
116
votes
16 answers

How to find SQL Server running port?

Yes I read this How to find the port for MS SQL Server 2008? no luck. telnet 1433 returns connection failed, so I must specify other port. I tried to use netstat -abn but I don't see sqlservr.exe or something similar on this list. Why it so…
keram
  • 2,321
  • 4
  • 24
  • 29
115
votes
7 answers

Cannot use a CONTAINS or FREETEXT predicate on table or indexed view because it is not full-text indexed

I am getting following error in my SQL server 2008 R2 database: Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'tblArmy' because it is not full-text indexed.
DotnetSparrow
  • 27,428
  • 62
  • 183
  • 316
115
votes
8 answers

COALESCE Function in TSQL

Can someone explain how the COALESCE function in TSQL works? The syntax is as follows COALESCE(x, y) The MSDN document on this function is pretty vague
Lloyd Banks
  • 35,740
  • 58
  • 156
  • 248
115
votes
8 answers

How do I use the CONCAT function in SQL Server 2008 R2?

I was looking for a CONCAT function in SQL Server 2008 R2. I found the link for this function. But when I use this function, it gives the following error: Msg 195, Level 15, State 10, Line 7 'CONCAT' is not a recognized built-in function…
Mitesh Budhabhatti
  • 1,583
  • 2
  • 16
  • 20
114
votes
6 answers

Current executing procedure name

Is it possible to get the name of the current Stored Procedure in MS SQL Server? Maybe there is a system variable or function like GETDATE()?
Sergey Metlov
  • 25,747
  • 28
  • 93
  • 153
114
votes
14 answers

How can I automate the "generate scripts" task in SQL Server Management Studio 2008?

I'd like to automate the script generation in SQL Server Management Studio 2008. Right now what I do is : Right click on my database, Tasks, "Generate Scripts..." manually select all the export options I need, and hit select all on the "select…
Brann
  • 31,689
  • 32
  • 113
  • 162
114
votes
3 answers

SQL Server 2008: how do I grant privileges to a username?

I need to be able to establish an ODBC connection through SQL Server authentication. In SSMS how do I grant permission for a user to be able to have ALL RIGHTS on a specific database? is there a way to do this graphically with SSMS?
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
113
votes
8 answers

TSQL - How to use GO inside of a BEGIN .. END block?

I am generating a script for automatically migrating changes from multiple development databases to staging/production. Basically, it takes a bunch of change-scripts, and merges them into a single script, wrapping each script in a IF whatever BEGIN…
BlueRaja - Danny Pflughoeft
  • 84,206
  • 33
  • 197
  • 283