This Tag is for SQL Server 2008 R2, major build version 10.50.xxxx

learn more… | top users | synonyms (2)

6
votes
1answer
723 views

Recommendations on how to organize Queues in Service Broker

I have a service broker application that currently has 5 or 6 queues on two servers. The general workflow is: Server A User populates some tables User fires stored proc which puts a message into ...
4
votes
3answers
2k views

Auditing specific database events

For auditing purposes, we have a requirement in which we have to enable Auditing for theses events: DBA Logins Changes made by DBAs LIKE INSERT, DELETE, UPDATE, ALTER (etc.) Changes made by our ...
4
votes
1answer
25k views

CREATE DATABASE permission denied in database 'master'

I've developed a desktop application using WPF and Entity Framework code-first. In my application the user can create multiple databases at run-time. But Entity Framework can't create database if ...
-1
votes
1answer
786 views

Directory lookup failed during log shipping

I have configured log shipping for all our SharePoint 2010 databases. All worked well since Friday and today Monday I ran this query: SELECT * FROM [msdb].[dbo].[sysjobhistory] WHERE [message] like ...
4
votes
1answer
959 views

When SQL Server uses Multi Page Allocations

What are the consumers of MPA (multi page allocations) in SQL Server? I know data pages are always 8K. Is there a situation where data/index page make use of MPA? It makes sense that execution plans ...
0
votes
1answer
180 views

distribution.dbo.MSdistribution_history comments explanation

The comment column of distributor.dbo.MSdistribution_history contains comments such as <stats state="2" fetch="11554" wait="214007" cmds="17898546" callstogetreplcmds="106880"> ...
1
vote
5answers
480 views

Document database structure for auditors

I am DBA for a Microsoft SQL Server 2008r2. Due to an audition, I need to provide data structure of my database, to people without an explicit IT background. I guess they would like the traditional ...
6
votes
1answer
333 views

BM25 (full-text search) implementation in SQL Server

I've hit a stump, while trying to implement the BM25 algorithm in SQL Server 2008 R2. I know that SQL Server includes the Full-Text Search option, which already implements a variant of BM25, but I ...
1
vote
2answers
183 views

Use a condition to limit the databases a policy checks

I'd like to create a Policy that checks, on demand, one database in an instance for tables that have no index. I can see how to create a Condition, linked to the 'Database' Facet and checks for my ...
1
vote
1answer
178 views

mdw_purge_data_ long runtime

I have a SQL Server 2008 R2 that is running several databases and has also been configured as our central MDW. When the management data warehouse is created it creates a number of agent jobs one of ...
-1
votes
1answer
156 views

Retrieve 5th highest salary in table [closed]

How to get the 5th highest salary from the table. Suppose, I have 100 rows and I want to display details of 5th highest salary of the individual then how to write that query in T-SQL using SQL Server ...
6
votes
1answer
810 views

When performing a cross-database transaction, in which transaction log(s) is the information stored?

Given the following snippet: -- error checking omitted for brevity begin tran exec database1..my_stored_procedure exec database2..my_other_stored_procedure if (@@error <> 0) rollback ...
0
votes
2answers
307 views

Can I recover CDC tables from transaction logs?

Is there anyway to restore CDC tables from transaction logs? My basic understanding is that CDC reads these logs, and entries that are specially marked, are grabbed by CDC. Once this has happened ...
3
votes
2answers
9k views

Total Memory used by SQL Server (64 bit)

My knowledge on the subject suggests that perf counter SQL Server:Memory Manager: Total Server Memory only gives you buffer pool memory. There is a column called physical_memory_in_use in a DMV named ...
9
votes
2answers
13k views

Maximum memory setting in SQL Server

I'm running SQL Server 2008 and a web based application, on a single dedicated server, with only 2Gb of memory available. As is noted elsewhere, SQL Server regularly takes up to 98% of physical ...
2
votes
4answers
1k views

Working Linked Server Query fails in sp_send_dbmail

Take the following example: EXEC msdb.dbo.sp_send_dbmail @recipients = 'me@whatever.co.uk' , @query = 'SELECT TOP 10 * FROM LINKEDSERVERA.DATABASE.dbo.TABLE' , @attach_query_result_as_file = N'True' ...
0
votes
1answer
1k views

