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

learn more… | top users | synonyms (1)

5
votes
2answers
1k views

DTA Recommends to CREATE STATISTICS

I just ran a T-SQL query through DTA and one of the recommendations is to CREATE STATISTICS on one of the columns that is part of many of the queries in the SQL code file. My question is, how exactly ...
10
votes
1answer
1k views

What is the impact of changing the index creation memory setting in SQL Server?

I am trying to create some indexes a SQL Server 2008 database but am getting the following error message. Msg 8606, Level 17, State 1, Line 1 This index operation requires 1024 KB of memory ...
3
votes
4answers
194 views

how to interpret log files with high transactions

I'm having this issues with too many logs files being generated. Over 60gb in the last 24 hours. It's not a massively high transactional website. What is the best way to read the log files and work ...
3
votes
1answer
492 views

Does T-SQL MOVE actually move the database, or just copy?

I'm a bit confused over the T-SQL command MOVE. I have a statement saying: MOVE N'Prod_Database_Data' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Test_Database.mdf' ...
3
votes
1answer
203 views

Minimum rowcount for filtered index?

Creating an index always has trade-offs. Whenever you insert, update or delete, it has to perform those operations on the index as well. This is all pretty commonly known. But with the advent of ...
5
votes
3answers
661 views

Using SQL Server on separate networks

I have a bunch of SQL Servers installed on Windows2008R2. Currently, each windows server has two NIC's, each connecting to separate networks. In other words, each server appears on each network. ...
4
votes
2answers
2k views

SQL Server database forum design sample

I am doing a design for a database using SQL Server 2008 R2, basically it is a simple database design for a forum (just like games fans forums). Fortunately I am struggling with it as I didn't find ...
3
votes
2answers
275 views

How to track how many times the data is read?

I want to track how many times records are read in a specific table. Let's say that we have this table ID Name 1 Cat 2 Dog 3 Fish I want to know how many times the record ...
1
vote
1answer
1k views

Install SQL server 2008 R2 with VS 2010

Ok, I've installed SQL Server 2008 R2. I'm trying to add a "SQL Server Database" to an ASP MVC project. But it keeps telling me I need SQL Server for it to work. What do I need to do to setup the ...
4
votes
2answers
1k views

Best way to evenly distribute data over partitioned tables

I am working with a database with roughly around 500MM records. We currently use a static partitioning method that partitions the data by an int identifier such at < 150MM goes on partition 1, > ...
6
votes
1answer
4k views

Find all ancestor nodes of a HierarchyId using a single SQL statement?

I'm trying to find a way to get all ancestor nodes of a given node using HierarchyID. Every solution I've seen using HierarchyID seems to use either a CTE or a variable. Is there a way to do this ...
1
vote
1answer
405 views

SQL Server sp_configure options?

Does anybody know where I can find a list of all the parameter options for sp_configure? It isn't really jumping out at me when I search online for possible variations and the capabilities of ...
3
votes
2answers
2k views

Problem Reaching VM SQL Server Instance

Here's what I'm working with right now. I have a host OS which includes a SQL Server 2008 Enterprise instance. I have a virtual machine running on this host which has a SQL Server 2008 R2 Express ...
9
votes
1answer
3k views

How to use transactions with SQL Server DDL?

I have a login table into which all inserts are done by a single stored procedure. CREATE TABLE dbo.LogTable( LogRefnr int IDENTITY(1, 1) NOT NULL, LogQuery varchar(255) NOT NULL, LogTime ...
1
vote
1answer
396 views

Ms Access queries equivalent in Sql Server

Queries in MS Access can act like views do in oracle in that you can query against them. Example: if you have a query in access called allProducts, you can also do SELECT * from allProducts; My ...
4
votes
2answers
2k views

Role db_ddladmin not working properly on SQL Server 2008

I want to allow certain user to create/modify objects on a database(tables, views, sp's, functions, schemas etc) and don't want to give db_owner. I thought I could do it with the db_ddladmin role, ...
6
votes
1answer
854 views

Can someone explain the magic of Opendatasource/Openrowset?

When pulling information from an excel file (or ms-access DB) I commonly use something like this: SELECT * FROM OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0', 'Data Source=C:\test.xls;Extended ...
2
votes
2answers
1k views

Is it possible with SQL Server 2008 to have a Partioned Tables with an Identity Column?

I'm not thinking of using it for the partition function. I just want to know, if it is supported or not. Don't tell me why it is not a good idea to use such columns on partitioned tables.
3
votes
3answers
412 views

Database Schema with a shared identity Field

I'm a developer treading into the database world so bear with me please. I'm creating a Contract database with separate tables for various types of contracts. I have 5 tables but would like to ...
5
votes
1answer
401 views

how to improve performance by using or not using table variables

I have a table variable: DECLARE @to_process TABLE ( [Id] [bigint] NOT NULL, [SequenceId] [bigint] NOT NULL, ... ) INSERT INTO @to_process ( Id , SequenceId ... ) SELECT ...
3
votes
3answers
1k views

Managing multiple SQL Server databases

My company has many branch offices and each branch has a DB server. Some have SQL Server 2005 and some others have SQL Server 2008. The schema is the same for all these servers. Whenever I want to do ...
2
votes
1answer
693 views

Change Tracking Retention from a backup?

I have a backup of a SQL Server 2008 database with change tracking enabled on it. The retention period is 2 days. AutoCleanUp is set to true. The database backup is 5 days old and has 2 days worth of ...
3
votes
1answer
625 views

Query Parallelism

I have a long running query that behaves differently between two different machines. I have an 8 core machine running Microsoft SQL Server Developer Edition (64-bit) that does not use parallelism and ...
3
votes
3answers
423 views

How to determinate in a trigger direct inserts and inserts via stored procedure

TableX can be modified in two ways: client does "direct" inserts client uses stored procedure to inserts records How to determinate the way of client's call (direct or stored proc) in a trigger of ...
3
votes
1answer
512 views

SQL 2008 Server agent cant see perfmon counters

I am trying to create a new SQL server agent alert to capture "SQLServer:General Statistics|Processes Blocked||>|5' but it looks like alert creation GUI is not able to see any perfmon counters as in ...
3
votes
1answer
83 views

How do you move a Database from one server to the other using MS-SQL-SMS

I need to move a database, but I want to make sure I do it safely and with all triggers, store proc and functions. I was think to simply detach the database from my server using MS-SQL-SMS and move ...
1
vote
1answer
237 views

SQL Server Schema Security

My company uses a multi-tenant database (one database, all tables have a customerID field). We are in the process of setting up a data warehouse and giving clients direct access. Our initial ...
3
votes
2answers
372 views

Windows Storage Server, SQL Server, regular files — means to protect from insider threats?

This is my first post here, and I am by no means qualified as a Windows Server or Storage Server 2008 or SQL Server 2008 administrator. I am mostly a Unix guy, however tasked with a job to investigate ...
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
353 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
418 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
715 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
864 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
331 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 ...
6
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
537 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
544 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
673 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 ...