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
3 answers

SQL select multiple rows in one column

I have table TestTable ID Name ------- 1 A 1 B 1 C 2 D 2 E 3 F I want to write a query in SQL Server 2008 which will return ID Name ---------- 1 A,B,C 2 D,E 3 F Please someone help me to write this query.
Gulrej
  • 969
  • 4
  • 15
  • 25
14
votes
2 answers

Enter data in geography column in SQL Server management studio

I've created a new table in SQL Server Management Studio, which includes a Geography column. Now, I'm trying to enter data in this column using the SSMS UI, but I just can't find the right way of doing it. So, how can that be done?
ml123
  • 1,059
  • 2
  • 12
  • 27
14
votes
5 answers

Catching null warnings in aggregate functions in sql

How does one use the debugger in sql 2008 / 2012 to catch null values in records? See: drop table abc create table abc( a int ) go insert into abc values(1) insert into abc values(null) insert into abc values(2) select max(a) from abc (1 row(s)…
Alex
  • 5,674
  • 7
  • 42
  • 65
14
votes
1 answer

Dropping/ Disabling index is better in sql server

I am writing this a follow up to Changing data type of column in SQL Server My question earlier was if I need to remove all indexes and constraints and it was answered I do need to remove them. So as I was surf internet on the topic I came across a…
Sam
  • 1,298
  • 6
  • 30
  • 65
14
votes
9 answers

Character mask output data on select

I'm using SQL Server 2008. I would like to character mask the output data of a query. This is my data from a column on a table when doing a select: column1 384844033434 743423547878 111224678885 I would like an output like…
pyram
  • 925
  • 9
  • 24
  • 43
14
votes
1 answer

Infinite loop in CTE when parsing self-referencing table

I'm using the following Common Table Expression to parse self-referencing table. But the CTE does not work, produces and infinite loop and generates an error: Msg 530, Level 16, State 1, Line 1 The statement terminated. The maximum recursion 100…
jrara
  • 16,239
  • 33
  • 89
  • 120
14
votes
5 answers

Add version control to existing SQL Server database

I am part of a development team currently working with a database that does not have any kind of source control. We work with SQL Server 2008 R2 and have always managed the DB directly with SSMS. It now has ~340 tables and ~1600 stored procedures,…
ederbf
  • 1,713
  • 1
  • 13
  • 18
14
votes
6 answers

Format a number with commas but without decimals in SQL Server 2008 R2?

I am using the following to create a comma formatted number in T-SQL. How can I get rid of the decimal point and the digits after decimal. So if I get 1,112.00 after formatting, how would I get only 1,112? SELECT CONVERT(varchar, CAST(1112 AS…
Sunil
  • 20,653
  • 28
  • 112
  • 197
14
votes
1 answer

Table in Excel from SQL Server stored procedure with parameter field in workbook

I need to create a dynamic report using Excel 2010 and SQL Server. Going off of previous ones created by others I figured out how to create the data connection and use the stored procedure with a specific parameter in the connection properties…
d456
  • 1,147
  • 4
  • 13
  • 25
14
votes
9 answers

Could not load Microsoft.SqlServer.BatchParser or one of its dependencies

I know this question was asked for many times and I found a lot of information on Google regarding this problem, but I still can't solve the problem that exists on my DEV PC :( Could not load file or assembly Microsoft.SqlServer.BatchParser I…
Alex Dn
  • 5,465
  • 7
  • 41
  • 79
14
votes
1 answer

SQL Server Update with group by

insert into tableA (column1) select min(tableC.column1) from tableB inner join tableC on (tableC.coumn2 = tableB.column1 and tableB.column2 = tableA.column2) group by tableA.column2 How would I change the above to a update with group by…
Chen Lu
  • 205
  • 1
  • 2
  • 9
14
votes
4 answers

Generate report from URL - SQL Server Reporting Services 2008

I have SQL Server Reporting Services 2008 and when I open the following URL: "http://localhost/Reports/Pages/Report.aspx?someReport" I'm getting report screen in which I fill my parameters and generate a report, My question is how can I do this…
Dor Cohen
  • 16,769
  • 23
  • 93
  • 161
14
votes
9 answers

How can I update my SQL Server database schema?

Usually throughout development of a project I will deploy frequently, just to make sure I wont have any problems in production. Also, throughout development, I find myself changing the database's schema. How can I easily update the database in…
Ronnie Overby
  • 45,287
  • 73
  • 267
  • 346
14
votes
1 answer

How to concatenate % and column name in a LIKE statement

I'm trying this: SELECT FacilityID, FacilityName, CMSProviderID, [Provider Number] FROM G2_Facility, SCIPHospitalCompare WHERE [Provider Number] LIKE '%' + CMSProviderID + '%'; And I get: Msg 245, Level 16, State 1, Line 1 Conversion failed when…
Tommy B.
  • 3,591
  • 14
  • 61
  • 105
14
votes
1 answer

Number of open connections and the meaning of sleeping status of a connection

I ran this query in my database : SELECT DB_NAME(dbid) as DBName, COUNT(dbid) as NumberOfConnections, loginame as LoginName FROM sys.sysprocesses WHERE dbid > 0 GROUP BY dbid, loginame…
Arian
  • 12,793
  • 66
  • 176
  • 300
1 2 3
99
100