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

learn more… | top users | synonyms (2)

2
votes
2answers
707 views

SQL Server 2008 R2 Database Diagram Error Code

I have sysadmin privileges on a SQL Server 2008 R2 server. I'm working with the development database and want to save a database diagram I created. When I try to save I get the following error message:...
0
votes
1answer
135 views

SQL Server : how to decide if FULL backup or DIFFERENTIAL

The following scenario (on SQL Server 2008 R2 and 2012 servers) A co-worker of mine restored another DB into the one our process was trying to create a differential backup for. As I am currently only ...
1
vote
2answers
177 views

SQL Server INNER REMOTE JOIN returns more rows than INNER JOIN

I'm trying to join a few rows from a remote view to a local table. The view has about 300 million rows, so I want to use the REMOTE query hint so that all 3 million rows don't have to be transferred ...
0
votes
1answer
119 views

Identify SQL Error - Transaction count mismatching number of BEGIN and COMMIT statements

On SQL Server 2008, the sproc below runs as part of a sql agent job every 4 hours. Six times in the last two months, the error below has been logged in the agent job history: 04/07/2016 20:00:00,...
0
votes
1answer
22 views

Default Value Of Table

In my example syntax below I want the field delayed to be the difference in days between gotitdate and dunitdate I know that this syntax will get me the result, and I was going to set this up as an ...
2
votes
3answers
4k views

How long will an index take to create?

I have a table with over 70 million rows in and I have viewed the execution plan which has identified a missing index. I took a snapshot of data a short while ago and created this index on a local ...
3
votes
1answer
43 views

Why is this filtered index not only not used but errors when I try to force it [duplicate]

I'm trying to tune a rather annoying query where a number of the tables have something that looks like: date = '9999-12-31 23:59:59.9999999' At least a few of the tables are in the 300 mil row ...
7
votes
7answers
24k views

How to find out the content differences between 2 SQL tables and produce sync SQL

How do I find out the differences in data between the two tables that have exact schema, and how to produce synchronisation SQL to get the union results (without duplicates) ? These are the 2 ...
1
vote
2answers
26 views

How can I perform a full-text CONTAINS call across a list of phrases?

I have a list of words/phrases in a table phrases. I have another table with a full-text catalog indexing the description column. I want to populate a table results with a record for each phrase, and ...
17
votes
1answer
32k views

SIMPLE or FULL recovery model for databases?

When should I use the full recovery model and when should I use the simple recovery model for databases? I always used the full recovery model because it is the default, but today i encountered this ...
0
votes
0answers
104 views

Cannot Update a System Collection Set

I'm trying to tweak the "Server Activity" Data Collection set as outlined in this blog post (I wrote the post, btw. Sorry--it's kinda long). It is working in SQL 2008 R2 and also in SQL 2014. However,...
4
votes
1answer
177 views

Scenario of huge SQL Server Database backup

I use SQL Server and have a huge database with large compressed backup size (about 250 GB). The backup scenario of this database is: Create full backup at the first day of each month. Create ...
1
vote
3answers
56 views

Need to intentionally create blocking processes for testing

My team and I have an issue where we need to be able to identify processes that are blocking other processes and kill them. There are a ton of scripts that are freely available to perform these ...
0
votes
0answers
24 views

Finding records only when all ids present in a group

Having these two tables id | val TableA -------- 1 | A 2 | B 3 | A 4 | B 5 | A 6 | C 7 | D id_A | data TableB ----------- 1 | a 2 | b 3 | c 5 | d 7 | e First I ...
0
votes
0answers
6 views

Generic Rowset Error Causing SSIS package to Fail

A vendor-provided stored procedure on a SQL 2012 instance and DB in compatibility mode 110 performs several ETL steps and returns a single resultset from a temp table. Execution of the sproc takes 3-5 ...
1
vote
1answer
24 views

Configuring a non-nullable foreign key uniqueidentifier with a default Guid.Empty value that exists in foreign table

Project Details: MS SQL 2008 R2 I have already asked what amounts to one half of the question here, but I am hoping someone in this forum can answer the other half, involving MS SQL server ...
7
votes
2answers
3k views

