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: Compilation Vacation

Bob Lang from SQLServerCentral.com

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

ADVERTISEMENT
SQL Search

Free SSMS add-in: SQL Search

Redgate SQL Search is a free SSMS add-in that lets you find fragments of SQL across multiple objects and multiple databases. Once installed, SQL Search appears on the SSMS toolbar, allowing you to quickly navigate to objects wherever they are on a server. Download SQL Search now.

Featured Contents

 

Stairway to Exploring Database Metadata Level 7: Extended Properties

Phil Factor from SQLServerCentral.com

In this level, I’ll introduce Extended Properties. As with the previous levels, I want to illustrate as much as possible with practical and immediately useful code. More »


 

Questions About the Use of PowerShell That you were Too Shy to Ask

Additional Articles from SimpleTalk

Let's forget the actual PowerShell code for a moment: Why is PowerShell important? Why should I use it? Where did it come from? Why did it take so long to arrive? These and many other basic questions are answered in William Brewer's latest addition to the series that answers those seemingly simple questions that you were too shy to ask in public. More »


 

From the SQLServerCentral Blogs - Estimated Costs of All Queries

Grant Fritchey from SQLServerCentral Blogs

One question constantly comes up; What should the Cost Threshold for Parallelism be? The default value of 5 is pretty... More »


 

From the SQLServerCentral Blogs - How to sign a SQL Server CLR Assembly in Visual Studio 2015

Jeffrey Yao from SQLServerCentral Blogs

It took me quite a while to figure out how to sign a SQL Server CLR Assembly (like a CLR... More »

Question of the Day

Today's Question (by Steve Jones):

I run this command:

 Backup-SqlDatabase -ServerInstance .\SQL2014 -Database sandbox -Incremental 

What is the name of my differential backup file?

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

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

The Definitive Guide to DAX: Business intelligence with Microsoft Excel, SQL Server Analysis Services, and Power BI - This comprehensive and authoritative guide will teach you the DAX language for business intelligence, data modeling, and analytics. Leading Microsoft BI consultants Marco Russo and Alberto Ferrari help you master everything from table functions through advanced code and model optimization.

Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I have a SQL Server 2016 instance and want to use BULK INSERT to load data. What file types can I import? Note that native refers to the native binary representation used by bcp. Character refers to the character formatting produced by bcp.

Answer: native SQL Server import/export files or character files meeting SQL Server rules

Explanation:

The correct answer from these choices is only the native or character formats from SQL Server. While a CSV could potentially be used, it must conform to certain restrictions, so any CSV cannot be used.

Ref: Prepare Data for Bulk Export or Import (SQL Server) - https://msdn.microsoft.com/en-us/library/ms188609.aspx


» Discuss this question and answer on the forums

Featured Script

Check if xp_cmdshell is turned on and flip the bit

Edward Pochinski from SQLServerCentral.com

In some shops \ cases this feature may be turned off as part of the security regulations. You may need to flip xp_cmdshell on to perform a piece work and then flip the bit back when the work is done. You can also tweak the code to flip the bit off again when done. Simple, non complex script but very effective in an automation task. The script uses sys.configurations to check the bit set for the xp_cmdshell feature, if the value = 0 we turn it on.  I hope you will find some use for the code.

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

Restore DB takes a coffee break to open file explorer - Hi all! This has been a problem sice my first SQL DB's in 2005. When i want trestore from device, it's really...


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

Practice T-SQL - Hello All, Do you know where i can find a project to train my T-SQL knowledge? from writing new DB with tables,...

How do I state my foreign key in my Create Table? - Hi Expert, I tried to create a table with foreign key but I am not sure why it is giving me...

Linking rows based on matching fields - I have a sub-set of customers : CREATE TABLE #temptable ( int, nvarchar(20), date, nvarchar(50), nvarchar(10)...


SQL Server 2014 : Administration - SQL Server 2014

Update Statistics - I have observed that for some tables the statistics have not been updated for a long time but the rowmodctr...

Performance improves after reboot - I am an ETL Developer who was asked to look at SQL Server performance problem. We have two DBA's but they're...


SQL Server 2014 : Development - SQL Server 2014

Converting Numbers to Letters - Hi Everyone, I am looking to convert numbers in a delimited string to corresponding letter. For example, if the string is '2,3,4' I...

Round decimal - Hello, when in my select I have  0,00 (decimal (4,2)), how can I round it to 0? Thanks a lot. Luigi

Optimizing a query - This needs to be a SQL view for C# to consume.  I am sure there is a better way to...


SQL Server 2012 : SQL 2012 - General

IO Performance Problem - We have a periodic problem on our sql server that I'm totally stumped on. This is on SQL Server 2012,...


SQL Server 2012 : SQL Server 2012 - T-SQL

Find Matching People in table based on similar values - Hello All, I'm trying to find a method that will run on Data-sets of 100K rows to a million efficiently and...

Non-ANSI equal join - SQL 2012 - I recently found a non-ANSI select statement with equal joins executing against a SQL 2012 (compatibility mode SQL Server 2012(110))...


SQL Server 2008 : SQL Server 2008 - General

To find that particular day top performer and overall performer - Top performer for that particular day is calculated by (Goodcheckin-Badcheckin) for that particular dayOverall top performer  is calculated by (Goodcheckin-Badcheckin) for...

Corruption when restoring/renaming databases - Hi i am trying to move databases to new SSD drives but some have dozens of logical file and are...


SQL Server 2008 : T-SQL (SS2K8)

How to avoid cursors - Hi All, I'm now the new accidental DBA. We have some non-prod DBs, but most of the DBs are production DBs...

Invalid length parameter passed to the LEFT or SUBSTRING function. Trying to remove everything after the period - I have a table that has Machinename that looks like the following: TH1239.CDB.LOCAL TH1238.CDB.LOCAL TH1237.CDB.LOCAL TH1236.CDB.LOCAL TSB1-TLA.CDB.LOCAL TSB2-TLA.CDB.LOCAL I would like to remove everything after the . SO...

Exists on where clause - Hi, Sample data to play with Declare @vendor table(IdVenor int,MessageId int); Declare @vendor_customer table(IdVenorCustom int,MessageId int); Declare @Message table(MessageId int, description varchar(4000)); insert into...


Programming : Powershell

Poweshell script to script out jobs, databases, users, linked servers, logins, roles, alerts, etc from a list of servers - create a c:\servers.txt file with list of servers and copy the following into a file .ps1 enjoy function getwmiinfo ($svr) { gwmi -query "select...


Data Warehousing : Integration Services

SSIS Agent Job Passing Parameters - I'm trying to set up a SQL Agent job to run a SSIS package. I want to pass a parameter to...


Database Design : Design Ideas and Questions

Many to Many Relationship Design Query - Hi, I have a table - TagDetail - that stores the many-to-many relationship between Tag, ParentTask, and ChildTask tables. Basically any 'Tag' can relate...

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