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

learn more… | top users | synonyms

1
vote
1answer
525 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
63 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
283 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
96 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
117 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
66 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
198 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
40 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
213 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
72 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
137 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
29 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
185 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
199 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
620 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
55 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 ...
3
votes
3answers
109 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
62 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: ...
0
votes
0answers
25 views

Delta data finding

I need to build a database that contain only the delta from yesterday by comparing two databases, finding out the following: What rows were Inserted What rows were Deleted What rwos were Updated ...
1
vote
3answers
621 views

How can I change the names of all tables to uppercase?

User created one database, for example TestDb. Within this database the user created 30 tables, with the table name in lower case letters (Eg:Employee). Is it possible to change the tables names to ...
1
vote
1answer
45 views

How to store chains of information?

I am currently trying to design a table structure that can capture report data (from various sources) in an ordered fashion. Let me give you an example: Each day I receive three separate reports ...
4
votes
2answers
259 views

Sudden performance decrease in SQL Server

I've got a problem with a SQL Server 2008 R2 instance. Last week the performance suddenly broke down. All inserts are very very slow. It takes 4-5 times longer than before. On the hardware we found no ...
0
votes
2answers
485 views

How to open SQL Server 2008 R2 Configuration manager in Windows 8.1

In Windows 8.1, i can't find Configuration manager of SQL Server 2008R2. I have already followed the steps as specified in this question. But Configuration manager is not showing up even after ...
1
vote
0answers
28 views

Permissions required for running extended events

I've found this link: Changes to Extended Events Permission Requirements in SQL Server 2012 that mentions the need of CONTROL SERVER permission for using extended events on SQL Server 2008. I want to ...
0
votes
1answer
951 views

How To Execute an Integration Services (SSIS) Package from a SQL Server Stored Procedure

i am executing query like this on sql server 2008 R2 DECLARE @returncode int EXEC @returncode = xp_cmdshell 'dtexec /f "C:\certs\SSIS Disposition\SSIS Disposition\SSIS Disposition\Package1.dtsx"' ...
0
votes
1answer
169 views

Creating Users on secondary server in log shipping

I have a production Server say ServerA I have setup log shipping to ServerB which is left in read-only mode. The purpose of this log shipping is to lower the load on production server for some ...
1
vote
1answer
60 views

cons of linked server providers not running in “allow in process” [closed]

what are the cons of having linked server providers not running in "allow in process"? SQL box crashed due to oracle provider crashing and it provider was running in "Allow in process", now have been ...
1
vote
1answer
112 views

Deadlock occurring on database, SQL Server 2008R2

Last few days I had major problems with my production site, turns out deadlock occurred, every half an hour maybe 50-60 of them. To do a quick fix in order to keep the site running I set : ...
3
votes
1answer
72 views

Secure database access from particular applications

I have an C#.NET application and a SQL Server database (SQL Server 2008 R2) and would like to restrict the access to some of the Tables when it has been accessed from some other application rather ...
3
votes
1answer
527 views

Can not start SQL Server, model db in RESTORING state

Quick run down: First problem started when sysadmin received error that model is recovering. Sometime later vendor tried to do some upgrades to the database. When they restarted SQL Server it failed ...
2
votes
1answer
44 views

Accidental Turn On of Replication

We had a log file that wouldn't stop growing even though we do backups. Turns out that replication had been turned on for that database. None of us DBAs did that (at least as far as we know). So, ...
0
votes
2answers
75 views

Memory Allocation in Shared DB & IIS Environment

In my use case, we have production servers that host both IIS & SQL on the same machine, not ideal but no flexibility to change that. Basically a single machine is both a DB and an Application ...
2
votes
2answers
89 views

SQL Server 2008 R2 Missing Index

I am performing index maintenance on a database. I have run SQL script that uses DMVs to provides a list of indexes SQL Server believes should be created. I am not creating indexes just because the ...
1
vote
0answers
57 views

What SQL Server Edition to use [closed]

