Categories: SSSOLV

Slammer, Alive…Barely

Categories: News, Professional, SSC, SSSOLV
Tags: ,
Comments: 1 Comment
Published on: January 24, 2012

Slammer

By now you must have heard of the SQL Slammer worm.  It was quite an infectious little nuisance.  The harm it caused came largely due to unpatched, unprotected SQL Servers.

We are now 9 years out from the initial discovery of this worm.  The worm has made its way onto the endangered species list – but it is not yet extinct.  I don’t know if I should be surprised by that.

My initial reaction is “No way that worm is still causing problems.  Everybody knows about it.”  But yet, I just caught several infection attempts from remote hosts that were affected by Slammer.  When I take a step back, I recall that many people out there are still running on unpatched servers.  I know of many places that are running SQL 2000.  I know of a large pool of servers across different versions and editions that are not patched.  I even know of a few places that are still running SQL 6.5.

When I take all of that into account, finding that Slammer is still active does not surprise me – but it should.

So for fun, here is what I was able to trap from the recent attempts at my machine with SQL Slammer.

Time:		 1/23/2012 3:59:03 PM
Event:		 Intrusion
IP Address/User: 202.56.192.195
Message:	 Attack type: MSSQL Resolution Service Buffer Overflow (Slammer)

When I trace that IP back to its source, I get a host name of the machine.  If I search on the Host Name of the IP Address, I find this page.  If I were a hacker, I now have a lot of valuable information.  I can also assume that this particular host has many virii.

This entire little foray has made me wonder how many people out there are concerned about security.  Do you know what the patch level is of your server?  Is your AV software up to date?  Are you running any form of HIPS?  If you are in IT and your focus is Data, you may want to check those things.  After all, our focus is to protect the data.

S3OLV February 2012

Categories: News, Professional, SSC, SSSOLV
Tags: ,
Comments: No Comments
Published on: January 23, 2012

Do you recognize this person?

 

If you are from the Colorado Springs area, you probably do.  This is:

 

 

 

Troy Ketsdever (twitter)

Troy will be presenting to the Las Vegas SQL User Group on February 9, 2012 @ 6:30 Pacific.  Here is his bio:

Troy Ketsdever is a data architect with over 15 years of commercial software development experience, and has maintained a love/hate relationship with SQL Server since version 4.2. In addition to his “day job”, Troy enjoys writing articles and presenting at user groups on a variety of database design and implementation topics.

His main objective and vision is “making the right information available to the right people at the right time”.

The topic that Troy has chosen for this meeting is titled: Zero to “MERGE” in 60 minutes.  And here is the abstract for that presentation.

Description: SQL Server 2008 saw the introduction of the new MERGE DML statement. In this session, we’ll take a look at the basic syntax and capabilities of the command. Once we have reviewed some simple examples, we’ll dive into some of the more advanced uses (abuses?) of the command, reinforcing our understanding by looking at more complex examples.

Bring your questions.  Bring your ugly code.  If you are remote, bring your own PIZZA.  Yes, this meeting will be both virtual and in person.

Virtual Meeting Info

Attendee URL: https://www.livemeeting.com/cc/UserGroups/join?id=H3ZGRQ&role=attend

Meeting ID:  H3ZGRQ

Physical Meeting Info

M Staff Solutions & Training / 2620 Regatta Drive Suite 102 Las Vegas, NV 89128

S3OLV – Jan 2012 Meeting Recap

Categories: News, Professional, SSC, SSSOLV
Tags: ,
Comments: No Comments
Published on: January 20, 2012

Last week (Jan 12, 2012), we held the user group meeting for the SQL Server Society of Las Vegas (a.k.a S3OLV or SSSOLV).

Presenting at that meeting was Josh Lewis (Twitter).  Josh presented on a pretty tough topic in my opinion.  He chose to present to us the topic of XML for the DBA.  You can read his abstract here.

We got the meeting rolling a little bit late.  Traffic must have been a bear down in LV.  Nonetheless, it got rolling and was a good meeting.

During this meeting we had our second installment of “Crap Code.”  Unintentionally, the crap code was a perfect segue into the presentation.  The crap code demonstrated extracting elements from XML related to the blocked process report.

Josh did a great job on the topic.  We recorded the meeting and you can view that here.  Check it out.  Get a little free learning on a difficult topic (for some us like myself).

Stay tuned, the February announcement is coming soon.

 

