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

learn more… | top users | synonyms

3
votes
1answer
1k views

Creating a read only replica of SQL Server database for reports

I've faced a problem when my .Net web application is running slow, even when I've optimized all queries. As it turned out another developer, who is making reports runs a bunch of non optimized queries ...
1
vote
1answer
325 views

Cannot grant execute to stored procedure [closed]

When I try to GRANT EXECUTE ON SP_NAME TO [DOMAIN\USER_NAME] on my database, I'm getting the error message below: Msg 8115, Level 16, State 1, Procedure grant_safety, Line 5 Arithmetic overflow error ...
2
votes
1answer
214 views

Logging errors with extended events excluding some users

I use extended events to store database errors, like this: CREATE EVENT SESSION [ErrorCapture] ON SERVER ADD EVENT sqlserver.error_reported ( ACTION ( sqlserver.client_hostname, ...
1
vote
2answers
7k views

DBCC SHRINKDATABASE TRUNCATEONLY 2008R2 vs 2012

Im a bit confused was the TRUNCATEONLY parameter changed in 2012 or is the documentation wrong in 2008R2? 2008R2 Releases all free space at the end of the file to the operating system but does ...
2
votes
2answers
560 views

Creating a partition on my soft-delete indicator column

In SQL Server 2008 R2 I am exploring the use of partitioning tables. We have a soft-delete scheme which is sometimes an IsDeleted bit NOT NULL and sometimes a DateDeleted date NULL I want to focus ...
2
votes
1answer
265 views

sql server NUMA binding to ports

I am trying to allocate a set of CPUs on a 2 node NUMA server as below : Below is from coreinfo that shows physical processors, logical processors and NUMA nodes on the server. Logical to Physical ...
1
vote
1answer
2k views

Some queries are very slow after index rebuild

After finding out almost all databases on my SQL Server had fragmentation over 40%, I decided to do an index rebuild on all tables using a fill factor of 80. After rebuilding all indexes, some ...
1
vote
1answer
143 views

Can I force MSDTC to control only within a single database?

Using MS SQL Server 2008 R2 we have .NET code and we would like to use nested connections to the same database within the same transaction scope. I understand and accept that this will require ...
0
votes
2answers
364 views

Resume log shipping from a specific transaction

Is it possible to force SQL Log Shipping to run from a given .trn file onward? I have two databases, where one ships to another this was working fine. However I had to restore the primary database ...
0
votes
1answer
55 views

SQL Server 2012 Intellisense Support for Extended Events

Using SQL Server 2012 with SP1 for some reason when try to use extended events programmatically using T-SQL. I am not able to see intellisense working? Just trying to check is this something on my end ...
1
vote
2answers
1k views

Delete rows from a large table with joins and aggregating (resulting in 1 % less rows in the big table)

I got a bit stuck on performance, so I thought about asking a bit of help. I have a working query, but unfortunatelly it feels rather slow and I know it's not as performant as it could be made ...
0
votes
1answer
257 views

In Extended Events what is the difference between rpc_completed and sql_batch_completed? [duplicate]

I understand that rpc_completed is defined as the completion of a remote procedure call and sql_batch_completed is the completion of a t-sql batch. However can anyone explain in concrete terms what ...
3
votes
1answer
1k views

Licensing standalone instance of SSIS

Basic background: I have an application on an app server (no MSSQL installed) that I want to allow to call an SSIS package. One Solution: One option seems to be that we can install just SSIS on the ...
3
votes
1answer
466 views

How do I find the longest string in a row amongst various text fields?

Does anyone have an easy query to find the longest string of characters in a data row from ALL alphanumeric (text, nchar, varchar, etc) type columns from ALL tables in a single SQL Server 2008 R2 ...
3
votes
1answer
1k views

Table-valued function runs fast, but slow from another function [closed]

Disclaimer: I'm a senior sysadmin who's trying to help our development team speed up the production database. Our users are hurting, bad. Please don't shoot me for not being great with SQL The ...
1
vote
1answer
257 views

To use a cursor or something else in my while loop?

From reading around the net it seems the use of cursors is frown upon but no one ever seemed to give an alternative to them. In my case I need to set row by row though the results of a select ...
5
votes
1answer
1k views

Why does SQL Server 2008 R2 insert an invalid datetime when using bulk insert?

I want to insert rows with an optional datetime value (per row) using T-SQL BULK INSERT on a SQL Server 2008 R2. A table could look like this: CREATE TABLE [dbo].[tbl_bulk_insert_datetime_issue] ( ...
4
votes
1answer
78 views

Query uses Primary Key Index instead of Nonclustered index defined

I have this simple query and I am confused why the index is not working. SELECT lop.RecordID ProspectusID, c.c_code CourseCode, c.c_desc CourseDescription, COALESCE(c.c_major, '') ...
2
votes
1answer
352 views

Can SQL Server prevent the pagefile from being moved?

On a production server of ours the page file has grown to 30gb+. The Sys Admin has moved the Page File to a different drive, but for some reason the old one won't be removed. He thinks that SQL ...
1
vote
0answers
357 views

Error 7373 connecting to SSAS 2008 only from one machine

Within the last week, I've gotten the following error when trying to use a linked server in SSMS (tried 2008 and 2012) to connect to a SSAS 2008 R2 instance on our cluster: Cannot set ...
1
vote
2answers
972 views

Should I load the data into Temp table or keep calling it from the normal table? [closed]

I am writing a procedure and find myself using the same select statement with the same where clause a lot. Currently the table holds over 55000 rows and grows about 100 or so rows each day. The two ...
2
votes
1answer
250 views

Should you use the schema name in WHERE, ON, and other clauses?

I know it is good practice, and a performance boost, in SQL Server to prefix the table name with the schema (dbo.TableName) in the FROM clause of a SELECT statement but should you also use it on other ...
2
votes
0answers
107 views

Find Most active databases that can be offloaded from a busy server

I am in the process of identifying the most active databases on the server and will be moving the databases off the current server to alleviate the load. The reason to do it is that our servers are ...
0
votes
1answer
389 views

How i can create backup script from diagram in SQL Server?

I use SQL Server 2012 and SQL Server 2008 R2. I create a script from all object (tables / trigger / stored procedure / function ...) in my database. I generated this script from SQL Server ...
0
votes
2answers
619 views

Why does my SSIS package produce different results when executed from a maintence plan

I have a SSIS package that picks up a file in one network location transforms the data and drops off files ready for import in another network location. The package reads a file and writes a new file ...
2
votes
1answer
15k views

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Reason: Token-based server access validation failed

As the title states, I'm getting the following error when attempting to use a ASP.NET webapp: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Reason: Token-based server access validation failed ...
1
vote
2answers
130 views

When next will my fullback up run

I created a maintenance plan to run full backups on a SQL Server 2008 R2. The schedule runs every last Thursday of the month. Sometimes due to some unknown reason, such as electric outage. When the ...
1
vote
2answers
3k views

Best Possible Solution for Reporting Mirroring or Replication?

Hi I have SQL SERVER 2008R2 Data Centre Edition and I use SSRS and a Vendor application for reporting. I have a Reporting Server where we backup and restore everyday from Live Server to have Data ...
1
vote
0answers
47 views

SQL Server log Size increasing while in Simple recovery mode [duplicate]

Is it possible to locate the active transaction, it was not listed in DBCC opentran, the log file keeps getting bigger. Database is in Simple recovery tried shrinking the database - no luck Also ...
4
votes
1answer
3k views

What's the impact of running sp_updatestats in production server?

Is it safe to run sp_updatestats on an SQL Server in the production environment? Or rather, what is the impact of updating all statistics on a sql server? Can it "choke" the sql server while it runs ...
0
votes
1answer
8k views

how to change default language of SQL server management studio 2008R2?

I tried to change default language to french by using the below query. USE ssidps; GO EXEC sp_configure 'default language', 2 ; GO RECONFIGURE ; GO but SELECT @@language gives "us_english" always. ...
-4
votes
1answer
276 views

T- SQL Query which can give all the Performance Monitoring information of a single database in SQL Server 2008 R2 [closed]

Urgently need a T-SQL query which can give all the performance monitoring information like database size, database physical path etc, log size, log path, spaced used, space free, number of ...
0
votes
1answer
1k views

Installing SQL Server 2008 R2 Express on Server 2012 - Could not load file or assembly

I'm trying to install SQL Server 2008 R2 Express Edition SP2 on Windows 2012 server. The error is: Any clue?
0
votes
0answers
127 views

Expanding the database in SQL Server 2008 R2

I have a database server DBA with .mdf and .ldf files on a SAN. Often one of my database will not list out the tables (unable to extend the db), Every time I have to take it offline and bring back ...
1
vote
1answer
196 views

How to find what prevented in getting a lock?

Sometimes my update statements fail after 3000 milliseconds with 'Lock request time out period exceeded' error. That 3000 limit is coming from my application through SET LOCK_TIMEOUT 3000 setting, ...
3
votes
1answer
1k views

failed with the following error: “Write on ”…bak" failed: 27(error not found) BACKUP DATABASE is terminating abnormally

This issue has been puzzling me for some time now and I'm running out of ideas! Any help would be much appreciated! Here's the problem: MS SQL Server 2008 running on Windows Server 2008R2 ...
2
votes
2answers
341 views

How to Select Most Recently Updated Row Based on Sequence ID

I have a primary ID column but also a sequence ID column for each edit of the row (the initial row is 1, each edit increments the sequence ID but the primary ID column remains the same). What is the ...
1
vote
1answer
589 views

Securely deleting data from SQL Server logs

Is there a good way to purge data from a particular DB's *.LDF? A little background... I'm a SysAd, not a DBA. I'm running SQL Server 2008 R2 for one of my applications and I'm not particularly ...
2
votes
0answers
253 views

Same data type but getting error “Cannot convert between unicode and non-unicode string data types” [closed]

We have two SQL servers (source and destination). From what little information I've got, it seems to literally copy content from one server/database to another using a SSIS package (which I ...
1
vote
1answer
2k views

Maintenance Cleanup Job Task Fails but Backup Jop is successful

I get this error: Executing the query "EXECUTE master.dbo.xp_delete_file 0,N'\\SQLSvr..." failed with the following error: "xp_delete_file() returned error 2, 'The system cannot find the file ...
5
votes
2answers
4k views

Limit CPU usage without Resource Governor

We have an SQL Server 2008R2 Standard Edition with several databases belonging to different applications on a 16 core server. One recently introduced application is regularly executing expensive ...
4
votes
1answer
1k views

Advisability of using STATISTICS_NORECOMPUTE

I've recently become involved in maintaining a set of databases with some interesting index problems. One of the ones that aggravates me the most is the differences in the indexes between ...
0
votes
1answer
111 views

Index Maintenance on SQL Server 2008 R2 Web edition [duplicate]

I've inherited of a couple of databases which indexes have never been maintained (rebuilt, reorganized). I'm using Ola Hallengren's Index maintenance script, I've used the following script to record ...
0
votes
1answer
80 views

What happens if you accidentally insert data into a replication target table?

We use transactional replication to replicate data from table1 on server1 to table2 on server2. However, one of my colleagues accidentally inserted some data into table2. In order to keep the two ...
0
votes
1answer
42 views

What Type of Join to Use in this Search?

I have the following query that is bound to a datagrid: select distinct a.Person_ID, a.Person_Last_Name, a.Person_DOB, CASE WHEN ...
4
votes
2answers
175 views

Can a single SQL Server instance issue the same SYSDATETIME twice?

I am contemplating using a datetime2(7) as a clustered index. If I were to always populate that column using SYSDATETIME is it possible for the same instance to issue the same value twice (assuming ...
1
vote
1answer
198 views

SQL Server 2008R2 Cluster: Spread tempdb over several files AND shrink original single file

On my SQL 2008 R2 active/passive cluster, I've received an error message regarding I/O requests on tempdb.mdf taking longer than 15seconds. Googled that and it as suggested I spread tempdb over ...
2
votes
1answer
188 views

What are Objective Business Reasons to Prefer SQL Server 2008R2 over 2012?

Basically, I want to take this discussion -- What are Objective Business Reasons to Prefer SQL Server 2012 over 2008 R2? -- and turn it on its head. We are a small business, and we are struggling ...
1
vote
0answers
87 views

How to enable SQL Server Log Truncation Counter

I have a database in Full Recovery mode. Full backup is executed every day, transaction log backup every hour. However, SELECT* FROM sys.dm_os_performance_counters where counter_name = 'Log ...
2
votes
4answers
1k views

SQL Server Page Life Expectancy sharp drop

I'm trying to put my hands on the reason this SQL Server slows down sporadically. There are no patterns detected so far. It's a SQL Server 2008 R2 running on a Windows Server 2008R2 VM on top of ...