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: Database Migra(ine)tion

Bob Lang from SQLServerCentral.com

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

ADVERTISEMENT
SQL Monitor

26 SQL Server monitoring tips – free course

Protect yourself from the most common causes of SQL Server pain, with this series of 26 free tips. Covers the hows and whys of monitoring, with practical advice and worked examples. Sign up now.

SQL Source Control

Want to use Git with your SQL Server database?

SQL Source Control now has built-in support for Git. Inside SQL Server Management Studio, you can commit to Git, push & pull changes from remote repositories, and get an object-level history for your database. Learn more.

DLM Automation Suite

Continuous integration and automated deployment for SQL Server databases

The DLM Automation Suite plugs into the build and release management tools you use for application development so that you can also set up continuous delivery for your databases. Download a free trial. Download a free trial.

Featured Contents

 

Level 2: Datatypes and the Default Mask with Dynamic Data Masking

Steve Jones from SQLServerCentral.com

This article digs deeper into the ways that Dynamic Data Masking works with different data types. More »


 

Step by Step Installation of SQL Server 2014 on a New Failover Cluster

Additional Articles from MSSQLTips.com

Manvendra Singh gives a step-by-step guide to installing SQL Server 2014. More »


 

Free eBook: Performance Tuning with SQL Server Dynamic Management Views

Additional Articles from Redgate

Dynamic Management Views (DMVs) are a significant and valuable addition to the DBA's troubleshooting armory, laying bare previously unavailable information regarding the under-the-covers activity of your database sessions and transactions. More »


 

From the SQLServerCentral Blogs - A journey to a movie recommender in U-SQL

Dave Ballantyne from SQLServerCentral Blogs

I haven’t gotten to involved in the whole “Big Data” movement to much,  I’ve kept an arms length watch and... More »

Question of the Day

Today's Question (by Steve Jones):

I create an ENDPOINT in SQL Server 2014, and I have both IPV4 and IPV6 IP addresses set up on my host server. If I fail to specify the LISTENER_IP parameter, what IP address does my SQL Server listen on?

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: Administration.

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

Healthy SQL: A Comprehensive Guide to Healthy SQL Server Performance

Healthy SQL is about ensuring the ongoing performance health of a SQL Server database. An unhealthy database is not just an inconvenience; it can bring a business to its knees. And if you are the database administrator, the health of your SQL Server implementation can be a direct reflection on you. It's in everyone's best interest to have a healthy SQL implementation. Get Your Copy Today

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

In SQL Server 2014, I am trying to determine if a database is a snapshot programmatically. What should I do?

Answer: Query the source_database_id field in sys.databases

Explanation:

The best way to determine if a database is a snapshot is to look in sys.databases in the master database. If the source_database_id field is populated, this database is a snapshot. If it is NULL, this is a normal database.


» Discuss this question and answer on the forums

Featured Script

Parse list of names from Outlook

Noel Scheaffer from SQLServerCentral.com

This script's target audience is likely pretty small, but I have used it quite a bit over the years so I thought I would share it anyway.

When I am writing an email or document in which I need to include a list of names I want to make sure I spell them correctly. So I start a new email and add each person I want as a recipient. I then copy that semi-colon separated list of names from the Outlook To box and set the @names variable in that string.

My script will parse the string removing the email addresses, the semi-colons and the commas and reverse that last name and first name (if @last_name_first = 0) and return just a list of names as "FirstName LastName". If you want the names in "LastName, FirstName" format just set @last_name_first = 1.

If you have middle initials they can be excluded by setting @remove_mi = 1. If you have a name like "O'Brien", you will need to manually change it to "O''Brien" (that's two single quotes between the "O" and the "B").

My example would yield...

Bob O'Brien
Jane X. Doe

Enjoy,


Noel

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

2014 SSMS - SA Account password changing on it's owm - how to get rid off this issue. - Guys, Have you ever heard of the the SQL password changing on it's own - for our software the SA password? I...

Avoid Blank Values in a column - Hi All, I need to avoid/deny blank values/empty string ('') entered into few columns in a table. This column already does not...

Query/Performance Tuning Steps without help of profiler - Please Help me Query/Performance Tuning Steps with out help of profiler


SQL Server 2014 : Development - SQL Server 2014

Stored Procedure Performance Issue - Hi all. I've done my homework on this one and I'm perplexed. I'm an old hand at optimizing queries and...


SQL Server 2012 : SQL 2012 - General

How do I install AdventureWorks in my local PC - I have SSMS installed on my PC. However, I am not able to install the AW database on my local...

Query slow just once a day - OK, this is driving me nuts. I have a query that runs slowly once a day (2 minutes) and then...


SQL Server 2012 : SQL Server 2012 - T-SQL

Finding retention of a person - I would like to ask if anyone would be able to help out with this. I would be more than...


SQL Server 2008 : SQL Server 2008 - General

problem with the query plan cache probably - Hi, i'm using sql server 2008 R2 sp3 and i have some weird issue with some queries. every few days some...

Automatic truncate of varchar string - I have a column in a table defiled as VARCHAR(245). If I am trying to insert a string that is...


SQL Server 2008 : T-SQL (SS2K8)

Finding best matched/covering time period/s against a time period search - [code="sql"]DECLARE @Data TABLE ( PrimaryKeyID INT NOT NULL IDENTITY(1,1), DateStart DATETIME NOT NULL, DateEnd DATETIME NOT NULL, Price INT NOT NULL ) INSERT INTO @Data ( DateStart, DateEnd, Price ) SELECT '20160425',...

Query Performance Issue with multiple unions and a view - Hello Gurus, I have a case where instead of looking too much into the indexes(Tables are not that big), I am...

Looping and scalar value - Hi No doubt this is standard behaviour I should already know about, but I'm a little unclear about it. The example...

Set @var being used in Where IN - I am trying to set up a variable @Location, for use in a where .. IN, but can not seem to...

0 is equal to zero length string. Can someone explain how this can be? - --I know this has to do with an implicit conversion of the varchar to int, --but why does the zero...


SQL Server 2008 : SQL Server 2008 Administration

Backup error. 112(There is not enough space on the disk.) - There is plenty of space left on the disk where the backup is stored. Why am I getting this error? Using...


SQL Server 2008 : SQL Server 2008 Performance Tuning

Optimizing Queries - Hi, I have some queries which are taking about 6 seconds to run against a table with 12,000,000 odd records. The...


Reporting Services : Reporting Services

SSRS restart - How can we identify the SSRS service restart. >From event viewer I am seeing daily the errors Report Server Windows Service...


Data Warehousing : Strategies and Ideas

DWH generator tools - Pro's & Con's - Hi there Have you experience with DWH generator tools? We are designing a new DWH architecture and weighting pro's & con's...


Data Warehousing : Analysis Services

Use DAX to create measures in Tabular Model that will apply different logic at each level of heirarchy. Can it be done? - How to say it? I have a fact table and within it a hierarchy, which I created. Now I need to...


SQL Server 2005 : SQL Server 2005 Integration Services

Creating Header AND Footer to a flat file destination file - Hi Guys, I am working on a financial project; the requirement is interface flat file should not contain any duplicated arrangement....

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