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

learn more… | top users | synonyms (2)

3
votes
1answer
171 views

Gigantic gaps in IDENTITY column

This question is about strange behavior in SQL Server 2008 R2 SP3 Standard Edition x64. I have read many questions about IDENTITY increments in SQL Server and strange gaps between them. But basically ...
2
votes
0answers
12 views

How to wait for MSSQL replication reinitialization via TSQL

We use snapshot and push replication. Every night after the data import 2 replication targets are initialized with the following commands. USE [dbImport] -- Execute at the Publisher to reinitialize ...
1
vote
0answers
32 views

How can I replace the below logic for my Stored Procedure? [on hold]

I have a table named TagSchema that stores information flattened from XML. The data in this table is stored per item. I have to get the data from this table and process it per item. I wrote a job ...
1
vote
0answers
28 views

SQL server on VMWare restart loses five days of data

I am just now in the midst of a strange issue. A client moved their SQL database server from Hyper-V to VMWare on Saturday. Yesterday they called me complaining about performance. In the brief time ...
0
votes
1answer
36 views

Error converting data type nvarchar to float. Oracle Linked Server

Upon executing the following query select value, cast(value as float) float_value from OPENQUERY([ORACLESERVER], 'select 3/5 as value from table') I am getting the following error: Msg 8114, ...
1
vote
1answer
39 views

Query to remove duplicate calculated values

I have a client running SQL Server 2008 R2 SP1, and I can't seem to write a query that has distinct calculated values. I could change the schema to store the value being calculated, but I was curious ...
1
vote
1answer
40 views

Defragmenting Indexes Bloats Log Files

I'm having difficulty "defragging" indexes as a minimally logged operation. Before defragmentation, the database recovery model is switched from FULL to BULK LOGGED. Depending on the fragmentation ...
2
votes
1answer
90 views

how to get the information about sleeping processes that are causing blocking?

I have a procedure that allows me to see what is currently running in my sql server. This procedure does not use sys.sysprocess because it has been deprecated. However, I am struggling to find ...
2
votes
2answers
73 views

Maintaining SQL Server 2008 R2 on Windows 10

I have to run SQL Server 2008 R2 on Windows 10 but it is not supported and so I am not getting any updates. Installing a later version of SQL Server is not an option. I can find all the service packs ...
1
vote
3answers
34 views

Show data and disk use breakdown by table

I have a SQL Server 2008 R2 database being used by several deployed programs. Question: Is there an easy way to display how much space each table consumes, for all of the tables in the database, and ...
2
votes
0answers
58 views

SQL Server 2008 R2 - Two Files Stuck In Restoring Status

Background: SQL Server 2008 R2 mirrored and clustered. We recently failed over the databases via mirror and everything went smoothly. When it was time to do a differential backup, I got an error so I ...
3
votes
0answers
44 views

Page Life Expectancy Wildly Fluctuating

For months now, the PLE on one of our servers has hovered around the 2 million seconds. If varied slightly from day to day but was pretty stable there. This last weekend, we added 12 GB of virtual ...
-4
votes
0answers
16 views

what is the difference between Data Migration and Data Archiving [migrated]

what the difference between Data Migration and Data Archiving.o we have a sharepoint application for document archiving and its database size is nearly 1 TB.So i have plan to reduce the size of ...
-3
votes
0answers
35 views

get all left and all right [on hold]

declare @runTimeId int =4 create table #Temp ( cid int, Placement char (1), TotalLeft int, TotalRight int ) insert into #Temp (cid) values (@runTimeId) declare @insertCount as tinyint set ...
2
votes
0answers
23 views

Mirroring won't fail back

Got an interesting mirroring issue. I am using SQL Server 2008 R2. Server A mirrors 8 databases to Server B ideally. Right now the 8 databases are principal on Server B (otherwise healthy). When I ...
0
votes
0answers
9 views

SQL Server 2008 R2 FREETEXTTABLE with FORMSOF(inflectional, string)

Can anyone confirm that using FORMSOF(inflectional, ...) is redundant when querying FREETEXTTABLE in SQL Server 2008 R2? Using FreeTextTable without formsof... gives me the same result list but with ...
0
votes
0answers
13 views

transfer from one DW to another DW [closed]