Blackout

Categories: News, Professional, SSC, SSSOLV
Comments: No Comments
Published on: January 18, 2012

What more can I say.  I disagree with the kind of legislation that is being presented via SOPA and PIPA.

In support of the community, my site will be dark 18 Jan 2012 between 10:30 and 21:30 GMT-8.

Normal services will return after that.

 

You can see support of this from some more reputable sites as well.

Wikipedia

 

Steve Jones @ SqlServerCentral

Grant Fritchey

Gail Shaw

 

Meme15 Twitter

Categories: Meme15, News, Professional, SSC, SSSOLV
Comments: No Comments
Published on: January 16, 2012

Twitter and Your Career

With the new blog party on the block, we have Jason Strate (blog | twitter) asking us this month these two questions:

  1. Why should average Jane or Joe professional consider using twitter?
  2. What benefit have you seen in your career because of twitter?

But first, a little background.  This blog party is an experiment in exploring the use of social networking and other medium (such as blogs) to enhance your career and professional development.  You can read about that in the link from this months invitation.

For myself, it will be very useful to participate as I explore these kinds of questions in answer for myself.  So, let’s get to the two questions at hand for this months topic.

Why should average Jane or Joe professional consider using twitter?

This question is one I had to explore back when I first started using twitter.  I even wrote a blog or two about it.

I first was having a difficult time justifying it for myself.  I wrote about that here.  But a little while later, I started to see that there was some worth to it and decided to take the plunge.

There are many benefits to twitter.  One benefit is that twitter is one method to announce information relevant to the local User Group.  Another top notch reason is that there are many very intelligent people watching twitter to help answer questions.  There are hashtags for SSRS, SSIS, SQLHelp and other topics.

If you are in a crunch and having a problem – twitter is often a very fast way to get a solid answer.  Call it an online helpdesk with quality and personality rating very high on the list.

What benefit have you seen in your career because of twitter?

Personally, I enjoy the benefit of the new friends and SQLFamily that twitter has exposed.  I sometimes find the time to lurk on twitter and enjoy in the conversation that is taking place.

Through the conversations that are occurring on twitter I find that it gives me a nice break from the work of the day.  It also gives me access to find interesting topics and articles that others have read or written.  But the best part boils back down to SQLFamily.

Check it out sometime – I think you will find that it is worthwhile.

TSQL Tuesday #26 or #23 – Identity Crisis

Comments: 1 Comment
Published on: January 10, 2012

The first opportunity of this New Year to participate in TSQLTuesday, we have been invited by David Howard (blog) to take a second shot at a previous TSQLTuesday.

This second shot is giving me fits.  I have no clue if it is TSQLTuesday 26 or if it is TSQLTuesday 23.  Is it some sort of amoeba of both TSQLTuesdays combined?

While I try to figure that out, how about we look at some pictures of what the New Year might have looked like as it was rung in.  Let’s begin with Paris.

Oooh…Aaaaahhh…Those are quite impressive.

Next up on our tour is where a twin resides for a famous lady.  How did they ring in the New Year in New York City?

 

 

 

And now, let’s DBCC Timewarp to the other side of the world.  Here is what you might have seen if you were in Sydney Australia.

Ahhh.  Yes, that did the trick.  This little diversion sure gave me enough time to think about which TSQLTuesday this is.  Et merci a Stuart Ainsworth (Blog | Twitter).  Le Sujet qu’il a propose est celui laquelle dont je vais parler ce mois.  Dans le TSQLTuesday qu’il a organise, il nous a invite de parler a propos des JOINS.

J’ai completement rate cet occasion de parler a propos de “Joins” en participantes dans TSQLTuesday.  Voyez, TSQLTuesday 23 etait tenu pendant le premier semain au lieu de deuxieme semain ce fois ci.  Et, maintenant, je vais terminer cet article en Anglais.  I was going to write the whole thing in French, but will save that for another time.  I should have a second chance to do that someday.

This second chance, gives me the opportunity to finally talk about a topic that has been on my to-blog list for quite some time.  I hope this post will show some different ways of joining in TSQL.  They are certainly methods I had never considered – until it was required.

Business Requirement

I have some tables that I need query.  One of the tables has lookup information with a bitmask applied to the id field.  Another table references this table but the ids can be a direct match or an indirect match to the id of the lookup table.  For this case, they will always only differ by the value of 1 if the two values do not directly match.  No other match possibility is considered for this example.

