Skip to content


SQL PASS Summit 2010 on a Budget

The following is some information I would like to share with the community about how I plan to travel to Seattle for the SQL Server Pass Summit.  Please take my information with a grain of salt because this is the first time I am attending.  Everything below comes from research and tweets. If you are a regular please leave comments so others can see your travel tips.

Summit 2010

PASS%20Summit%20Banner%20300x300
Can we fast forward to November?

The SQL PASS Summit 2010 is the best opportunity for SQL Server DBA’s to connect, share and learn. Your first obstacle towards getting into the Summit is to well pay for general admission to the summit. You basically have two options here, either you pay the general admission fee (this is what I am doing this year) or you can get someone to sponsor you. A great option here would be your employer. Your employer also isn’t your only option for sponsorship. Speaking of getting someone else to sponsor you MSSQLTIPS and Idera is currently looking to send someone to PASS.  Give it a shot it could be you!

If you are paying for yourself you will want to pay ASAP because PASS has a sliding scale.  Just like many other conferences there is a price before sessions are announced and different prices as you get closer to the event.  You want to avoid paying at the door because the price is usually a lot more.

The following are some links that will help you save some money on attending the 2010 Summit.

How do I get there?

How you get to the PASS Summit will depend on your location and its distance to Seattle.  I  live in Wheeling, WV which is an easy hour drive to Pittsburgh so I will be flying.  If you are also flying you might want to checkout bing.com and setup email alerts to track the change in flight prices.  At this time I see that there are round-trip flights under $300 from Pittsburgh.

In order to travel through the Seattle Metro area check out the public transportation system.  It looks like they have bus, and a monorail.  The Seattle Center Monorail can take you from the airport to downtown for $5.00 round-trip.

Where Should I stay?

The PASS website recommends the following two hotels.

Looking at bing.com and  traveladvisor.com I found a few hotels within a miles of the convention center under $100 per night.  If you are trying to stretch your money I would recommend checking them out.

Do you have any friends that are attending PASS? If so, you might want to recommend sharing a room. This is a great way for you to split the costs of a hotel room.

Where should I eat?

If you are attending the Summit there is good news. Breakfast and Lunch is included daily. This means you will only have to worry about dinner.   There will also be some evening events where you might be able to snag a bite to eat.  On Monday night you can attend the PASS Summit 2010 Welcome Reception.  On Tuesday night you can also attend the Exhibitor Reception.

Another thought towards saving some $$ on dinner is to talk it up with the vendors.  They are there to get to know you and see if their products can solve your problems.  If your team has a budget for SQL tools (I really hope your team does) I bet you could convince a vendor to take you out to dinner.  Even if you don’t have a budget for SQL Tools I bet you could convince some vendors to take you out to dinner.  Remember most people in sales try to build relationships before they sell you on a product or idea.

Can you buy me a drink?

I never really was a big fan of beer and alcohol until I started my career in Information Technology (we will leave the company name out of this story). There were several internal functions to attend for networking and they all had beer.  I quickly noticed that all the bigwigs always had a beer in their hands. Being fresh out of college I followed suite and soon fell in love with beer (a trip with the wife to tour Samuel Adams in Boston also helped).

Anyways back to saving money. If you like to grab a drink (I defiantly fall into this category) it looks like its cheaper to go away from the convention center.

According to @SQLDBA its cheaper to go to the Tap House across the street from the convention center. If you also like to sample local beer the Rock Bottom Brewery is another  recommended place within walking distance from downtown.

What are your travel plans?

PASS Summit vets what am I missing? How else can people save some $$ on their quest to their first Summit conference? Let us know we are all looking forward to your recommendations.

Posted in SQLServerPedia Syndication.

Tagged with , , , , , , , , .


Recap: PGH.NET August 2010 Meeting

On August 10th 2010 I attended and presented at the PGH.NET User Group meeting named “5 Guys with Code.”  According to one of the PGH.NET leaders tweet it looks like the headcount was 60+

Twitter  David Hoerster @brittrking Awesome mtg la ..

The following are some thoughts and highlights from the presentations.

