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

Recursive same-table query in SQL Server 2008

I have the following table in a SQL Server 2008 database: Id Name ParentFolder -- ---- ------------ 1 Europe NULL 2 Asia NULL 3 Germany 1 4 UK 1 5 China 2 6 India 2 7 Scotland …
CesarGon
  • 15,099
  • 6
  • 57
  • 85
14
votes
4 answers

Using pivot table with column and row totals in sql server 2008

I have a table with following columns defect_id, developer_name, status, summary, root_cause, Secondary_RC, description, Comments, environment_name The column root_cause has Enviro, Requi, Dev, TSc, TD, Unkn as its values and column…
user1931944
  • 175
  • 2
  • 2
  • 9
14
votes
5 answers

How to create daily backup with unique name in sql server

I want to make full database backup of my server's all databases with unique name daily. For that I have an idea to keep timestamp which will make database copy separate. Suppose there is a database on server named ABCD then it should be backuped…
Dhwani
  • 7,484
  • 17
  • 78
  • 139
14
votes
3 answers

Join different tables based on condition

create table [premiumuser] (user_id int, name nvarchar(50)); create table [liteuser] (user_id int, name nvarchar(50)); create table [feature] (id nvarchar(50), user_id int, userkey int); insert into [premiumuser] select 1, 'stephen'; insert into…
Null Head
  • 2,877
  • 13
  • 61
  • 83
14
votes
2 answers

Is there a table that holds the listing of sysobjects.xtype descriptions?

According to the sysobjects documentation, sysobjects.xtype can be one of these object types: | xtype | Description | |-------|---------------------------------------| | AF | Aggregate function (CLR) | | C …
Mike Perrenoud
  • 66,820
  • 29
  • 157
  • 232
14
votes
2 answers

sp_send_dbmail: FROM_ADDRESS

I am using SQL Server 2008 R2. When I execute sp_send_dbmail I can't change the FROM_ADDRESS from the default one that our DBA specified. Why is there this parameter if it doesn't work? How do I specify a "custom" FROM_ADDRESS?
Denis
  • 11,796
  • 16
  • 88
  • 150
14
votes
5 answers

Return all values including NULL

I have two tables in SQL Server 2008, and by doing a JOIN I want to get all values, however I get only the values where records exist even though I need the fields with NULL records. Here is the example on how tableA looks like |IPAddress …
Farkiba
  • 366
  • 1
  • 5
  • 17
14
votes
2 answers

Include additional columns in a non clustered primary key index

I have defined the primary key on a table as nonclustered. With non-clustered indexes which are explicitly created by create nonclustered index it is possible to include additional (non-indexed) columns. Is the same also possible for the implicitly…
Claude
  • 1,724
  • 3
  • 17
  • 46
14
votes
1 answer

Slow query caused by parameter variables, but why?

I have 3 versions of a query that ultimately returns the same results. One of them gets dramatically slower when adding an extra inner join to a relatively small table AND where parameter variables are used within the where clause. The execution…
make_transition
  • 452
  • 1
  • 5
  • 12
14
votes
5 answers

How to only check the time on datetime fields but ignore the date?

I have a column that stores data in datetime format. I want to check for all instances where the time part of this column is not equal to 00:00:00:000 - the date does not matter. Basically, if time() was a function, something like this: SELECT …
Michael A
  • 9,480
  • 22
  • 70
  • 114
14
votes
5 answers

Ignore certain columns when using BULK INSERT

I have a comma delimited text file with the structure field1 field2 field3 field4 1 2 3 4 I wrote the following script to bulk insert the text file, but I wanted to leave out column 3 create table test (field1…
wootscootinboogie
  • 8,461
  • 33
  • 112
  • 197
14
votes
3 answers

Deleting column doesn't reduce database size

I have a test database with 1 table having some 50 million records. The table initially had 50 columns. The table has no indexes. When I execute the "sp_spaceused" procedure I get "24733.88 MB" as result. Now to reduce the size of this database, I…
Vinod
  • 929
  • 1
  • 16
  • 42
14
votes
3 answers

Why precision is decreasing when multiply sum to other number

I have encountered with following bug (or feature) in SQL Server. When I use SUM (*column*) where column has a numeric(18, 8) type and multiply it to any other number (integer or decimal) the result precision is reducing to numeric(18, 6). Here is…
Victor Chekalin
  • 676
  • 1
  • 8
  • 15
14
votes
3 answers

which runs first:joins or where clause

I have a query in which i am Using 13 LEFT OUTER JOINS .The very left table has a large data,so it takes very much time to execute the query and return the result. But when I am using a where clause to filter the result , It takes very less…
Brijesh Kushwaha
  • 273
  • 1
  • 3
  • 11
14
votes
6 answers

SQL Server ARITHABORT

I'm working with a client who has just upgraded from SQL 2000 to SQL 2008 and their view query times have gone up a lot. I had a look at the views and couldn't see much wrong with them. When I ran the view directly on the server, the times were OK.…
Tim Almond
  • 12,088
  • 10
  • 40
  • 50
1 2 3
99
100