This tag is for SQL Server 2012, major build version 11.00.xxxx.

learn more… | top users | synonyms (2)

0
votes
0answers
13 views

Debugging value of varchar set to empty string crashes SSMS?

DECLARE @test varchar(1) = ''; SELECT @test When debugging, hovering over @test displays a little {...} token, and clicking the magnifying glass to open the text visualizer causes an application ...
1
vote
1answer
33 views

Can you optimize a view with many UNION ALLs to external databases?

Given these views in a Sql Server 2012 database: create view vManyUnions as select 1 as p, a from vSubQuery_1 union all select 2 as p, a from vSubQuery_2 union all select 3 as p, ...
-3
votes
2answers
46 views

optimisation for 4million + records [on hold]

I have a table full of addresses in one state. ID, address, state_id,region_id, suburb_friendly_url,street_name_friendly_url I have indexes on all of these fields. A cluster index on address. Doing ...
0
votes
2answers
50 views

Any way to track who has been executing what queries? who has been on my lawn?

I have a database in which most of tables are readable for users in one particular security group. I know most of the users are from my team, but lately I found that it's been used by more and more ...
3
votes
2answers
156 views

sql querying for a pattern

I was hoping someone could steer me in the right direction with this one. I have a table that has student grades. Create Table StudentGrades ( StudentID references Student(StudentID) int not null, ...
2
votes
1answer
26 views

SQL AlwaysOn Availability 2 synchronous nodes on either side of an asynchronous link

Say we have two datacentres, DC-A and DC-B. Say in each DC, there are two SQL servers. DC-A has SQL-A1 and SQL-A2 and DC-B has SQL-B1 and SQL-B2. Is it possible to have SQL with an AlwaysOn ...
0
votes
0answers
23 views

Heap having high fragmentation

Does high fragmentation on Heap impact query performance? Can I rebuild the heap with ALTER TABLE Rebuild to get rid off the fragmentation?
0
votes
1answer
16 views

Change Data Capture in a services environment

Change Data Capture looks to be exactly what I need... Except. All of my database actions come from users that system accounts. We have WCF service that is called by an application. The WCF Service ...
1
vote
0answers
21 views

Include LOCK_ESCALATION in CREATE Script in SQL Server 2012

Consider following T-SQL script: USE [DB1]; GO CREATE TABLE [T1] ( [C1] INT NOT NULL, [C2] TEXT NOT NULL ); GO ALTER TABLE [T1] SET (LOCK_ESCALATION = AUTO); GO When I explicitly set ...
2
votes
1answer
25 views

How to group list of start times by a category?

I have a list people and when they started occupied various rooms in the building. Like so: IF OBJECT_ID('tempdb..#RoomAssignments') IS NOT NULL DROP TABLE #RoomAssignments; CREATE TABLE ...
1
vote
1answer
27 views

SQL Server execution plan using a view, but no view is inside the stored procedure

I am troubleshooting this slow stored procedure and when checking the actual execution plan I noticed a warning of a possible missing index. Taking a closer look, it's against one of the views, not an ...
2
votes
2answers
54 views

Upgrading a database from SQL Server 2005 to 2012 uncovered a syntax error

I recently upgraded from SQL Server 2005 to 2012. During validation however, a bug was discovered. A certain trigger was coded as follows: CREATE TRIGGER [dbo].[trigger] on [dbo].[foo] FOR UPDATE, ...
1
vote
1answer
15 views

Registered Server window does not show Database Engine or Local Server Groups

I am running SQL Server Management Studio 2012 on a Windows 7 machine. After a failed attempt to import my registred servers from SSMS 2008, the icons for Database Engine and Local Server Groups are ...
0
votes
1answer
31 views

How can I decide Rebuilding Index with DETAILED or SAMPLED on SQL Server

I want to rebuild my indexes and statistics on DB. How can I select this option on production maintenance. SQL Server Version : Microsoft SQL Server 2012 - 11.0.2100.60 (X64) (Build 7601: Service ...
0
votes
1answer
34 views

on every row on SELECT Query must lookup to other table

I'm working on Login/Logout System and I'm facing this problem regarding on SELECT Query. I have 2 tables namely dtr_tbl and shift_tbl. In dtr_tbl are the logs of the user(login/logout time details) ...
1
vote
2answers
24 views

SQLOS Resource Monitor and QueryMemoryResourceNotification Win API

Here's some info about SQLOS and the Resource Monitor I found from Jonathan Kehayias: As a general rule, SQL Server will use as much memory as you can give it, and it will not release the memory ...
3
votes
2answers
227 views

RAID10 vs. RAID5 for data files

We are trying to evaluate the potential performance improvements that could be gained by switching an existing applications .mdf files to a RAID10 LUN vs. the existing RAID5 LUN they are living on ...
1
vote
1answer
21 views

Distrubution1 Database Offline - I have no clue what this is

I have a SQL Server 2012 installation with a hosting provider that is an active/passive high-availability setup. (Exact version 11.0.5058) We recently migrated to this server from a 2008 install in a ...
2
votes
1answer
24 views

Implications of setting READ_Write

I am looking to update several users on READ_ONLY databases. As the databases are used 24/7 globally, and maintenance windows have just past, I would like to do this during a low-activity moment (to ...
0
votes
0answers
22 views

Can I change “Category_Id” & “Current_execution_status” value in SQL Server 2012 through stored procedure?

I have created one job in SQL Server 2012 through SQL Server agent, and that job is not running due to some security privileges. When I am seeing through below SQL query to that my created job ...
1
vote
0answers
48 views

sys.dm_os_volume_stats problem

Today I have been having quite an interesting issue, which I can't seem to fix. I am getting drive information for a Failover Cluster Instance SQL Server 2012. These drives are Volume Mount Points. ...
2
votes
1answer
14 views

Domain User lockout after SQL Cluster Failover

We have this one user who uses SSMS to connect to a 3 node 2 instance fail over cluster. He also uses SSIS, Excel, SharePoint, SSAS etc.. to connect to this database instance I'll call TEST. There are ...
2
votes
0answers
40 views

Performance differs on same query against two (almost) identical tables?

I'm running these two queries in SQL Server 2012: SELECT tpua.Field1, CAST(round(twg.Field2 * 2, 0) / 2 As Decimal(8,1)) As Field2, CAST((round((twg.Field3/10.0) * 2, 0) / 2) * 10 As int) As ...
0
votes
1answer
45 views

MS SQL Server 2012 enlarge database space

I tried to enlarge a database size of database instance on my MSSQL server 2012 . I manually added a new MDF file under database instance After restart on shrink database dialog I can see ...
1
vote
0answers
15 views

How to check particular SQL UserID windows permissions in MS SQL SERVER 2012?

I would like to say as per my network system administrative security of windows Server 2012 R2. I am unable to start SQL Server agent. As per in MS SQL Server 2012 , i have "sysadmin" & "public" ...
1
vote
1answer
21 views

What to do when Sql Server Agent refuses to run a Job Step that references a missing database snapshot

I have a SQL Server Agent Job creating a snapshot of my main database every minute: -- delete snapshot if it exists if exists (select * from sys.databases where name = 'mydb_snapshot' ) begin ...
0
votes
0answers
10 views

Control locking behavior for Snapshot Replication

I want to have snapshot replication of several databases into single one for reporting purposes. I choose replication because i need to publish just certain columns. I don't need transnational ...
0
votes
2answers
26 views

High Availability using SQL Server 2012 requires how many licenses [closed]

For on premise solution, is it possible to implement high availability for SQL Server 2012 using a single license, or, one needs to buy extra licenses? Also, for high availability with SQL Server, ...
0
votes
0answers
9 views

Join two tables and count a column using mdx

I am trying to join the two tables as below Table1 --------------------------- Product| StoreType| Store --------------------------- 1 | 10 | X ...
2
votes
0answers
65 views

Index Optimization Error in SQL Server 2012

I have an Index optimization job set on the database SWHSJ having two data files with unrestricted growth in the J drive with 174GB free, as you can see below: ...
0
votes
1answer
13 views

Maintaining permissions on a replicated view after reinitialization

When we were on SQL Server 2005, there was some way that I was able to keep custom permissions on a view at the subscriber. Now that I'm on SQL Server 2012, there doesn't seem to be a way to do ...
2
votes
1answer
54 views

Add linked server from SQL Server 11.0.5058 to SQL Server 10.50.4000 [closed]

I tried to add a linked server running on SQL Server 2008 R2 (10.50.4000) from SQL Server 2012 (11.0.5058). I keep getting this error: The linked server has been created but failed a connection ...
0
votes
0answers
42 views

Purging Data that has Foreign Keys

I have a transaction database that we recently went live with. The number of rows in the tables are starting to climb into the millions. So I am looking at how to purge the older data. I have written ...
-3
votes
0answers
26 views

Preventing historical data changes in MDS

We are prototyping MDS/DQS as a master data solution. We have a business requirement to prevent historical master data from being updated, i.e. in master data sets with effective dates, we are not ...
0
votes
0answers
11 views

How to accomplish SQL Server 2012+2014 high availability [duplicate]

(Copied from here) Maybe I'm searching for the wrong thing, but I can't see how I can do this. I have two servers: Server A (has SQL Server 2012 installed) Server B (has SQL Server 2014 ...
0
votes
0answers
29 views

Backup File Size Almost 50% of Database File Size with TDE Enabled

I'm really hoping someone can help shed some light on this for me. I receive a full backup of a very large database once per week from a vendor. It contains transactional data which we then load into ...
0
votes
1answer
24 views

How to accomplish SQL Server 2012+2014 high availability

Maybe I'm searching for the wrong thing, but I can't see how I can do this. I have two servers: Server A (has SQL Server 2012 installed) Server B (has SQL Server 2014 installed) Server A provides ...
0
votes
0answers
40 views

SQL Server performance is slow when migrated from SQL Server 2012 to SQL Server 2014

We are trying to migrate from SQL Server 2012 to SQL Server 2014 on Windows 2012 R2 OS. After the upgrade, we are doing performance testing and observed huge difference in running a simple query from ...
1
vote
0answers
38 views

High performance SQL Server - Poweredge R730xd [closed]

Last year I wanted to move our critical SQL Server solution from Virtual to physical. I liked the Poweredge R720 with it's 2 RAID controllers and favoured filling it with 2.5" Samsung EVO SSDs - not ...
1
vote
1answer
88 views

SQL Query return a column per hour / day / week / month betwen 2 dates

What I am trying to achieve (Table View) Part No 01/02/15 02/02/15 03/02/15 04/02/15 05/02/15 06/02/15 PU1234 24 25 15 22 27 21 PU5678 25 ...
3
votes
0answers
46 views

Take action from extended event?

I've seen it mentioned a few times that you can configure an event session to take an action when an event fires. Does anyone have any information on how to do this? I know that you can use the ...
0
votes
1answer
18 views

DateDiff Returning Dates and Not Integer Values

I've added a [DAYS_FROM_TODAY] column to my table to calculate the number of days between today's date and the date a check was written for each record in that table. I used the following code to ...
1
vote
1answer
54 views

SQL Server : Job not reconnecting to restarted Linked Server

The problem To keep two tables across two servers in sync, we have a trigger that adds a change to a MergeTable. Every so often, a merging job runs on SQL Server to push the changes to the Progress ...
0
votes
1answer
43 views

Continuous replication between Oracle Database and Microsoft Azure SQL [closed]

Background info: Our core ERP has it's data on Oracle. Our own applications are Microsoft SQL based. Almost every application reads data from this Oracle database and usually there is some sort of ...
1
vote
0answers
71 views

SQL Server 2012 merge replication blocks other insert/updates during sync

I have a merge replication setup between two SQL Server 2012 databases via Pull method. There are several merge replications affecting different table sets (3 sets 2-5 tables each, actually). There ...
1
vote
2answers
113 views

Computed Column Bit based on other Bit Columns

What would be the formula to compute a bit column from other bit columns? For example: CREATE TABLE #Employee ( [empNumb] [INT] identity(1,1) PRIMARY KEY, [IsOk] [BIT] NOT NULL, -- ...
2
votes
0answers
41 views

SQLNCLI10.x vs 11.x when connecting SSIS 2008R2 to a SQL Server 2012 database

Starting from the question and working backwards. My question: is it OK to use SQLNCLI10.1 as a provider for SSIS 2008 R2 to connect to SQL Server 2012 database(s)? I have a SSIS box running SQL ...
0
votes
0answers
29 views

Fastest way to compare polygon geometry types

We have two tables which has polygon geometry stored in them. I would like to fetch the polygons present in one table and not present in another table.. As of now I am doing a left outer join and ...
0
votes
1answer
51 views

SQL Licensing on Azure, Standard D4 Windows 2012 Server 8 core, is it 1 phsysical core?

I am trying to calculate my costs for Microsoft Azure. Imagine I take a Standart D4 Type machine running Windows 2012 and would like to install my own SQL Server 2012. Are these 8 cores 1 quad core ...
0
votes
1answer
37 views

Converting date string to SQL DATETIME - hopefully without a udf

I am taking an Excel file that has dates in different formats but one of these formats is giving me some grief when I try converting it or casting it to a SQL DATETIME. For example: Thu Oct 16 ...