Presentations

  •  
    • John Sterrett (Blog | Twitter) – Table Value Parameters with SQL Server 2008 and Microsoft .NET  
  • I presented a feature that is included in SQL Server 2008 and underused by many developers.  This presentation shows developers how to pass a  DataTable, DataReaders and Lists to SQL Server database objects with only two extra lines of C# or VB.NET code. 

    As promised below are some reference links

  • David Hoerster (Blog | Twitter) – jQuery Code Snippets in Visual Studio 2010

Time is money and David’s fifteen minute tip might just save you a lot of time and money.    He covered several tools that will help you generate some awesome JavaScript. 

I  really liked the jsFiddle.NET tool.  It looks like a great tool to mockup some a user interface (more on user interfaces later).

  • Rich Dudley (Blog  | Twitter ) – A Quick Look at the New SQL CE Engine

Being addicted to databases I very happy to see that I wasn’t the only one presenting a topic based on databases.  Rich did a great job explaining what SQL CE can do and what it cannot do. 

Rich blogged about his experience (post includes photos, slides and more)

  • John Hidey (Blog | Twitter) – Layout Controls for XAML

I have to admit that XAML and I don’t get along well.  We had a fling a few years ago.  XAML cheated on me and I haven’t been the same since.

Ok seriously, I tried XAML a few times and found it very hard to understand.  John did a great job going over the common things that are hard to understand when you get started with XAML.   John started with some very basic controls and then built a final example that included all the basic controls.

At this summers PGH.NET Code Camp we had a speakers session where one of the presenters said, “Code is considered legacy code when TDD is not applied.”  Eric bowling for TDD example showed how anyone can start developing TDD.

Posted in Events, SQL Server 2008, SQLServerPedia Syndication.

Tagged with , , , , , .


Moving SharePoint to the data center

I cannot speak for the whole legal industry but where I work a lot of people love some SharePoint.  It’s like 50 Cent says, “We love SharePoint like a fat kid loves cake.”  And trust me we love some cake.  With this mad love of SharePoint comes great collaboration and with this great collaboration comes tons of binary files stored in a database.  What does this mean to the DBA? SharePoint now consists of VLDB’s

Hmm… How do we move the VLDB’s across the USA and keep them in sync?

With the built in features of Log Shipping, database Mirroring, Transactional Replication with SQL Server I knew it was possible to migrate the databases and keep them in-sync.   At the time I wasn’t exactly sure of the best way to do this so I used the bat phone.

While some people love SharePoint I love Twitter. Twitter allows me to communicate with several great DBA’s.  For example, I used #sqlhelp which is the equivalent of getting Batman on the bat phone.  This time it was Brent Ozar ( Twitter | Blog) who confirmed my gut feeling that Log Shipping was the way to go.

So…. How do you do it?

The complete process I used is documented at mssqltips #2073.  This tip walks you though the process of 22 steps to get the job done.  I hope this tip helps out other DBA’s that need to migrate VLDB’s from one location to another location without using third party tools.

If you have any comments or suggestions please forward them along.

Posted in SQL Server 2008, SQLServerPedia Syndication.

Tagged with , , , , .


Resolving Very Large MSDB

The following is the a walk-through guide towards how I resolved a problem with a MSDB that went wild.  I strongly recommend never shrinking database files.  I am not alone on this.  If you need more reasons check here (If you don’t like that example see the ones used in that post).

Unfortunately I am in a situation where I didn’t have another option.  We didn’t have a process on a server to delete records from the tables used to log SQL Server Agent job information. This database server in particular has over 400 databases and hourly transactional logs and a full backup.  This alone will create 10,000 rows daily when logging the results.  We actually reached the point where the data drive free space was consumed.

Backup MSDB

First, step is to do a full backup of MSDB.  You should always make a backup before you plan on doing any changes with a system database.  You should also have a plan to restore the system database just in case you have to implement it.

So Where’s the Beef?

Next, I needed to know why this database was so huge.  I ran the following query to see the file size of all database objects within the MSDB database. You can find this query written by Jeremy Kadlec in MSSQLTIP #1461 I also highly recommend reading that tip as it will provide some more helpful information to troubleshoot a large MSDB.