Broken tempdb location and can't recover

Made a mistake and mistyped an alter database command for tempdb. Now the instance won't start. I can't start in single user mode using -m as it states the tempdb could not be found. I tried using: ...
1
vote
5answers
86 views

Passing comma separated values to parameters in stored procedure

I have a requirement to retrieve data from a table based on the comma separated values sent in the parameters for stored procedure. As of now I have made the code work for one single value not sure ...
1
vote
0answers
32 views

Deleted sql server windows authentication user

I had deleted a system user "sysuser" from the server. I had previously used this user to login to the SQL server through "windows authentication" mode.Now, I tried to create a new user with the same ...
0
votes
1answer
190 views

Application is hanging when database upgraded from SQL Server 2000 to SQL Server 2008 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, ...
1
vote
1answer
113 views

Shrink database or DB files not reducing size even after dropping biggest table

Our MDF file was originally 550GB in size (log is just 10MB), and the biggest table we had [HourlyCounters] was 140 million rows with 580 columns (varchar[50]). It's a table with a very inefficient ...
0
votes
0answers
48 views

Cannot execute code connecting to SQL Server 2008 R2 in SQL Server 2014 SSMS

I am not able to connect and execute a code in SQL Server 2008 R2 while connected to SQL Server 2014 SSMS. SQL Server 2008 R2 is on Windows 2008 R2 64 Bit SP2 (Stand Alone) SQL Server 2014 is on ...
3
votes
1answer
63 views

Why does the “Date Created” for the master database show such an old date (8 April 2003) in SQL Server 2008 R2?

Why does the "Date Created" for the master database show such an old date? I created the new instance today, not 2003.
0
votes
0answers
25 views

Creating view to another instance

I am trying to create a view from one SQL instance to another on the same server. Client wants to "get tables from the INSTANCE-A into the views for INSTANCE-B. I have tried a couple different ...
1
vote
1answer
160 views

Indexed view doesn't exist on the subscriber

I am configuring transactional replication in SQL Server. The subscription is configured as push from 2008R2 publisher (distributor is the same server) to 2012 subscriber. The object I want to ...
3
votes
3answers
20k views

SQL Server 2008 R2 Management Studio : “Evaluation period has expired”

I've spent several hours trying to fix this issue so far with no success. I had installed SQL Server 2008 Evaluation Edition. Out of fear it might expire & create problems for me I installed SQL ...
14
votes
4answers
6k views

Move multiple databases from C: to D: at once

I have SQL Server 2008 R2 with 323 databases consuming some 14 GB on my C: drive, a fast SSD. Because I want to reclaim some space on my C: drive, I would like to move them to my D: drive. I have ...
3
votes
1answer
49 views

Database Shrinking as a logged operation

I would like to know if shrinking a data file is a logged operation or not. I do not have a definite answer to this. I have heard people say it is a logged operation but so far I did not see an ...
0
votes
2answers
42 views

Need demo scripts and sample corrupted databases for corruption databases troubleshoot [closed]

I am looking for a demo for recovery of corruption databases in different ways. Is there any link for those examples to practice in LAB machines.
0
votes
0answers
25 views

Query that shows name of excel spreadsheet that is calling the stored procedure

Does anyone know if there is a way to query sql server for the name of the excel spreadsheets in which a stored procedure is being called to produce the data?
4
votes
1answer
78 views

Copy Millions of Records from one table to another with the same schema, in the same database

I am trying to find the best way to copy a large amount of rows ( ~70million) from one table to another with the same schema inside the same database. Our system currently runs with a set of A/B ...
7
votes
3answers
569 views

Property class Length Annotation PersistedResolvableAnnotation

I am trying to deploy an ssdt project using sqlpackage.exe utility. I get the following error (in German): Fehler bei der Erstellung des Bereitstellungsplans. Die Bereitstellung kann nicht ...
2
votes
1answer
886 views

SQL Server connection failed for domain user from Mac OS machine

