Posts

SQL New Blogger Challenge November 2015 Edition - Week 3 Digest

This week’s #sqlnewblogger posts!

Author Post
@eleightondick [[T-SQL Tuesday] Data modeling: The trouble with prefixes
@tomsql Adventures With TomSQL, aka Tom Staab
@EdDebug [Automatically name primary key constraints in SSDT
@rabryst Born SQL on Twitter: “Temporal Tables - Under the Covers with the Transaction Log. 
@YatesSQL [Community Involvement–Why Wait?
@cjsommer [Identity Column Increment Value (EVEN/ODD)
@DBA_ANDY Nebraska SQL from @DBA_ANDY: CHECKDB - The database could not be exclusively locked to perform the operation
@ALevyInROC Selectively Locking Down Data – Gracefully – The Rest is Just Code
@eleightondick [SQLNewBlogger, Week 3
@tomsql Being Our Collective Best
@SQLMickey [T-SQL Tuesday #72 Summary – Data Modeling Gone Wrong

Selectively Locking Down Data - Gracefully

I have a situation where I need to retrieve the data in an encrypted column from, but don’t want to give all my users access to the symmetric key used to encrypt that column. The data is of the sort where it’s important for the  application to produce the required output, but if a user runs the stored procedure to see what the application is getting from it, it’s not critical that they see this one field.

SQL New Blogger Challenge November 2015 Edition - Week 2 Digest

This week’s #sqlnewblogger posts!

Author Post
@arrowdrive Anders On SQL: T-SQL Tuesday #72: Data modelling gone extremely wrong
@rabryst Time After Time - An Introduction to Temporal Tables in SQL Server 2016 using a DeLorean
@EdDebug [Deploy SSDT INSERTS in Batches
@ALevyInROC Don’t Trust the Wizard
@DBA_ANDY Nebraska SQL from @DBA_ANDY: T-SQL Tuesday #72 - Implicit Conversion Problems
@eleightondick [SQL New Blogger Challenge: Week 1 recap
@eleightondick [SQL New Blogger Challenge: Week 2 ideas
@BeginTry [SQL Server 2012 Upgrade: The RPC Server is Unavailable

Don't Trust the Wizard

The one wizard you can trust

If you need to move data from one table into a new table, or even tables in a database into another database, the Import/Export Wizard in SQL Server Management Studio looks pretty tempting. Set up a source & destination, click a few buttons, kick back with a cup of tea and watch the progress bars, right?

It turns out that the wizard just isn’t as smart as it may seem. If you’re not careful, you won’t get what you’re expecting. Let’s check it out.

SQL New Blogger Challenge, November Edition, Week 1 Digest

Ed Leighton-Dick has renewed his New Blogger Challenge this month. Here are all (I think) the posts for this week after Ed posted his announcement. If I’ve missed any, please let me know and I’ll update.

Author Post
@arrowdrive Anders On SQL: First Timer Summit impressions.
@EdDebug [Deploy SSDT INSERTS in Batches
@EdDebug [Looking at SSDT upgrade scripts
@DBA_ANDY Nebraska SQL from @DBA_ANDY: PASS Summit 2015 Recap
@eleightondick [PASS Summit 2015 Highlights
@OliverAsmus [PASS Summit 2015: My Experience
@EdDebug [ScriptDom Visualizer
@eleightondick [SQL New Blogger Challenge: Looking back… and a new challenge!
@Clem1029 [Tearing down the wall
@ALevyInROC Why Ask Why?
@rabryst The SQL Server Family

Why Ask Why?

Spend any time around a 4 year old, and you will inevitably find yourself involved in a conversation which evolves into this:

  • Please do this thing
  • Why?
  • Reasonable answer
  • Why?
  • Restatement of reasonable answer
  • Why?
  • Shorter, more frustrated restatement of reasonable answer
  • Why?
  • Because that’s what has to be done
  • Why?
  • Because
  • Why?
  • I give up. Go ask your other parent

It’s a simple, but powerful and important question. The trouble is that when it’s a 4 year old asking it, in a lot of cases they can’t understand the answer. More often, they aren’t interested in understanding it.

Hello GETDATE() My Old Friend...

So you’ve decided that your new web application needs to record some page load time metrics so you can keep tabs on performance. Terrific!  You set up a couple page load/complete functions to write to a logging table when a page request comes in, and then update the record when it finishes loading.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
INSERT INTO PageLogs (
  RequestTime
  ,ResponseTime
  ,RemoteIP
  ,UserName
  ,PageId
  ,Parameters
  ,SessionId
)
VALUES (
  GETDATE()
  ,NULL
  ,127.0.0.1
  ,'Dave'
  ,'Home'
  ,'Pd=2015Q2'
  ,'883666b1-99be-48c8-bf59-5a5739bc7d1d'
);
1
2
3
4
UPDATE PageLogs
  SET ResponseTime = GETDATE()
  WHERE
    SessionId = '883666b1-99be-48c8-bf59-5a5739bc7d1d';

You set up an hourly job to delete any logs older than 2 weeks (just to prevent information overload) and you call it a day. Each morning, you run a report to look at the previous day’s performance, watch the trends over the past week or so, and you’re pretty happy with things. Pages are loading in a fraction of a second, according to the logs. People find the application useful, word spreads around the office, and adoption takes off. The project is a success!

Getting Over It or: How I Learned to Stop Worrying and Love Speaking

Consider this the outtakes from my previous post about speaking at SQL Saturday.

It took a while for me to build up the courage to finally get up in the front of a room at SQL Saturday. As I mentioned in my prior post, I did quite a bit of studying of other peoples’ sessions, read peoples’ studies of other peoples’ sessions (Grant Fritchey’s “Speaker of the Month” series) and talked to a few people at the speakers’ dinner. Here are a few of the key things I learned which put me more at ease.

I Spoke at SQLSat (and I Liked It)

That is the first and last Katy Perry reference you will find on this blog or anywhere else in my life.

Last weekend I spoke at the 4th edition of my “home” SQL Saturday, SQL Saturday #383. This was the end of a path that started four years ago, and the beginning of an exciting new one.

About four years ago, I was introduced to PASS. It didn’t take long for people to start talking to me about public speaking. I went to my first-ever SQL Saturday, and kept thinking to myself “I could never do that.” Then I was given the opportunity to attend PASS Summit 2012 and was hooked on the PASS community - SQL Family. I stepped onto the floor at the convention center and felt comfortable immediately. I think my exact words when I called home that evening were “I’m home. I found my people.” Mid-Summit, in a 10-minute conversation with a chapter leader, I was told “you should speak at one of my user group meetings.”