SELECT object_name(i.object_id) as objectName,

i.[name] as indexName,
Sum(a.total_pages) as totalPages,

sum(a.used_pages) as usedPages,

sum(a.data_pages) as dataPages,

(sum(a.total_pages) * 8 ) / 1024 as totalSpaceMB,

(sum ( a.used_pages) * 8 ) / 1024 as usedSpaceMB,

(sum(a.data_pages) * 8 ) / 1024 as dataSpaceMB

FROM sys.indexes i

INNER JOIN sys.partitions p

ON i.object_id = p.object_id

AND i.index_id = p.index_id

INNER JOIN sys.allocation_units a

ON p.partition_id = a.container_id

GROUP BY i.object_id, i.index_id, i.[name]

ORDER BY sum(a.total_pages) DESC, object_name(i.object_id)

GO

Dam you sysmaintplan_logdetail

Okay, we tried to using sp_maintplan_delete_log and it failed because the transaction log grew and consumed all the space on the drive for transactional log files.  We are not allowed to take the SQL Server database engine offline so we go with the next best option truncate the tables in question and shrink the database.

Yes I know……  I said shrink the database.  I actually had to slap myself  after typing this.

I found this great post on msdn that walks you through the script to truncate the sysmaintplan_logdetail table.


ALTER TABLE [dbo].[sysmaintplan_log] DROP CONSTRAINT [FK_sysmaintplan_log_subplan_id];

ALTER TABLE [dbo].[sysmaintplan_logdetail] DROP CONSTRAINT [FK_sysmaintplan_log_detail_task_id];

truncate table msdb.dbo.sysmaintplan_logdetail;

truncate table msdb.dbo.sysmaintplan_log;

ALTER TABLE [dbo].[sysmaintplan_log] WITH CHECK ADD CONSTRAINT [FK_sysmaintplan_log_subplan_id] FOREIGN KEY([subplan_id])

REFERENCES [dbo].[sysmaintplan_subplans] ([subplan_id]);

ALTER TABLE [dbo].[sysmaintplan_logdetail] WITH CHECK ADD CONSTRAINT [FK_sysmaintplan_log_detail_task_id] FOREIGN KEY([task_detail_id])

REFERENCES [dbo].[sysmaintplan_log] ([task_detail_id]) ON DELETE CASCADE;

Shrink MSDB

Now I know you followed the first step and backed up your MSDB.  Once again you should never consider truncating or shrinking data if you don’t have a working backup that can be restored.

Okay now that we are done with the disclaimer I created the following script to truncate the log and data files.


--- SHRINK THE MSDB LOG FILE

USE MSDB

GO

DBCC SHRINKFILE(MSDBLog, 512)

GO

 

-- SHRINK THE MSDB Data File

USE MSDB

GO

DBCC SHRINKFILE(MSDBData, 1024)

GO

Rebuild Indexes

Now that you did the nasty and shrinked the database data file you need to rebuild your indexes and update your statistics.   You can find the scripts to do this below.


-- REBUILD ALL INDEXES

USE MSDB

GO

EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"

GO

-- UPDATE STATISTICS

EXEC sp_updatestats

EXEC sp_helpdb @dbname= 'MSDB'

How do we prevent this from reoccurring?

Well actually there are quite a few things that could have and should have been done.  We could create a maintenance plan to clean up the SQL Agent history, we can also specify in the agent’s properties to also clean up history.  I will show you how to do both below.

The following is the maintenance task that will help cleanup the agent history tables.

Cleanup History

You can also right click on the SQL Server Agent in SSMS and select properties.  Once the properties window comes up select History on the list on the left.  You will then be able to remove data by record size or date.

AgentCleanHistory

Posted in SQLServerPedia Syndication.

Tagged with , , .


Compare your websites traffic against your competitors

Once upon a time I did software development for a dot.com start-up that did very well.  Highschoolsports.com  is a huge success and eventually got bought by Gannett.  When I worked there we were constantly tracking unique hits.  In the back of my mind I always wondered how we did against other companies.

