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

learn more… | top users | synonyms

-4
votes
1answer
21 views

Find Longest Running Query [duplicate]

How I can find Longest Running Query and SPID on SQL Server 2008?
2
votes
1answer
48 views

SQL Server : 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 ...
0
votes
1answer
16 views

How to list all past remote login information on remote SQL server

Instead of using "Remote Desktop" for connecting to SQL server, I and my coworkers are using SQL Server Management Studio to apply the changes on remote server (each users have their own credentials). ...
1
vote
1answer
388 views

Optimising a query of an SSRS dataset

Consider the query given below: SELECT * FROM ((SELECT c.cust_id , c.username , REPLACE(qs.seg_type_ref_key_02, 'N/A', 'Non Vip') casino_group, ...
0
votes
0answers
15 views

delete millions of rows from multiple tables

Hi we have to delete between 40 and 55% of records from several tables that have between 40 million and 100 million rows. Is it better to copy the rows we want to keep to a new table, drop the source ...
2
votes
2answers
383 views

How to get SQLCMD to output errors and warnings only?

How can you get SQLCMD, when executing a SQL script file, to just output any errors or warnings it encounters? I essentially dont want information based messages to be output.
0
votes
0answers
15 views

Application is Hanging when database upgraded from MS SQL 2000 to SQL 2008 Server R2

Presently we are working with SQL Server 2000,the database is perfectly working with our software for retail sales counter application developed with VB 6.0. But after upgraded to SQL Server 2008 R2 ...
2
votes
2answers
3k 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 ...
-3
votes
0answers
28 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
41 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 ...
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
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 ...
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
2answers
430 views

Table with 4 million records - different size and performance in development and production

At my company we use SQL Express 2008 R2, which supports databases up to 10GB. We have 2 databases with almost the same number of rows in all tables. But, one of them is 4.5 GB in size (which is in ...
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 ...
2
votes
1answer
737 views

SQL Server 2008 R2 cluster installation error

I was trying to install SQL Server Cluster (Launch wiard to install single node SQL Server 2008 R2 faliover cluster) .. The setup checks displayed no error and the installation started after all the ...
1
vote
5answers
14k views

Why is SQL Server consuming more server memory?

Sqlserver is consuming 87.5 % of my server Ram. This recently causes alot of performance bottleneck such as slowness.I Research on this issue. One common solution i could find on the internet is to ...
2
votes
1answer
73 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 ...
8
votes
4answers
13k views

How export a sql server 2008 diagram to PDF filetype?

I want to have an export from my database diagram to PDF or image types. How can I do this? I worked with SQL Server 2008 R2.
2
votes
1answer
1k views

SQL Cluster Resources Disappear After Removing Disk Resource

In the process of removing an usused disk resource from cluster, I would follow these steps: 1) remove dependencies on the disks by the SQL Server resource, 2) take the disk resource offline, 3) ...
1
vote
3answers
4k views

How to move a SQL Agent Job to another Server?

I'm moving from SQL Server 2005 to SQL Server 2008R2, and I see there is one job in the SQL Server Agent Jobs that I need to move but I see it also in the SSIS---> Stored Packages\MSDB\File ...
4
votes
3answers
3k views

Reconnect mirroring server SQL2008 R2

The failover server has status (Mirror, Disconnected, In recovery) and principal server has status (Principal, Disconnected). What is the process to reconnect these servers?
5
votes
1answer
151 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
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
1answer
205 views

SQL Server 2008 R2, error creating file for FileStream

I'm trying to create a file to add to a filestream file group and I get the error: Msg 5120, Level 16, State 106, Line 1 Unable to open the physical file "d:\data\filestreamstore.mdf". Operating ...
0
votes
1answer
133 views

Best approach to have a Live copy of a table in the same database

I have a table where 15,000 to 20,000 rows are being inserted every hour. Table Schema is something like ColumnName DataType ID BIGINT IDENTITY(1,1) Column1 INT Column2 INT ...
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 ...
3
votes
1answer
232 views

Login failure error log when querying Central Management Server group

I am querying a group under a Central Management Server, which results in the following being logged to the SQL Server Error Log. Error: 18456, Severity: 14, State: 38. Login failed for user ...
3
votes
1answer
336 views

MS DTC errors on SQL Server 2008 R2 but not SQL Server 2000 running on difference instance

I am receiving errors when I try to run a distributed query against different SQL Server 2008 R2. At first I thought this might be cause the servers have been set up on a VM using a clone but after I ...
0
votes
2answers
89 views

Reviewing Stored Procedure template for handling transaction?

I've prepare a template for SQL Server stored procedures which will have Insert, delete, Update transaction. I have a stored procedure to log error in catch block in a table. How can I improve my ...
1
vote
1answer
60 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 ...
3
votes
1answer
189 views
+100

List of Expired Merge Subscribers

I have a setup of merge replication. Sometimes, subscribers will not be able to sync within the retention period set in the publication. How can I get a list of expired subscribers to a merge ...
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 ...
1
vote
2answers
77 views

Compress files and directories into zip file and put it into blob field

What is the best way to do the following using SQL Server? Compress all the files, folders and subfolders from a specific location (specified in a parameter in a stored procedure) - the server side ...
1
vote
1answer
207 views

Database Mirroring and Replication in SQL Server 2008 R2

I have configured the mirroring and replication between 4 servers (A,B,C,D).i.e, Mirroring between A to B and C to D, Replication between A and C. The configuration was a success and I am able test ...
0
votes
2answers
80 views

SQL Server 2012 Very Slow to Consume Memory

I have a bit of a conundrum. I recently upgraded a ~20gb database from Window Server 2008 R2 || SQL Server 2008 R2 to Window Server 2012 || SQL Server 2012. The previous server had 32gb of memory, ...
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 ...
4
votes
1answer
151 views

ProcessID Owner with third party app

I am having problems trying to audit a third party app with a SQLServer backend. The app manages users and user access via a SQL table, using a single SQL login to access the databases. I am trying ...
0
votes
2answers
302 views

How to provision the SQL Server Agent service after SQL Server Edition upgrade

I have upgraded SQL Server 2008 R2 Express to SQL Server Standard Edition. After I have upgraded it, the SQL Server Agent was stopped. I have tried to start but it fails. Only when I have changed ...
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
63 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 ...
4
votes
1answer
163 views

Which parameters was a stored procedure or command executed with?

We are using nHibernate which generates queries from .NET code. Occasionally, some queries get stuck in the sp_whoisactive list and we cannot find out why. I have a feeling that it has to do with a ...
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
40 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 ...
18
votes
3answers
1k views

difference in execution plans on UAT and PROD server

I want to understand why there would be such a huge difference in execution of the same query on UAT (runs in 3 sec) vs PROD (run in 23 secs). Both UAT and PROD are having exactly data and indexes. ...
1
vote
1answer
202 views

Deadlock occurring on database, SQL Server 2008R2

Last few days I had major problems with my production site, turns out deadlock occurred, every half an hour maybe 50-60 of them. To do a quick fix in order to keep the site running I set : ...
3
votes
3answers
682 views

SQL agent job, why is the job history showing that a step is still running even though the job has completed

I have a sql agent job that runs Powershell as its first step (there are 3 steps in total). I have set this step to have 2 retries, with a 3 minute retry interval. When I look into the job history, ...