I have a task as i'm migrating from 1 server to another i.e from NAV 2009 to 2013. in current DW i need to copy it to a new DW, and from there to cube. where in the new DW contains old+new data. ...
8
votes
3answers
155 views

zero-or-one to zero-or-one

How do I model zero-or-one to zero-or-one relationship in Sql Server the most natural way? There is a 'Hazard' table that lists hazards on a site. There is a 'Task' table for work that needs to be ...
1
vote
1answer
32 views

How to audit all DML operations on a SQL Server 2008 R2 database

In order to assess options of implementing indexed views, I want to check the usage of DML operations of the tables. The database is new to me as well as the relevant business knowledge, so I just ...
6
votes
1answer
252 views

Cannot execute as the database principal because the principal “dbo” does not exist [duplicate]

I restored a backup of a database from SQL Server 2008 R2 to SQL Server 2012. When I try to access a particular page of my application, I get this error: Cannot execute as the database principal ...
5
votes
1answer
74 views

Detect if two time periods overlap

I have an HR system and I need to detect if a new leave (time off) request conflicts with an existing one. I have written code to do this based on the entire day; I now need to do the comparison based ...
0
votes
1answer
29 views

How to send an email with embedded values

I need to do a stored procedure that sends an email when a value reaches 100 with this wording in the body: "100 daily file downloaded from the user:USERID" where USERID is the user that reached 100. ...
2
votes
1answer
38 views

Replace/upgrade mirrored server hardware

We are deploying new VMs for a mirrored database that is in high safety mode with automatic failover and also going from SQL Server 2008 to SQL Server 2008R2. Most of the documentation I've come ...
2
votes
1answer
19 views

Unable to change Agent Operators

I am trying to change a SQL Agent Operator in my system and it will not let me. I have sa but I think it's partially due to how I'm doing it. I'm trying to modify the operator with the name NIT and ...
6
votes
1answer
552 views

Dropping a large table

On our production db there is a table 180 GB, around 2 millions records, I want to re-create it as a new empty table in a new filegroup and delete the existing table. What is the best practice to ...
2
votes
1answer
114 views

why this session in particular is suspended? Please see the details

My understanding regarding the suspended status of a session: A query gets suspended when it is requesting access to a resource that is currently not available. This can be a logical resource ...
0
votes
0answers
31 views

Application Taking More Time(Hang)

We are facing issues in our application and database. Our application has an asp.net 3.5 front end and a SQL Server 2008 R2 back end. Based on project requirement, we are doing fields setting for ...
6
votes
1answer
73 views

Size of individual transactions in log file

is there a way to find out the size of transactions from the transaction log by looking at the log file in SQL Server 2008? I do have an unexpected bloat of my logfile from some maintenance jobs which ...
2
votes
0answers
74 views

Why does SQL Server Management Studio crash?

When I open SSMS I get this message: SSMS - SQL Server Management Studio has encountered a problem and needs to close. We are sorry for the inconvenience What can I do? The issue persists ...
5
votes
3answers
162 views

Virtualize SQL High CPU

This is a client environment which needs significant overhaul so all I am trying to do is slow the bleeding. Situation CPU is getting crushed, often 80% or higher utilization VMWARE 5.5, Windows ...
2
votes
1answer
46 views

Does a database backup include all files? [closed]

If I have two files in my database (mdf & ndf), when I do a backup of the database with the statement: backup database mydb; are both the two files are backed up?
0
votes
1answer
20 views

Is there a query to see if all of my logins and password are moved during migration from SQL Server 2005 to 2008R2

I am trying to migrate my database from SQL Server 2005 to 2008 R2 test, I did follow back up and restore method to migrate the database, and I ran the QUERY provided by Microsoft to transfer logins ...
1
vote
2answers
47 views

Turning a multiple row resultset into columns with multiple rows [duplicate]

I currently have a resultset that looks like this: Title Value Start Time              1998-01-04 01:38:00.000 End Time                1998-01-04 01:43:00.000 Product Name         ...
3
votes
2answers
247 views

How does SQL Server perfom lock when using CROSS APPLY?

The best way I think I can ask my question is by starting with an example. Imagine these two queries : SELECT CAR.SerialNumber, TIRE.SerialNumber FROM dbo.tCar AS CAR INNER JOIN dbo.tTire AS TIRE ON ...
3
votes
0answers
18 views