Today I caught up with a good friend of mine Adolph Santorine (old owner of highschoolsports.com) at tonights Greater Wheeling Chapter of AITP meeting and he showed me a tool I had to throw on here.  Its a web app that allows you to compare your competitors unique hits against yours. 

Give www.compete.com  a try.  It’s a nice tool that just might give you what you need.

Posted in Events.

Tagged with , , , , .


Using Profiler to trace database calls from third-party applications

Today using profiler to trace database calls from third-party applications was published on www.mssqltips.com.  Hopefully, this tip will help some people understand why profiler is bacon.  In this example I trace two queries with Management Studio.  Speaking of Management Studio, have you ever wondered what queries are executed by your favorite features of Management Studio?  You can follow the steps in this tip to do that too.

This is my fist tip published at www.mssqltips.com.  I look forward to publishing tips on a monthly basis.

Posted in SQL Server 2008, Scripts.


Wheeling, WV and Pittsburgh Joint AITP Meeting

Every year the Pittsburgh, PA and Wheeling, WV chapters of AITP have a joint meeting in Washington, PA.  It is usually is the most attended meeting for both chapters.   Currently at this point in time 40 people are signed up to attend. 

The meeting is scheduled for Tomorrow June 9th 2010 and it will be held Holiday Inn – Meadowlands at 340 Racetrack Rd, Washington, PA 15301.  You can register online and pay at the door. The cost is $29.  The meeting starts at 6:30pm

The topic for this joint meeting is Cyber-crime, investigations and digital forensics it will be presented by the Members of the FBI Pittsburgh Division Cyber Squad.  Members of the FBI Pittsburgh Division Cyber Squad will discuss current trends in cyber-crime, investigations and digital forensics.

Posted in Events.

Tagged with .


24 Hours of FREE SQL Server Training

On May 19th there will be 24 live back-to-back presentations including ones highlighting new features provided in SQL Server 2008 R2 and more.  I attended parts of the 24 hours of PASS last year and was blown away by the content.  If you work with SQL Server I highly recommend you attend.   You can register online now at http://www.sqlpass.org/24hours/2010/

The following speakers are lined up for this great event.  Adam Machanic, Andy Leonard, Brad McGehee, Brent Ozar, Brian Knight, Chuck Heinzelman, Dean Richards, Don Kiely, Don Vilen, Donald Farmer, Glenn Berry, Greg Low, Jacob Sebastian, Jessica Moss, Kevin Cox, Kevin Kline, Louis Davidson, Maciej Pilecki, Peter Myers, Peter Ward, Rushabh Mehta, Sean McCown, Simon Sabin, Thomas Grosher

Watching Paint Dry
Watching Paint Dry

“But John I have to do xyz watch the paint dry on May 19th and the 20th.”

That’s fine, it looks like these sessions will be recored and made available through PASS within two months.  If you access the event this way you can watch 24hrs of PASS and the paint at the same time :-)

A good friend of mine Thomas LaRock(blog | twitter) is organizing this bad boy.  For more information check out his post or the 24 hrs of PASS site.  I know it will be a big hit!

Posted in Events, SQLServerPedia Syndication.

Tagged with , , , .


DBA Survivor, Becoming a Rock Star DBA

In today’s world many companies want and need their employees to do more with less resources.  You might find yourself in a position where you start to manage databases while doing many other tasks.  Thomas LaRock’s book may  save you countless hours.  If you are starting and your goal is to be a Rock Star DBA this book might be one of the best investment you can make to have a successful career as a Database Administrator.

During the first week of January I moved from .NET Developer and part-time accidental DBA to full time DBA and PeopleSoft Engineer.  While this book just came off the shelves I still found it very interesting six months after I landed the job as a Database Administrator.  I agree with Brent Ozar, this book is tailor made for someone moving into a DBA role.  I also still think that it has useful information for someone like myself, someone who wants to understand what a Database Administrator does, or someone who has thoughts of becoming a DBA.

Favorite Quote

Tom does a great job giving you great information but he also throws in entertaining stories and great quotes.  While many readers will like the “shards of broken glass comment” quote my favorite is what you (the DBA) have in common with the President.  I would paste the quote below but that would ruined the fun.  I will tell you this, it’s hilarious but also at the same time very true.