Based on this need, the solution dictates some sort of bitwise math.  I have several examples of how a join could be written to accomplish this primary objective.  I am only going to show the possible ways of performing this.  In my environment these all yield the same results and the data is unique and large enough (4.2 million records).  I will compare performance of these different queries in a later post as I demonstrate a query tuning method to drive the query down from nine seconds to 100ms or less.  For the record, I would choose any of queries 5, 6, or 7 for this particular need based on plan cost and performance.

The JOINS

First up is the ANSI style INNER Join using addition in one of the conditions as well as an OR to fulfill the second portion of the business requirement.

PRINT 'Query 1 -- Join with Or and source+1'
------
SELECT TOP 1000
		PPV.RumorID,PPV.PersonRumorID,PPV.PersonID
		,US.Source,Us.SourceID, PPV.SourceID
	FROM	RumorView PPV
		INNER Join SourceType US
			ON (PPV.SourceID = US.SourceID
				Or PPV.SourceID = US.SourceID+1)

This is probably the easiest to understand and it performs well enough.  Until running into this business requirement, I hadn’t considered putting an OR in the JOIN conditions.  But it makes sense considering that an AND can be used there.

Next is a NON-ANSI style of JOIN.

PRINT 'Query 2 -- Non-Ansi Join with Or and source+1'
------
SELECT TOP 1000
		PPV.RumorID,PPV.PersonRumorID,PPV.PersonID
		,US.Source,Us.SourceID, PPV.SourceID
	FROM	RumorView PPV, SourceType US
	WHERE (PPV.SourceID = US.SourceID
				Or PPV.SourceID = US.SourceID+1)

Through 2008 R2, this works just as well as the ANSI JOIN already shown.  I haven’t tested in SQL 2012 but I do know that the NON-ANSI syntax of *= (for example) no longer works.  I am not a big fan of this style JOIN because it is far too easy to end up with a Cartesian product.

Another type of JOIN that I like is the use of APPLY.

PRINT 'Query 3 -- Cross Apply with Or and source+1'
------
SELECT TOP 1000
		PPV.RumorID,PPV.PersonRumorID,PPV.PersonID
		,US.Source,Us.SourceID, PPV.SourceID
	FROM	RumorView PPV
		Cross Apply SourceType US
	WHERE (PPV.SourceID = US.SourceID
				Or PPV.SourceID = US.SourceID+1)

This particular code segment is the equivalent of the first query shown.  This is the last in the set of using basic math and an OR in the JOIN conditions.  The remaining queries all rely on bitwise operations to perform the JOIN.  Again, until this particular need, I had never even considered using a bitwise operation in a JOIN.  First in this series is the NON-ANSI style JOIN.

PRINT 'Query 4 -- Non-Ansi with COALESCE and Bit compare'
------
SELECT TOP 1000
		PPV.RumorID,PPV.PersonRumorID,PPV.PersonID
		,US.Source,Us.SourceID, PPV.SourceID
	FROM	RumorView PPV, SourceType US
	WHERE (PPV.SourceID|1 = COALESCE(US.SourceID|1,Us.SourceID))

The big change here is in the where clause.  Notice the use of COALESCE and the first comparison value in that COALESCE.  This is called a BITWISE OR.  From MSDN: “The bits in the result are set to 1 if either or both bits (for the current bit being resolved) in the input expressions have a value of 1; if neither bit in the input expressions is 1, the bit in the result is set to 0.”

So I am comparing the bit values of 1 and the SourceID.  The SourceID from RumorView will create a match meeting the requirements put forth thanks in large part to the BIT OR operation being performed on both sides of the equality in the WHERE clause.  It is also worth mentioning that the COALESCE is completely unnecessary in this query but it I am leaving it as a pseudo reference point for the performance tuning article that will be based on these same queries.

Next on tap is the CROSS Apply version.

PRINT 'Query 5 -- Cross with Bit compare'
------
SELECT TOP 1000
		PPV.RumorID,PPV.PersonRumorID,PPV.PersonID
		,US.Source,Us.SourceID, PPV.SourceID
	FROM	RumorView PPV
		Cross Apply SourceType US
	WHERE (PPV.SourceID|1 = US.SourceID|1)

And the last two queries that the optimizer equate to the same query.

