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
1
vote
0 answers

Adding Script Component to VS2015 generated package doesn't run on SQL Server 2016

We are upversioning from SQL 2012 with a BIML-generated package containing a script component. We're receiving an error that I am able to reproduce in a fresh project without BIML. The error is: Failed validation and returned error code…
1
vote
0 answers

Difference with nolock and readpast in SQL server 2016

I am updating a table Hr.employees for a single record in a transaction in one query window Begin Tran A update hr.Employees set lastname = 'davis' where empid=1 In other query window i am running two select statements without a transaction select…
omkar
  • 79
  • 1
  • 9
1
vote
1 answer

Triggering actions on SQL Login Pw Change

I am attempting to implement the event notification code from https://www.mssqltips.com/sqlservertip/2708/tracking-login-password-changes-in-sql-server/ I am not seeing any results in the PasswordChangeLog table when I change the password. there…
1
vote
1 answer

Integrate R script into SELECT query

So I have the following integrated R code which I use to be able to match stuff via regex without too much complication (what I want to do eventually is more complex than this example so regex is pretty much required, this is just the first…
cheh
  • 17
  • 3
1
vote
1 answer

Performance issue with SQL Server and XML datatype columns

I am encountering performance issues using an XML datatype column in SQL Server 2016. It looks like my query is looping through the xml over and over. Here is my setup: Create a table with an ID int column (PrimaryKey) and an XML column CREATE…
F43G4N
  • 159
  • 1
  • 1
  • 9
1
vote
1 answer

Logging into local SQL Server instance with windows auth

I have a nodejs and express based project. I currently use sequelize to connect to a SQL Server instance. This works fine for external SQL Servers using SQL Server authentication. However, I am now trying to connect to a local SQL Server instance…
George Edwards
  • 8,979
  • 20
  • 78
  • 161
1
vote
1 answer

Disable all SQL Agent Jobs in a particular category

I have the following query that generates the commands necessary for me to disable all the SQL Agent jobs particular to a category. Select 'Exec MSDB.dbo.sp_update_job @job_name = N''' + SJ.Name + ''', @Enabled = 0' FROM msdb..sysjobs SJ inner…
Philip
  • 2,460
  • 4
  • 27
  • 52
1
vote
2 answers

Handling very big table in SQL Server Performance

I'm having some troubles to deal with a very big table in my database. Before to talk about the problem, let's talk about what i want to achieve. I have two source tables : Source 1: SALES_MAN (ID_SMAN, SM_LATITUDE, SM_LONGITUDE) Source 2:…
1
vote
3 answers

Update more than one column with single Case When logic - SQL Server

I need to create a following XML with Custom Element with attribute using Hard-code data. Table schema: StudentMark: CREATE TABLE [dbo].[StudentMark] ( [StudentMarkId] int IDENTITY(1,1) NOT NULL, [StudentId] uniqueidentifier NOT NULL, …
B.Balamanigandan
  • 4,713
  • 11
  • 68
  • 130
1
vote
1 answer

For XML Custom Attribute and Element in SQL Server

I need to create a following XML with Custom Element with attribute using Hard-code data. Table schema: StudentMark: CREATE TABLE [dbo].[StudentMark] ( [StudentMarkId] [int] IDENTITY(1,1) NOT NULL, [StudentId] [uniqueidentifier] NOT NULL, …
B.Balamanigandan
  • 4,713
  • 11
  • 68
  • 130
1
vote
1 answer

Divide by zero error encountered - SQL Server

I'm generating a random DateTime in SQL Server table using the following sample code Sample Code: DECLARE @SeedInt INT = 0; SELECT DATEADD(minute,(-1 * (ABS(Checksum(NewID()) % (CASE WHEN @SeedInt IS NULL OR @SeedInt <= 0 THEN 2 ELSE @SeedInt END -…
B.Balamanigandan
  • 4,713
  • 11
  • 68
  • 130
1
vote
2 answers

Selecting the last 3 characters of a string SQL

can someone help me with some SQL I am struggling with. I need to select the final 3 characters of a field containing a file name (so I can grab the extension of said files). Ideally, I'd like a count of these values. Selecting the first 3…
b0redj0rd
  • 43
  • 1
  • 1
  • 8
1
vote
1 answer

Can you replicate a normal table to a system versioned temporal table?

I'm curious to know whether I can replicate a table in SQL Server where the publisher is a normal table, and the subscriber is a system versioned temporal table? Is that possible? The intent is to have a DW containing the historical (and current)…
1
vote
1 answer

SQL Server: similar records based on 2 detail tables

I need to find similar records in SQL Server 2016, and it would be great if I could order result by how much they match. Match criteria for similar are 2 detail tables. My table structures are: //Basic: Id Title 1 Title 1 2 Title…
Makla
  • 9,899
  • 16
  • 72
  • 142
1
vote
1 answer

How to Group By and Order By - SQL Server

I need to group by an UniqueIdentifier column and then sort the group by a DateTime Column, the table also contains the XML column. Table schema: StudentMark: CREATE TABLE [dbo].[StudentMark] ( [StudentMarkId] [int] IDENTITY(1,1) NOT NULL, …
B.Balamanigandan
  • 4,713
  • 11
  • 68
  • 130