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
132
votes
6 answers

SQL Server Management Studio won't let me add an index to a table

When I right click on the indexes folder in the table the "New Index" menu item is grayed out. I don't understand why. I've deleted all data in the table just in case, and refreshed and restarted SSMS, but no luck. I'm using SQL Server 2012 Business…
118
votes
6 answers

Partition Function COUNT() OVER possible using DISTINCT

I'm trying to write the following in order to get a running total of distinct NumUsers, like so: NumUsers = COUNT(DISTINCT [UserAccountKey]) OVER (PARTITION BY [Mth]) Management studio doesn't seem too happy about this. The error disappears when I…
whytheq
  • 34,466
  • 65
  • 172
  • 267
67
votes
1 answer

LocalDB SQL Server 2014 Express creates 2 instances (localdb)\ProjectsV12 & (localdb)\MSSQLLocalDB?

I'm using SQL Server 2014 Express and the LocalDB option, and I have the following in my SQL Server object explorer pane in Visual Studio 2013... So what is the difference between (localdb)\ProjectsV12 & (localdb)\MSSQLLocalDB?
Ramy Yousef
  • 2,982
  • 2
  • 25
  • 24
64
votes
2 answers

Possible to restore a backup of SQL Server 2014 on SQL Server 2012?

I know that you can't (at least not easily) restore a SQL Server 2012 backup on SQL Server 2008. But how does it work for SQL Server 2014 to SQL Server 2012 ? On database level there is the property to adjust the compatibility mode to any other SQL…
RayofCommand
  • 4,054
  • 17
  • 56
  • 92
56
votes
5 answers

Does the Poor Mans T-SQL formatting add-in for Management Studio 2012 work in Management Studio 2014?

Does the Poor Mans T-SQL formatting add-in for Management Studio 2012 work in Management Studio 2014? In SSMS 2012, if I go to tools, it showed up in the list. In SSMS 2014, it doesn't. I tried to run the installer again, and it gave me options to…
Hoppe
  • 6,508
  • 17
  • 60
  • 114
47
votes
3 answers

Incorrect syntax near 'THROW'

IF @SQL IS NOT NULL BEGIN BEGIN TRY EXEC sp_executesql @SQL PRINT 'SUCCESS: ' + @SQL END TRY BEGIN CATCH SET @ErrorMessage = N'Error dropping constraint' + @CRLF + 'Table…
Metaphor
  • 6,157
  • 10
  • 54
  • 77
45
votes
3 answers

How do I create a local database inside of Microsoft SQL Server 2014?

Forgive me if this question was already asked before. I just installed Microsoft SQL Server Management Studio 2014. I want to create a database so I can start building some tables from scratch. All I am getting is the ability to connect to a…
user3123222
  • 1,185
  • 2
  • 10
  • 13
44
votes
3 answers

Using GROUP BY with FIRST_VALUE and LAST_VALUE

I'm working with some data that is currently stored in 1 minute intervals that looks like this: CREATE TABLE #MinuteData ( [Id] INT , [MinuteBar] DATETIME , [Open] NUMERIC(12, 6) , [High] NUMERIC(12, 6) , [Low]…
31
votes
3 answers

Could not find server 'server name' in sys.servers. SQL Server 2014

I recently upgraded our SQL Server from 2005 to 2014 (linked server) and I am noticing that one of the stored procedures which calls the exec command to execute a stored procedure on the upgraded linked server is failing with the error Could not…
nobody
  • 10,892
  • 8
  • 45
  • 63
31
votes
4 answers

Azure SQL Database vs. MS SQL Server on Dedicated Machine

I'm currently running an instance of MS SQL Server 2014 (12.1.4100.1) on a dedicated machine I rent for $270/month with the following specs: Intel Xeon E5-1660 processor (six physical 3.3ghz cores + hyperthreading + turbo->3.9ghz) 64 GB registered…
Daniel A. Burke
  • 544
  • 1
  • 5
  • 11
31
votes
3 answers

Why is running a query on SQL Azure so much slower?

I created a trial account on Azure, and I deployed my database from SmarterAsp. When I run a pivot query on SmarterAsp\MyDatabase, the results appeared in 2 seconds. However, running the same query on Azure\MyDatabase took 94 seconds. I use the…
Lucian Bumb
  • 2,821
  • 5
  • 26
  • 39
31
votes
3 answers

Publish DACPAC to SQL Server 2014 using SqlPackage.exe?

I've been successfully publishing DACPACs to SQL Server 2008-2012 instances using SqlPackage.exe, as installed by SQL Server Data Tools (and typically found in C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin). However, in attempting to…
Nick Jones
  • 4,395
  • 6
  • 33
  • 44
29
votes
5 answers

How to check active transactions in SQL Server 2014?

I am using SQL Server 2014 and want to know how to check my active transactions?
Jason Clark
  • 1,307
  • 6
  • 26
  • 51
27
votes
10 answers

SQL Server after update trigger

I have a problem with this trigger. I would like it to update the requested information only to the row in question (the one I just updated) and not the entire table. CREATE TRIGGER [dbo].[after_update] ON [dbo].[MYTABLE] AFTER UPDATE …
user3927897
  • 611
  • 3
  • 10
  • 20
27
votes
3 answers

Database project deploy fails in Visual Studio 2013

I have a database project in a solution which will not deploy from Visual Studio 2013. It fails with an error message "Unable to connect to target server". The same project, when opened in Visual Studio 2012 deploys without an issue. The database…
1
2 3
99 100