[SQLServerCentral - www.sqlservercentral.com](
A community of more than 1,600,000 database professionals and growing
Featured Contents
- [Stairway to U-SQL Level 15: U-SQL Global Scalar Functions With C#](
- [Free eBook: Defensive Database Programming](
- [Setting Variables in Calling T-SQL Code While Using sp_executesql](
- [Log File Space Issue Monitoring Using SQL Server DMV]( (From the SQLServerCentral Blogs)
- [Statistics Parser]( (From the SQLServerCentral Blogs)
The Voice of the DBA
A Bad First Day
I've started quite a few jobs throughout my career. In college, I worked in a variety of restaurants, changing employers at the start of every summer and again at the start of the school year. At some of those positions, I had a hectic beginning, with the staff shorthanded days and no one to train me, but they needed me to jump in. More than a few bartender jobs started like that, with me jumping in, making drinks, and teaching myself where things were stored. Luckily there weren't a lot of mistakes I could make that might severely damage the business.
Fortunately the frequency of new jobs has declined over time, though if I changed positions at this point, I'd go through much of the confusion that many new starters have. Where are things, how do I get work done, what credentials and procedures do I use, and more would be the questions on my mind for a few days. Perhaps a DevOps shop might smooth the process out and prevent issues, but I could see how this type of mistake could be made: a new intern used a document to setup a database, and ended up [crashing the production database](.
There are lots of comments on that post, but essentially a setup document contained production values (url, user, pwd) and a junior developer used those values instead of the output from their local laptop. I common mistake. A document should have no ambiguity, and certainly should never have production passwords inside of it. Individual credentials should always be used to connect to sensitive systems, with some auditing of who connected (and hopefully what they did).
I've had developers crash databases before and delete data. If they're databases I manage, there's a backup. I've never been in the situation where a database I was managing didn't have some backup. However, I've had clients and coworkers managing databases with no backups. Perhaps the situation I felt lots of empathy for was a client that had developers making backups before they deployed updates to a client database. One day an update didn't work correctly, and it asn't until a day later they realized. At that point, they couldn't restore the backup. They called me, only to have me inform them that they were actually making striped backups. Unfortunately, they had deleted one of the stripes, and we couldn't find it. Data loss, that fortunately didn't kill the company, but it did cost quite a bit.
There are any number of ways that a person can make a mistake on their first day. To prevent this, a good process should limit the damage that an individual can cause because of ignorance. This might be especially important for anyone that might have access to production data.
Steve Jones from [SQLServerCentral.com](
Join the debate, and [respond to today's editorial on the forums](
---------------------------------------------------------------
The Voice of the DBA Podcast
Listen to the [MP3 Audio]( ( 4.1MB) podcast or subscribe to the feed at [iTunes]( and [Libsyn](. [feed](
The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.
ADVERTISEMENT
[SQL Compare](
The industry standard for comparing and deploying SQL Server database schemas
Trusted by 71% of Fortune 100 companies, SQL Compare is the fastest way to compare changes, and create and deploy error-free scripts in minutes. Plus you can easily find and fix errors caused by database differences. [Download your free trial](
[Database DevOps](www.red-gate.com/dlmdemo?utm_source=ssc&utm_medium=pubemailad&utm_content=devops-webinar&utm_campaign=databasedevops&utm_term=20170614-slot2)
Database DevOps Demo Webinar
Learn how to automate your database deployments alongside your app code in this free demo webinar. [Register now](www.red-gate.com/dlmdemo?utm_source=ssc&utm_medium=pubemailad&utm_content=devops-webinar&utm_campaign=databasedevops&utm_term=20170614-slot2)
Featured Contents
 []
[Stairway to U-SQL Level 15: U-SQL Global Scalar Functions With C#](
Mike McQuillan from [SQLServerCentral.com]()
In this article, see how to created shared functions using C# assemblies in U-SQL.[More »](
---------------------------------------------------------------
 []
[Free eBook: Defensive Database Programming](
Press Release from [Redgate]()
Resilient T-SQL code is code that is designed to last, and to be safely reused by others. The goal of defensive database programming, the goal of this book, is to help you to produce resilient T-SQL code that robustly and gracefully handles cases of unintended use, and is resilient to common changes to the database environment.[More »](
---------------------------------------------------------------
 []
[Setting Variables in Calling T-SQL Code While Using sp_executesql](
Additional Articles from [Database Journal]()
In this tip, Greg Larsen shows you how to set variables in your calling T-SQL code when using sp_execute sql.[More »](
---------------------------------------------------------------
 []
From the SQLServerCentral Blogs - [Log File Space Issue Monitoring Using SQL Server DMV](
Dharmendra Keshari from [SQLServerCentral Blogs](
As a continuation of âDatabase Monitoring using DMVâ series, this blog will cover how quickly you can address the log...[More »](
---------------------------------------------------------------
 []
From the SQLServerCentral Blogs - [Statistics Parser](
matthew.mcgiffen 73574 from [SQLServerCentral Blogs](
In the last post we looked at using the STATISTICS IO and STATISTICS TIME commands to measure query performance. If youâve...[More »](
Question of the Day
Today's Question (by Steve Jones):
If I run this:
seq(10, 20)
I get this:
10 11 12 13 14 15 16 17 18 19 20
What if I want
10 12 14 16 18 20
How do I code this?
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: R langauge.
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
[Expert Scripting and Automation for SQL Server DBAs](
Automate your workload and manage more databases and instances with greater ease and efficiency by combining metadata-driven automation with powerful tools like PowerShell and SQL Server Agent. Automate your new instance-builds and use monitoring to drive ongoing automation, with the help of an inventory database and a management data warehouse. [Get your copy from Amazon today](.
Yesterday's Question of the Day
Yesterday's Question (by Steve Jones):
What does AUTO mean when this is the value set for PROCESS AFFINITY?
Answer: A thread can randomly pick a CPU based on server workload
Explanation:
Auto is the default process affinity, which means that any thread can freely be assigned to any CPU at any time. This is recommended unless you have a reason to change this.
Ref: ALTER SERVER CONFIGURATION - [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 2016]( : [SQL Server 2016 - Administration](
[SQL Replication]( - Firstly, please understand this is completely new to me, so I dont understand a lot of this. On Server01 I have...
---------------------------------------------------------------
[SQL Server 2016]( : [SQL Server 2016 - Development and T-SQL](
[calculate percentile]( - I wanted to calculate the percentile Column from the given data in tsql. Here is the data , how can i get...
[Best way to handle a table-based queue?]( - NOTE: This is NOT a Service Broker question. The table defined below is accessed by concurrent jobs that select the next...
---------------------------------------------------------------
[SQL Server 2014]( : [Administration - SQL Server 2014](
[Rename SQL server in a VM cloned host]( - We are trying to set up a test environment for testing upgrade. We did a VM clone from another VM machine...
[Running into issues while running a trace to capture SQL Statements.]( - All, I am running into issues when I run the trace. "Windows error occurred while running SP_TRACE_CREATE. Error = 0x80070035(The network...
[AlwaysOn - adding secondary problem]( - Hello SSC, I am having trouble with adding a secondary replica to my availability group. Â Once I choose the server/instance to...
[Node down or Failover or Service Stop]( - I believe the three scenarios ,Node down or Failover or Service Stop,I can think off will clear the buffer cache...
---------------------------------------------------------------
[SQL Server 2014]( : [Development - SQL Server 2014](
[Query displaying redundant data for a menu item, menu has choices, but displays menu item multiple times with different choices]( - Ugh, I know that topic was ugly...Ill try to explain this as best I can...I am writing a report for...
---------------------------------------------------------------
[SQL Server 2012]( : [SQL 2012 - General](
[Daily FULL backups?]( - I've been told that one of the SQL boxes I started to admin has daily FULL backups. It has one...
[XML to SQL Table]( - Can someone guide me how to get a file as below into a sql table - where I will be able...
---------------------------------------------------------------
[SQL Server 2012]( : [SQL Server 2012 - T-SQL](
[Best practice for simple concurrency challenge]( - To setup the question, please start with this table: CREATE TABLE .( Â Â Â Â IDENTITY(1,1) NOT NULL, Â Â Â Â (8) NULL, Â Â Â Â NULL, PRIMARY...
[Is the logic the same for these two queries?]( - Are these two logically the same? declare @chrono_start datetime, @chrono_end datetime, @record_id int if exists(select * from reclocat where record_id = @record_id) ...
[Heap vs Clustered Wildcard Search]( - I am working on converting a heap table to a clustered table by adding a primary key to the identity...
---------------------------------------------------------------
[SQL Server 2008]( : [SQL Server 2008 - General](
[Things to consider while creating new table for an application]( - Hi All, I am going to design a new table for one functionality which we are going to add in our...
[Unable to open Alerts in SQL Server Agent / Cannot view properties]( - I am unable to open Alerts in SQL Server Agent and Cannot view the properties using GUI. Although I am...
---------------------------------------------------------------
[SQL Server 2008]( : [SQL Server Newbies](
[trying to convert date to format of MM/DD/YY]( - Hello, I have taken over another colleagues sql project and am not very versed in syntax as of yet, but...
[SPID of top CPU consuming queries]( - Good Morning Experts, I am finding top CPU queries using SSMS(Reports->Standard Reports->Performance-Top Que
---------------------------------------------------------------
[SQL Server 2008]( : [SQL Server 2008 High Availability](
[The Distributer Has not been Installed Correctly - Error 2036 SQL 2008 R2]( - Hello, Hoping some one can advise, I am receiving the Error "The Distributer has not been installed correct(Microsoft SQL Server, Error:...
---------------------------------------------------------------
[Data Warehousing]( : [Integration Services](
[Grief importing date from Excel 2010 to SQL Server 2012, SSIS, Derived column task.]( - Hello, First of all, I'm an SSIS Noob, and not great with Excel either, someone else created and imported the data...
---------------------------------------------------------------
[SQL Server 2005]( : [SQL Server 2005 Integration Services](
[Parsing Unstructured Text file in SSIS and read the each line to get the required data]( - I am working on SSIS and I am having the complex unstructured TEXT File, I have to parse the text...
This email has been sent to {EMAIL}. 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 ©2017 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com