Real-time merge of two databases on different servers

One of the requirements our customer has given is to merge two databases running on two different machines in real time. This means that we have to build some sync policy (or use SQL Server tools to ...
2
votes
2answers
2k views

Trying to write a function that doesn't require dbo. prefix

I am trying to write a simple system function so that the dbo. prefix is NOT required to access the function. I have found an example of this for SQL Server 2000 but when I run EXEC SP_CONFIGURE ...
9
votes
5answers
2k views

Force sql server to run query conditions as written?

Im using Sql server 2008 R2 And I have this pseudo query (SP) : select ... from ... WHERE @LinkMode IS NULL AND (myColumn IN (...very long time exeted query...)) ... ... The ...
4
votes
1answer
278 views

Is there a behavior change between SQL Server 2000 and SQL Server 2008 R2 OPTION (FAST 1)?

This is question 2 of 2 related to the FAST query hint. Background Information (as an aside, I'm not trying to garner more rep, I'm trying to be true to only asking one question per question). Our ...
5
votes
1answer
2k views

How does OPTION (FAST 1) actually interact with a client?

This is question 1 of 2 related to OPTION (FAST 1); We've just upgraded our ERP database from SQL 2000 EE to 2008 R2 EE and we've been noticing increased blocking in the database. I've narrowed it ...
1
vote
1answer
760 views

Publishing stored proc execution in transactional replication

In SQL 2008 R2, I am going to update a table which will affect 25 million rows, table is currently replicated (transactional replication). To minimize the impact on replication can I create a stored ...
4
votes
1answer
611 views

Indexes file damaged, was on ramdisk

I have put some of my indexes into a filegroup that contains one file, that file is on the ramdisk, the performance is great, but the problem is that the file was deleted incorrectly (the file ...
1
vote
1answer
12k views

How to find which tables and views a user has access to?

We have a SQL Server 2008 database and have restricted all tables and views away from a specific user ID. Over the years we have granted back tables and views one at a time based on user need. We ...
1
vote
1answer
1k views

Upgrade SQL Server 2005 Enterprise to SQL Server 2008 R2 Standard

I understand that this is not a supported path, but does anyone have any insight about how to accomplish this? I can't seem to find any documents on the subject. I need my QA (2005) to match my ...
5
votes
1answer
229 views

Transactional replication creating a fixup index that's sleeping, but blocking other processes

I've just migrated my ERP database server from SQL Server 2000 to SQL Server 2008 R2 (both Enterprise Edition) and that migration went fairly smoothly. However, now that I'm trying to recreate ...
2
votes
1answer
9k views

Unable to connect to SQL server 2008 R2 via Instance name?

I don't understand : I've installed sql server 2008 R2. the installation process asked me for the desired instance name , so I wrote: MSSQLSERVER. after the installation , running Setup Discovery ...
1
vote
4answers
6k views

Speed up large clustered index creation?

I have a large table, the row count of the table is more than 3 billion, the data space for this table is about 120 GB. And Intel Xeon CPU E5645 @2.4GHz(2 processors), 24 CPUs, 64G memory, 64bit ...
3
votes
2answers
638 views

limit the number of rows returned when a condition is met?

Is it possible to limit the number of rows returned when a condition is met? I am working on a query to check if a student is ready to graduate, and they need to meet a certain number of credits per ...
5
votes
1answer
198 views

Fulltext stoplist replication

In MS SQL Server 2008 R2 there is replication of table with fulltext index on it. But stoplist that is associated with replicated fulltext index doesn't replicate. Is there any possibility to ...
3
votes
4answers
9k views

Logging queries and other T-SQL

I would like to know if SQL Server 2008 R2 has a default logging scheme for SELECT statements (or any other T-SQL for that matter). If yes, where can I see it? If not, how could I set it up?
2
votes
2answers
4k views

INSERT INTO #temp taking 1000 times longer than SELECT INTO #temp

I am shredding an xml blob that is being passed to me and loading a temp table for further processing. One of the things I noticed while working through the process is that performing an INSERT INTO ...
2
votes
2answers
476 views

Can view adapt to implicitly reference user's default schema?

A bit of background. I have a base application and most clients use it as standard. However some clients have small code and database customisations. Each of these clients has their own branch and ...
4
votes
2answers
3k views

Error while taking backup using SSMS

I am using SSMS. I have about 5 logins. For a particular login I have all server roles other than sysadmin. It is a sql login (not windows authentication). In user roles it has all permission for ...
0
votes
1answer
307 views

How to store a sequence of events related to a transaction

I am using Sql Server 2008 R2. I have two tables that describe import processes and export processes. Import table has these columns with others that just have details about each type of import ...
1
vote
1answer
127 views

Tips for catching changes in table data over time interval for export to Data Warehouse

I've recently been tasked with exporting data from one of our databases to a central Data Warehouse. The export is supposed to be incremental since a full load every 24 hours would be a massive waste ...
1
vote
0answers
58 views

Slow Response: Initially it's slow and on subsequent restart of the host it works normally

We have SQL Server 2008 R2 32 bit installed on the following hardware: CPU: Intel Xeon E5310 @ 1.60 GHz RAM: 4 GB HDD: Raid Server: HP Proliant 120 OS: Microsoft Windows Server 2003 R2, Standard ...
1
vote
2answers
140 views

Rebuilding, truncating etc SQL Server 2008 maintenance

About a month or so ago I inherited this somewhat-new database. I was lead to believe that everything was set up and all maintenance tasks were running without a hitch. SQL Server 2008 R2 I was ...
2
votes
1answer
204 views

Can I drop and recreate a system extended stored procedure?

I am having a problem with one of my servers where I cannot execute xp_cmdshell under certain conditions. The full problem can be found here problem running xp_cmdshell when Application Name set in ...
-1
votes
1answer
490 views

Deleted rows but database size is still large [duplicate]

I am using SQL Server 2008 Express which has maximum database size limit of 10 GB. Every month I hit the limit and the application can't store more data. To overcome this problem we run a job every ...
7
votes
2answers
4k views

Updating a table with more than 850 million rows of data

I have been tasked with writing an update query to update a table with more than 850 million rows of data. Here are the table structures: Source Tables : CREATE TABLE [dbo].[SourceTable1]( ...
1
vote
1answer
2k views

How do I specify a linked server to a remote database over tcp/ip?

I have a remote database running on an IAAS provider and I need to be able to execute joined queries from my local workstation. I am having trouble because when I attempt to create the link it is ...
0
votes
1answer
117 views

Accidentally Deleted SQL Server Log Reader Service Account [closed]

Uh, I accidentally deleted the Security Login in my SQL server that allows for the reading of log files. Now, I can no longer see any of the log files in my SQL Server Logs node of SMSS:( What ...
1
vote
2answers
414 views

Clustered vs Nonclustered Index

My database currently has a primary Key/Clustered index on the ID column for each table. However, the application that connects to the database is always looking at views defined as: SELECT * FROM ...
3
votes
1answer
5k views

How Should I Configure Memory for Multiple Instances of SQL Server?

We have a set of SQL Server instances (2008 R2) that run on the same virtual server. Each instance represents a stage in our development cycle (Dev/Test/Stage/etc.). The instances all need to be ...
0
votes
2answers
202 views

Server side trace to database

How can I set up a server side trace that dumps to a database instead of a trace file? I set-up and tested a trace configuration I want with Sql Server Profiler that dumps only needed info straight ...
1
vote
3answers
148 views

Proper way to export database to other servers

I am using SSMS (I am a software developer, not a DBA) and in each application release I need to release the database with its tables (some with data some with scheme only). I tried doing 3 things ...
2
votes
2answers
227 views

Moving one TempdB on 3 instance server

I have a large virtual SQL Server (Full 2008R2). I run 3 SQL Server instances and would like to relocate the TempdB database file to another location, splitting off from the TempdB log file. The ...
2
votes
1answer
5k views

Migrating from SQL Server 2005 to SQL Server 2008 R2 on a different box

We currently have a SQL Server 2005 instance hosting a lot of application specific databases (ArchiveManager, SolarWinds, Kaspersky etc). We are planning to deploy a new SQL Server 2008 R2 instance on ...
0
votes
1answer
38 views

Can I rely on the order of colums on an index generated by Database tuning advisor

I got the following recommendation on a table: CREATE NONCLUSTERED INDEX ...