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

learn more… | top users | synonyms

5
votes
1answer
134 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
48 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
20 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
54 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
21 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
57 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
0answers
51 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
92 views

SQL Server - Slow Database for no apparent reason [on hold]

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
30 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
38 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
53 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
88 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
32 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
66 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
30 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
102 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
122 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
110 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
121 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
44 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
70 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
114 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
50 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
47 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 ...
1
vote
1answer
24 views

Clear missing index DMVs

How can I clear missing index DMVs such as dm_db_missing_index_group_stats, dm_db_missing_index_groups and dm_db_missing_index_details? I don't have an option to restart the server or taking it ...
0
votes
0answers
29 views

SQL Server 2008 Linked Servers Consistently Dropping Connections

I have set up a Linked Server between 2 SQL Server 2008 R2 databases (both 10.50.1600). The linked server worked normally for several weeks until I received reports that users were not able to hit ...
-2
votes
1answer
43 views

Find difference between two database and output them in a script sql [closed]

I had a SQL Server 2008 R2 database. I have dump it and made some mods in a copy. So, I have two databases: 1) the older version 2) the new version I need a script SQL to update the number 1) to ...
1
vote
2answers
104 views

Should I set document version field to be part of a primary key

Should I set document version as a primary key I am working on a document management system, and I have these two tables representing part of the whole tables. On the DocumentVersion table I have ...
3
votes
1answer
50 views

How to create a Relation between a table and a many-to-many relation table

I am buildng a new database inside an Sql server 2008 r2.I have the following tables & business rules:- Skill that have predefined levels assigned to it, such as junior, senior, manager. Staff ...
1
vote
1answer
47 views

Add a column with Not Null [duplicate]

I have a existing table in which i am adding a column as NgoId whose datatype is int. I want to add as NOT NULL to the column . When I'm adding this I am getting the following error: Unable to ...
0
votes
0answers
35 views

SQL Server 2008 R2 native replication with Column Level Collation

In my SQL Server 2008 R2 environment. Created a 'source' and 'target' database and altered the database collation as follows: use master go ALTER DATABASE source COLLATE Chinese_PRC_CI_AS GO ALTER ...
0
votes
1answer
69 views

SQL Server Agent Error 1053

A few months back I installed SQL Server 2008R2. At the time of installation I used 1.Mixed Authentication 2.NT Authority\NetworkService as the SQL Agent user name, and the same user name for all ...
1
vote
1answer
28 views

SQL Server 2008 R2 memory on 64 bit OS

My application server is running SQL Server 2008 R2. OS is Windows 2008 R2 with SP1. Total physical memory is 16 GB. When I looked into the Task Manager, the sqlservr.exe was using "6,734,588 K". ...