SQLServerCentral - www.sqlservercentral.com

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

Featured Contents

Featured Script

The Voice of the DBA

Byte Me: Supervirus

Bob Lang from SQLServerCentral.com

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

ADVERTISEMENT

Want to work on databases in Visual Studio alongside your application?


ReadyRoll's the tool for you.

Featured Contents

 

Target Recovery Interval and Indirect Checkpoint

Igor Micev from SQLServerCentral.com

Indirect checkpoint is the recommended configuration, especially on systems with large memory footprints and default for databases created in SQL Server 2016. More »


 

SQL Server differences of char, nchar, varchar and nvarchar data types

Additional Articles from MSSQLTips.com

Sherlee Dizon looks at the basic differences between char, nchar, varchar, and nvarchar, as well as what to be aware of when using each data type. More »


 

Using SQL Compare with Dynamic Data Masking

Additional Articles from Redgate

Dynamic Data Masking is an exciting new feature in SQL Server 2016, allowing DBAs to centrally set a mask that is returned for a table column instead of the actual data, limiting what information is returned to certain users in a consistent and reliable way. What’s more, Redgate SQL Compare safely and reliably handles your DDM changes. Data Platform MVP Steve Jones explains more. More »


 

From the SQLServerCentral Blogs - Common Table Expression, Just a Name

Grant Fritchey from SQLServerCentral Blogs

The Common Table Expression (CTE) is a great tool in T-SQL. The CTE provides a mechanism to define a query that... More »

Question of the Day

Today's Question (by Steve Jones):

What is returned from this code? Note, the largest SMALLINT value is 32767.

 DECLARE @i SMALLINT = 32767 , @j SMALLINT = 32767 , @k SMALLINT = -32767; SET @i += @j + @k SELECT @i 

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.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

If I wanted to get a copy of my production database with all objects and the statistics for indexes, how can I do this in the easiest way in SQL Server 2014 SP2 and later?

Answer: Use DBCC CLONEDATABASE

Explanation:

SQL Server 2014 Service Pack 2 introduces DBCC CLONEDATABASE, which creates a meta data copy of your database, with all objects (a few restrictions) and statistics.

Ref: How to use DBCC CLONEDATABASE to generate a schema and statistics only copy of a user database in SQL Server 2014 SP2 - https://support.microsoft.com/en-us/kb/3177838


» Discuss this question and answer on the forums

Featured Script

Missing Index Script with Create Statement

Andrew Lackenby from SQLServerCentral.com

This is a standard missing index script that includes a create statement.

Run this script against any database. Create Statement column can be copied to a new window to create the missing index

More »

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 2016 : SQL Server 2016 - Administration

Cluster Index change on a table with 1 billion rows - We need to change the cluster index definition on a table with 1 billion rows. This will be performed on...


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

Creating a DBA Oncall list to email to group. - I'm looking for suggestions on creating a table with a list of DBA's and then a Job that will weekly...


SQL Server 2014 : Administration - SQL Server 2014

online script full of odd quotation marks - We're gearing up for sql 2014 upgrades and I found this nice script that documents almost everything. However it is...

Identical Query, Different Execution Stats - Hi All, I have restored a copy of a production database to my local machine to troubleshoot a problematic query. When...

Backup Question !! - I have 40 SQL servers, (mostly standard SQL servers 2008,2012) and SQL express (Free). Each of this 40 SQL server has...

Allocation and Consistency Errors - Hi all! I am not a DBA per se, but I do have enough experience with SQL to get assigned...


SQL Server 2014 : Development - SQL Server 2014

URGENT Please -Substring Formation in SQL SERVER 2014 - Hi- How can I grab the numeric value from string. Numeric value if starts with 2 is going to be 16 characters...

Script to stop service using XP_CMDSHELL, restore full and differential .bak files in a single script - Hi - I have a need to stop some application services based on the database environment I am refreshing, restore full...


SQL Server 2012 : SQL 2012 - General

How do I add a constraint to a column - I am looking for the ALTER TABLE .....? Where I can limit values of a column CHAR(1) to only accept the...

Correct MAXDOP setting - Hi All, I have a VM with 32GB RAM and 12 processors (SQL 2012 SP3 Ent 64bit) What would be the correct...

SQL Agent Job not providing full failure message for SSIS Packages - Good Morning, We are having an issue with 2012 SQL Servers not reporting why a job has failed, this is happening...


SQL Server 2012 : SQL Server 2012 - T-SQL

Table variable and query help - I have few quick questions 1) If table variable is storing in tempdb why can't I use them like temp tables?....

How to search exact match case - Hi In my table component information ID is stored as comma separated whenever multiple items are selected from the interface. [b]Scenario...


SQL Server 2008 : SQL Server 2008 - General

Database mirroring issue - Hi All , I set up mirroring from 2 different servers . Server A as principal and Server B as Mirror ( No...

Stored procedures and Creating tables. (Problem). - Hello All, In a single store procedure I often have a number of functions: Initialize, Prepare something (for example the creation of a...


SQL Server 2008 : SQL Server Newbies

Substring from RIGHT - I am trying to get a substring of characters but need to go from right Example 9.0.0832.1032 need to get the...


SQL Server 2008 : Security (SS2K8)

Standard Edition Auditing - Hello All, We all know that in SQL Server standard edition we cannot do any auditing on Server and DB...


Cloud Computing : SQL Azure - Administration

How do I create a new database using Backup? - I'm trying, once again, to get my database into Azure. I've gone through the process of creating a new logical...


Reporting Services : Reporting Services

Connecting to mof in command prompt for Report Configuration - Hi, Whenever I tried to connect to Program Files (x86) using Command prompt, it keeps saying it is not recognized. How...


Data Warehousing : Analysis Services

SSAS Tabular with CAWA - Has anyone use CAWA plus scripts to automate processing of SSAS Tabular tables? How does that worK?

This email has been sent to newsletter@newslettercollector.com. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com.
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 ©2015 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com