Cluster node upgrade of SQL Server 2008r2 to SP3 Fails when moving resource

I'm trying to update a cluster to SQL Server 2008 R2 SP3. I've installed SP3 on the passive node but when I fail over the cluster it errors when running through it's upgrade scripts. The messages ...
9
votes
4answers
143 views

Is it poor practice to aggregate data from different tables into one?

Background I write a lot of large reports for and generally maintain a large health records DB (write SPs, functions, jobs, etc.). The original schema, and software that uses it, is from a different ...
7
votes
1answer
92 views

Clustered Index Help, where did i go wrong?

I was asked to review a very busy table and identify any areas of improvement. I have very limited power to change the table just the indexes. Table information 240 columns ~5 million rows Read ...
3
votes
2answers
154 views

Latin1_General_BIN performance impact when changing the database default collation

I have set the database collation to Latin1_General_BIN, to make string comparisons case-sensitive. Will this have an impact on performance? Will it have any impact on DML or DDL operations in the ...
2
votes
1answer
59 views

Can't upgrade a SQL Express to SQL Standard

I have a 64 bit SQL Server 2008 Express R2 installed and I cannot upgrade it to a fully licensed 2014 Standard. When I try to update to SP 4, I get this issue: If I try to run the upgrade edition, ...
3
votes
2answers
303 views

Database Schema for Blank Database is large. 20MB

Is it normal for blank databases with just schema to be large? Or is there a way that I can reduce the size of the initial database?
3
votes
1answer
82 views

Is it possible to validate more than one parameter simultaneously into a Stored Procedure in sql?

On Microsoft SQL Server 2008 I realized a stored procedure which contains more than 20 parameters, in this SP I update or insert data into table which does not accept null values. I need to evaluate ...
13
votes
2answers
229 views

How are these two SQL Server rollbacks different?

In SQL Server 2008 R2, how are these two rollbacks different: Run an ALTER statement, for a few minutes, and then hit 'Cancel Executing'. It takes a few minutes to rollback completely. Run the same ...
-5
votes
1answer
66 views

Split after comma into separate row [duplicate]

id name books 1 dan history,physics,english 2 ron chem,social,biology 3 mon it,ece,eee I need an output as id name books 1 dan history 1 dan physics 1 dan english 2 ron chem 2 ron ...
2
votes
3answers
51 views

SQL Server restore database with active connections [duplicate]

I am trying to run this SQL script on a SQL Server instance to restore a test database to a newer copy of the live database. RESTORE FILELISTONLY FROM disk = ...
0
votes
1answer
54 views

Granting access to the Job Activity Monitor

I'm trying to grant access to the Job Activity Monitor. On my model office server I can create a new login and add it to the SQLAgentReaderRole role in msdb, and the id has access to the monitor. ...
1
vote
0answers
27 views

Why do Statistic recommendations disappear from DB Tuning Advisor after implementing recommended indexes?

Why is it, when analyzing a query through Database Engine Tuning Advisor, statistic recommendations disappear after some or all of the suggested indexes are implemented? For example, Query X suggests ...
1
vote
4answers
154 views

WHERE NAME LIKE ( A SET OF NAMES )

I would like to drop all the jobs related to a set of specific databases. So I have added all the names into a table variable and I was trying to generate the scripts to drop the jobs. how can I ...
1
vote
1answer
287 views

How to resolve “the specified account already exists” error during SQL Server 2008 R2 installation

I recently had a problem while installing Visual Studio 2012 and SQL Server 2008 R2 on a new development machine. My installation sequence was Visual Studio 2012 then install SQL Server 2008 R2. An ...
1
vote
1answer
40 views

Report Server ( [162] Internal request to deactivate schedule ) error ( SQL Server 2008 R2 )

This is the error: [162] Internal request (from SetJobNextRunDate [reason: schedule will not run again]) to deactivate schedule N The Image: Has anyone seen this? I have no idea what is ...
3
votes
1answer
62 views

Why is SAN Replication is Causing Random Database Corruption?

Having a strange issue with a disaster recovery technology we're trying to implement. The environment in both datacenters is the same having VMWare and Dell Equallogic SANs, which are the same ...