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

learn more… | top users | synonyms

0
votes
1answer
19 views

Track changes in database structure

There has been a change in our DB and one of the SPs has been deleted. We have no idea who did it or when. Is there any way to find it out? Or enabling an option to be able to track this in future?
2
votes
1answer
104 views

How do I transfer logins from 2008R2 to 2014 with passwords?

I've tried Tasks>Generate Scripts... and set 'Script Logins' in the Advanced Scripting Options, but I get this in the output: /* For security reasons the login is created disabled and with a random ...
1
vote
0answers
39 views

Possibly tempdb out of space or a system table is inconsistent

While running DBCC CHECKDB I got this error Msg 8921, Level 16, State 1, Line 1 Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system ...
2
votes
0answers
28 views

Phantom Transactions using Version Store in tempDB

We are seeing version store space increasing on one of our servers, and there are ~20 sessions that are showing as actively accessing version store rows for over 24 hours. The problem is, when I try ...
1
vote
2answers
83 views

What is the best way to get all data for a date range, plus the last event just before the range?

For this question assume the following: There is a table of events [Event] There is a table of employees [Employee] There is a table that relates the two [EventEmployee] (EventID + EmployeeID) Each ...
0
votes
1answer
13 views

Oprhaned entries in msdb..sysjobactivity

In this question: http://stackoverflow.com/questions/18445825/how-to-know-status-of-currently-running-jobs This answer was proposed: SELECT sj.name , sja.* FROM msdb.dbo.sysjobactivity AS sja ...
0
votes
1answer
32 views

Which is faster in process time?

I have a script that uses aggregate functions many times, and that might cause the slowdown of my script. And I thought to simplify my script and do all the summation/addition/concatenation on the ...
2
votes
1answer
74 views

Can comments in stored procedures cause problems

We're running a webserver that calls stored procedures to compute complex queries. Using sp_who2, we've discovered a peculiar issue where an abnormal number of processes would be stuck on SELECT state ...
0
votes
0answers
13 views

Randomly failing SQL Server 2008R2 used by Access 2010 front-end via ODBC

From time to time (sometimes days apart, sometimes several times a day) users of a multi-user Access front-end, which has ODBC connections to a SQL Server back-end, see a variety of problems. Most ...
0
votes
1answer
53 views

Help me improve my query

Help me improve this query. It took 8 minutes to generate 16k rows only. SELECT TPG.group_id INTO #tempgroups FROM [sqlcdb-h05].[cosmocallv6].[dbo].tpersonnel AS TP INNER JOIN ...
1
vote
0answers
29 views

Link up an ms access database to SQL Server 2008 R2?

I've installed the OLE DB Provider for JET by downloading this and installing it. I closed and reopened Microsoft SQL Studio, and connected to my SQL Server Instance. In <instance-name> ...
0
votes
0answers
14 views

Database mirroring partner cannot connect to witness

So, I am not sure when this started but at some point in my database mirroring configuration, one of the partners (currently the mirror) stopped being able to connect to the witness. This is a ...
0
votes
1answer
14 views

SQL Server distrb.exe & Logread.exe using huge SQL.txt file in C:\Users\sqlsrvacct\AppData\Local\Temp folder

I have the following situation: SQL server 2008 R2 SP2 I have both the Distribution and Subscription database in this server. LogReader agent and Distribution agent are running in continuous mode the ...
1
vote
1answer
39 views

Sql Server 2008 R2 Memory Caching , why doesn't it release the memory?

i am working on SQL server 2008 R2. It has been allowed to take a maximum memory which is around 45 GB. In couple of days it caches everything and the limit is reached. We have other processing as ...
0
votes
0answers
24 views

SQL Server Replication Monitor Throwing “Specified cast is not valid. (ReplicationMonitor)” Error

The publisher is running SQL Server 2008 R2 on a Server 2008 R2 box. The subscriber is running SQL Server 2012 on a Server 2012 box. I have tried launching the replication monitor from both servers ...
1
vote
2answers
50 views

Should I include as much information as possbile to help the optimiser?