PRINT 'Query 6 -- Join with Bit compare'
------
SELECT TOP 1000
		PPV.RumorID,PPV.PersonRumorID,PPV.PersonID
		,US.Source,Us.SourceID, PPV.SourceID
	FROM	RumorView PPV
		INNER Join SourceType US
			ON (PPV.SourceID|1 = US.SourceID|1)
------
PRINT 'Query 7 -- Join with ISNULL and Bit compare'
------
SELECT TOP 1000
		PPV.RumorID,PPV.PersonRumorID,PPV.PersonID
		,US.Source,Us.SourceID, PPV.SourceID
	FROM	RumorView PPV
		INNER Join SourceType US
			ON (PPV.SourceID|1 = ISNULL(US.SourceID|1,Us.SourceID))

The query optimizer in this case is smart and eliminates the ISNULL.  These two queries use the same exact plan, have the same cost and the same execution statistics.  The version with COALESCE is considered more expensive and takes longer to run than these queries.  It is also important to note that the Cross Apply Join also produces the exact same plan as these two queries.

Conclusion

So there you have it.  Many different ways to write the JOIN for this little query.  Performance and results may vary.  It is good to have a few different ways of writing this particular JOIN.  During my testing, it was evident that various methods performed better under different circumstances (such as how the indexes were configured – which will be discussed in the follow-up article).

Notes: Names have been concealed to protect the innocent ;) .  Also, the fireworks images are all links to external sites.  I have no affiliation with those sites…disclaimer yada yada yada…I am not responsible for content on those sites but they can have the credit for the images.

S3OLV update and Reminder

Categories: News, Professional, SSC, SSSOLV
Comments: No Comments
Published on: January 9, 2012

We are now just a few days away from our first meeting of 2012.  We have some good content lined up.  Check it out here.

I am looking forward to the presentation on XML and would really love to be able to bring Josh back to finish out the series.  Let’s show him a lot of support as he has put a lot of effort into making this presentation series.  I know because I have been hounding him about it.

In other news, we have received the PASS 2011 Summit DVDs.  There is a lot of cool content.  We plan on making these DVDs available to the group shortly.  These DVDs contain all of the main conference sessions.  They will prove to be an invaluable resource (much like every other year).

We have also talked in the past of getting a newsletter together.  As an interim step, we created the S3OLV Journal paper.li newsletter.  We are getting closer to having a mechanism in place to send out newsletters to the group.  Stay tuned – this should be happening in the near future.

Meme Monday January 2012

Tags: , ,
Comments: No Comments
Published on: January 9, 2012

Meme Monday was pushed back this month to the second Monday of the month.  That is a good thing or maybe a bad thing or maybe a non-discussion at all.  I guess it really depends on the person.  For me, I would have been rushing the post so I am fine with.  Oh wait, I sit here on the first Monday writing my post anyway.

Tom LaRock has asked us to write about what we plan to do for #sqlfamily in 2012.  I am somewhat prepared for this topic already.  I had been giving it some thought over the past couple of weeks.  I was even thinking of incorporating some of that into my Goals post for 2012 (assuming I get it done this year).

So, without further ado and without going to great detail, here is what I had been planning for the upcoming year and to describe in greater detail in my goals post.

1.  More SSRS and SSIS blog posts.  It seems that these have been somewhat popular in the past.  In addition, I have several posts lined up that I have been planning to write.  Some will be multi-part series, and others just a single post series.

2.  Present at least once per quarter throughout 2012.  I think this is attainable and I hope to add a few presentations to the bag.

3.  I really want to help organize an event.  This will take a lot more time and be a little more difficult based on event location relative to where I live – but I am hoping to get it done.

4.  I plan on maintaining the other activities such as UG help, forum help, twitter (when I can) help, articles, and blog posts.

 

That pretty much sums it up for what I hope to do for #sqlfamily in 2012.  What are you planning to do?

Thoughts on SSSOLV December Meeting

Categories: News, Professional, SSC, SSSOLV
Comments: No Comments
Published on: December 30, 2011

This is very late – I know.  The meeting was held on December 8, 2011 and I haven’t yet shared my recap/thoughts about the meeting.

We hold the SQL Server Society of Las Vegas user group meeting on the second Thursday of every month.  We have decided to hold the meeting as both a physical and a virtual meeting.  This decision was made to try and encourage better attendance and to allow people like myself to attend and participate.  Since I moved back to Utah and am trying to continue to help the group thrive – it has been helpful to have the virtual meetings.

