SQL Server 2008 R2 (major build version 10.50.xxxx). Please also tag with sql-server.

learn more… | top users | synonyms (2)

4
votes
2answers
70 views

Does a covering nonclustered index help to answer Select * queries?

Our application developers run a lot of SELECT * queries against our database system, unfortunately. The missing index suggestions of sys.dm_db_missing_index contain a lot of cases that indicate to ...
0
votes
1answer
40 views

What are the low hanging fruits of a SQL Server 2014 migration?

I have read about new features and changes of the SQL Server 2014 version. But I still don't know the benefits every server will have by upgrading (from 2008 R2) to 2014? Are there any new features ...
0
votes
1answer
39 views

Moving MSDB database files fails

I'm trying to relocate system databases files. I managed to do that with the tempdb database, but I'm stuck with msdb. When I run: SELECT name, physical_name AS current_file_location FROM ...
-1
votes
1answer
30 views

I cannot add a new Server Role “SQL Server 2008 R2”

I want to add a new user-defined Server Role to my SQL Server instance, but the menu doesn't show all options, it only shows this: Instead of this : and I also tried the T-SQL command to create ...
0
votes
1answer
25 views

Upgrade from SQL Server 2008 R2 SP2 to SQL Server 2014 Error

I am upgrading from SQL Server 2008 R2 SP2 to SQL Server 2014 and receiving an error I cannot get past. Everything checks out before the upgrade runs. The upgrade stops at ...
1
vote
1answer
26 views

Function is counting -1 char ( wrong )

