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

learn more… | top users | synonyms (2)

1
vote
1answer
278 views

What is the default value of ANSI Padding Enabled, and what should value should I set it to?

When creating a new database, ANSI Padding Enabled is set to False by default. According to this however, the default is ON (which I assume is the same as True). They also recommend to set it to ON ...
1
vote
0answers
709 views

Log file growth due to replication issue

I have one primary database and it's getting replicated to another server. Both servers are SQL Server 2008 R2 with SP1. Replication was running fine till last week. We have transaction log backup ...
1
vote
0answers
3k views

Strange error with restoring database

Some times ago I have done backup my MS SQL Server database and then I restore it (on other computer and server). Today I would make just like two weeks ago. But when I choose file to restore from ...
4
votes
1answer
482 views

Suggest better design pattern for reverse DNS lookups

I'm working on a project where I need to look up the hostnames associated with IP addresses who were logged making HTTP requests. The lookups currently happen as part of a daily ETL job. The current ...
2
votes
1answer
690 views

Checkdb giving error for master database

When i run dbcc checkdb on master database i get error like Msg 5030, Level 16, State 12, Line 1 The database could not be exclusively locked to perform the operation. Msg 7926, Level 16, State 1, ...
2
votes
1answer
495 views

Should I run a delete first before I execute index rebuild to a large table about 15 Million records

I need help for a better approach on how to approach this. Currently we have a table that is huge about 15 million records. We plan to create an index on this table however due to large size, we ...
1
vote
1answer
746 views

SSRS Line Graph formatting

Environment: Windows 8.1, SQL Server 2008 R2 Express database, SQL Server 2008 R2 BIDS Database: Performance counter data collected on client servers. The particular values involved in this question ...
1
vote
0answers
31 views

How to restrict SQL Server database access to application or server running the application [duplicate]

I have a third-party application that connects to a SQL Server database via a SQL Server Native Client 10 ODBC data source. The application requires that each user of the application must have ...
10
votes
1answer
498 views

Poor query performance

We have a large (10,000+ lines) procedure that typically runs in 0.5-6.0 seconds depending on how much data it has to work with. Over the past month or so it has started taking 30+ seconds after we do ...
1
vote
1answer
9k views

Does “use AWE to allocate memory” do anything on a SQL Server 2008 R2 64bit Windows 2003 system?

After checking the box I noticed that queries that would timeout after 30 seconds would complete execution. The TechNet article says "AWE is not required and cannot be configured on 64-bit ...
0
votes
0answers
502 views

SSPI handshake failed with error code 0x80090308 connection to Sql Server 2008 R2

I have a cross domain situation where the SQL Server 2008 R2 server sits in one domain and the client in another. There is a one-way trust between the domains. The SQL Server runs on a domain account. ...
2
votes
5answers
30k views

Backup and restore database - occured system error 5

In my work I made backup of database and I receive file .bak. Now I would like restore this database in my machine. But I get the following error: Cannot open backup device 'C:\Program ...
1
vote
1answer
6k views

Unexpected EOF during bulk insert

USE [campaigns] DECLARE @FILENAME varchar(400) = 'W:\PlayerListing\List.txt' ,@EMAIL_SOURCE varchar(50) = 'listing' ,@SQLCMD varchar(8000) PRINT (CAST(GETDATE() AS varchar(30)) + ' BULK ...
2
votes
1answer
4k views

SSIS Event Handler at Package Level

I have a fairly simple SSIS package (handful of Execute Task and a few Data Flow task). The end result I am looking to have: I would like to get notified by email when an error occurs anywhere in ...
5
votes
3answers
3k 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
395 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
261 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, ...
4
votes
2answers
11k 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
698 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
329 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
4k 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
217 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
487 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
57 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
2k 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
369 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 ...
4
votes
1answer
3k 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
638 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
3k 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
325 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
2k 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
91 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, '') ...
3
votes
1answer
445 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
480 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
1k 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
405 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
155 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
603 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 ...
1
vote
2answers
827 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
24k 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
145 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
7k 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
5k 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 ...
1
vote
1answer
15k 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
398 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
2k 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
208 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
261 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
2answers
193 views

Restore database to a instance in network

We are creating a application which requires sql database as backend to store data. So when user install my application he chooses a sql instance and its details. There we plan to restore the database ...