Reading the article "Dynamic Search Conditions in T‑SQL" I saw the following statement in the "Using sp_executesql" section. Double Feature You may wonder why there are two conditions on the ...
0
votes
1answer
69 views

Finding login or user name of last person to use a DB

The boss has asked for a list of DB names along with size and name of last person to use that DB. I've found resources for when a DB was last accessed but for by whom. How would I solve this? ...
1
vote
1answer
31 views

SQL Server 2008 R2 - Limit viewing on database list

In SQL Server 2008 R2 I have user1, he owns 3 db (db1 , db2, db3) and I want he can see only these 3 db when he login by using SSMS. I did REVOKE VIEW ANY DATABASE FROM PUBLIC, but then he cannot see ...
1
vote
1answer
23 views

Partition Style - MBR or GPT

I am setting up a new server and I am designing the server for performance over capacity. Planning the disk partitioning style I would like to use GPT over MBR but am not sure which is best. I am ...
0
votes
1answer
28 views

Insert / Edit Rows by Selecting FK row

When inserting or editing rows ("Edit Top 200 Rows") for a table with a FK constraint, can the editor be configured to select the foreign row, rather than me having to look up the FK?
1
vote
1answer
36 views

why a session becomes a head blocker

I am troubleshooting a problem that seems to be random The problem is sometimes an application (dynamics SL) is freezing When the application is freezing , I notice there is a blocked by in SQL ...
1
vote
1answer
46 views

Using CHECKSUM on where clause

I'm going through a long stored procedure and I found this, as part of a long query: SELECT .... FROM --- WHERE condition AND CHECKSUM(r.roomprovider_id) <> ...
0
votes
0answers
28 views

ssis ado.net destination has failed to acquire the connection

I am Transferring data from sql server source db to sql server destination db (cross db). but some times getting error "ssis ado.net destination has failed to acquire the connection.The connection may ...
0
votes
1answer
39 views

How to know DB size using backup file without restoring it

Is there anyway so that we can estimated/know size of database using backup file without restoring it?
0
votes
1answer
27 views

Minimum Permission to Restart SQL Services

Occasionally, our developers need to restart SQL services. We do not want said developers to be local admins on each server if not necessary. What is the minimum permission required so that the ...
0
votes
1answer
88 views

Monitoring sql server

This question is related to monitoring of sql server. I want to send an email alert with all open transactions on SQL Server in HTML report whenever there is sustained 50-60% CPU usage for more than ...
0
votes
0answers
35 views

How to go about building new reliable SQL Server?

I need help on this. Basically I am looking for typical questionnaire which can be asked to customers/clients when they reach out to a DBA for building new SQL Servers in their environment? For ...
0
votes
1answer
49 views

sql server disk I/o question [closed]

I have a question on disks. How much I/O can a normal disk and a SAN disk can handle? I have heard about SAN disks should be able to handle upto 200-300 mb/sec, how much does a normal disk can handle ...
1
vote
2answers
56 views

Decode function in SQL Server

Can some one help me to figure out the equivalent function to decode in SQL Server. Here is the statement which I used for Oracle and I want it for SQL Server. I tried but not able to get it. UPDATE ...
1
vote
1answer
44 views

Why does sp_rename not affect the output of sp_helptext?

create procedure Eg_Proce as begin select * from po; end go exec sp_rename 'Eg_Proce','Example_Procedure' After renaming procedure sp_helptext 'Example_Procedure' The definition of the ...
1
vote
1answer
29 views

Creating Excel files in SSIS based with a predefined format

I need to create a statistical report in Excel and wondering if I can use SSIS to read data from the database (calculate the aggregated numbers) and load them into an Excel file with a specific ...
1
vote
2answers
44 views

How to drop database that I can't get out of single user mode?

I've got a database in single user mode that I can't get out of single user mode. I've tried resetting the server, and I've even tried resetting my computer but with every attempt I make to do ...
1
vote
1answer
60 views

How to solve the error Msg 547, Level 16, State 0, Line 1 [closed]

Please suggest me how to solve the error How to solve the error Msg 547, Level 16, State 0, Line 1 The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "MyForeignKeyName". The ...
0
votes
2answers
61 views

