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

learn more… | top users | synonyms

-2
votes
0answers
25 views

Backup and Restore

What are the Negative Aspects backup and Recovery in sql server Over these points. Full Backup and Restoration Point in Time Restoration Restoration in Same Instance Restoration in Different ...
2
votes
2answers
35 views

Backup compression in SQL server 2008R2 and above

Recently we got a new server to take care of and found that there are two data drive: S: 1 TB where resides 10 databases(mdfs and ldf's, though they should be on different drives but that's how we ...
1
vote
0answers
13 views

Using the partition function in the Where clause

I've been asked to test out performance of a database (a test system) after implementing horizontal partitioning. The database is on SQL Server 2008 r2. I'm inheriting this from someone else and ...
2
votes
1answer
41 views

MSSQL - Index Seek with very high Scan Count

I have a query that joins 2 tables: Documents table, that has DocID as Unique Clustered Index DocumentsRows table, that has DocID, RowID as Unique Clustered Index When I join those 2 tables, I ...
1
vote
0answers
29 views

Renaming databases vs backing up and restoring

I am creating a copy of Database A, restoring as database b, executing a job on database b. Upon successful execution, I would like to delete the database A and rename the database B to what the ...
-1
votes
1answer
16 views

can exec permissions be granted to a role in SQL Server 2008 / 2012

Can exec permissions (e.g. on a SP) be granted to a role in SQL Server 2008, so that all role members then have the permission; and if the 2008 database were backed up and restored into SQL Server ...
-4
votes
1answer
20 views

Find Longest Running Query [duplicate]

How I can find Longest Running Query and SPID on SQLSERVER 2008?
0
votes
1answer
30 views

SQL Server Import/Export: cannot copy geo columns

I'm trying to copy data from a SQL Server 2014 Express database to a SQL Server 2008R2 Express database. Compatibility level for the 2008R2 Express database is set to 100. As soon as I hit Next in ...
2
votes
1answer
71 views

Same query sometimes uses a Table Spool

I'm checking out a query which exhibits strangely inconsistent performance. Using SolarWinds DPA, I can see that the query sometimes uses a Table Spool, sometimes it doesn't. When it actually used a ...
5
votes
1answer
147 views

Why can a non-clustered index not be dropped using online=on option

When attempting to drop a non-clustered index using the online option such as DROP INDEX [IX_MYINDEX] ON [dbo].[myTable] WITH ( ONLINE = ON ), I receive the following error message. Msg 3745, Level ...
0
votes
1answer
20 views

SSMS 2008 R2 no longer connects to database [on hold]

Before Christmas I had no problem connecting SSMS 2008 R2 to a specific remote database. Since Christmas, I get this error when I try to connect: TITLE: Connect to Server Cannot connect to ...
0
votes
2answers
52 views

SQL Job for Monitoring Blockings on SQL Server [duplicate]

Is it anyway possible to create a SQL Job for monitoring blocking on SQL Instance, if the blocking are still happening after some interval of time? We are using SCOM Monitoring tool to monitor events ...
0
votes
0answers
10 views

Cross Server Transaction takes longer when executed from stored procedure

I have a stored procedure on ServerB which executes an update statement joining with another table on ServerA. Something like.... USE [DatabaseA]; GO SET XACT_ABORT ON; --<-- Since cross ...
0
votes
0answers
21 views

Convert SmallInt to Datetime

Please help me to convert the following values to datetime: DayLastAccessed -23569 -23789 -23629 -23564 -23732 0 0 The above column is smallint type in SQL Server. I'm using the following query to ...
1
vote
1answer
59 views

How do I update and insert specific set of rows to an existing table using Merge in SQL Server 2008 R2?

I have a table in the database that I need to update based on the records being passed to it. I am given a table-valued-parameter that has the same schema as the existing table (for all intensive ...
1
vote
0answers
26 views

Average Waiter Count increasing

I am in a nightmare. We have deployed an application to a UAT environment, which has only 7 users. Since then, we have noticed in the logs, a lot of deadlocks, and processes being victims and things. ...
1
vote
1answer
23 views

Re-Run Backup Job in SQL Agent

My question is regarding re-running backup jobs only for those databases for which the job initially when it ran failed due to some reasons, like server reboot, path not accessible, newly created ...
2
votes
2answers
62 views

Monitor Database Memory usage SQL Server

In our PROD environment, there are two servers on which we have system critical database. The management requirement is to monitor these databases for high memory usage or access or long running ...
0
votes
1answer
64 views

sql join without combining all rows

I've searched questions but can't seem to apply to my scenario. Please see attached code below. I am trying to join two subsets of this data but am getting duplicates/too many rows please see ...
1
vote
2answers
95 views

SQL Server - Slow Database for no apparent reason [closed]

I have a DB Server running SQL Server 2008 R2 SP2 on 24 physical Cores and 32GB of RAM. The database files are on a SSD Raid1 and the TempDB on a SAS 15k (150GB DB) I assume that the server has more ...
0
votes
1answer
34 views

how to get child categorys based on categoryid

this is my table structure i need to find child categoryids. If CategoryID 1 then 1,2,3,4,10,12,13,14,15,16 when CategoryID 2 then 2,10,12,13,14,15,16
2
votes
0answers
39 views

How to identify whether a log backup or job executing a SP is causing High Page Reads/sec

For one of my servers( SQL server 2008R2) we can continuously witness High Page Reads/sec during business hours say: from 7 AM to 9 PM EST. I kept the counter settings to monitor the same and found ...
2
votes
0answers
54 views

SQL Server changes in tables reverted after two three days in two different DBs

I'm having a strange issue in one SQL Server 2008 R2 I admin. Three days ago, a major renaming on the columns of a table was made due to a development. After the columns where renamed, the change was ...
6
votes
1answer
89 views

Looking for a set-based solution for a rolling 30-day period

I have a stored procedure (MS SQL Server 2008 R2) that needs to see if 10 points/sales fall within a 30-day rolling window. So far, I have a solution that works, but it's not a "proper" solution as ...
0
votes
1answer
35 views

Distributor latency - slow sp_MSget_repl_commands performance

One of our publishers is subscribed to by three subscribers, each subscriber is hosted on its own physical server. Two of those subscribers are 2008R2 and the third 2012. The 2012 subscriber is ...
1
vote
0answers
37 views

Setting up a new db-server with same name and ip. Backup/restore or detach/attach

I'm planning to set up a new Win 2012 server, with SQL server 2014 standard. This server is going to replace our current server, Win 2008R2, with SQL server 2008R2. The name and ip is going to be the ...
2
votes
1answer
68 views

Alter table Statement Failed -Msg 207, Level 16, State 1

I wrote a script to add a column in a table and on successful execution update its values. I know it’s just a simple script but what is wrong with the ‘IF NOT EXISTS’ statement why script between ...
3
votes
2answers
81 views

When does SQL Server determine to use a new index?

I have been performing some maintenance on a server that runs some software the company bought, so I can't really change how the queries have been written. I have used some tools to determine some of ...
1
vote
0answers
30 views

Find queries performing full scans

I have a monitoring system that is telling me that the Full Scans /sec on one of my servers is rather high. I am trying to determine which queries may be causing the issue. Is there a simple/easy ...
1
vote
0answers
32 views

Script Rename of SQL Server Database and Database Files

As part of our development lifecycle, we would like to do regular comparisons of versions of our database between two different versions of source control. I expect that there are many automated ...
1
vote
1answer
26 views

SQL Server 2008 R2 enterprise named instance [closed]

I have sql server 2008 r2 installed and I am using 3 named instances (2 express and 1 developer). For a task I need to use the CDC (change data capture) which is only in the enterprise edition. I have ...
2
votes
0answers
70 views

Find out why SQL Server released memory

I have a SQL Server 2008 R2 used for sharepoint and ssrs. The SQL Server hosts two instances. For a few minutes both instances were timing out, not responding. CPU slowly rose to 100%, 30% from ...
1
vote
1answer
103 views

Tempdb files don't exist

I have a strange behaviour on one of my SQL Server's tempdb. It has six tempdb files, according to SSMS and queries, all pointing to S directory. Each of them have ~5gb of initial size. The weird ...
1
vote
2answers
123 views

Assigning new auto increment value [duplicate]

I have a table that is created as below. CREATE TABLE [dbo].[Table1]( [ID] [INT] IDENTITY(1,1) NOT NULL, [Title] [VARCHAR](255) NULL, ... Lets say that the latest ID is 100 ( I have 100 ...
1
vote
1answer
20 views

Initialize replication from multiple split backup files

We are creating a new Node within our existing P2P replication setup. To be able to create the backup and copy the files I am Backing up to 9 files - each will be about 72Gb: e.g. BACKUP DATABASE ...
0
votes
0answers
34 views

Transactional replication error 8102

I am getting below error while initializing push transactional replication using backup. We are using SQL 2008R2 SP2 on both sides. Command attempted: if @@trancount > 0 rollback tran ...
2
votes
1answer
111 views

How can I filter an extended event by database in SQL Server 2008 R2

If I do an extended event session like this in SQL Server 2008 R2: CREATE EVENT SESSION [Query tracing] ON SERVER ADD EVENT sqlserver.rpc_completed ( ACTION(sqlserver.sql_text) ...
1
vote
1answer
42 views

What precautions to take when moving a mirrored server

I have a SQL Server 2008 R2 mirror setup running in high safety with automatic failover (synchronous, witness). Over two different nights, the mirror and the primary will be shut down and re-racked. ...
0
votes
0answers
21 views

SQL Server Mirroring with Certificates

I'm struggling with setting up mirroring with the following configuration: Server 1 running SQL Server Standard 2008 R2, Principal Server 2 running SQL Server Standard 2008 R2, Mirror Server 3 ...
4
votes
1answer
122 views

Table with clustered Index consuming max memory causing low PLE alerts

For one of my server with below configuration i am continuously receiving alerts for low PLE which ranges between 20- 400 and an average of 90-100 in a day: Server: SQL server 2008R2 Databases : ...
0
votes
1answer
47 views

Behaviour of RAISERROR within a TRY/CATCH within a loop

I have just encountered a section of SQL that is behaving not as I would expect (See below for a distilled version of the SQL in question that demonstrates the problem pattern). (This is on SQL ...
0
votes
1answer
39 views

Order to restore system and user databases

We are going to move an sql instance to a new physical server (SQL SERVER 2008 r2). The answer to this question explains how Agent jobs and ssis-packages will be moved by restoring the master and ...
5
votes
2answers
72 views

Finding the query causing the missing index DMVs

How can I find the query causing the missing index DMVs suggesting to create a particular index? Thank you.
0
votes
0answers
9 views

VS2008 report using data from a parametized Stored Procedure

I want to generate a report showing payslips for a single employee using values from a SP with parameter values that have been passed from a datagrid row. However the report that is generated is ...
2
votes
2answers
115 views

Uniquifier on Non-Unique Clustered Index vs Unique Clustered Index

Lets say for example that I have a table structured this way: ID1 int ID2 int ID3 int DTM datetime I'm only able to create a unique clustered index on the table if I include ID1, ID2, and ID3 (a ...
1
vote
0answers
46 views

SQL Server transaction replication agent error

We are running transaction replication on SQL Server 2008 R2 SP3. Distribution agents are reporting : "Agent is retrying after an error. 3 retries attempted" every 10 minutes. Tried changing ...
1
vote
0answers
28 views

Replication / Bulk Update between Servers

I'm looking to update several tables between two servers daily to have a replica of the data available. My question is, what is the least resource heavy and most effective method to implement this? ...
0
votes
0answers
17 views

Missing index recommendation for an already existing index [duplicate]

SQL Server missing index DMVs suggest to create an index which already exists. The existing one and the suggested one exactly overlap each other; they are single (same) column index with no included ...
1
vote
1answer
51 views

Executed a Stored Procedure in the Production Server and the following warning message is shown [closed]

I executed a stored procedure on the production server; and though it shows that query has been successfully completed it doesn't allow me to close SQL Server Management Studio and the below warning ...
0
votes
0answers
53 views

Error: Package ‘Microsoft SQL Server Management Studio Package’ failed to load [closed]

I have SQL Server 2008 R2 64bit installed with SQL Server Management Studio (SSMS). I've been using SSMS for log time but recently when I try to open SSMS, I get the above error. I've tried all the ...