I have this function ( It counts how many characters I have in a certain string, separated by ,: ALTER FUNCTION [dbo].[fContaRespostas] ( @List VARCHAR(6000),@SplitOn VARCHAR(5),@Resposta ...
2
votes
1answer
24 views

Refreshing a table using CREATE TABLE, DROP and Rename

A read-only database (database1) is updated via log shipping every minute, then a procedure queries multiple tables in it and refreshes a large table on database2. For this process I run an ...
1
vote
0answers
29 views

Reasons why plans of sys.dm_exec_cached_plans do not match actual plans?

I re-assess index / query optimization and actually focus on key/bookmark lookpus that could be eliminated. Using a script of Jonathan Kehayas I go through the list of query plans that used those ...
2
votes
1answer
52 views

Why is Page Life Expectancy value sometimes exceptionally high (4,3 M)?

My value of PAGE LIFE EXPECTANCY usually is in a range of 3000 - 10000. But as you can see in the little data sample below, there are regular values of about 4,3 Milion. I get those values using ...
0
votes
1answer
55 views

Sub Query vs Table Filter

I have have been assigned to resolve Performance issue of a Stored Procedure. Select TableTwo.Column1, DatabaseTwo..TableThree.Column2, Sum(TableTwo.Column3) As Column3 --- Section 1 from ...
0
votes
1answer
55 views

How Do I Filter a Group of Rows based on one Column's Value in TSQL?

I am trying to make a SQL query in Server 2008 R2 that selects the rows only for employees who have over 40 hours in a pay week and a pay description that doesn't include "over time". So far I have ...
6
votes
1answer
180 views

Getting database sizes on an MSSQL Server named instance

I need to get a list of database sizes for a SQL server migration project. The SQL Server server we're migrating from has three installed instances, one default and and two named. It's running SQL ...
7
votes
2answers
126 views

How can I get individual rowcounts like SSMS?

I have a client c# program that is executing stored procedures via ExectueNonQuery, including catching the PRINT and Error output with InfoMessage events. It works fine, but I have noticed something ...
-3
votes
1answer
60 views

Generate Script Of Database in SQL Server 2008 [closed]

How to Create Script for the Database Objects in SQL server 2008 r2 and restore it in database.
-2
votes
1answer
73 views

Accumulate Balance [closed]

Wants to calculate accumulate balance(accu_bal) emp wise in sql server 2008R2 through sql statement. Is there any option? Emp Month Leaves Accumulate_Bal 1 12-Jun 3 3 1 12-Jul 2 ...
2
votes
2answers
83 views

Shrinking log files on development

I've been looking at getting some disk space back on some of our development machines. These are machines that are not being backed up, not being developed on directly, and not being maintained ...
1
vote
1answer
38 views

Is there an actual problem in my storage IO or is the data incorrect?

Running SP_Blitz indicated that I have a slow read/write performance on my drives. Reading further, I eventually landed on this query to view the actual statistics of IO occurring on my drives: ...
1
vote
1answer
97 views

The process cannot access the file because it is being used by another process

I'm using SQL Server 2008 R2. Absolutely new to DBA role, but I've worked with SQL and VS for a while. I've installed the 2 aforementioned softwares on my home computer. If I have VS2010 open and ...
1
vote
2answers
45 views

SQL Replication across the internet give named pipe error

We've had a db replication working between two servers across the internet. Server A is sitting on our server network (Windows Server 2008 + SQL Server 2008 R2) Server B is sitting on a different ...
1
vote
1answer
88 views

First log backup after FULL taking lots of space

In the backups I'm doing in my database, the first LOG backup I do after the FULL backup is taking too much space, even more than the full backup. For example: 4:50 AM: FULL BACKUP - .bak 7.2GB ...
0
votes
1answer
106 views

Rebuild Indexes on SQL Server Standard edition

We have SQL Server 2008 R2 Standard on a Windows Server cluster. I want to defrag all indexes on a database. What is the best approach to disable all connections and allow the rebuild of indexes? ...
0
votes
1answer
67 views

What or Who is taking SQL Server backups [duplicate]

I have inherited a SQL Server 2008 R2 (SP3) Database. There are backups being taken daily at seemingly random times. The backups are not being saved locally on the server. I see the backup information ...
2
votes
1answer
82 views

Why does SQL Server use this index?

I have two indexes on a table with 786602 rows: CREATE NONCLUSTERED INDEX [IX1] ON [dbo].[O] ([A] ASC, [B] ASC) INCLUDE ([c1], [c2], [c3]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ...
6
votes
3answers
76 views

Query Processing & The Buffer Pool

When SQL Server Server 2008r2 begins to process a query, I know it needs to parse the SQL Text and create the plan, plus a few other steps. It is doing all of that in memory OUTSIDE of the buffer ...
2
votes
2answers
149 views

Create index with a commentary

I would like to add some comments to my indices. So I added some additional information to the index creation script, expecting to see this comment again as soon as I open the script again. But it was ...
1
vote
1answer
53 views

Bringing SQL Server filegroups online

We've experienced an sql injection attack which corrupted our main db. The main db had two partitioned tables into filegroups. The corrupt database entered into Suspect mode, and it's been ...
3
votes
2answers
85 views

Switching between databases with dynamic SQL

I have a process which involves executing various commands between multiple databases - however, when I use dynamic SQL to change DB with 'use @var', then it doesn't actually change the database. ...
0
votes
0answers
33 views

How to Split string into multiple values using best approach [duplicate]

We are trying to save result of a query in database by tokenizing a column but query is taking more than 3 minutes to finish his objective. My question is, do we have any faster way to tokenize a ...
2
votes
1answer
279 views

Restarting SQL Server Agent on a cluster installation

I've just enabled the mail profile in SQL Server Agent and I need to restart the service for it to take affect but the Agent is running as part of a SQL Server cluster and I don't want the cluster ...
3
votes
2answers
278 views

Way to ignore pages in memory for 1 query

Is there some way to ignore both cached query plans and any data pages in memory for a single query or batch? Something like a table hint or other option which can be turned on just for the current ...
2
votes
0answers
22 views

Combine several missing index suggestions with one index?

I investigate on missing indexes recommendations of my sql server engine. Looking at the most useful ones (for a specific table) that are candidates based on their potential usage and potential ...
3
votes
2answers
67 views

How to handle lock information?

Due to analyzing several deadlocks I used sp_blitzIndex to get an overview about locks. There is a high accordance between the tables (and views) affected by the deadlocks and the tables being ...
0
votes
0answers
54 views

SQL Server DB in suspect mode after installing SQL Server 2008 R2 SP3

One of our production DBs is stuck in Suspect mode since we installed SQL Server 2008 R2 SP3. Earlier today we found that most text fields (nvarchar) had the following data appended to it ...
0
votes
0answers
18 views

Dropping historic Partitions that are no longer required while in P2P replication

The Company I work for has a set of databases (largest just below 1Tb) on different servers - 2 in the US, 2 in Europe. We run full peer-to-peer replication per database between the 4 nodes - so they ...
3
votes
2answers
366 views

Connect to SQL Server without specifying port

I am trying to use what appears to be a rather badly written application which connects to an SQL Server database which I specify. I cannot seem to connect to the SQL Server instance I wish to use ...
0
votes
1answer
28 views

Partitioning a database

I have a database that's growing larger by the week (as expected). Key tables are becoming huge and slower to perform queries against. Whilst the indexes are sufficient, I've read the partitioning ...
0
votes
1answer
72 views

SQL Server does not failback to the primary node

We are running SQL Server 2008 R2 on a Windows Server 2008 R2 two-node cluster. My choice of machine is primary, and the secondary is just a low-end machine for contingency planing. We had a ...
3
votes
1answer
209 views

Cannot reinstall SQL Server 2008 R2 after downgrade from Windows 10 to Windows 7

Scenario: using SQL Server 2008 R2 Express under Windows 7 without problems. Then I upgraded to Windows 10 without problems. Then I downgraded back to Windows 7 (due to problems with other ...
-2
votes
1answer
169 views

SQL Server 2014 is not showing

I have installed SQL Server 2014 in my machine (OS Windows 10). I already have SQL Server 2008 R2. Now I have 2 server instances and I also have 2 Management Studios. My problem is that I can not ...
1
vote
0answers
51 views

SQL query using CTE not working after database migration

We have recently migrated an application, and in the process we have migrated from SQL Server 2005 to SQL Server 2008 R2. I have noticed that some SQL queries using CTE do not work anymore since. I ...
0
votes
2answers
64 views

List all sessions from current user

I connect to SQL Server with a given user that is not an administrator. I want to get a list of all my open connections. I've found endless commands to do so but all fall in one of those categories: ...
2
votes
2answers
59 views

Does my table need a primary key and clustered index change?

I have a table holding 1.7 Milion rows. Definition: CREATE TABLE T( [ID] [uniqueidentifier] NOT NULL, [AID] [uniqueidentifier] NOT NULL, [BID] [uniqueidentifier] NOT NULL, [iType] [int] NOT NULL, ...
-3
votes
0answers
24 views

I need the results of 7 day period and sum all point according to 7 day [duplicate]

USE [MLMDB] GO /****** Object: Table [dbo].[payoutPoints] Script Date: 10/15/2015 16:58:43 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE ...
1
vote
2answers
31 views

Replication fails exactly after a week

We are application developers trying to decode why replication is failing. It fails every week on the same day pretty much same time. This has been happening for about a month now and our vendors ...
0
votes
1answer
28 views

Change SSIS package location (REPOST from SO) [closed]

My SSIS Package are located in shared drive with a long path name. To make the packages easier and not to remember long path name, I use "Map my network drive" option and use X: drive as an alias to ...
1
vote
0answers
138 views

Can't uninstall SQL Server 2008 R2 SP3

I have encountered the error on SQL Server 2008 R2 where Report Builder 3 fails to load with error Microsoft.ReportingServices.ComponentLibrary.Controls.dll, has a different computed hash than ...
-1
votes
3answers
163 views

SQL Server installation errors assembly

I have been trying to install SQL Server and now I am tired of it. I tried to version SQL Server 2008 and SQL Server 2008 R2. SQL Server 2008 gives the following error (.Net Framework installed) ...
0
votes
1answer
32 views

Alert and notification option in job properties

During SQL Agent Job configuration I see the options to define ALERT and NOTIFICATION. I see that notification is what I'd expect, a notification of a job failure for example. But I do not understand ...
0
votes
1answer
116 views

SSRS CROSS Domain Reports Server Authentication

I have a pretty complicated situation at hand, let me try to explain. I have a SQL Server and a Web Server in a separate domain (lets call it domain A). SQL Server has the databases for Reporting ...
2
votes
1answer
47 views

Missing indexes dmv count varies every day

I have a question to the missig index dmv. BOL says: Information returned by sys.dm_db_missing_index_details is updated when a query is optimized by the query optimizer, and is not persisted. ...