Questions tagged [sql-server-2016]

Use this tag for questions specific to the 2016 version of Microsoft's SQL Server.

Microsoft SQL Server 2016 v.13.0.1601.5 Ready To Manufacture (RTM), was released on June 1, 2016.

There are many editions of SQL Server 2016:

1- Entreprise Edition : Comprehensive, mission-critical in-memory performance with unparalleled security, mission critical high availability, an end-to-end enterprise business intelligence solution with mobile BI built in, in-database advanced analytics at scale, and unlimited virtualization with software assurance. Enterprise edition provides the highest scale and performance for Tier-1 workloads.

2- Standard: Find rich programming capabilities, security innovations, and fast performance for applications and data marts. Easily upgra

3- Developer: Build, test, and demonstrate applications in a non-production environment with this free, full-featured set of SQL Server 2016 SP1 Enterprise edition software.

4- Express: Deploy small databases in production environments with this free, entry-level database that’s ideal for building small, data-driven applications up to 10 GB of disk size.

5- Compact: Free, embedded database app for building ASP.NET websites and Windows desktop applications.

6- Web: Secured, cost effective, and highly scalable data platform for public web sites—available to third-party hosting service providers only.

References

3794 questions
6
votes
1 answer

How to check are there JSON Functions by SQL query?

There are JSON Function in SQL 2016 like JSON_VALUE, JSON_QUERY and other. I would like to use it in my queries, but I still have old servers with SQL 2014, for example, that are not allowed to use the new functionality. Can I check are there…
hcp
  • 3,268
  • 6
  • 26
  • 41
6
votes
2 answers

SQL Server 2016: Hide column data from DBAs but specific users can view data through application

I'm trying to enable access to team leaders of salary information through PowerBI, but encrypt this data from other users and the DBAs. Users denied access to this column data should still be able to execute the query but only see encrypted…
6
votes
2 answers

Database and server triggers on DDL statements CREATE, ALTER and DROP are not supported with memory optimized tables

I am getting this error when i try to drop a memory optimized table. i am using a sql server 2016 sp1 Database and server triggers on DDL statements CREATE, ALTER and DROP are not supported with memory optimized tables. I have dropped the sec…
6
votes
1 answer

How can I create named-instance of Microsoft SQL Server on Ubuntu

I used the official tutorial to create a default instance https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-ubuntu but now I want to create a named-instance and can't find how to do that
6
votes
1 answer

if statement in SQL computed Column Specification

I'm trying to built in if statement in computed column What I'm trying to accomplish should look like this but this is more pseudo code: SalePrice-Cost-(if(isConsigned=1 Then Payout else 0)) How do I this and can I use if statement inside computed…
TheAccountant
  • 71
  • 1
  • 1
  • 3
6
votes
4 answers

Deploying SSIS Package - 'Failed to load Assembly Microsoft.SqlServer.Management.IntegrationServicesEnum'

I have a fresh install of SQL Server 2016 Developer with SSIS, on a clean install of Windows 10 When I try to deploy an SSIS package (developed on the same machine), when I come to select the destination server, I instantly get an error; Failed to…
aldredd
  • 236
  • 1
  • 2
  • 7
6
votes
3 answers

Query fast, but when in a VIEW, it's slow - due to ROW_NUMBER

I have a query that when run, it's result is instant. However, I paste the exact same query into VIEW, and the results take 6 seconds to reply. For example, SELECT ... FROM MyTables WHERE PersonID = x runs fast. But create a view with: SELECT ...…
Craig
  • 18,074
  • 38
  • 147
  • 248
6
votes
2 answers

Computed Columns In Temporal Tables

I am looking at creating temporal tables https://msdn.microsoft.com/en-us/library/mt604462.aspx in our database but I cant on a couple of tables that have computed columns. The error message returned is rather self explanatory "Computed column is…
Macilquham
  • 282
  • 1
  • 10
6
votes
5 answers

LAG functions and NULLS

How can I tell the LAG function to get the last "not null" value? For example, see my table bellow where I have a few NULL values on column B and C. I'd like to fill the nulls with the last non-null value. I tried to do that by using the LAG…
Diego
  • 34,802
  • 21
  • 91
  • 134
6
votes
2 answers

Keep column names from a data.frame in an output table in sql-server-2016

I have a table in sql-server-2016: CREATE TABLE #tempData (A int not null) INSERT INTO #tempData VALUES (0); GO Now I can call my R-script having the table as the input data (incl. column names): EXECUTE sp_execute_external_script …
J.R.
  • 3,838
  • 1
  • 21
  • 25
5
votes
2 answers

Either the parameter @objname is ambiguous or the claimed @objtype (INDEX) is wrong

With SQL Server 2016 when I run this: SELECT * FROM sys.indexes WHERE name = 'idx_Parts_PartNum' There is one result. As expected. But when on the same DB I run: exec sp_rename N'idx_Parts_PartNum', N'ux_Parts_PartNum', N'INDEX' I get this…
Developer Webs
  • 983
  • 9
  • 29
5
votes
2 answers

#Errors in SSMS built-in reports

From my local computer I am using SQL Server 2016 Management Studio client (SSMS) to connect to a SQL Server installed on a remote computer. I connect using Windows Authentication method. My SQL Server Management Studio 2016 installed in my local…
Willy
  • 9,848
  • 22
  • 141
  • 284
5
votes
4 answers

How to implement constraint based referential integrity on a simple 3 way relation

I have three simple relations. TableB and TableC both reference TableA, and TableC also references TableB. I'm finding it impossible to model this in SQL Server in a way that enforces referential integrity via constraints, but which also permits…
Neutrino
  • 8,496
  • 4
  • 57
  • 83
5
votes
1 answer

How do you change the DURABILITY option on an existing memory-optimized table in SQL Server 2016?

I want to change the DURABILITY of a memory-optimized table in SQL Server 2016 from SCHEMA_AND_DATA to SCHEMA_ONLY. The Microsoft documentation suggests that the following ALTER TABLE statement should work: ALTER TABLE mem_opt_table DURABILITY =…
Rob Streeting
  • 1,675
  • 3
  • 16
  • 27
5
votes
2 answers

Why would all tables not be temporal tables by default?

I'm creating a new database and plan to use temporal tables to log all changes. The data stored will be updated daily but will not be more than 5000 records per table Is there any reason I shouldn't just make all tables temporal? Ps. I am aware of…