SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

The Voice of the DBA

Have You Been Hacked?

This editorial was originally published on Oct 30, 2014. It is being republished as Steve is on vacation.

I am glad that I don't work in the retail industry as a DBA. It seems that I read about a new security breach every few weeks from some company. Home DepotTargetStaples, the list goes on and on, and includes more and more businesses that at least some of us use regularly. It's gotten to the point where I expect that I'll need to replace at least one of my cards every year because of some data loss issue.

However it's not just retail companies that are getting attacked. According to the Q3 Dambella report, companies are having dozens of devices infected daily and seeing increasing numbers of point-of-sale (POS) attacks all the time. Even those companies that don't deal directly with credit cards and consumers are finding that they are targets of network attacks more and more. Some of these are merely vandalism, but many are intended as some sort of industrial espionage or data breach that can be used for profit.

This is the other edge of the data professional's sword. We have low unemployment and high salaries, but we are also becoming responsible and the target of blame when data is stolen. I really believe that theft detection is becoming more important for data professionals. We won't be able to prevent attacks, but we surely need to know when they have occurred and be prepared to respond.

I don't know how our profession will move forward in the future to meet these needs. Perhaps we'll become bonded like locksmiths. Perhaps we'll be bound by insurance requirements to adhere to best practices. I'm not sure any of that will help increase security, but it might help reduce the liability that we may face.

Steve Jones from SQLServerCentral.com

Join the debate, and respond to today's editorial on the forums

ADVERTISEMENT
SQL Monitor

What’s the top challenge faced by SQL Server professionals in 2018?

Learn how 626 SQL Server professionals monitor their estates in our new report on the State of SQL Server Monitoring. Discover the challenges currently facing the industry, and what is coming next.  Download your free copy of the report

SQL Prompt

Become a more efficient SQL developer with SQL Prompt

Learn how to write SQL faster and more efficiently with these exclusive short videos from Data Platform MVPs and SQL Server experts. With SQL Prompt you can strip out the repetition of coding and write SQL 50% faster. Check out the tips

Featured Contents

 

Finding a String Anywhere in Another String

Janeta Parakosova from SQLServerCentral.com

Optimize searching for a string within another string with this string storage and indexing technique. More »


 

Introduction to Azure Cosmos DB Global Distribution

Additional Articles from Database Journal

Global distribution of updatable data stores is one of the more challenging goals that software designers and architects have been struggling with over the years. Addressing this challenge has become increasingly pressing as the rapid growth of cloud technologies increased the need for deployments capable of spanning multiple geographical areas. In this article, we will provide an introduction to global distribution-related functionality in Cosmos DB. More »


 

Scaling SQL Monitor to Large SQL Server Estates

Most organizations are finding that the size and number of databases that need to be monitored is increasing, unlike the number of people available to do the work. In this article Tony Davis explains how SQL Monitor can help with the demands of bigger databases and higher numbers of monitored servers. More »


 

From the SQLServerCentral Blogs - The need for having both a DW and cubes

James Serra from SQLServerCentral Blogs

