Personal Ownership–The Vision Within

vision-imageIt has been said that the very essence of leadership is that you have a vision. It has to be a vision you can articulate clearly and precisely on any occasion. There is a vast difference between a person that has a vision and what is called a visionary person. Think of it in this manner:

  • A person with a vision talks little but does much.
  • A visionary person does little but talks much.
  • A person with a vision finds strength from inner convictions.
  • A visionary person finds strength from outward conditions.
  • A person with vision continues when problems arise.
  • A visionary person quits when the road becomes difficult.

Some of my personal experiences have taught me the following:

  • The credibility of a vision is determined by the leader.
  • The acceptance of a vision is determined by the timing of its presentation.
  • The value of the vision is determined by the energy and direction it gives.
  • The evaluation of a vision is determined by the commitment we the people have.
  • The success of a vision is determined by its ownership by both the leader and the people.

Take a look around you; what is happening to others

A good idea can become great when the people are ready. The data professional who is impatient with people can become defective in their leadership. The evidence of strength lies not all the time in blazing a trail ahead but instead adopting our stride at a slower pace while not forfeiting the end goal. If you run too far ahead then you run the risk of losing your power to influence.

The ability to decipher the big picture

The ability to decipher the big picture is oftentimes what separates leaders. They are concerned with the shop’s basic purpose of why it exists and what it should achieve. Some things to think about that may hinder a vision:

  • Limited Leaders – everything rises and falls on leadership.
  • Concrete Thinkers – see things as they are and say why?
  • Dogmatic Talkers – to be absolutely sure about something one must either know everything or nothing about the problem. At times knows nothing but conventionally says something.
  • Continual Failure– many people look at past failures and fear the risk of pursuing future visions.
  • Satisfied Sitters – people who strive for comfort which sits on the heels of complacency, predictability, and boredom.
  • Census Takers – some people are never comfortable stepping out of the crowd.
  • Problem Receivers – some people can see a problem in every solution.
  • Self-Seekers – people who live for themselves.
  • Failure Forecasters – extract only discord; outlook is always gloomy and times are always bad.

Summary:

Spend some time and think about the dreams and vision you have as a data professional. Whether you are in an organization or a consultant I challenge you to consider the following:

Refuse to accept failure with self-worth.

Don’t restrict thinking to established, rigid patterns.

See the big picture.

Welcome challenge with optimism

Don’t waste time in unproductive thinking.

QA, Utility Databases, and Job Executions

thinking-outside-the-box1Sometimes we, as data professionals, have to think outside the box. I know, crazy idea right? Each shop and situation are different; there will always be several different ways in most cases that you can arrive at a solid solution.

 

This post has a few intentions behind it:

  • It is not a “take this solution; it’s the only way”.
  • Generate some thought and additional methods to reach a goal.
  • This is not intended for a production environment.

Good, now that we have those few things out-of-the-way let’s get to the meat of the topic. A situation arises where you want to give a bit more control to teams to execute jobs without giving full access to the SQL agent. In that case a good utility database may come in handy.

Example of an issue: A QA team is in need of kicking jobs off to test in a specific environment. Keeping in mind that each shop can be different this also means that security levels at varying shops will be different. There are a few choices that may come to mind with this issue:

  • Fire off an email to the DBA team and wait for them to kick job off.
  • Fire off an email to someone with access and wait for them to kick the job off.
  • Wait for the predefined schedule on the job agent and let it kick the job off.

Another method would be to utilize a utility database. You can give it whatever name meets your criteria in this case we will just call it TestingJobs. Let’s look at the overall picture below and how this all fits together:

Things you’ll need

  • UtilityDatabase
  • Two Stored Procedures
  • Table
  • Agent Job

Step1: Create the TestingJobs database (I won’t go into specifics here on proper set up; assume this is already created).

Step2: Create a table called ControlJobs inside the TestingJobs database