But let me share another reason that I like to do it virtually.  Having lived in Las Vegas, it seems that a lot of the membership end up working during the meeting.  I know there were several times that I had to work during the meeting.  I know several people have expressed that concern to me as well.  By having the virtual meeting, they can sometimes join the meeting while fulfilling work duties.

As the announcement for the December meeting showed, I had the opportunity to present a new topic that I have been working on a lot of late.  The topic was on getting better functionality out of SSRS reports for mere DBAs such as myself.  I talked on topics that I needed to figure out in order to meet business requirements.

Some of the items touched included dynamic sorting and dynamic grouping.  These dynamic abilities were setup in a fashion that multiple reports could use the same datasets and tables within a database.  Furthermore, changing the sort or group would be as simple as changing a value in a table rather than editing the rdl and uploading the changes into SSRS.  This was all included in the demos.

Unfortunately, I focused too much on getting demos done.  I still need to go back and flesh out the slide-deck.  Yeah, I did a no-no.  I gave the presentation without a slide-deck.  It is far better to have the deck available to help control the flow of the presentation.  I’ll get that fixed.  You can see the presentation (gaffs included) here.

In addition to this presentation, I have been planning on writing up a few articles/blogs to also detail the various topics covered during the presentation.  Those should be out soon.

January 2012 Las Vegas SQL UG

Categories: News, Professional, SSC, SSSOLV
Tags: , ,
Comments: No Comments
Published on: December 30, 2011

This month I am attempting to get a jump on things a bit.  I am hoping to get the info out in a more timely fashion throughout this new year for the User Group meetings for S3OLV.

Out with the old and in with the new.  Let’s ring in the New Year for the Las Vegas SQL User Group together and with a bang.

Helping us will be Joshua Lewis as he presents the first part in his three part series on XML.

XML for the DBA – A Series (part 1)

XML has been a feature available in SQL Server for a long time, but the capabilities were limited, and it was never very easy to use.  This was always a huge disappointment to me, because XML in itself should be any DBA’s best friend when it is used properly. What we typically see in applications is not the prettiest example of XML;  it is typically used by developers to accomplish things very quickly when it comes to data.

For the most part, XML is a heap of data that can get very large, doesn’t store well, and isn’t easily indexed.

But consider this:  What if a very data-centric person were the one dictating the XML (like a DBA)?  XML, when used properly, can be a very powerful tool in data storage and presentation.

About Josh

Joshua is a Database Professional, with over 10 years’ experience in Configuration / Administration of Data Infrastructures, Performance tuning, Development, and Business Intelligence Architecture, using Microsoft’s suite of SQL Server Products.

Over the years, and in varied industries, he has supported and optimized large DataCenters, developed multiple ETL platforms for handling client eligibility / enrollment / claims, and designed security policies and procedures to meet various industry security certifications (Sarbanes-Oxley, HIPAA, and CISP).

Currently, Joshua is expanding his knowledge and skills to .NET, building Value-Add interfaces and integrations to SQL Server and Integration Services through the use of SQL-CLR and Custom SSIS Components.

 

LiveMeeting Information:

Attendee URLhttps://www.livemeeting.com/cc/UserGroups/join?id=GW2GD2&role=attend

Meeting ID:  GW2GD2

page 1 of 3»
Calendar
February 2012
M T W T F S S
« Jan    
 12345
6789101112
13141516171819
20212223242526
272829  
Follow me on Google+
Jason Brimhall

In 246 people's circles

Add to circlesi
Content
Categories

Categories

Now Reading

Now Reading

Planned books:

Current books:

  • ChiRunning: A Revolutionary Approach to Effortless, Injury-Free Running

    ChiRunning: A Revolutionary Approach to Effortless, Injury-Free Running by Danny Dreyer, Katherine Dreyer

  • Advanced Marathoning – 2nd Edition

    Advanced Marathoning – 2nd Edition by Peter Pfitzinger, Scott Douglas

  • SQL Server MVP Deep Dives

    SQL Server MVP Deep Dives by Nielsen Paul, Delaney Kalen, Machanic Adam, Tripp Kimberly, Randal Paul, Low Greg

  • A World Without Heroes (Beyonders)

    A World Without Heroes (Beyonders) by Brandon Mull

Recent books:

View full Library

SQLHelp

SQLHelp


Welcome , today is Saturday, February 4, 2012