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: Meltdown

Bob Lang from SQLServerCentral.com

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

ADVERTISEMENT
SQL in the City

SQL in the City Streamed

Register now for Redgate's free virtual event offering a wealth of SQL Server sessions for you to livestream on December 14 and 15. Find out more and register.

SQL Toolbelt

Not enough hours in your day?

The SQL Toolbelt lets you reduce the time spent on SQL Server development and administration. Cambridge University developer David Spaxman, for example, says: “I’m saving 10-12 hours a week using the SQL Toolbelt.” Learn how you can double your productivity, speed up deployments and protect your data. Download a free trial.

SQL Clone

SQL Clone – create database copies fast!

Create copies of production databases and SQL backups in seconds and save up to 99% of disk space using SQL Clone. Redgate’s new tool removes much of the time and resource needed to create and manage database copies, allowing teams to work on local environments to develop, test and diagnose issues faster. Download the beta.

Featured Contents

 

Stairway to Exploring Database Metadata Level 5: Exploring Facts About Tables

Phil Factor from SQLServerCentral.com

Now that we've explored, in preceding levels, some of the information that is available about indexes, triggers, keys and distribution statistics, we can concentrate on the tables themselves and their columns. More »


 

Free eBook: Troubleshooting SQL Server: A Guide for the Accidental DBA

Press Release from Redgate

Three SQL Server MVPs (Jonathan Kehayias, Ted Krueger and Gail Shaw) provide fascinating insight into the most common SQL Server problems, why they occur, and how they can be diagnosed using tools such as Performance Monitor, Dynamic Management Views and server-side tracing. The focus is on practical solutions for removing root causes of these problems, rather than "papering over the cracks". More »


 

SQLBits 2017

Additional Articles from SQLBits

SQLBits 2017 has been announced. The conference will take place on April 5-8, 2017 in Telford, UK. More »


 

Cloning a SQL Server Login with all permissions using PowerShell

Additional Articles from MSSQLTips.com

Cloning a SQL Server login with permissions that match another login is a common task. In this post, Jeffrey Yao shows how this an be done using PowerShell. More »


 

From the SQLServerCentral Blogs - VMware vSphere 6.5 breaks your SQL Server vNUMA settings

kleegeek from SQLServerCentral Blogs

VMware’s latest release of the vSphere virtualization suite, version 6.5, changes how they handle vNUMA presentation to a virtual machine,... More »

Question of the Day

Today's Question (by Steve Jones):

I am creating a login and see there is a CHECK_POLICY option. What does this do?

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

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

Introducing Microsoft SQL Server 2016: Mission-Critical Applications, Deeper Insights, Hyperscale Cloud, Preview 2 - With Microsoft SQL Server 2016, a variety of new features and enhancements to the data platform deliver breakthrough performance, advanced security, and richer, integrated reporting and analytics capabilities. In this Preview 2 ebook, we introduce three new security features: Always Encrypted, Row-Level Security, and dynamic data masking; discuss enhancements that enable you to better manage performance and storage: TempDB configuration, query store, and Stretch Database, and more.

Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

The new STRING_ESCAPE() function in SQL Server 2016 takes two parameters: a string to escape and a type of escaping rules. What are valid values for the type?

Answer: 'json' only

Explanation:

As of the release of SQL Server 2016, only 'json' is a valid type of escaping strings with STRING_ESCAPE().

Ref: STRING_ESCAPE - https://msdn.microsoft.com/en-us/library/mt684589.aspx


» Discuss this question and answer on the forums

Featured Script

Keyboard shortcut to select top 1000

Timothy Harms from SQLServerCentral.com

When testing a procedure for an error or creating an ad hoc query, the number one typed syntax is select top N * from table. I wanted to create a keyboard short-cut to help speed up this process and I came up with this. Once the stored procedure is deploy. Put a single tick on each side of a table, including schema and database, highlight the object and hit ctrl + 6 and SSMS will select top 1000 all from the table. To create a keyboard short cut please visit http://msdn.microsoft.com/en-us/library/ms174178(v=sql.105).aspx. Here is an example: 'Database.Schema.Table'

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

Unable to restore a database on a new instance - [b]Scenario[/b] Moving database from: Microsoft SQL Server 2008 (SP4) - 10.0.6241.0 (X64) Apr 17 2015 10:56:08 Copyright (c) 1988-2008 Microsoft Corporation Enterprise...

Mirroring Automatic Failover - We are receiving the below Error message in Mirroring and principal server is failovering automatically to Mirror Server. Database mirroring connection...


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

Select query inside procedure taking long time, clustered indexes doing scans, need suggestion - I have a procedure, which is running very slow, and is being timed out without returning any records. [Reports] Table...

possible combinations for all rows in table - I have a table having three column Name  Value1  Value2    Value3 A           1             2           3 B           4             5           1 C           2             3           1 I want...

recursive query to find out orphans - Hi, i need a query to find out all orphan over a hierarchical table with the code above i can get...


SQL Server 2014 : Administration - SQL Server 2014

Problem configuring Database Mail - I used a script that I was able to successfully install on multiple servers but I can't get it to...

RAMDisk? Use it for TempDB? - RAMDisk used to exist in Windows NT. I used it and it worked really well. Then, it was eliminated in...

Transaction Log File removal - I have a database with two transaction log files, I have deleted one log file using alter database remove file...


SQL Server 2014 : Development - SQL Server 2014

Deny DML on a table - Hi all I have a table "test" in my "testdb" database. There is a user "user1" The user has access to...

Query optimization - Hello, I want to optimise the following query that is running so slowly. Please help or gimme an advice. MERGE dbo.LocalizedCategories AS...

Is there a way to extract only credit card numbers from text - i have below sample data, i try to extract valid credit card data. But i was not able to do...


SQL Server 2012 : SQL Server 2012 - T-SQL

trying to get rid of clustered index scan - I have statement below which does a merge join but does a clustered index scan with over 2 million rows...

Unexpected Behavior With TOP clause in a DELETE - I recently encountered some unexpected behavior, or at least not expected by me, using the TOP clause in a DELETE...

Converting time - from "seconds after midnight" - Hello all, We have time saved in our db in a seconds after midnight format and need to convert it to...

effective use of subquery with a where condition - Good day friends, i have the query below: There are two sub queries with joins, the first sub query requires a...


SQL Server 2008 : SQL Server 2008 - General

relative performance sizing/estimation - I'm trying to get a better understanding of relative performance expectations for different types of queries. For example, given a...

SSIS Excel import error - The situation is: Server A: runs alle the ssis jobs. Excel is located on a fileserver. Connection string Excel: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\Fileserver\somewehre\Excelfile.xlsx;Extended Properties="EXCEL 12.0 XML;HDR=YES"; The...

Weird Resource Database Message in Error Log - I'm getting this message in the error-log each time on a SQL restart. [quote] The resource database has been detected in two...


SQL Server 2008 : T-SQL (SS2K8)

Split list of string into all possible combinations - I have a table that contains one column and is populated as follows: declare @table table ( Col varchar(100) ) insert @table ( Col...


SQL Server 2008 : SQL Server Newbies

SQL Query/JOB Error - Hi all, Need advise for my error Executed as user: NT AUTHORITY\NETWORK SERVICE. Arithmetic overflow error converting IDENTITY to data type int....

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