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

learn more… | top users | synonyms

1
vote
0answers
426 views

Keep original column names in SSRS report designer 3.0?

I have queries returns a lot of (over a hundred) columns which names contain important underscores, >, < and Uppercase/lowercase characters. However, when creating the reports, SSRS designer (3.0) ...
1
vote
1answer
499 views

DATETIME2 and IDENTITY as composite key

I am currently developing a new database schema with an opportunity to do things right. The purpose of the development effort is to collect data (events) from various sensors that will be recorded ...
2
votes
1answer
677 views

Can a clustered index with low cardinality cause deadlocks?

I'm looking at a deadlock, which happens when two processes execute an UPDATE statement on the same table. Both transactions are implicit, meaning that they span only the current statement only, which ...
8
votes
1answer
9k views

SQL Server 2008 Change length of varchar on live prod table

I have a MS SQL Server 2008 R2 DB server currently in use with a production app. A new enhancement to the app now requires a varchar(100) column in a table to be increased in length. Can the ...
0
votes
0answers
530 views

Update Statistics Maintenance Plan - Ambiguous column name error

Microsoft SQL Server 2008 R2 Web Edition (RTM) - 10.50.1600.1 (Intel X86) Windows 2003 R2 SP2 I am in the process of setting up a maintenance plan to update statistics on a daily basis for all user ...
10
votes
1answer
1k views

DBCC CHECKDB firing every 20 - 60 seconds

I have a dev environment that is rapidly approaching deployment into production and have noticed in the logs that roughly every 20 seconds I see the message: Starting up database 'dbname' CHECKDB for ...
2
votes
1answer
196 views

Views - Indexes/Keys/Execution Plans

I am working with a SQL 2005 database server that contains multiple databases and tables that are replicated from various sources. No one but administrators have access to this server. There is a ...
2
votes
1answer
130 views

General strategy for updating a full text search index

I am using a SQL Server 2008 R2 DB with FTS enabled on it. I applied an FTS index on a table. The table is frequently updated (I mean the CUD operations). Keeping this in mind, I came up with a ...
13
votes
3answers
3k views

Can you explain this execution plan?

I was researching something else when I came across this thing. I was generating test tables with some data in it and running different queries to find out how different ways to write queries affects ...
6
votes
3answers
2k views

How to identify columns order in a table

I need to list columns from a table in the table definition order: select * from syscolumns where id = object_id('MyTable') --order by colid By examining syscolumns tables two columns look ...
3
votes
1answer
281 views

SQL Server Storage sql_variant

USE tempdb ; GO DROP TABLE tbl ; GO CREATE TABLE tbl ( i SQL_VARIANT NOT NULL ) ; GO INSERT INTO tbl (i) VALUES (1) ; GO SELECT i FROM tbl ; GO DBCC IND ('tempdb','tbl',-1) ; GO DBCC ...
9
votes
1answer
1k views

Interpreting SQL Server's Showplan XML

I just rolled out a feature on my site http://sqlfiddle.com that allows users to view the raw execution plans for their queries. In the case of PostgreSQL, MySQL, and (to some extent) Oracle, looking ...
32
votes
4answers
12k views

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

My company is facing the decision whether to purchase SQL Server 2012 Denali or SQL Server 2008 R2 for a new database server. I am looking for objective reasons to choose one over the other. Our ...
9
votes
2answers
2k views

Restore bak file to smaller mdf and ldf database files

I have a legacy database whose nightmarish lack of design I will not get into here, but the files on the server are (relatively) enormous. I have: MyDatabase.mdf: 24.8GB MyDatabase.ldf: 114.6GB This ...
2
votes
1answer
285 views

Upgrade to SQL Server 2008 R2 Standard with Mirroring (1 Thread Limit)

I am upgrading a mirroring pair of SQL2005 Enterprise servers to SQL2008R2 Standard which has 1 thread for mirroring limitation. As far as I understand this limitation applies to redo queue: ...
3
votes
3answers
3k views

SQL Server R2 and HyperThreading - Max Worker Threads and performance

SQL Im getting this error: This file is generated by Microsoft SQL Server version 10.50.2500.0 ...
6
votes
1answer
116 views

When you back up a database and scripts are running at the same time, at what point in time does the backup reflect?

