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

learn more… | top users | synonyms

2
votes
2answers
87 views

Why is table variable forcing an index scan while temp table uses seek and bookmark lookup?

I am trying to understand why using a table variable is preventing the optimizer from using an index seek and then bookmark lookup versus an index scan. Populating the table: CREATE TABLE dbo.Test ...
3
votes
0answers
20 views

DBCC CheckDB run into early hardware failure

Our production database server (SQL 2008 R2 Enterprise on Windows Server 2008 R2 DC) run into a strange error during its nightly DBCC CheckDB (Prod_DB) since late June. The same job had been running ...
0
votes
0answers
9 views

Exporting data in Sql Server 2008 [on hold]

I have Sql server backup file but it does not contain any extension. I checked it after removing hiding option for known types. It does not contain any extension except name. But in type option of ...
1
vote
0answers
23 views

Should I restore without the log file?

I need to restore a SQL Server database with/without the log file. This is for a reporting system and when I restore the log file it is sometimes 8x larger then the data file. I am restoring this once ...
0
votes
1answer
20 views

How to merge consecutive record pairs over a table?

I have a table where I need to merge consecutive record pairs (when ordered by id, data and from). Note that for pairs being merged, the first row's prevfrom is NULL and the second row's nextto is ...
2
votes
1answer
20 views

Hosting SQL Server and SSIS/SSRS in same VM

I have SSIS / SSRS and large number of databases currently being hosted on the same prod server (SQL1, SQL Server 2008R2). Since SQL1 already has SSRS/SSIS installed, would it be a good option to ...
1
vote
3answers
80 views

SQL Server Max memory limit

I have my SQL Server 2008 R2 installed running on 32GB ram. I need to decrease the limit SQL Server uses to 28 GB and I have set the same to 28GB but it is still taking more. I have seen posts saying ...
2
votes
1answer
19 views

How to copy non clustered indexes in transactional replication

I create transactional replication ,but forget to include non clustered indexes and now my subscriber have only clustered indexes (primary key) and I want to transfer all nonclustered indexes to ...
0
votes
0answers
11 views

Should setting up SQL Server transactional replication require schema locks on published articles?

I'm attempting to setup transactional replication in a production environment. When adding columns to an article (calling sp_articlecolumn stored procedure), it appears to want to lock the published ...
1
vote
0answers
17 views

Follow up to: SQL Server 2008 R2: Problems after computer name change

The Original question can be found here: SQL Server 2008 R2: Problems after computer name change I need to know if there is a way to modify the script found in the original question to allow for ...
0
votes
0answers
14 views

Transactions Log fails to shrink / release vfl [duplicate]

The past two nights, our nightly index job has caused our log drive to fill up. We complete log file backups every 15 minutes, and the log file still grew to 250GB. This is a SQL Server 2008R2 SP3 ...
1
vote
1answer
44 views

microsoft sql server schema [on hold]

From blog.sqlauthority.com: Protecting ISV database access: in custom ISV (Independent Software Vendor) applications, the database schemas are usually complex, and in the case of applications such ...
0
votes
1answer
13 views

How to FETCH from a cursor into a table variable?

I have a cursor defined as: DECLARE idCursor CURSOR FOR SELECT DISTINCT [id], [data] FROM #tempTable And I have a variable defined as: DECLARE @currentId TABLE ( ...
0
votes
0answers
29 views

SQL Server DR scenario

I have a SQL server A and B which is production databases. The DR of production 'A' is production db 'B' and DR of production db 'B' is production db 'A'. DR feature that is used is log shipping. All ...
3
votes
1answer
41 views

SQL Server 2008 R2 Mirroring issues

I have this very frustrating problem that I've been trying to figure out for almost a week now. I have two SQL Server 2008 R2 STD w/SP3 box running on Windows 2012 R2 with two instances each, Server1 ...
0
votes
0answers
10 views

Monitoring external Oracle db, creating changes locally to SQL Server

I have a local mirror database of an external database that our vendor provides us read access to. Occasionally they add columns and/or table to their database. The addition of columns used to play ...
5
votes
2answers
105 views

SQL Server compatibility with New TLS Standards

The major browsers are moving beyond SSL3.0 and TLS1.0 . The PCI Security Council has declared an end-of-life date for these protocols to be considered sufficiently strong encryption. We need to ...
1
vote
1answer
33 views