I have heard some people say if you have a data warehouse, there is no need for cubes (when I... More »


 

From the SQLServerCentral Blogs - RESTORE VERIFYONLY what does WITH LOADHISTORY do?

Kenneth Fisher from SQLServerCentral Blogs

Recently someone mentioned the LOADHISTORY option of RESTORE. It’s not horribly hard to find in BOL but it wasn’t the... More »

Question of the Day

Today's Question (by Carlo Romagnano):

 I have two tables:

 CREATE TABLE a ( i INT PRIMARY KEY ); CREATE TABLE b ( i INT PRIMARY KEY FOREIGN KEY REFERENCES a ); 

I'd like to drop them in one shot. Which of these commands will be executed successfully?

 --1 DROP TABLE IF EXISTS a,b --2 DROP TABLE IF EXISTS b,IF EXISTS a --3 DROP TABLE a,b --4 DROP TABLE b,a

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: T-SQL.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

Microsoft SQL Server 2017 on Linux

This comprehensive guide shows, step-by-step, how to set up, configure, and administer SQL Server 2017 on Linux for high performance and high availability. Written by a SQL Server expert and respected author, Microsoft SQL Server 2017 on Linux teaches valuable Linux skills to Windows-based SQL Server professionals. You will get clear coverage of both Linux and SQL Server and complete explanations of the latest features, tools, and techniques. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I create and populate this table in SQL Server 2016.

 CREATE TABLE NULLTest ( myint INT, myvalue VARCHAR(20)) GO INSERT dbo.NULLTest ( myint, myvalue ) VALUES (1, 'Steve' ), (2, NULL), (3, 'Andy') GO 

Now I want to run this query:

 SELECT nt.myint , nt.myvalue FROM dbo.NULLTest AS nt WHERE nt.myvalue = NULL; 

What should I SET to get this to return 1 row. I have the default settings for a US English installation already. These are:

  • ANSI_NULLS - ON
  • ANSI_NULL_DFLT_OFF - ON
  • ANSI_NULL_DFLT_ON - OFF

Answer: SET ANSI_NULLS OFF

Explanation:

The ANSI_NULL_DFLT_ON/OFF settings do not matter here. The ANSI_NULLS setting is what controls this. If set to OFF, then a WHERE col = NULL evalutes to true if a NULL value is in the column.

Ref: SET ANSI_NULLS - click here


» Discuss this question and answer on the forums

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2017 : SQL Server 2017 - Administration

Availability Groups either -- Windows 2016 Failover Cluster vs SQL Server Cluster - Hello, I supported SQL Server Clustering for a number of years, but now I am facing a task to implement Availability...


SQL Server 2017 : SQL Server 2017 - Development

Finding levels in a hierarchy - i have some data which has a variable amount of hiearchy levels to it, DAX has a function called Path(),...

Insert in the Insert statement the previous value from the before value - CREATE TABLE .(      NOT NULL,      NOT NULL, PRIMARY KEY CLUSTERED  (      ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,...

Assistance with DATETIME calculation when comparing to VARCHAR column (Test code included) - Hello, so I'm trying to get the difference in MINUTES between two columns. One column is a DATETIME column while the...


SQL Server 2016 : SQL Server 2016 - Development and T-SQL

Scripts runs on 2017, but not on my 2016?? - Hello, I've got help over a few days getting a script to run and create data partitioning for tables. I'm...

xp_cmdshell in database administration - Hi colleagues. I made T-SQL script for automatic backup databases which is on AlwaysON availability group. Whole script works prorerly but...

DEVOPS with EDW - Wanted to kick off a discussion about Devops in the context of the enterprise data warehouse (EDW) One of the challenges...


SQL Server 2014 : Administration - SQL Server 2014

Extended events question - Hi All, I have a question related to extended event ring buffer target. In SQL Server, how many ring buffer(s) will...


SQL Server 2014 : Development - SQL Server 2014

Find a value immediately prior to a given date - I have this code to create a temp table with 50,000 rows. CREATE TABLE #TEMP1(Part varchar(90),Supplier varchar (10),Import varchar (10),Summary...


SQL Server 2012 : SQL Server 2012 - T-SQL

Changing table name used in function, stored procedure and views - Our ERP Vendor decided to change the tables names. For example there use to be a table called customer now...


SQL Server 2008 : SQL Server 2008 - General

Left padding a FLOAT type with zeroes - Dear Friends, I'm in a situation where in I've to Left Pad a column of type Float with zeroesto a length...

remove Identity from a column - Hi Dudes, I have a Table Which has a column that is set to identity by mistake and it is on...


Cloud Computing : Amazon AWS and other cloud vendors

Migration of SQL Server 2008 R2 to AWS cloud - Hi, I am new to AWS cloud- can any one tell me what would be the steps to migrate SQL Server...


Reporting Services : Reporting Services

SSRS Next/Previous Functon Fetch - Is Any Function in SSRS Report Like Crystal Report, we can find the next record column data and compare with...


Data Warehousing : Integration Services

Error: The type of the value being assigned to variable "User::VARName" differs from the current variable type. - BIDS 2008.  I need to create a bunch of text files inside ForEach loop in SSIS Package. 1 file is...

Project Deployment Model - Multiple Projects in a Solution - We've recently upgraded to SQL2014 and we're keen to move over to Project Deployment Model for our SSIS Packages. One...


Database Design : Design Ideas and Questions

T-Script Error on resetting Counter - Hello, When I run this T-SQL script that begins a dynamic way to create table partitions, I’m fine until the...


SQL Server 2005 : Administering

SQL Sever Scheduled Jobs - Hi, I'm trying to set up a scheduled job that runs daily and sends out an email to me when a...

Database stuck in single user mode - Hi, Suppose you had a database stuck in single user mode that is in a busy OLTP environment. Given that: 1. The connection...


SQL Server 2005 : SQL Server 2005 General Discussion

Failed to notify ''operator name'' via email? - Following command sends email fine: EXECUTE msdb.dbo.sp_notify_operator @name=N'operator name',@body=N'test message' However, SQL Job with a notification to above operator doesn't work. Job history...

This email has been sent to [email protected]. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the [email protected].
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: [email protected]