Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

SQL Barbarian

After working in the mortgage industry for 7 years, I transitioned into Business Intelligence and began learning SQL and .NET. My goal is to integrate my business knowledge into my development to intelligently analyze and find solutions to problems. Blogging offers me an option to share what I've learned as well as receive feedback on better practices and solutions.

Should I use option(recompile)?

Should I use option(recompile)?

This will probably be a multiple stage discussion. The notes I’m providing today were sparked off of the content located in the fantastic learning resource provided by Brent Ozar Unlimited. Most of the core material based on a training class entitled: Table Variables, Temp Tables,… Read more

0 comments, 152 reads

Posted in SQL Barbarian on 2 February 2016

Easy way to test log shipping or availability groups setup

Have been working through the fantastic training resources from Brent Ozar’s Everything Bundle and on the recommended resources they mention after all the training on log shipping and availability groups that you can use a lab environment from TechNet to actually get going on familiarizing yourself with the technology more. Read more

2 comments, 152 reads

Posted in SQL Barbarian on 29 January 2016

Transaction Logging & Recovery (part 3)

Transaction Logging & Recovery (part 3)

… Continuation of some notes regarding the excellent content by Paul Randal in *Pluralsight: SQL Server: Logging, Recovery, and the Transaction Log. Please consider supporting his excellent material by using Pluralsight and subscribing to his blog. He’s contributed a vast amount… Read more

0 comments, 371 reads

Posted in SQL Barbarian on 20 January 2016

Verifying Instant File Initialization

Verifying Instant File Initialization

Ran into a few issues verifying instant file initialization. I was trying to ensure that file initialization was enabled, but found out that running the xp_cmd to execute ‘whoami /priv’ could be inaccurate when I’m not running it from the account that has the privileges. This… Read more

0 comments, 16 reads

Posted in SQL Barbarian on 13 January 2016

Transaction Logging & Recovery (part 2)

Transaction Logging & Recovery (part 2)

… Continuation of some notes regarding the excellent content by Paul Randal in Pluralsight: SQL Server: Logging, Recovery, and the Transaction Log. Please consider supporting his excellent material by using Pluralsight and subscribing to his blog. He’s contributed a vast amount to… Read more

0 comments, 28 reads

Posted in SQL Barbarian on 8 January 2016

Transaction Logging & Recovery (101)

Logging & Recovery Notes from SQL Server Logging, Recovery, and the Transaction Log (pluralsight) Paul Randal

Going to share some key points I’ve found helpful from taking the course by Paul Randal at pluralsight. I’ve found his knowledge and in detail presentation extremely helpful, and a great way to expand… Read more

0 comments, 34 reads

Posted in SQL Barbarian on 5 January 2016

Model needs exclusive lock

Ran into an issue where a developer was trying to create a database and was denied due to no ability to obtain exclusive lock on model. After verifying with other blogs, I found that creating a database required exclusive lock to use model as a template for the new database… Read more

0 comments, 13 reads

Posted in SQL Barbarian on 15 December 2015

Model needs exclusive lock

Ran into an issue where a developer was trying to create a database and was denied due to no ability to obtain exclusive lock on model. After verifying with other blogs, I found that creating a database required exclusive lock to use model as a template for the new database… Read more

0 comments, 16 reads

Posted in SQL Barbarian on 15 December 2015

Documenting Your Database with Diagrams

Documenting Your Database with Diagrams

Don’t get too excited. I know you love documentation, and just can’t wait to spend some time digging in to document your database thoroughly. I imagine you probably want to build visio charts manually, or draw whiteboard diagrams by hand and take pictures.

For the… Read more

0 comments, 15 reads

Posted in SQL Barbarian on 9 December 2015

Best Tools for Taking Notes In Development

Best Tools for Taking Notes In Development

Developers have a lot to juggle. Do a few of these things sound familiar:

  • Juggle current sprint tasks
  • Resolve outstanding issues needing immediate attention
  • Research/Professional Development
  • Long term development objectives that you can only get fragments of time to work on
  • Performance testing…