If I run a SQL Server database backup via Management Studio and there are scripts running at the same time, does the backup reflect the point in time when the backup was started or when it ended? My ...
8
votes
2answers
5k views

Table not getting created under dbo schema

When creating tables in SSMS, I've realized that if you execute the following statement: CREATE TABLE [tableName]; the table will be created under your own schema (and not dbo). So in order to ...
4
votes
2answers
3k views

What server property makes TransactionScope escalating to MSDTC?

In our application we're using TransactionScope's. We're aiming to not use the MSDTC service because it's a lot slower than lightweight transactions. using (var transactionScope = new ...
1
vote
1answer
51 views

A few questions regarding Sql Server Utility

I just stumbled across the Sql Server Utility (don't ask) and was just wondering what the overhead of the collect and upload process is like? How does this compare with other monitoring/health tools ...
3
votes
2answers
1k views

Is this procedure to Failover to Logshipped secondary and Fail back again procedure correct?

I have a primary database in Amsterdam (AMDB), and a secondary in London (LNDB). I want to fail over from AMDB, to LNDB and then back again, without having to make another full backup (because the ...
2
votes
2answers
3k views

Deadlock on Insert/Update

Using SQL Server 2008 R2: I'm currently attempting to track down the cause of a deadlock issue we have. Not sure where to turn. Here's the setup. TABLE Scores: id INT IDENTITY(1,1), first_name ...
11
votes
4answers
7k views

SQL Server database on an SSD - any advantage to a separate file for every table?

I'm creating a database in which there will be around 30 tables, with every table containing tens of millions of rows and each table containing a single important column and a primary/foreign key ...
1
vote
1answer
145 views

How does SQL Server control which users get automatically added to a new database?

I re-create my Dev Database with a Visual Studio DB Project twice a week. Today I fixed my permissions to be Active Directory group based rather than giving individuals permissions. After I re-ran ...
5
votes
2answers
3k views

How to Determine the input and output values of stored procedures?

I have hundreds of SPs and I would like to find out: input parameters with type output fields with type (not output parameters) Of course I could manually go through each one and write it down but ...
6
votes
3answers
2k views

Simple SQL queries not finishing

I don't quite know how to formulate the question because we don't know much yet, but I would like to ask sooner than later because this looks like something that should not be neglected. This week we ...
1
vote
1answer
588 views

Why is my maintenance plan save overwriting job ownership?

I'm slowly untying all the system dependencies to the previous DBA's system account and moving them to a service account. The old DBA had ownership of all the jobs in our maintenance plan. In SSMS I ...
5
votes
1answer
1k views

How can dm_db_index_usage_stats show 0 for user_seeks and user scans but a large number for user_lookups?

I'm probably not understanding something but here is the question. I have done a query on dm_db_index_usage_stats. I've noticed that a couple of my indexes have large numbers (6.5 million and 20 ...
0
votes
0answers
31 views

Fix missing performance counters [duplicate]

Possible Duplicate: How to revive SQL Server 2008R2 performance counters? On one machine, I have an instance of SQL Server 2008R2 Enterprise, Visual Studio 2010 and VS 11 Developer Preview. ...
0
votes
1answer
5k views

Remove an instance of “SQL Server 2008 R2” after reinstalling “SQL Server 2008”

I have installed "SQL Server 2008 R2" with an instance name "SQLEXPRESS". Then I found out it cannot restore from my older "SQL server 2008" backup files . So I uninstalled SQL Server 2008 R2 and ...
1
vote
2answers
608 views

Email notifications in SQL Server 2008

I have set up 2 profiles. I can send a test email ok to one profile. I have set up 2 operators. I have a simple job (select coount(*)) which when it completes should send an email notification to the ...
1
vote
2answers
160 views

Is it possible to have indexes for like '%*%' type queries

Now for my thesis project i need to make a lot of queries like the below select * from tblMyTable where ItemName like '%item%' Now my question : is that possible to create indexes for such queries ...
7
votes
1answer
775 views

Is there a way to force Deferred Name Resolution even if the table exists when creating a sproc?

When creating a Stored Procedure in SQL Server you are allowed to refer to tables which do not exist. But, if the table does exist then any column you refer to in the procedure must exist in that ...
7
votes
3answers
354 views

Would it be considered as a bad practice to have multiple nullable FKs on a table in SQL Server

On my database structure in SQL Server, I have 3 types of products which requires different information about the order. So, I created one Customers table and three different orders tables: ...
1
vote
2answers
296 views

Installing SQL Server 2008 R2 Service Pack 1

I have SQL Server 2008 R2 installed on my computer. I want to install Service Pack 1 for SQL Server 2008 R2. Do I need to select upgrade option or new installation during installation of service pack ...
4
votes
2answers
6k views

Get Job id OR Job name from within executing job

I have a central DB that I write job outcomes on all my servers back to. I pass 3 parameters via powershell in a SQL job back to a sp on the central server that verifies the job should be running at ...
6
votes
2answers
2k views

What Problems Does an Eager Spool Indicate

Currently running on SQL Server 2008 R2 I am attempting to increase performance of an UPDATE statement. I notice an Eager Spool operation in the showplan popping up. My understanding of spooling ...
1
vote
1answer
96 views

Trying to figure out when a table was dropped? [duplicate]

Possible Duplicate: Determining how a schema change occurred? Using SQLServer 2008, I see in my schema a particular table was dropped. I am trying to figure out when / why etc? Is there ...
3
votes
1answer
480 views

SQL Server 2008 R2 Express - Runs at an average of 2-3% CPU, but gets stuck at 100% sometimes

Edit: Skip to the last paragraph for the summary-version! I am dealing with a SQL Server 2008 R2 Express installation. I have a fairly complex stored procedure. Depending upon the inputs, it may ...
3
votes
4answers
907 views

SQL Server 2008 R2 Standard with SSIS Enterprise

I currently have SQL server 2008 R2 Standard installed with SSIS. I need a SSIS feature that is only available with the enterprise edition. Is it possible to upgrade SSIS only to enterprise while ...
-1
votes
3answers
163 views

SQL Server - Transaction Slowness

Using: SQL Server 2008 R2 I'm seeing some behavior right now in SQL Server, and I can't decide if the server is underperforming or not. I've set up a test to insert an integer into a table, as ...
2
votes
1answer
1k views

SQL Server Maintenance Plan Fails to Rebuild the Indexes

When I run a maintenance plan to reorganize and rebuild tables indexes, it fails. Below the last two rows that displays the fail: Source: Reorganize Index Executing query "ALTER INDEX ...
7
votes
2answers
2k views

Msg 2534 : DBCC CHECKDB allocation errors

We recently moved our intranet production database from an SQL Server 2008 to an SQL Server 2008 R2 brand new server. The backup Job have been failing since migrating, due to DBCC Errors (Check ...
1
vote
1answer
78 views

Where has sysindex.rows gone?

In SqlServer 2000, there used to be a table called sysindex which had a column rows. This table is now: -sys.indexes -sys.partitions -sys.allocation_units -sys.dm_db_partition_stats (see: ...
1
vote
1answer
1k views

Output into temporary table

I am trying to create a procedure that will generate an xml document of a given table whilst updating the information in said table. My procedure does not recognise the use of the temporary table ...
6
votes
1answer
6k views

Is there a shorthand way to 'Auto_Fix' all Orphaned Users in an SQL Server 2008 R2 database?

It's fairly straight forward to fix up a single orphaned SQL user to a login using: EXEC sp_change_users_login 'Auto_Fix', 'user' I could script this, but is there an existing sproc which ...
0
votes
1answer
537 views

SET keyword in SQL Server

I have been using SET keyword to assign the values to parameters declared in SQL Server something like, Declare @StudentName Nvarchar(max) SET @StudentName='ABC' I'm not sure how to write this if ...
6
votes
3answers
8k views

Add article to transactional publication without generating new snapshot

Using SQL 2008 R2 transactional replication with pull subscribers, when we add an article, I'd like to avoid having to create an entire snapshot (the db is ~80 GB, so this takes hours). From this ...
4
votes
2answers
1k views

How do I rescue SQL Agent jobs from a set of detached master, model, mdb files?

I had a MSSQL (MSSQL 2008 R2) cluster that failed in a way that I couldn't bring it back up (long story, servers ended up in BSOD loops, I'm blaming Broadcom and myself). I've SQL backups, and even ...
4
votes
1answer
607 views

How does objectproperty() figure out if a function is deterministic in sql server?

How does sql server determine if a function is deterministic or not? Consider the following function, I think it's deterministic (as it's ultimately an integer operation), but sql server returns 0 ...