This tag is for SQL Server 2008, major build version 10.00.xxxx.

learn more… | top users | synonyms (1)

6
votes
3answers
2k views

Specify Connection in Management Studio T-SQL Query

When adding users are roles to DB servers I often use the "Script this action" function from the GUI. I then just go to "Connection :: Change Connection" to do the same on my other servers. Is there ...
4
votes
1answer
348 views

How can a raised alert fail to notify an operator via e-mail?

SQL Server 2008: A message with @msgnum = 75000 and @severity = 16 was added to the SQL instance. An alert was added that is raised when error number 75000 is raised. The alert is enabled and an ...
3
votes
1answer
7k views

CONTAINS function in MS SQL 2008 R2

I try the following SQL query : SELECT FirstName, SecondName FROM Persons WHERE CONTAINS(FirstName, 'Mat') and I got this error : Cannot use a CONTAINS or FREETEXT predicate on table or ...
3
votes
1answer
1k views

What does “slot 80 for LOB data type node does not exist” error in sql server mean?

When I modify a table in SQL Server 2008 I get the following error: The Database ID 29, Page (1:235225), slot 80 for LOB data type node does not exist. This is usually caused by transactions ...
0
votes
1answer
406 views

Performance problem caused by joining with the result of a scalar function?

In the following example the performance of the first version using only one SQL query is very bad. The problem is the last join. When I store the result of the left side into a temporary table and ...
1
vote
1answer
1k views

Recovering from: A transport-level error has occurred when sending the request to the server in SSMS