I have SQL Server 2008 R2 SP1. I am using connection string to connect to SQL Server. In connection string I am passing the driver path, server name, TCP port number, user name with which I want to ...
0
votes
1answer
56 views

Migrate ssrs 2008 r2 to ssrs 2016

The current setup of the server is Windows Server 2008 sp1, with SQL Server Reporting Services 2008 r2 installed. The databases are on a separate server which is using SQL Server 2008 r2. I have a ...
3
votes
1answer
124 views

SQL Server 2008 R2 DB grows overnight and slow

I am running a SQL Server 2008 R2 SP2 DB. I have a DB that was running around 19 GB in size and three days ago grew to 34 for no good reason. We typically have about 100 MB growth in the DB every ...
3
votes
2answers
55 views

Can an SQL Job Deletes itself after its end date?

I have created a job which will sets up its start date and end date automatically with a dynamic value. For example: Job will run for eight days and at eighth day it needs to automatically deletes ...
1
vote
1answer
35 views

Use stored procedure to get minimum value from column and decrement it and other values

I'm trying to understand how the following algorithm could be completed in SQL 2008 R2. I have a table that contains production data. The table uses a "rolling" scheduling method, meaning that orders ...
5
votes
1answer
39 views

Recover Instance after Log File disk error

This is mainly theoretical, but I would like to have a documented list of options if this happens in the future. Today we had a critical disk error on the SAN, meaning the disk holding the ...
0
votes
1answer
27 views

Temporarily stop Log shipping [closed]

How can I temporarily stop log shipping --> Do the task --> Start the Log shipping ? Is it possible ?
6
votes
5answers
58k views

List all permissions for a given role?

I've searched around all over and haven't found a conclusive answer to this question. I need a script that can give ALL permissions for an associated role. Any thoughts, or is it even possible? ...
0
votes
1answer
19 views

The merge process could not connect to the Publisher 'Server:Reports'. Check to ensure that the server is running

Sql version:Microsoft SQL Server 2008 R2 Replication type: Merge Getting Below error in 'View Synchronization Status' window. The merge process could not connect to the Publisher 'Server:Reports'. ...
2
votes
1answer
156 views

Intermittent errors sending email from SQL Server Database Mail

I've been seeing some SMTP errors in my database mail logs. So I have a set up a test SQL Agent job that runs every ten minutes (it's only action is to SELECT NULL). It is set to send email ...
0
votes
0answers
42 views

Selecting a View consumes 4GB memory but executing SQL statement of View only 70 MB

I am facing high memory consumption on my database server. During diagnosis, I found a view consuming 4 GB memory. But when I executed it's statement (select statement of view) it's taking only 70 MB. ...
0
votes
1answer
526 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 ...
5
votes
1answer
167 views

Cluster node upgrade of SQL Server 2008 R2 to SP3 fails when moving resource

I'm trying to update a cluster to SQL Server 2008 R2 SP3. I've installed SP3 on the passive node but when I failover the cluster it errors when running through it's upgrade scripts. The messages &...
0
votes
3answers
4k views

SQL Server Configuration Manager returns remote procedure call failed

I open the SQL Server Configuration Manager and it returns remote procedure call failed. This is Windows 7 Ultimate version, SQL Server 2008 R2 Express version with advanced services. Previously I ...
3
votes
7answers
2k views

How can I compare the schema of two databases?

Is there a way to find the differences in two SQL Server databases (schema only). One is local and the second is at a customers site. We are experiencing problems with crystal reports running some ...
0
votes
1answer
27 views
0
votes
0answers
34 views

sqlcmd returning literal 'NULL' for null columns when outputting to CSV

I'm using sqlcmd (SQL Server 2008 R2) to execute a simple query to output data to a .csv file. In the SQL file, I have the following code: USE [OSCAR_UK] SELECT DISTINCT ISNULL(LTRIM(RTRIM(il.[...
2
votes
1answer
2k views

SQL Server recommended MAXDOP settings for NUMA

I have an OLTP SQL Database running on SQL 2008 R2 Enterprise Edition that may be fairly busy (5000 batches/sec) in next couple of months after going live production. Looking into server configuration ...