USE [TestingJobs]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[ControlJobs](
[JobControlID] [INT] IDENTITY(1,1) NOT NULL,
[JobName] [VARCHAR](500) NOT NULL,
[RunStatus] [BIT] NOT NULL DEFAULT ((0)),
[LastRanBy] [VARCHAR](50) NOT NULL,
[LastRanByApp] [VARCHAR](150) NULL,
[Date_Modified] [DATETIME] NOT NULL DEFAULT (GETDATE()),
[Active] [BIT] NOT NULL DEFAULT ((1))
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

Step3: Store procedure creation for table insertion (note the parameter @JobName)

USE [TestingJobs]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[test_StartJobs] ( @JobName VARCHAR(100) )
AS
BEGIN

        /************************************************************************
This script will insert the record needed to kick off agent jobs.

        ************************************************************************/

INSERT  INTO [TestingJobs].[dbo].[ControlJobs]
( [JobName] ,
[RunStatus] ,
[LastRanBy] ,
[LastRanByApp] ,
[Date_Modified] ,
[Active]
)
VALUES  ( @JobName ,
1 ,
” ,
” ,
GETDATE() ,
1
);

END;

Step4: Set up stored procedure that will run the pending jobs.

USE [TestingJobs]

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE
[dbo].[RunPendingJobs]
AS
SET NOCOUNT ON;

    DECLARE @JobName VARCHAR(500) ,
@JobStatus INT ,
@RC INT;

DECLARE cur_RunJobs CURSOR
FOR
        SELECT  JobName
FROM    Ddbo.ControlJobs
WHERE   RunStatus = 1
ORDER BY JobName;

OPEN cur_RunJobs;

FETCH NEXT FROM cur_RunJobs
INTO @JobName;

WHILE @@FETCH_STATUS = 0
BEGIN
PRINT ‘Checking to see if job is currently running. ‘;

EXEC @RC = dbo.GetCurrentRunStatus @job_name = @JobName;

IF @RC = 0
EXEC msdb.dbo.sp_start_job @JobName;
ELSE
PRINT
@JobName + ‘ is currently running.’;

UPDATE  ControlJobs
SET     RunStatus = 0 ,
Date_Modified = GETDATE()
WHERE   JobName = @JobName;

FETCH NEXT FROM cur_RunJobs INTO @JobName;

END;

CLOSE cur_RunJobs;
DEALLOCATE cur_RunJobs;

Step5: Set up stored procedure to check if job is already running

USE [TestingJobs];
GO

SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
ALTER PROCEDURE
[dbo].[GetCurrentRunStatus] ( @job_name sysname )
AS
SET NOCOUNT ON;

    /* Is the execution status for the jobs.
Value Description
0 Returns only those jobs that are not idle or suspended.
1 Executing.
2 Waiting for thread.
3 Between retries.
4 Idle.
5 Suspended.
7 Performing completion actions  */

DECLARE @job_id UNIQUEIDENTIFIER ,
@is_sysadmin INT ,
@job_owner sysname ,
@Status INT;

SELECT  @job_id = job_id
FROM    msdb..sysjobs_view
WHERE   [name] = @job_name;
SELECT  @is_sysadmin = ISNULL(IS_SRVROLEMEMBER(N’sysadmin’), 0);
SELECT  @job_owner = SUSER_SNAME();

CREATE TABLE #xp_results
(
job_id UNIQUEIDENTIFIER NOT NULL ,
last_run_date INT NOT NULL ,
last_run_time INT NOT NULL ,
next_run_date INT NOT NULL ,
next_run_time INT NOT NULL ,
next_run_schedule_id INT NOT NULL ,
requested_to_run INT NOT NULL , — BOOL
request_source INT NOT NULL ,
request_source_id sysname COLLATE DATABASE_DEFAULT
NULL ,
running INT NOT NULL , — BOOL
current_step INT NOT NULL ,
current_retry_attempt INT NOT NULL ,
job_state INT NOT NULL
);
INSERT  INTO #xp_results
EXECUTE master.dbo.xp_sqlagent_enum_jobs @is_sysadmin, @job_owner,
@job_id;
SELECT  @Status = running
FROM    #xp_results;
RETURN @Status;

DROP TABLE #xp_results;

SET NOCOUNT OFF;

Step6: Job Creation

Create a SQL agent job that will call the RunPendingJobs in the database. You can set this schedule to three minutes for this test.

The Benefit

Now think of a QA team member sitting at their desk running multiple tasks. This does take some coordinated effort in getting the job names but now that the basics are set up the team member could run the execute command for the test_StartJobs which will place the necessary information into the control jobs table. Of course the proper security would need to be set up in order for the user to be added (think AD groups). By utilizing the above method the team can suffice on it’s own in a non prod environment streamlining some of the inefficiencies that have plagued the groups in the past.

Summary

A few things to note here:

  • Don’t ever take code off the internet without testing it. This is just a thought-provoking post and there are some things in this post that are dependent upon one to set up and test.
  • I realize there are multiple ways to accomplish this. This is just an avenue to explore and test with some thinking outside the box.
  • Don’t limit yourself to “I can’t” or “This will not fly at my shop”; challenge yourself to become innovative and think of ways to tackle problems.

SQL Doc by RedGate

SQL DocI recently was on a call where a technical unit indicated they did not receive any form of documentation around the vendor database that was created. Now, seeing that I fall into the database profession it sparked my fancy. I began to ask a few questions to the individual who was asking for this documentation; these are important questions in that you have to determine if there is a need for what was running through my mind. Sure enough, the technical team, was just needing some guidance on overall structure and what they were dealing with in terms of tables, procedures, and so on. This group was trying to review and write a process around information they were not privy to.

My mind went straight for the SQL Doc utility that RedGate has available. It’s a simple utility really to utilize and often times can save the day for such cases like the one above. Check out the steps below on how easy the utility allows you to document a database on the fly:

Step 1: As you open the application you will be prompted to enter a server location followed by how you’d like to connect to it (Windows or SQL authentication). In this case we’ll just hook up to a local instance I have on hand.

image

Step 2: Once connected you’ll have some default settings. There will be a cover page option along with the databases that you want to document.

image

Step 3: Looking at the project you’ll begin to review some of the following information:

  • Database Selection
  • Server Properties
  • Server Settings
  • Advanced Server Settings
  • Sections that are included in the report

For this specific test I’m just going to take a look at the TempDB

image

The screen capture will note that under Object Types you are able to drill into and get as granular as you can. The below example will show you a snippet from a table in the TempDB and will also show that you can enter a description of what the field is utilized for in the far right hand column under Description.

image

Step 4: If you have to save this documentation out for any meetings or other purposes you can create a cover letter along with any logo information and description. Simply click on the cover page option on the left menu and complete the following:

image

Step 5: After all the choices are made you can click on the General Documentation Go button on the menu and be prompted for the following:

image

image

Give the location and file a name and BOOM; you’re done.

Summary

You may find yourself in a situation where you are needing a quick hit for documentation purposes. If you are an avid RedGate user and enjoy using their SQL Doc product; or maybe you had this product and didn’t even know what it was then you can benefit greatly from documenting multiple databases in a matter of minutes. This post is to show you what type of utility SQL Doc is and what it can actually be used for in a real life circumstance. In the end it was the right product and right time to use it for a technical team in need. Well done RedGate, well done.

Integrity–A Key Ingredient to Leadership

IntegrityWhen I have the opportunities to speak, whether local or elsewhere, on leadership I am often asked what are some things that make up a good leader? Over the years one very common word keeps coming up ~ integrity. It is a small word with a big meaning; if you were to pull up a dictionary integrity is defined as, “the state of being complete, unified.” When one has this ingredient their words and deeds match up; meaning they are who they say they are no matter where they are or who they are with.

This ingredient seems to be vanishing where personal standards are crumbling with data professionals in hot pursuit of finding shortcuts to success. Integrity is not what we do so much as who we are, and who we are often determines what we do. Our system of values is so much a part of us that we cannot separate it from ourselves. It is a navigational system so to speak that guides us. We often struggle in our respective shops with situations that demand our decisions between what we want to do and what we ought to do. Integrity establishes those ground rules for resolving such occasions.

Below are some traits that I believe derive from Integrity:

  • Integrity builds trust.
  • Integrity has high influence value.
  • Integrity facilitates high standards.
  • Integrity results in a solid reputation, not just image.
  • Integrity means living it myself.
  • Integrity helps a leader be credible, not just deemed clever.
  • Integrity is a hard-won achievement.

All the above are not given factors in everyone’s life. It is as result of self-discipline, inner trust, hard work, and a decision to be relentlessly honest in all situations.

Summary

Think about the situations as a data professional that you find yourself in. Begin asking the question am I taking a shortcut in order to get to success? Will that security permission not mean anything if I give it now and let another data professional handle the fall out at a later time? Or maybe you are a leader at your shop, is it something that you would sell a team or colleague out to get ahead. Whatever the case may be I urge you to take a long look at what your leadership looks like in your current role. Everyone influences someone in some form or fashion, will you have this key ingredient that is called integrity?

T-SQL Tuesday #89 Invitation – The times they are a-changing

TSQL2SDAY-150x150This month’s topic by Koen Verbeeck (B|T) is based around times that are a changing. To break it down somewhat it was inspired by a blog post that Kendra Little (B|T) put together around Will the Cloud Eat My DBA Job. Koen is wanting to know with the ever-changing world of technology what kind of impact has it had on you and how do you plan to deal with the future of data management/analysis.

To The Cloud

I think one of the topics that I’ve seen a gradual change in is the topic that revolves around the cloud. Being in the financial district cloud talk is not always welcome. It is a myth to some; I am glad that a while back I headed some of Grant Fritchey’s (B|T) advice in that he said you better start learning cloud techniques sooner than later. The cloud discussion is not always a welcomed one, but is one that needs to be had to keep up with innovative technologies.

Finding what is the best solution for you and your respective area the cloud does allow for flexibility and control. One of the main issues I see most shops running into are security based around a cloud model along with costs in data size etc.

With the proper planning and oversight the cloud is a viable option that should not scare away data professionals

Third Party Utilities

I think over time some of the third-party tools have become game changers in a lot of shops. I see vendors such as SQL Sentry and Red Gate that have evolved over time to help streamline and provided better efficiencies around data management and monitoring. Cutting edge keeps the users of these third-party tools on edge and wanting more. Tying all these into automation of daily tasks and not just on premise monitoring but cloud monitoring has been a huge plus for the community.

The Way Business Interprets Data

Data is what drives us; it is what a lot of decisions are derived from and direction of companies and shops. The data is ever-changing and how we look at it. Take for example Power BI. The methods we used years ago have morphed into a greater approach of delivery to businesses. I never thought I would be watching a professional sports game and see them pull out their tablets and review live data in between innings or set of downs.

PowerShell

No, this isn’t a tribute to Mike Fal (B|T) or Drew Furgiuele (B|T), but I do appreciate their nudge in getting me to utilize PowerShell for some of my every day usage. This could fall under the third-party utilities section up above but I thought it beneficial to state that in some cases it has been a game changer. Stumbling upon the DBATools website has been a blessing in disguise; I love getting to work with technology that I may have not utilized as much in the past.

Do You Feel Endangered?

No, and neither should you. I should paraphrase that with don’t be afraid of change for it allows us to learn new technologies and grow on our journey. There will be opportunities to always learn; each day you should strive to learn something new that you didn’t know before. A wise SQL community member once told me, “The data will always be here; will you?”

T-SQL Tuesday

For those that are not aware T-SQL Tuesday is a block party started by Adam Machanic (B|T). Each month community members who blog pick a topic then gather all the blogs who participated in the event and provides a recap. It’s a great method to share knowledge and an avenue to give back to the community. If you are an avid blogger and would like to be a host then do reach out to Adam via the methods provided.

Don’t Duck On Responsibilities

ResponsibilitiesBeing a data professional you assume a certain amount of responsibility. It often requires having the right attitude and an action plan in place for finding the solutions to our problems at hand. Too many times we attack the symptoms causing the issue, but overlook the root cause. The quick Band-Aid fixes are found many times over, whereas our jobs should be identifying the real issues that lie beneath the symptoms. Now, don’t get me wrong – I understand at times you have to stop the bleeding. In the end though one should uncover the root cause and make the permanent fix.

Prioritize the issue at hand

Chances are you, dear reader, encounter many problems throughout the day. Never try to solve all the problems at one time; instead make them line up for you one by one. Might seem odd but make them stand in a single file line and tackle them one at a time until you’ve knocked them all out. You may not like what you find when uncovering the root cause issues, but that is part of the process. Be careful of this uncovering and be cognizant that what you find with the issues may or may not be the root to all the problems.

Take time and define the problem

In it’s simplest form, take time out and ask yourself this question – “What is the problem?” Sounds easy enough doesn’t it; you’d be amazed by the many accounts of knee jerk reactions data professionals make all over the world. You  may be thinking to yourself that there has to be more to it than that. Think about it in four easy steps:

  • Ask the right questions – if you only have a vague idea of the situation, then don’t ask general questions. Do not speculate but instead ask process related questions things relating to trends or timing. What transpired over the course of the week that may have led to this issue.
  • Talk to the right people – you will face people who inevitably will have the all-knowing and all correct way that things should be done. Heed caution to such as you may find resistant to change and blind spots by these individuals. Creativity is, at times, essential to any problem-solving skill.
  • Get the “set in stone” facts – once the facts are all laid out and defined you may find that the decision is pretty concise and clear on action that should be taken.
  • Be involved – don’t just let the first three steps define you; get involved in the process of being the solution.

Questions to ask yourself regarding the problem

  • Is this a real problem?
  • Is it urgent?
  • Is the true nature of the problem known?
  • Is it specific?
  • Are all parties who are competent to discuss the issue involved?

Build a repository

Once you’ve come to the conclusion and provided a solution to the issue – document it. I know I just lost several readers there. Believe it or not documentation will save your bacon at some point. Maybe not next week or next month, but at some point down the line it will. Some things to consider are:

  • Were we able to identify the real cause to the problem?
  • Did we make the right decision?
  • Has the problem been resolved by the fix?
  • Have any key people accepted the solution?

I am reminded by a saying I once ran across:

Policies are many, Principles are few, Polices will change, Principles never do

Summary

Each day we encounter issues and problems. Don’t let them define you but rather you define the issue. Often times we overlook the root cause; remember to go through your process, policy, and standards in rectifying the problems at hand. It is better to tackle the problems when they are known than to sweep them under the rug for the next data professional to come along and then they are faced with fixing them.

Hopefully this short post will provoke you to think about the issues you deal with on a daily basis and how best to tackle them.

Are You Wasting Energy?

Teamsuccess.jpgOften times we as leaders within our respective shops tend to waste our time focusing on the wrong things. Think about that for a moment and think about the team that you are on or that you are leading. I’ve seen it happen among some very talented teams where we (yes I include myself in this) are not tapping into the expertise of our teams bringing for the most potential out of each team member.

Over the course of time I’ve come across some things that have helped me in a leadership role that may help some other data professionals out there who are starting out or maybe even a season vet.

Want Results?

  • Eliminate those distractions – you have to define out what matters most. What are you or the team doing that may prevent you from focusing on the real tasks at hand.
  • Get Real – face it; there will be times when those awkward conversations are needed. Hold each other accountable if you are on a team, and if you are a lone DBA which some of my friends out there are then build a base in the community of trusted advisors. Bounce some ideas off them.
  • Point out what is not working – this may seem simple enough, but believe me it’s not always that easy to overcome it. Constantly review processes and procedures to make sure you are thriving forward; not drifting backward.
  • Set some goals – do this with your team, individuals, or yourself – put the emphasis on with.

Change is hard; change is never easy. That’s where coaching comes in; you have to stick with it. Trust me; if it were easy then everyone would be doing it.

What Are Some Ways To Define Success?

  • Respect and leverage – I’ve personally found that when teams respect each other and can strategically leverage each persons talents then watch out. You are about to witness something special take place.
  • Management has focus – as I typed this I had to take a moment and reflect on the team I’m blessed to lead. I’m I positively focused on leading the group – I do believe I have their best interest but that doesn’t mean “we” won’t make mistakes. I include we, cause dear reader, you may be in this category with me.
  • Does your team matter – your colleagues and teammates; the ones you get in the trenches with on a daily basis should feel like they matter.
  • Ability to be innovative – one of the key success points I’ve experienced is turning a team loose and just say, “be innovative”. End of day I got your back, and guess what you will fail. Let me repeat myself; you will fail. However, if you are not being innovative or your team or colleagues are scared to try anything new from fear of backlash then are you truly pushing forward?
  • Good enough isn’t really good enough – a saying that has stuck with me my whole life is a simple one. Somewhere someone is practicing getting better, and when you meet that person one on one will you rise to the challenge. It is okay to set the bar high and it is also okay to keep working hard toward and end goal. On the flip side to that it is also okay to learn from your mistakes and let that be the fuel to the fire to keep getting after it.

Summary

I challenge you to embrace your aspirations today. If you lead a team of data professionals then take a long hard look at how you are leading your group. Let innovation; collaboration, and engagement with others turn into respect, leveraging talent, and building on success. If we are bragging or dwelling on the past; then that may mean we are not doing enough in the present.

How’s that fuel in the fire; are you passionate about succeeding? These are just some thoughts in my own mind that I’ve jotted down over the years that may help you along your journey as a data professional. Time to get after it and make it happen ~ BE THE CHANGE.