Every now and than I loss the connection in SSMS and get the message Msg 121, Level 20, State 0, Line 0 A transport-level error has occurred when receiving results from the server. (provider: TCP ...
3
votes
2answers
700 views

A query submitted from different applications has differing DOP

I have a query which selects from multiple views and is fairly I/O heavy. If I execute this query using Management Studio it uses parallelism across most of the 16 CPUs and completes in under 10 ...
5
votes
3answers
863 views

SQL Server database file fragmentation

I have inherited a system where the previous DBA added 7 data files to the PRIMARY filegroup (8MB initial size) and left the AUTOGROW option at 8MB. What I have now is a set of eight files each about ...
0
votes
1answer
330 views

Date Format in Sql Server

I am importing data from another sources, which has multiple columns but I am facing problem in date column like I have multiple format in this column like: dd/mm/yyyy mm/dd/yyyy mmm-yyyy Can you ...
2
votes
2answers
301 views

Search on part of a column in a SQL Server cross-database view

I'm currently writing an application that interfaces with a 3rd party vendor's SQL Server 2008 database that I only have read access to. We have a separate database that contains cross database views ...
5
votes
1answer
5k views

Restore encrypted database to another server

I'm using a product which runs on SQLServer 2008. Understandably the company supplying it don't offer SQLServer support. When I installed the product I specified a password to encrypt the database. ...
5
votes
1answer
534 views

Indications from obscenely high Operator Costs in Query Plan?

I have a monthly ETL process that's too complicated to explain here, but basically we get a large amount of customer data, bulk load it into various tables, then run a series of build processes. The ...
4
votes
3answers
3k views

How to insert multiple records using XML in SQL server 2008

i use SQL server 2008 in my web application back end. Apparently i iterate through all the records from the C# code whenever there is a multiple insertion scenario. i have never tried the multple ...
4
votes
1answer
546 views

How to perform the dreaded double hop with linked servers?

The situation: I have SERVER1, SERVER2, ACCESSDB on SERVER3. I have successfully created a linked server connection from SERVER1 to SERVER3's ACCESSDB. I want to be able to access the linked server ...
5
votes
2answers
541 views

SQL Server configuration / specification recommendations and advice!

I am about to deploy a new server at work as follows: Dell T610 2 x Xeon 2.53 Quad core 24 GB RAM 1 x Perc H700 RAID controller with 1GB Non Volatile memory 8 x 300GB 15k SAS Hard drives I am looking ...
3
votes
1answer
669 views

Login problem to SQL Server

I attempt to connect to SQL Server 2008,I receive the following error. Login failed for user <>. Reason: Failed to open the explicitly specified database. By the way, I have a SQL Server 2008 ...
4
votes
2answers
4k views

Help solving a Clustering Issue: [sqsrvres] ODBC sqldriverconnect failed

I have a 2 node cluster (NODE-A & NODE-B) with 2 SQL instances spread between them. INST1 prefers NODE-A, INST2 prefers NODE-B. INST1 started generating errors then, failed over to NODE-B. ...
5
votes
1answer
1k views

Migrate DTS Jobs to 2008 Server

We have been running SQL Server 2000 for years. Finally, at long last, we have an SQL 2008 Server being shipped in. We have many DTS jobs on our SQL 2000 Server that need to be migrated to the SQL ...
3
votes
2answers
3k views

Best way to sync a table between two sql server databases with an identity key

I have an SSIS package that moves data from a table into another table in another database. The source table has an identity key. I need to perform some operations on the data. The only way I can ...
3
votes
3answers
235 views

Checking for dupes on Compact Insert Statement

I'm not sure if that is the correct term "Compact Insert Statement" It is just what I have always heard it referred to. It goes as follows: INSERT INTO [tblUsers] ([username], [password]) ...
4
votes
2answers
5k views

SQL Server 2008 posibilities of having views from one database in another database?

I have a vendor database from I want to extract and transform certain information. As I dont want to change the structure of the original database due to licensing I therefor wondering if I can put ...
6
votes
1answer
2k views

Duplicating some rows of a data flow in SSIS

I have a data flow to migrate data from an old database to a new one. The old design had all the data and historical information (changes) stored in a single table with a "version" (incrementing ...
5
votes
3answers
390 views

SELECT * WHERE VarCharColumn IN (…) Optimization

I have a list of 3000 strings, and I am passing them (twenty at a time) into a parametrized IN clause. It definitely isn't getting the results I would like to see ~ 500ms per execution. The column is ...
4
votes
2answers
712 views

How to mark an item as “Expired” when it's ExpiryDate value is in the past?

I have a table of items, each of which has a Status and ExpiryDate. What is the best way of enforcing this: when ExpireyDate > DateTime.Now update Status to "expired" I could have a stored ...
6
votes
2answers
978 views

Using totals on aggregates to improve performance

I have two tables: details and totals of these details. Details (Slow solution): select OrderId = r.OrderId , TotalQty = SUM(r.Quantity) , ...
3
votes
1answer
1k views

How to fix discrepancies between publisher and subscription data?

I have a transactional replication between two SQL Server 2008 SP1 servers, both on Windows 2003 Server. I discovered that there are discrepancies between some of the tables of the main database and ...
7
votes
1answer
2k views

noexpand hint for non-enterpise edition and performance

I have to use Indexed views to reach performance. As I can see from this comparison table standard edition does not support indexed views. But BOL says: Indexed views can be created in any ...
5
votes
1answer
541 views

Alerting on Database Mirroring Events

I am looking for the actions one must take to cause Threshold Alerts to occur for a single mirrored database on an instance of SQL Server 2008 containing multiple mirrored databases. FYI: This is ...
5
votes
1answer
954 views

Using integrated security over VPN

We've got a client that we're going to allow to use one of our applications. Staff on site regularly connect to our network via VPN. The .Net application that connects to the SQL Server uses ...
3
votes
1answer
331 views

Badly performing query plan after adding ORDER BY to Full Text CONTAINS search

The following query is proving beyond my abilities to fix - hope someone can help. SELECT top 100 Id, Name, InsertDate FROM Foo WHERE CONTAINS(FooText, '"test*" and "hello*" and "goodbye*"') ORDER BY ...
2
votes
1answer
698 views

Are master/slave replication relationship between different versions of SQL Server possible?

I have a database server, SQL Server 2005, that's inside a private network. Now i need to make a database there available for a webserver, so i want to replicate this db to an external server, which ...
3
votes
3answers
900 views

SQL Server 2008 on Hyper-V Virtual Machine with Multiple instances

Running SQL Server 2008 instance on a Virtual Machine (Hyper-V) on a Windows 2008 R2 OS. Currently has a few production DBs. The whole VM itself is on RAID 5 volume (so are the DB files etc). We ...
5
votes
1answer
563 views

Why can the target of the OUTPUT INTO clause not be a view?

Here is my statement: DELETE FROM table1 OUTPUT deleted.col1, deleted.col2 INTO view1; It gives me this error: The target 'view1' of the OUTPUT INTO clause cannot be a view or common table ...
1
vote
1answer
1k views

Inner cursor performance issues

Before I tried to avoid using cursor because of performance issues. But now I have to do some calculations to reach some goals. I have a stored procedure that has a code like this: DECLARE ...
2
votes
2answers
3k views

Database mirroring - Witness only

In SQL Server 2008 R2 Express the only mirroring alternative is "Witness only", however I can't find a good explenation to what this is. I would like to have a database on a virtual server and then ...
10
votes
3answers
2k views

SQL Profiler tutorials for newbie

The MSDN documentation tough to understand. Are there any online tutorials available to learn SQL Profiler? If possible, videos or simple blog posts would be preferred.
4
votes
2answers
4k views

What is the best practice for storing image varbinary(max) data in a database table?

I have a table that stores images that range in size between 16-100 KB each. Since the images are so small, I've taken Microsoft's advice and not used the FILESTREAM data type. The table is ...
3
votes
1answer
910 views

SQL: transfer database schema

If i want to transfer schema ownership to another schema i know that i need to use something like: ALTER SCHEMA destinationschema TRANSFER sourceschema.objectname; But how is it different from: ...
1
vote
1answer
797 views

How to ensure that SQL Jobs run in the correct order within a minimal maintenance window?

From this question I learned about a script which creates jobs for backing up databases, checking database integrity, optimizing indexes, and cleaning files. According to the documentation, this ...
2
votes
1answer
483 views

What is the best practice for backing up a database in Simple mode?

I am trying to create a SQL Job for backing up my database. I want to have: A weekly full backup A daily differential backup Something that will clean up backups that are older that 14 days I ...
0
votes
1answer
4k views

Maintenance plan delete backup

I succeeded in making a backup through maintenance plan. All I need now is to find how to delete a folder (containing old backup) through the same maintenance plan.
2
votes
2answers
520 views

Should I create a maintenance plan for my database or use jobs?

I tried creating a Maintenance Plan on my SQL Server 2008 database and was impressed by some of the things that are available out of the box. However, after it was created, it seemed difficult to ...
6
votes
4answers
2k views

Duplicate database and keep it up to date - Replication or SSIS?

I would like to duplicate a database, on the same server, and keep it up to date either by running a scheduled service once a day or having SQL Server 2008 take care of this internally. We don't need ...
11
votes
4answers
785 views

Creating centralized DBA database

We have 200+ servers and I am thinking about creating a centralized DBA database where it logs backup, errors, space jobs and generate reports on SSRS. I am not sure where to start and I would highly ...
9
votes
4answers
1k views

What is the best way to monitor long running queries in SQL Server?

I have to run quite a few long-running queries (rebuilding indexes, updating large sets of data) for my database. Is there an alternative to running the query in SQL Server Management Studio and ...
3
votes
2answers
279 views

Report model data source

Does anybody know how i could use a linked server as a data source for a report model in SQL server 2008 r2? or how i could make this linked server a data source on a report model? Please help. Thank ...
3
votes
1answer
4k views

How do I alter index rebuild an entire database?

I want to reorganize the indexes of all tables in my SQL Server 2008 database, named 'db'. I try the following command: ALTER INDEX all ON db REBUILD And I get the following error: Cannot find ...
7
votes
3answers
544 views

Data Warehouse Creation

I'm fairly green when it comes to this field. I'm a data analyst at a small hospital 8 months now, out of a 2 year degree in a new career field for me. Situation We have a Cobol "database" (I ...
5
votes
3answers
739 views

Deadlock Error from SQL Server 2000 to SQL Server 2008

After migrating data from SQL Server 2000 to SQL Server 2008,when I am doing any a transaction in the table which find out more row on the database,that's gives me error. Transaction (Process ID ...
3
votes
2answers
744 views

MS SQL : Use Computed value to Compute other values

I'm having problem with generating results which are computed from data that exists in database. This is the case I have Coupons that can be amount or percent, if percent is 0 then amount is used ...