sql-server-2014
Publish DACPAC to SQL Server 2014 using SqlPackage.exe?
Yes, there is a new version supporting SQL Server 2005-2016 available and it installs into a different location than the previous (SQL Server 2012 and lower) version. In fact, you’ll have different install locations depending on if you just use SSDT or if you install it as part of SSMS or the standalone installer. SSDT … Read more
How to check active transactions in SQL Server 2014?
Query with sys.sysprocesses SELECT * FROM sys.sysprocesses WHERE open_tran = 1 DBCC OPENTRAN : helps to identify active transactions that may be preventing log truncation. DBCC OPENTRAN displays information about the oldest active transaction and the oldest distributed and nondistributed replicated transactions, if any, within the transaction log of the specified database. Results are displayed … Read more
Could not find server ‘server name’ in sys.servers. SQL Server 2014
At first check out that your linked server is in the list by this query select name from sys.servers If it not exists then try to add to the linked server EXEC sp_addlinkedserver @server=”SERVER_NAME” –or may be server ip address After that login to that linked server by EXEC sp_addlinkedsrvlogin ‘SERVER_NAME’ ,’false’ ,NULL ,’USER_NAME’ ,’PASSWORD’ … Read more
Using GROUP BY with FIRST_VALUE and LAST_VALUE
SELECT MIN(MinuteBar) AS MinuteBar5, Opening, MAX(High) AS High, MIN(Low) AS Low, Closing, Interval FROM ( SELECT FIRST_VALUE([Open]) OVER (PARTITION BY DATEDIFF(MINUTE, ‘2015-01-01 00:00:00’, MinuteBar) / 5 ORDER BY MinuteBar) AS Opening, FIRST_VALUE([Close]) OVER (PARTITION BY DATEDIFF(MINUTE, ‘2015-01-01 00:00:00’, MinuteBar) / 5 ORDER BY MinuteBar DESC) AS Closing, DATEDIFF(MINUTE, ‘2015-01-01 00:00:00’, MinuteBar) / 5 AS Interval, … Read more
How do I create a local database inside of Microsoft SQL Server 2014?
As per comments, First you need to install an instance of SQL Server if you don’t already have one – https://msdn.microsoft.com/en-us/library/ms143219.aspx Once this is installed you must connect to this instance (server) and then you can create a database here – https://msdn.microsoft.com/en-US/library/ms186312.aspx
Incorrect syntax near ‘THROW’
From MSDN: The statement before the THROW statement must be followed by the semicolon (;) statement terminator.
Does the Poor Mans T-SQL formatting add-in for Management Studio 2012 work in Management Studio 2014?
Create the folder %SystemDrive%\ProgramData\Microsoft\SQL Server Management Studio\12.0\Addins\ if it does not exist. Then just copy the file from: %SystemDrive%\ProgramData\Microsoft\SQL Server Management Studio\11.0\Addins\PoorMansTSqlFormatterSSMSAddIn.AddIn to %SystemDrive%\ProgramData\Microsoft\SQL Server Management Studio\12.0\Addins\PoorMansTSqlFormatterSSMSAddIn.AddIn
Possible to restore a backup of SQL Server 2014 on SQL Server 2012?
You CANNOT do this – you cannot attach/detach or backup/restore a database from a newer version of SQL Server down to an older version – the internal file structures are just too different to support backwards compatibility. This is still true in SQL Server 2014 – you cannot restore a 2014 backup on anything other … Read more