Questions tagged [sql-server-2014]

Use this tag for questions specific to the 2014 version of Microsoft's SQL Server database engine. SQL Server 2014 is the predecessor of the later SQL Server 2016.

SQL Server 2014 (codename Hekaton, version 12.00), released in April 2014, is the successor to SQL Server 2012 and the predecessor of the newer version of Microsoft's SQL Server database engine SQLServer 2016.

This tag covers questions specific to the 2014 version of the database engine. It is recommended that the tag is also used when tagging questions with this version specific tag.

Read more about SQL Server 2014 from MSDN.
Get SQL Server 2014 from here.

4735 questions
11
votes
2 answers

In-Memory user defined table, not in memory?

I am using SQL Server 2014 CTP2, with READ_COMMITTED_SNAPSHOT ON (I think it's important for the question). I have create an In-Memory table type (very similar to the example the technet blog, SQL Server 2014 In Memory OLTP: Memory-Optimized Table…
10
votes
4 answers

When installing SSAS, should you install the version that corresponds to the version of SQL Server installed, or go with the newest version of SSAS?

I am currently running SQL Server 2014 and need to install SSAS. Is it best to match the version of SSAS to the version of SQL Server installed or is it recommended that the newest version of SSAS be installed? I figure the SQL Server environment…
user7560542
  • 527
  • 1
  • 5
  • 14
10
votes
2 answers

How to make JSON from SQL query in MS SQL 2014

Question: What is best solution to generate JSON from a SQL query in MS SQL 2014? I created a procedure, but it is very slow. My Example: DECLARE @customers xml; DECLARE @json NVARCHAR(max); SET @customers = (SELECT * FROM dbo.Customers FOR XML…
Joachim Langezaal
  • 195
  • 1
  • 2
  • 13
10
votes
1 answer

How to use LIKE and NOT LIKE together in a SQL Server query

I have this a SQL Server table Users with a column codename with a lot of records, example: ... [LP]Luis JoseLuis [LP]Pedroso Luis PedroLuis [LP]Maria CarlosJose MariaJose [LP]Carlos Pedro ... I need to make a query for a search form that ignore…
Lewis Yuburi
  • 153
  • 1
  • 2
  • 11
10
votes
9 answers

How to get the next number in a sequence

I have a table like this: +----+-----------+------+-------+--+ | id | Part | Seq | Model | | +----+-----------+------+-------+--+ | 1 | Head | 0 | 3 | | | 2 | Neck | 1 | 3 | | | 3 | Shoulders | 2 | 29 | | |…
Luke101
  • 63,072
  • 85
  • 231
  • 359
10
votes
2 answers

Using OFFSET-FETCH, how to default number of rows to "all rows"?

Envision a stored procedure which takes @skip (offset) and @take (maximum number of rows to return. If @take is null, then I want to return "all rows after applying the offset". I can accomplish this by counting the number of rows in the table/view…
Josh M.
  • 26,437
  • 24
  • 119
  • 200
10
votes
2 answers

How to add header comments when altering stored procedures in SQL Server

I have a stored procedure where there are no header comments. I want to add them, but whenever I try, it is not included. In SQL Server Management Studio I : 1.Right-click my stored procedure and click modify USE [ABigDB] GO /****** Object: …
GIVE-ME-CHICKEN
  • 1,239
  • 3
  • 15
  • 29
10
votes
2 answers

SQL RESTORE WITH RECOVERY; Hangs at 100%

I have done a lot of research about this. I am attempting to recover a database with SQL Server 2014 and it keeps hanging at 100%. A lot of people suggest that the solution is to just make sure that you restore with the RECOVERY option. I have tried…
JTech
  • 3,420
  • 7
  • 44
  • 51
10
votes
1 answer

DECRYPTBYKEY slower on SQL Server 2014 than SQL Server 2012

We have been using symmetric keys for encryption/decryption on some SQL Server 2012 instances for a few years. We recently installed some new instances of SQL Server 2014 and came across some performance issues decrypting the data on SQL Server 2014…
10
votes
2 answers

Is it a best practice to drop the temp table after using it, in addition to before creating the temp table?

I have a stored proc that creates a temp table. It is only needed for the scope of this stored proc, and no where else. When I use temp tables list this, I always check to see if the temp table exists, and drop it if it does, before creating it in…
Hoppe
  • 6,508
  • 17
  • 60
  • 114
10
votes
1 answer

SQL Server 2014: SSISDB vs MSDB for package deployment

I'm currently in the process of upgrading from SQL Server 2008R2 to 2014 (both Enterprise). There are a plethora of SSIS jobs that are in production, and which will need to be migrated. I'm trying to get a handle on how I should manage SSIS jobs…
Skkra
  • 121
  • 1
  • 1
  • 5
10
votes
1 answer

SQLCmd with connection string

Can I Pass connection string via SQLcmd? I want to change application Name and failover partner (for mirroring) by connection string when use sqlcmd. Now. When I use sqlcmd, application name of my connection set SQLcmd in sys.sysprocesses result.
10
votes
1 answer

Distributed database transaction vs cross database transaction

What's the different between Distributed database transaction and cross database transaction in SQL Server. I know that Distribute database transaction is a transaction between multiple database and can use by following query : BEGIN DISTRIBUTED…
9
votes
2 answers

SQL Server : view MUCH slower than same query by itself

From this SO answer a view should provide the same performance as using the same query directly. Is querying over a view slower than executing SQL directly? I have a view where this is not true. This query targeting a view SELECT * FROM …
JensB
  • 6,663
  • 2
  • 55
  • 94
9
votes
1 answer

Entity Framework 'Update Model from Database' recreating associations between base and sub classes

I am trying to implement a number of base/sub classes using Entity Framework, database first. Following some online tutorials, I have decided to attempt TPT inheritance. On the database, I have a base class table 'Location', and two sub class…
Chronicide
  • 1,112
  • 1
  • 9
  • 32