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

learn more… | top users | synonyms

0
votes
0answers
121 views

SQL Server in a state of confusion: Does the database exist or doesn't it? [duplicate]

Got a really weird, annoying problem.. Somehow the instance of SQL Server 2008 R2 running on our server has gotten somewhat corrupted. First, we noticed that the database we created yesterday was ...
6
votes
1answer
1k views

UNIQUE index key violation

I have a table with a PK and a unique non-clustered index, as follows: CREATE TABLE Table1 ( Id INT IDENTITY(1,1) NOT NULL, Field1 VARCHAR(25) NOT NULL, Field2 VARCHAR(25) NULL, ...
1
vote
1answer
512 views

SQL Server 2008 R2 database mirroring - is it possible to have a slave server for multiple master servers?

Scenario is that I have two servers running SQL Server 2008 R2 (64-bit), let's call them DB1 and DB2. I have set up database mirroring for all the databases on these servers so that DB1 is the ...
1
vote
2answers
3k views

Issue with ROW_NUMBER and DISTINCT

I have following query SELECT Dept ,ID FROM (SELECT TOP (@RowTo) ROW_NUMBER() OVER (ORDER BY Dept) AS ROWID, Dept ,ID FROM Department ...
3
votes
2answers
2k views

How to restore a filegroup from its backup in SQL Server

I need guidance on how to restore a file group in Database from the File group backup taken from another same DB server. Is it possible to restore the filegroup by running restore DB for File Group. ...
1
vote
0answers
533 views

Collect CPU, reads and writes when replaying SQL Profiler Trace

I'm trying to replay a trace on a test environment with SQL Profiler in order to benchmark a database prior to making some performance tweaks. I intend to replay the same trace at various stages to ...
1
vote
0answers
250 views

Troubleshooting Database Mail issues and Service Account permissions in SQL Server

I am having difficulties troubleshooting a Database Mail issue. When I try to stop and start the service using sysmail_start_sp and sysmail_stop_sp, I see a critical error in the Administrative Logs ...
2
votes
1answer
2k views

SQL Server cluster questions please

We have SQL Server 2008 R2 cluster active/active/active (a, b, c) and three instances run on this environment. We did a test on one of the instances, and failover test. Manual failover from node c ...
1
vote
1answer
329 views

Effects of enabling service broker

I would like to use SqlCacheDependency to update a dataset in real-time, but we have not enabled the service broker on our production database. Could enabling the service broker have any adverse ...
2
votes
1answer
186 views

How do I know if my database partitioning is done well? [closed]

I have a sneaking suspicion that the guy who wrote the partitioning functions at my place of work did a fairly poor job. For certain queries (maybe 20% of them) we see incredible performance boosts ...
0
votes
4answers
456 views

Update Table A row if Table B row is changed

Is is anyhow possible to tell the database to execute a little script, if a row is changed in a table? Scenario: The database constantly monitoring Table B to see if rows are inserted, updated or ...
3
votes
1answer
296 views

Load Testing Crash Course

Can someone point me at a good resource to get a crash course in load testing. I have a sql server machine that I need to load test but I havent been thruogh the process before. Also we do not have ...
3
votes
3answers
28k 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? ...
3
votes
0answers
164 views

Key Lookup and Full-text index

I have the following query: SELECT T2.Title FROM TitleTable T1 INNER JOIN TitleTable T2 ON T2.FKID1 = T1.FKID1 WHERE T1.FKID2 = @ID_PARAM1 AND T2.FKID2 = @ID_PARAM2 AND ...
5
votes
2answers
2k views

Manually moving SQL instance to another node causes immediate database mirror failover

I have a two-node SQL cluster (2008 R2). Some of the databases within that SQL instance are mirrored to another server on a remote site, using the High safety with automatic failover. The mirroring ...
1
vote
1answer
7k views

How to fix “The OLE DB provider ”MSOLAP“ has not been registered”?

Here's the code I'm using to register a linked server to SSAS: USE [master]; GO EXEC master.dbo.sp_addlinkedserver @server = N'ServerAlias', @srvproduct = N'', @provider= N'MSOLAP', ...
0
votes
2answers
1k views

SQL Server 2008 R2 not starting after moving model database

SQL Server 2008 R2 not starting after moving model database. Any ideas? Error: 945, Severity: 14, State: 2. Any ideas? Sql 2008 R2 will not start with trace -f -T3608 or single user mode -m. Need ...
0
votes
1answer
931 views

SQL Server domain account login and user

What is the difference between adding a domain account login to an SQL Server (2008 R2) instance then add a corresponding user to a database adding a domain account user to a database without ...
1
vote
3answers
656 views

SQL Server xml performance

I have a table with 21 columns. The majority are numerical and the rest are nvarchar. I need to add 4 columns that will contain XML data for each row. The XML data for each row can be anywhere from ...
3
votes
1answer
23k views

Find all the queries executed recently on a database

[I am a beginner level T-SQL Programmer] [..and hopefully I am on the right stack exchange site] I would like to get a list of all the queries I executed (in the least, those I executed today since ...
4
votes
3answers
2k views

Password reset for database for VCenter Install

I'm trying to reinstall vCenter SSO and it is prompting me for the "sa" password. I set it up previously, but cannot remember what I used. I uninstalled SSO (as well as the vCenter Server, and ...
2
votes
1answer
662 views

Pervasive linked server provider missing

I am having the same problem as this question. I installed Pervasive v11 (which does have 64bit ODBC drivers) and I still do not see Pervasive listed as a provider when trying to create a linked ...
3
votes
1answer
1k views

How to tell what's failing at making backups?

I have an instance of SQL server that is regularly getting errors like this: 02/25/2013 23:22:38,spid138,Unknown,BackupVirtualDeviceFile::SendFileInfoBegin: failure on backup device ...
2
votes
1answer
221 views

Log all than queries taking more than X seconds

I have a database Microsoft SQL Server 2008r2. I have some applications in different programming languages. I would like to log all the queries that take more than X seconds. I guess that the I ...
4
votes
2answers
2k views

Subquery in the VALUES clause

Here's a real-world schema: CREATE TABLE [dbo].[Setting] ( [ID] [BIGINT] NOT NULL, [Module] [NVARCHAR](400) NOT NULL, [Property] [NVARCHAR](400) NOT NULL, [Value] ...
4
votes
1answer
725 views

How do I create a CLR UDF with external name specifying namespace, class, and subclass?

I am creating a CLR UDF using external name and second level nested class names seem not to be permitted. Is this the case? When using the following syntax and including a first level class name and ...
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) ...
5
votes
3answers
4k views

Choosing the right algorithm in HashBytes function

We need to create hash value of nvarchar data for comparison purposes. There are multiple hash algorithms available in T-SQL, but which one the best to choose from in this scenario? We want to ensure ...
2
votes
1answer
286 views

Microsoft Baseline Configuration Analyser on Production

I came across an useful tool that Microsoft has released for configuration analysis. It's called Microsoft Baseline Configuration Analyser 2.0. I downloaded and ran it on my local instance and got a ...
0
votes
1answer
2k views

How to set the timeoffset in a Datetimeoffset column without changing the date part

Is there any way to set the timeoffset of a datetimeoffset column directly without having to use SWITCHOFFSET which changes the date as well? In the post below, we can see the SWITCHOFFSET will ...
3
votes
2answers
1k views

Log all errors in queries

I have a database Microsoft SQL Server 2008r2 I have some applications in different programming languages. Some of them are legacy and I would not like to modify. Is there a way to log at server level ...
4
votes
1answer
273 views

Reindexing plan [closed]

I have a reindexing plan failing with error message: Refresh failed for PhysicalPartition '1' (Details: SQL Server Enterprise edition running in cluster.) Searching through BOL and other ...
5
votes
2answers
527 views

Stored Procedure as Create Table proxy?

With SQL Server it was my understanding, I thought, that you could elevate a users permissions with specific constraints. For example, you need a user to create a specific table object in a specific ...
0
votes
1answer
619 views

How to remove symbol from file

I am using ssis to generate some .dat files which are then sent to linux server for automated load. It looks as windows add some symbol character in file which is not easily identifiable first but if ...
4
votes
2answers
1k views

SQL Server replication for off site copy

We have our Primary SQL Servers in-house (15 primary servers at the moment (500 databases approx overall), most of the servers have hex core processors). These are mirrored to other backup servers in ...
1
vote
1answer
474 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 ...
2
votes
0answers
62 views

Is it possible to have a valid backupset with null position?

In database restore process I need to rely on position column exists in backupset record to restore the latest backupset. Restore the latest backup on the database I noticed sometimes position is ...
2
votes
2answers
189 views

Using SQL Server 2012 for Business Intelligence Features Only, No Database Engine

I would like to implement SQL Server 2012 purely for the Business Intelligence Features: SSIS, SSAS and SSRS on its own server. I current have SQL Server 2008R2 Database Engine installed on another ...
5
votes
2answers
4k views

Can we minimise the risk of using xp_cmdshell?

Using xp_cmdshell can be quite helpful and sometimes possibly the only answer to some scenarios. I've read some posts on the internet that enabling xp_cmdshell might jeopardize the security of the ...
0
votes
1answer
266 views

SQL Server merge replication across domains

I'm getting the following message when trying to set up merge replication on SQL Server 2008 R2: The Merge Agent failed to locate the partitioned snapshot for this subscription in the expected ...
4
votes
2answers
785 views

Identify NON-ANSI joins in SQL Server 2008 R2 on a Database that's in 2000 (80) compatibility mode

We have a very old database running on SQL Server 2008 R2. The database is running in 2000 (80) compatibility mode and has oodles of NON-ANSI joins in stored procedures, views and functions. We need ...
0
votes
2answers
346 views

Database not naturally shrinking log file [duplicate]

I have a database that is set to Simple recovery mode. There is 99% free space in the log file and I can manually truncate the log file right down to 500 MB. The next day, after a daily import ...
0
votes
2answers
2k views

Restore the latest backup on the database

We have a stored proc which takes the backup from a database to the specified location. Sometimes the backup process runs more than once. It causes having more than one backup set on the same file ...
1
vote
0answers
53 views

Fulltext indexes and issuers with server startup

I have a windows server for host about 4500 data bases for same application. And this application have 34 fulltext catalogs on it, and the CHANGE_TRACKING for this fulltext index are AUTO. And the ...
0
votes
1answer
132 views

Is it possible to drop data from OLAP database (and to keep definitions)?

[SQL Server Analysis Services from MS SQL Server 2008 R2 Standard] Our OLAP DB takes data from OLTP DB. We want to make some changes to its structure and to do this - it would be helpful if we could ...
0
votes
1answer
243 views

Any issue in referencing a unique index from a foreign key table?

Is there any concern in referencing a unique index from a foreign key table? Using SQL Server 2008 R2 Please advise thanks
5
votes
4answers
8k views

Quick way to validate two tables against each other

We're doing an ETL process. When all is said and done there are a bunch of tables that should be identical. What is the quickest way to verify that those tables (on two different servers) are in ...
4
votes
2answers
266 views

SSDT 2010 and SQL70590 errors

I have Visual Studio 2010 SP1 with SSDT (with Dec 2012 update). I have created a new SQL Server project and imported objects from a database on a SQL Server 2008 R2 instance. The database has a ...
5
votes
2answers
4k views

identify blocking and send alert

I need to create an alert that will notify me when any query has been blocked for more than 60 seconds. For example if someone has a transaction open on a table and forgets to run a commit or a ...
1
vote
2answers
985 views

What am I doing wrong with the Database Tuning Advisor?

My background: I'm a dev/architect, not a DBA. Sorry! So we have a ~400 table 75GB database. I ran Profiler for ~24 hours ("Tuning" template minus LoginName) and have ~7GB of usage recorded in a ...