Order of update column?

This is my Table Employee. Reocrds like below id first_name last_name salary start_Date region city 1 VINOTH Martin 5890.00 2005-03-22 00:00:00.000 North CHENNAI 2 BALU Mathews ...
0
votes
1answer
73 views

Restoring a SQL Server 2008 R2 backup on SQL Server 2005

I'm getting an error whenever I restore a testing database on SQL Server 2005 that was backed up from SQL Server 2008 R2. It seems that I cannot restore from a higher version of sql onto lower ...
0
votes
0answers
84 views

How can I get rid of the “No Join Predicate” warning

I have this fairly straight-forward snippet of a query: DECLARE @ClientGUID numeric(16) = 9000011916900200; SELECT ch.GUID, c.LastName, c.FirstName, mrn.ClientIDCode AS MRN FROM Client c INNER ...
2
votes
1answer
81 views

How should I limit a table to N rows, discarding oldest?

I have a SQL Server table which I use to store events. I only want the table to contain the 1000 most recently added rows, when row 1001 is inserted, row 1 should be deleted. I have both a ...
0
votes
2answers
59 views

For SQL Server, What is the proper way to update a table?

I don't have a mentor to ask so I am seeking direction from the DBA community. I am in charge of a SQL SERVER 2008 R2 and SQL Azure databases that are the resources for a website and an ERP system for ...
1
vote
2answers
89 views

Numerous failed authentication attempts in error log

I'm having a hellacious time trying to figure out what is attempting to authenticate against a particular database server, running SQL Server 2008 R2 Standard Edition. The following is the error ...
0
votes
1answer
20 views

Moving a heap between filegroups

I would like to move the tables in my database from one filegroup (Primary) to a another (a new one). I can find lots of advice on this concerning tables with clustered indexes but all these tables in ...
2
votes
4answers
140 views

How To change the column order?

How To change the column order in sql server 2008 R2? Eg: My table order is Eid------Ename-----Esalary Know i want this format like Eid---Salary----Ename Thanks.
1
vote
1answer
65 views

Transaction Log usage by transaction

Is there a way to find out how much of the transaction log a specific transaction uses? I have a database with simple recovery model and a log file with max size 500 MB. During our tests we ran into ...
1
vote
2answers
40 views

Maintenance Plan Job running at additional unscheduled times?

I have a situation that has left me really scratching my head. This is a SQL Server 2008r2 instance, used as the database server for a substantial corporate SharePoint service. As my company is ...
1
vote
0answers
16 views

ODBC Connection Not Refreshing

I am trying to connect FedEx Shipping Manager Integration Assistant to a SQL 2008 R2 database. I have a view created that has all the necessary fields to populate in the Integration Assistant. The ...
3
votes
1answer
167 views

Three Node Cluster that Allows For Two Failures

We are creating a three-node three-instance cluster with SQL 2008 R2 (not cutting edge, but that is what the application supports) and think it should be able to maintain quorum with two physical ...
2
votes
1answer
29 views

Database Backup from 2008 R2, Restore on 2012 Failover Cluster Instance

I have a production database server having sql server 2008r2. This is an old server and considering our load, we are moving to a better hardware configuration, Now the new environment is a cluster ...
4
votes
3answers
436 views

Displaying the list of all tables in all database

How can I display a list containing all the tables of all the database in a SQL Server 2008 R2 server?
1
vote
1answer
51 views

Find the SQL query that caused an event in the past

I have a database in which I noticed that one of my tables is missing. I haven't used this database for over three months and now I want to find out who caused this, when this happened, how it ...
2
votes
3answers
35 views

Steps after restoring to a different server

We have a 30 GB Database on SQL Server 2008 R2 Standard Edition. Yesterday we backed up the database and restored it to a different Virtual Machine which has exactly the same specs as the previous ...
0
votes
1answer
36 views

Nightly reload of tables from a linked server

I have a number of tables that need to be reloaded nightly from a linked server. My current method of doing this is to create a nightly job to pull the data using something like the following: ...