Checklist

Checklists are very important to help automate processes and to make your life easier.  Heck sometimes they are as important as life and death.  For example, when a pilot is about to fly a single engine jet plane they have a checklist to complete before they go in the air.  Tom’s checklist for your first 100 days on the job is essential to make sure you have safe travels and are out of harms way once you get in the air with your DBA career.

No One Knows Everything

If you have not learned this lesson yet I highly recommend you do it now before its too late.  Tom explains why it’s just not possible to know everything.  He also provides some examples on how you can find the answers to what you don’t know.

Connect, Share, Learn

Within my five year career in IT I have had the pleasure to work at a major consulting firm, a dot com, and a global law firm.  What is the constant with these three environments?   There are a lot of the people in IT who prefer to stay in their cubical and communicate the least amount as possible. Tom explains not only why you want to break this trend but also includes some benefits.

Where is the Buffet?

Surprisingly this was the most important chapter for me. The goal of this book is to make sure you have a long successful career as a DBA.  This is not possible if your life is cut short due to health issues.  When your profession demands that you sit in front of a computer screen it’s easy to make some bad decisions that can put your health in jeopardy.  This was a wake up call for me. I am pushing 300 lbs and am glad to get back on the right track so I can have a long successful career as a DBA.

So there you have it.  If you are new into the DBA game or know of someone who is seriously considering becoming a DBA get this book.  You can find it at amazon.

Posted in Professional Development, SQLServerPedia Syndication.

Tagged with , .


PGH.NET Code Camp Review

This past weekend I had the pleasure of helping out David Hoerster (bio, twitter) with the setup of PGH.NET Code Camp.  Why, would I want to get up before the crack of dawn to help?  Well for starters David is a die hard Pittsburgh Pirates fan like myself.  Okay the real answer, is that I wanted to help with the code camp before I ran my first SQLSaturday in West Virginia.   This was a great practice before the game starts on May 1st.

In short I learned that if you have good volunteers it’s actually not too hard to have a great event.  If the event is free there will be people who just don’t show.  I guess mowing their lawn is more important than free training?  People will also leave before the event is over.  I could be wrong but I thought about half of the crowd left before the last session ended.  Finally, if a speaker doesn’t show you could replace the session with speakers panel.  This was a great move and actually was my favorite session of the day. 

SQL Server 2008 for Developers

During the day I also did a presentation on SQL Server 2008 for Developers.  I presented right after lunch and expected the majority of the crowed to have a food coma from the free burritos but this was not the case.  It actually was a nice interactive session. The following are a few quick facts from the presentation. 

About 40 people attended this session and only five of them are currently using SQL 2008.  I know this is a small sample size but it makes me believe that there are a lot of people out there still on SQL 2005 or SQL 2000.

The majority of the people awake (yes,  a few experience the food coma) were really impressed with using the real-time debugger to debug stored procedures, using merge to replace truncate table insert into table and use TVP to pass a data table in as an input parameter.

Follow-up Answers

The following are answers to some questions that were asked after the session.  Thought I would answer them here so others could find them in the future.

Can I create an index to filter based on dates?

Yes, you can.  I believe this is a new feature added in SQL Server 2008.  The following script will execute.

CREATE NONCLUSTERED INDEX FIBillOfMaterialsByStartDate
    ON Production.BillOfMaterials (ComponentID, StartDate, EndDate)
WHERE StartDate > '20000801' AND StartDate < '20010801';
GO

Checkout this MSDN link for more on Filtering Indexes. 

How can I make my database run faster? 

This is always a fun question and a hard one to answer without looking at the database and the server it resides on.   I recommended that this individual start with the free performance boosts.  This is also known as managing your indexes.   To do this checkout the following great links with video from SQLServerPedia.

Can I find the last time database objects were modified?

Yes, check out this link for a script that does the following task

Posted in Events, Professional Development, SQLServerPedia Syndication.

Tagged with , , , .



Get Adobe Flash playerPlugin by wpburn.com wordpress themes