Why RECOMPILE doesn't fix parameter sniffing, but local variables does?

SQL Server 2008 R2 A developer was asking me about why his procedure wasn't running, but the query was ok. When I run the query, it was fast.But running the procedure, it was executing forever. ...
2
votes
3answers
67 views

How can I reduce the Initial Size of a LOG file?

I've inherited a SQL Server 2008r2 database; the Data file was created with an initial size of 1,000 mb, but the Transaction Log has an initial size of 28,016 mb. No backups were being performed. ...
0
votes
1answer
27 views

SQL Server 2008 Triggers and Merge Replication

I am trying to have a trigger fire when the Merge agent inserts or deletes data into / from a table. It is supposed to insert data into a report table for use with SSRS. I DO NOT have the "NOT FOR ...
-6
votes
2answers
52 views

bring the output into single column from a table as vertical order [closed]

Name Age Type City Tom 20 life null tim null motor UK john 55 null USA I need Output as Tom 20 life Tim motor UK John 55 USA
0
votes
0answers
60 views

optimizing paging in a stored procedure

I have the following SQL command which is built inside a stored procedure according to input parameters: SELECT DISTINCT * FROM ( SELECT DISTINCT TOP @displayLength * FROM ( ...
5
votes
2answers
108 views

How do I merge similar records with different validity dates?

The table I am working on has three components: An ID column (primary key in another table) Some data columns Date valid from/to columns. Values: ID Data From To 1 a ...
3
votes
2answers
33 views

Trace to find “error messages”( SQL Server 2008 R2 )

I'm using this config, trying to find error when a certain host executes a task ( it runs inside a software ): The user says that the software is running, but it's not updating what it needs to ...
2
votes
0answers
18 views

SQL Server 2008 Replication “between retries” or “worker thread no available”

All our existing servers are in SQL 2008 and I am in the process of upgrading to SQL 2014 and as well moving SAN to different SAN storage. As part of it I have to upgrade my distributor. We got ...
2
votes
1answer
30 views

Select columns dynamically from sql server table

Lets say I have a table that actually store record which looks like Create Table dbo.Info ( SN int primary key identity(1,1), FirstName nvarchar(50) not null, LastName nvarchar(50) not null, ...
1
vote
0answers
28 views

How to resolve Error 7311 returned by a job running against a linked server?

I have a job and a linked server. The job was working fine for a while, but recently I started getting this error message and I couldn't find a soloution for this. Executed as user: ... Cannot ...
2
votes
3answers
84 views

Restore a large number of transaction logs

I'm using SQL Server 2008 R2, and I need to restore 36 .trn logs to a database. I have restored the first 4 using the restore transaction log functionality in SSMS (right-click database > tasks > ...
1
vote
0answers
13 views

restore multiple .trn logs in SQL 2008 R2 [duplicate]

I am using SQL server 2008 R2 and need to restore 36 .trn logs to a database. I have restored the first 4 using the restore transaction log functionality in SSMS (right click database > tasks > ...
1
vote
1answer
20 views

Are there security vunerabilites/implications with SQL Mail, currently using SQL Server 2008 R2

I am an accidental DBA and responsible for series of data load jobs. I would like to use SQL Mail for altering me to job failures. SQL Mail is not currently turned on are there security concerns in ...
3
votes
2answers
59 views

For XML PATH error (SQL Server 2008 R2) [closed]

I have a big query (if necessary I will post it here) and I'm getting this error: Msg 6841, Level 16, State 1, Line 1 FOR XML could not serialize the data for node 'NoName' because it contains ...
0
votes
0answers
16 views

Passing DEFAULT value into new SqlParameter() [migrated]

How can i pass DEFAULT value into stored procedure in MVC4 .NET ? I have this code return Database.SqlQuery<Program>( "spGetProgram @p1,@p2,@p3,@p4", new ...
3
votes
0answers
36 views

SQL Job Step created via wizard does not correctly set server & database_name values

I've recently been tasked with migrating a database from SQL Server 2005 to 2008R2. This has all been accomplished without any issues, but one part of the system requires a Snapshot Replication to be ...
4
votes
1answer
40 views

How to increase performance in Cross Database operations?

We currently have a SQL Server 2008R2 being accessed by a legacy ASP application. Among different processes, one of them essentially SELECTs data from one database and INSERTs (or UPDATEs) them into ...
4
votes
1answer
41 views

SQL Server 2008 R2 : LDF file size not increasing

I am using SQL Server 2008 R2. I have a table statDB of 100 GB in primary filegroup. I have created a secondary filegroup in same database (Lab1) and created a table copyStatDB. Now I start copy ...
4
votes
4answers
423 views

SQL Server - Alter table vs drop and create

Our database is SQL Server 2008 R2. We have some tables that have some varchar(500) columns that I want to switch to datetime2 or bigint. I can guarantee all the data in the columns to be switched are ...
1
vote
1answer
59 views

Is it Possible that a variable name changes in a stored procedure after a restore?

I often restore my Testing database from Production db, but this time I noticed something odd: we have a stored procedure called (USP_AddTS), one of its variable names have slightly a different name ...
1
vote
0answers
13 views

Could not redo log record on mirror

One of my database mirrors is in the suspended state today and the error log on the mirror shows the following. Could not redo log record (338934:102862:477), for transaction ID (0:848150408), ...
0
votes
0answers
27 views

Shrink database or DB files not reducing size even after dropping biggest table

Our MDF file was originally 550GB in size (log is just 10MB), and the biggest table we had [HourlyCounters] was 140 million rows with 580 columns (varchar[50]). It's a table with a very inefficient ...
1
vote
1answer
17 views

Recovering credential data from a master DB backup

On a SQL 2008 R2 instance, a misconfigured credential used as a SSIS proxy for an SSA job was dropped before I could look at the system views to figure out when it was originally misconfigured. I ...
0
votes
0answers
13 views

How to connect SQL SERVER 2008 R2 as a server client architecture using vb.net 2010? [closed]

I want to store the database in a server machine and other clients machines will be access this machine via LAN. So, how to configure the SQL SERVER 2008 R2 in Server machine, and how to access it ...
1
vote
1answer
64 views

select query on Temp table is not returning data in correct order even after specifying index hint [duplicate]

In my code, I am creating a temp table using select * into #tempTable. Temp table contains the huge number of records and I need to retrieve data from it many times in my code so I created a ...
1
vote
1answer
47 views

Oracle 12c Client to 10g Server (OPENQUERY)

Scenario: We currently have a SQL 2008 R2 server (with Oracle 10g Client) using OPENQUERY to return data from an Oracle 10g database. Problem: We would like to upgrade to SQL Server 2014 SP1 (with ...
0
votes
2answers
25 views

SSMS fail to connect localhost SQL Server 2008 R2 suddenly [closed]

Until today when accessed by remote desktop to my sql server could connect using localhost, but suddenly I cant (without any update or change in my server), now I can connect using localhost\instance ...
1
vote
0answers
17 views

Transactional publication and database mirroring considerations

I've recently taken over a project, and with it comes 2 backends. 1st is the production services backend and the 2nd is a reporting service backend. Both of which are 2008r2 instances. The production ...
3
votes
1answer
101 views

Hiding a SQL Server vs Turning Off SQL Browser

Can anyone explain the difference between turning off the SQL Browser service and Hiding an instance through the SQL Server Configuration Manager? I've always assumed they do the same thing and have ...
3
votes
1answer
21 views

SQL Server 2008 R2 lack of space?

I have upgraded from SQL Server 2005 to SQL Server 2008 R2 because my database was 4G and needed extra space. I though SQL Server 2008 R2 has a limit of 10Gigs hence I would have 6 Gigs free, however ...
2
votes
1answer
38 views

Running SSRS and SSAS from different server than the primary database instance(SQL Server Engine)

Right now both SSRS, SSAS and SQL Server Engine are on the same server. We are using 2008R2 Enterprise. We are thinking to upgrade to SQL Server 2012 or 2014. and We want put on separate serve the ...
0
votes
0answers
29 views

Property error when linking SQL Servers

I'm running into an issue linking SQL servers. The servers I have are: Server A - SQL Server 2008 R2 Server B - SQL Server 2014 I can set B as a linked server on A with no problem, but setting up A ...
1
vote
1answer
62 views

SQL Server Log Shipping Randomly Stops Copying and Restoring

I'm fairly new to Log Shipping but have configured a few with no issues, however I have a server sitting on SQL 2008 R2 with 6 databases on there, all 6 of these are supposed to be log shipping. The ...