Read more

0 comments, 175 reads

Posted in SQL Barbarian on 14 October 2015

Dynamic SQL & Quotename

Not quite fineprint, but sure feels like it!

Quotename can be a pretty cool function to simplify your dynamic sql, as it can ease some of the escaping of strings.

However, I normally use it for table/column names, and so hadn’t ran into a “gotcha” of this function until today. Read more

0 comments, 260 reads

Posted in SQL Barbarian on 23 September 2015

XML Attribute VS Element Assignment when working with SQL

XML handling with aliases

I find it interesting the difference in behavior with querying XML between column assignment, and quoted alias naming.

It’s a generally understood best practice to not use the deprecated syntax of column aliasing using a quoted name. For example:

select
[escapedWithBracketsIsGood] = case when raining then…
Read more

0 comments, 61 reads

Posted in SQL Barbarian on 21 September 2015

Split personality text editing in SSMS with Sublime Text 3

Split personality text editing in SSMS with Sublime Text 3

My preview post showed a demonstration of the multi-cursor editing power of Sublime Text 3 when speeding up your coding with SQL server.

There is a pretty straight forward way to setup sublime (or one of your preferred text editors)… Read more

0 comments, 85 reads

Posted in SQL Barbarian on 14 September 2015

Multi-Cursor Editing SQL feels like the movie Inception just became real

  • Yes… multicursor editing is epic
  • No… SSMS doesn’t support multi-cursor editing the way it should.
  • Yes… you can do some basic editing with multiple lines using alt-shift
  • No… it doesn’t come close to what you can do with Sublime.

Cool thing is you can open text in Sublime synced w/SSMS… Read more

0 comments, 76 reads

Posted in SQL Barbarian on 10 September 2015

Brentozar’s Training: Chocolate & Cowboy Hats Included

It was entertaining to listen to a technical wizard fighting the obsession with waiting to eat chocolate with 3k viewers watching. Kendra wore about 4-5 cowboy hats in an effort to help those of us who wear many hats feel welcome…. Now that’s the kinda of training I enjoy! No… Read more

0 comments, 49 reads

Posted in SQL Barbarian on 27 August 2015

Monitoring SQL Server on a budget

Monitoring SQL Server on a budget

Cheap ain’t easy

There’s a lot of tools out there, and very few that are polished, have a good UI, and some reasonable functionality to help monitoring, that don’t cost an arm and a leg. One such tool I’ve recently begun to appreciate is… Read more

0 comments, 64 reads

Posted in SQL Barbarian on 18 August 2015

Stranger Danger… The need for trust with constraints

I ran into an issue with errors with an database upgrade running into a violation of a foreign key constraint. Don’t know how it happened. Figured that while I’m at it, I’d go ahead and evaluate every single check constraint in the database to see if I could identify any… Read more

0 comments, 160 reads

Posted in SQL Barbarian on 13 August 2015

Red Gate SQL Source Control v4 offers schema locks

Red Gate Documentation Update

Looks like the rapid release channel now has a great feature for locking database objects that you are working on. Having worked in a shared environment before, this could have been a major help. It’s like the poor man’s version of checking an object out in… Read more

0 comments, 59 reads

Posted in SQL Barbarian on 12 August 2015

Using Qure Profiler To Benchmark Tuning Progress

the problem of monster views

I’ve been working with tuning an application that performs a lot of Entity framework calls, as well as stored procedure activity. The stored procedures could be processing a large amount of data, or a small amount, depending on the configuration of the client. The major…

Read more

0 comments, 286 reads

Posted in SQL Barbarian on 10 August 2015

SET NOEXEC is my new friend

Have never really played around with the option: SET NOEXEC ON

Turns out this can be a helpful way to validate larger batch scripts before actually making changes, to ensure compilation happens. If you choose, you can verify syntax by “parsing” in SSMS. However, this doesn’t compile. Compilation checks more… Read more

0 comments, 337 reads

Posted in SQL Barbarian on 7 August 2015

Older posts