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
130
votes
15 answers

The transaction log for the database is full

I have a long running process that holds open a transaction for the full duration. I have no control over the way this is executed. Because a transaction is held open for the full duration, when the transaction log fills, SQL Server cannot…
Jimbo
  • 1,685
  • 3
  • 12
  • 15
129
votes
11 answers

Querying data by joining two tables in two database on different servers

There are two tables in two different databases on different servers, I need to join them so as to make few queries. What options do I have? What should I do?
Kashif
  • 2,926
  • 4
  • 20
  • 20
129
votes
7 answers

Arithmetic overflow error converting numeric to data type numeric

I keep getting this error message everytime I run this query: Msg 8115, Level 16, State 8, Line 33 Arithmetic overflow error converting numeric to data type numeric. The statement has been terminated. But if I change the create table to (7,0), I…
user572984
  • 1,299
  • 2
  • 8
  • 4
128
votes
4 answers

Multiple INSERT statements vs. single INSERT with multiple VALUES

I'm running a performance comparison between using 1000 INSERT statements: INSERT INTO T_TESTS (TestId, FirstName, LastName, Age) VALUES ('6f3f7257-a3d8-4a78-b2e1-c9b767cfe1c1', 'First 0', 'Last 0', 0) INSERT INTO T_TESTS (TestId, FirstName,…
Borka
  • 2,169
  • 3
  • 20
  • 26
127
votes
14 answers

Errors: "INSERT EXEC statement cannot be nested." and "Cannot use the ROLLBACK statement within an INSERT-EXEC statement." How to solve this?

I have three stored procedures Sp1, Sp2 and Sp3. The first one (Sp1) will execute the second one (Sp2) and save returned data into @tempTB1 and the second one will execute the third one (Sp3) and save data into @tempTB2. If I execute the Sp2 it will…
HAJJAJ
  • 3,667
  • 14
  • 42
  • 70
127
votes
8 answers

I cannot start SQL Server browser

I can't start the SQL Server browser from SQL Service Configuration Manager 2008 version. There are absolutely no options to start the service. It's disabled as image shown below. How should I start the service again?
Nipun Alahakoon
  • 2,772
  • 5
  • 27
  • 45
126
votes
4 answers

How to enable Ad Hoc Distributed Queries

When I run a query with OPENROWSET in SQL Server 2000 it works. But the same query in SQL Server 2008 generates the following error: SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries'…
emergency coder
  • 1,313
  • 2
  • 9
  • 8
124
votes
7 answers

SQL Add foreign key to existing column

If I am using the following SQL command in SQL Server 2008 to update a table with a foreign key constraint: ALTER TABLE Employees ADD FOREIGN KEY (UserID) REFERENCES ActiveDirectories(id) UserID being my FK column in the Employees table. I'm trying…
ExceptionLimeCat
  • 6,191
  • 6
  • 44
  • 77
123
votes
7 answers

How to print GETDATE() in SQL Server with milliseconds in time?

I want to print GETDATE() in SQL Server 2008, I need the time with milliseconds (this is for debugging purpose - to find sp's execution time ) I find this Difference SELECT GETDATE() returns 2011-03-15 18:43:44.100 print GETDATE() returns Mar 15…
Ramakrishnan
  • 5,254
  • 9
  • 34
  • 41
123
votes
11 answers

How do I change db schema to dbo

I imported a bunch of tables from an old sql server (2000) to my 2008 database. All the imported tables are prefixed with my username, for example: jonathan.MovieData. In the table properties it lists jonathan as the db schema. When I write…
jonathan hall
  • 1,386
  • 3
  • 10
  • 7
122
votes
6 answers

Using RegEx in SQL Server

I'm looking how to replace/encode text using RegEx based on RegEx settings/params below: RegEx.IgnoreCase = True RegEx.Global = True RegEx.Pattern = "[^a-z\d\s.]+" I have seen some examples on RegEx, but confused as to how to apply it…
Control Freak
  • 12,965
  • 30
  • 94
  • 145
122
votes
11 answers

Could not obtain information about Windows NT group/user

I have a Windows 2012 Server running SharePoint 2010 using an SQL Server Express locally installed. Unfortunately my logs are currently flooding with message "An exception occurred while enqueueing a message in the target queue. Error: 15404, State:…
kolback
  • 1,341
  • 2
  • 10
  • 5
121
votes
13 answers

Index was outside the bounds of the Array. (Microsoft.SqlServer.smo)

I am using SQL Server 2008 R2. It is working fine. But recently, I have changed my hosting server and I came to know that they have installed SQL Server 2012 on Server. Now, Issue is that after connecting with Server Database through SQL Server 2008…
Jeeten Parmar
  • 5,568
  • 15
  • 62
  • 111
121
votes
18 answers

SQL Server: Invalid Column Name

I am working on modifying the existing SQL Server stored procedure. I added two new columns to the table and modified the stored procedure as well to select these two columns as well. Although the columns are available in the table, I keep getting…
Kamran Ahmed
  • 11,809
  • 23
  • 69
  • 101
121
votes
8 answers

Add a column to a table with a default value equal to the value of an existing column

How to add a column to a SQL Server table with a default value that is equal to value of an existing column? I tried this T-SQL statement: ALTER TABLE tablename ADD newcolumn type NOT NULL DEFAULT (oldcolumn) but it's giving an error: The name…
doesdos
  • 1,751
  • 4
  • 14
  • 13