I am a programmer and I have been asked to identify a Sql Server Edition suitable for our intranet web site. There will be 15 users connecting to web site. But we use one windows account to connect ...
2
votes
2answers
586 views

SQL Job step run as different sql account

I'm curious how to set up a SQL job step to be executed as a different SQL login account. It appears I need to set up a New Proxy Account which requires an existing credential. When I create a ...
-1
votes
1answer
60 views

SQL Server 2008 R2: cannot attach database [closed]

On attaching the database I get following error, Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\demorainbow.mdf" failed with the operating ...
3
votes
2answers
61 views

SQL Server NULL Index

I am new here and have a little question. In a customer environment after checking his index fragmentation we see some "NULL" named index that we couldn't rebuilt or reorganize. This was a SQL ...
0
votes
0answers
64 views

How to convert Excel into Star-schema Moel?

Team, My end user gave an Excel spreadsheet with 15 columns and 50K rows out of which 5 columns are calculated and 10 are not. My data modeler has converted Excel into a single TABLE on MSSQLServer ...
1
vote
1answer
110 views

Snapshot agent stuck at 48%

We are having to redo a publication/subscription and while running the snapshot agent it stalls at 48% with the message "The process is running and is waiting on a response from the server." ...
0
votes
1answer
29 views

Can't set up mirroring for a specific database

We have several databases. All of them are mirrored. Until now, we never had issues with this. One database had some problems, and now when we try to enable mirror again, it just stops. Message in ...
3
votes
1answer
113 views

SQL Server 2008 R2: query RECENT locks, NOT current locks

The database had average lock wait time of 30 seconds for a period of about a minute. I didn't run my lock query in time to see what was happening. I can't seem to find anything that shows recent ...
3
votes
1answer
143 views

Timestamp on SSIS update on tsql

I have a couple of SSIS packages that copy the content of several tables to another db. One of the columns updated in the process is a timestamp datatype. From what I read this datatype can't be ...
0
votes
0answers
278 views

SSRS - Report using Stored Procedures, Cascading Parameters and Views

I am looking for a non-trivial Microsoft SQL Server Reporting Services example that shows the efficient use of the following for calculated columns such as: Profit = Revenue - Expense Margin = Profit ...
1
vote
1answer
66 views

How to include categories for which there are no values in an ssrs chart

I've got a query that gets some data points for the last 6 months (prior to current), akin to this: SELECT [DataPoint], [When] FROM Table WHERE [When] >= DATEADD(MONTH, -7, ...
2
votes
0answers
94 views

send custom email when SQL Server job fails

I have setup a profile and account for sending mail using DatabaseMail. I have a SQL JOB. If the job fails, I receive an Email Till this point, everything works fine. This is what the email looks ...
5
votes
3answers
585 views

Encountered unexpected growth Transaction log file size

We are using SQL Server 2008 R2 Standard version, we created Maintenance plan Rebuild Index, Reorganized Index and update Statistic , Scheduled Every day at 1 AM. After Executing this Maintenance ...
0
votes
1answer
65 views

How does the Distributor know you have seeded/initialized your Subscriber using a backup?

Im building my first transactional replication database for our Sharepoint team. The Publisher database is fairly large 330GB+ Because the Publisher database is in a different data center than the ...
0
votes
0answers
71 views

incorrect value from SUM Function

Has anyone seen this before? When doing a simple sum on a table: select sum(column) from table where column is not null I'm receiving the data 1558.39999999999 However, investigation of the ...
0
votes
0answers
130 views

SQL Server 2008 single-line PIVOT/UNPIVOT combo

I have a request to get information from a table with a stored procedure that shows all the necessary data for in one line. This table includes a hierarchyID, so I am trying to use the HID methods in ...
1
vote
2answers
70 views

Backing up my SQL Server System Databases

I'm trying to create a recurring scheduled job to fully backup the master, msdb and model databases, I'm using the Maintenance Plans for SQL Server 2008 R2, in the "Specific Databases to choose from ...