Rotating Header Image

PASS Summit 2014 – I’m Speaking!!!

Good Morning!!

With all the huzzah of PASS announcing the speakers and topics recently I thought I would wait a bit before doing the standard “I’m Speaking” blog post :)

As always it’s an honor to be selected to speak anywhere but the PASS Summit has and always will have a special place in my heart.

I’ve said it before and I’ll say it again… it’s the most wonderful time of the year for me as I get to recharge my SQL battery and see all the amazing friends and #SQLFamily I’ve had the pleasure of knowing over the years.

Last year I had two sessions and felt VERY overwhelmed and nervous (as it was my first ever Summit as a speaker) this year I’m hoping to be a bit more “myself” and enjoy the experience that much more.

Have a great day and I’ll see you in November!!!

PASS-Summit-2014-Speaking-Badge_250x250

Enjoy!! (Follow me on Twitter: @ColinStasiuk)

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon

Waiting For A Pot To Boil… Restore Database Progress

BoilingPot

Ever kicked off a restore and didn’t set the STATS parameter?

Ever had a separate application handle a restore and not give you any feedback at all on how far along a restore is?

Well if your answer is no than this post / script is NOT for you  :)

BUT

If your answer is YES then this script should tickle your fancy:

SELECT	A.start_time as 'RestoreStartTime',
		A.percent_complete,
		DATEDIFF(minute, A.start_time, getdate()) as 'CurrentRestoreDurationInMinutes',
		((DATEDIFF(minute, A.start_time, getdate()) * 100) / A.percent_complete) as 'EstimatedTotalDurationInMinutes',
		ROUND(((DATEDIFF(minute, A.start_time, getdate()) * 100) / A.percent_complete) - (DATEDIFF(minute, A.start_time, getdate())), 2) as 'EstimatedTimeRemainingInMinutes',
		B.[text]
 FROM	sys.dm_exec_requests A CROSS APPLY 
		sys.dm_exec_sql_text(A.sql_handle) B
 WHERE	A.percent_complete != 0

Thanks!!

Enjoy!! (Follow me on Twitter: @ColinStasiuk)

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon

List All Statistics For a Column – Update

Msg 5074, Level 16, State 1, Line 1
The statistics ‘StatName’ is dependent on column ‘ColumnName’.

Msg 4922, Level 16, State 9, Line 1

ALTER TABLE DROP COLUMN ColumnName failed because one or more objects access this column.

So what is a nice quick and easy way to list all the statistics that are dependant on that column?

My googling skills are obviously subpar this morning cause I couldn’t find anything to help me and it seems to me that this would be something that lots of people have run into. This is what I came up with:

DECLARE @SearchColumnName	nvarchar(100)
SELECT	@SearchColumnName = 'SearchColumn'
 
SELECT	OBJECT_NAME(A.object_id) as 'TableName',
		C.stats_column_id AS 'StatisticID',
		B.name as 'StatisticName',
		COL_NAME(C.object_id, C.column_id) AS [Name]
FROM	sys.tables AS A	INNER JOIN
		sys.stats B ON B.object_id = A.object_id INNER JOIN
		sys.stats_columns C ON C.stats_id = B.stats_id AND C.object_id = B.object_id
WHERE	COL_NAME(C.object_id, C.column_id) = @SearchColumnName

I dunno… seems like there should be a sp_ListAllStatisticsForAColumn system stored proc or something LOL.

If you have something easier/better please post it in a comment!!

UPDATE:
Change your WHERE Clause to this:

WHERE	COL_NAME(C.object_id, C.column_id) = @SearchColumnName AND
		B.name  NOT IN (Select ISNULL(name,'') from sys.indexes)

If you want to filter out the statistics that are created based on indexes (which can’t be dropped anyways)

Enjoy!!

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon

SQL Server 2014 RTM – April 1st (and that’s no joke)

 

 

Santa

Christmas in April :) I like it.

 

SQL Server 2014, Microsoft’s cloud first data platform, released to manufacturing today

Today, Quentin Clark, corporate vice president of the Data Platform Group, announced that SQL Server 2014, the foundation of Microsoft’s cloud-first data platform, is released to manufacturing and will be generally available on April 1. Quentin’s blog discussed the tremendous momentum with the SQL Server business as well as SQL Server 2014’s new in-memory OLTP technology and hybrid cloud capabilities. Here we provide additional details on those capabilities and highlight ways customers are getting tremendous value with SQL Server 2014.”

http://blogs.technet.com/b/dataplatforminsider/archive/2014/03/18/sql-server-2014-releases-april-1.aspx

 

Thanks!!

Enjoy!! (Follow me on Twitter: @ColinStasiuk)

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon

PASS Summit 2014 – Call for Speakers

OpenForBusiness

That’s right ladies and gentlemen the PASS Summit 2014 Summit Call for Speakers is officially open for business!!!

Last year was my first year presenting at a Summit and I can’t wait to submit and hopefully have an abstract and topic that people are interested in.

I actually was honored and selected for 2 sessions last year which was a VERY overwhelming situation for a first time Summit presenter like myself.  This time around I’m still going to submit 2 sessions with my end goal of one being selected.  If I happen to end up with 2 sessions again I will be discussing with the “powers that be” at PASS HQ as to which session I’d like to present and which sessions I’d like to hit the cutting room floor.

The call for speakers closes on Wednesday, March 19th, 2014 at 10 PM (MST).

Summit2014

Thanks!!

Enjoy!! (Follow me on Twitter: @ColinStasiuk)

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.