PASS Azure Virtual Chapter Launched!

Earlier this year I became the chapter leader for the PASS SQL Azure Virtual Chapter and decided to reboot it. While in the reboot phase, an announcement was made stating that  SQL Azure would now be known as SQL Database. This situation made the committee members consider not only renaming the group but also changing the focus of the group. The end result is the creation of the PASS Azure Virtual Chapter with a mission to enable Azure knowledge sharing and create a network of Azure and Cloud Computing professionals.

Does this mean that we would not have any SQL Database (SQL Azure) sessions? SQL Database is part of Windows Azure so we will have sessions on the topic but not all the sessions would be focused on it.

Join us for our first session: Getting Started with Windows Azure

Date: Monday 24th September 11 AM Eastern Time (8 AM Pacific) - Add the event to your calendar

Speaker: Brian Prince, Principal Cloud Evangelist Microsoft

Abstract:
Windows Azure is Microsoft's cloud platform for quickly building and running scalable applications. We will cover just what the cloud is, as an industry, and what Microsoft is offering. We will see into the datacenters, how they work, and a high level view of all of the components of the platform.

For more information: http://azure.sqlpass.org/
Follow us on twitter: @AzurePASSVC

 
Continue Reading →

TTSSUG School Tour

Later this month, the Trinidad and Tobago SQL Server User Group (TTSSUG) will be hosting sessions at some of the tertiary education institutes in Trinidad. The purpose of the sessions is to introduce students to database topics that would serve them well as they join the IT world.

Agenda:
Introduction to TTSSUG
Introduction to Database Administration
Introduction to Database Programming
 
The presentations will also be highlighting the capabilities and features of SQL Server. The sessions will be from the perspective of an IT professional and not necessarily a theoretical view.

Tour Dates:

Date: Wednesday 26th September 2012
Time: 3:00 pm to 4:30 pm

Date: Thursday 27th September 2012
Time: 1:00 pm to 3:00 pm

Date: Friday 28th September 2012
Time: 9:00 am to 11:00 am

If you are a student at any of the institutes and you wish to attend, please send an email to events@ttssug.org with your name and the institute that you attend.

 
Continue Reading →

T-SQL Tuesday #34 - Presentations Can Be Helpful

The purpose of month's topic chosen by Rob Volk (Blog | Twitter) is to get some insight about where we get SQL Server help.

There are many methods to get assistance with SQL Server when you have issues but what about the help that you didn't realise that you need! How do you ask for help on an issue if you don't know you have an issue? Presentations have been a great resource for providing me with SQL Server knowledge  which assists me with finding and fixing existing and possible future SQL Server issues. It goes without saying that presentations can assist with current known issues as well.

Before you continue reading this thinking that I am just talking about attending sessions please note that  I am also talking about being the presenter. While preparing for a presentation I am sure you will learn something that can be used immediately or eventually for a fix/improvement to you system.

Besides the actual content of the presentation, the interactions during the session (e.g. questions and answers) are quite helpful and informative. You can get direct immediate answers to some of your questions and also both attendee and presenter can possibly learn from other people's scenarios/situations. An extra benefit of attending presentations is the networking opportunities, which can be considered as a separate way of getting help.

In the IT world it is very difficult to attend these presentations but luckily there are many online presentations to deal with this issue. Even if you are unable to attend the online session due to your schedule, many presentations both online and in-person are recorded to allow on demand viewing. Of course it is not going to be as great as being there and the networking opportunity will be lost.

I consider presentations to be a necessity to anyone in the IT world! A great place to get many helpful presentations is the PASS Summit. Sessions are recorded for people who want to see sessions that they missed or people who couldn’t attend but the DVD should not be your first option!

 
Continue Reading →

24 Hours of PASS: Summit 2012 Preview

It's that time of the year again, the PASS Summit is approaching and to help kick things off they are giving you a preview of the type of sessions you can expect at the Summit! That's right another 24 Hours of PASS (24HOP) event with back-to-back sessions starting at 12:00 GMT (UTC) on September 20, 2012.

For those of you who don't know about the '24 Hours of PASS' event, it is 24 live webcasts that provide free SQL Server training from some of the top SQL Server and BI experts from around the world. This Summit Preview edition will show case 24 sessions, out of the 180 + sessions that are going to be available at the Summit. Go to the 'Sessions by Track' page to see who are the 24 international presenters as well as the sessions that they will be delivering.

Want to know if the PASS Summit is for you, want justification for attending or want to have an idea of what sessions to attend while at the Summit then attend this 24HOP event!

Registration is open and if you have any questions then contact PASS at 24hrs@sqlpass.org

 
Continue Reading →

T-SQL Tuesday #33 - Monitoring Log File Size Without Logging On To The Server

This month’s T-SQL Tuesday is hosted by Mike Fal (Blog | Twitter). The topic is TrickShots and the purpose of this topic is to highlight a cool trick or process and explained what you learned from this trick.

I encountered my first log file issue in my early days as a DBA using SQL Server 2005. While I was on vacation, I received a phone call from the company's system administrator because he noticed the reduced free space on one of the drives of the database server. When I logged on to the server I immediately noticed the large log files that were not present a few days ago. After fixing the issue one of the main questions that was on my mind was "How can I know the log file size without logging on to the server to check the logs folder?".

I did some research and came across the T-SQL Statement:

DBCC SQLPERF (LOGSPACE)

This provides transaction logs usage statistics for all the databases on the instance (for more information see MSDN: DBCC SQLPERF)

I found the information very interesting and thought it would be a good idea to store the data everyday and look for some trend so that I can predict the size of the log files.  The following code was used to store it in a table:

INSERT INTO Information(DatabaseName,LogSize,LogSpaceUsed,Status)
EXEC ('DBCC SQLPERF (LOGSPACE)')

Around the time I was working on this issue, I was also now getting familiar with SQL Server 2005 Reporting Services and anything that was being stored in a table was suitable test information for a report. This resulted in a report with the data from the 'Information' table but I had to run the script and the report manually.

Using the little knowledge that I had of SQL Server 2005 as well as the excitement to try out new things, I decided to use a stored procedure as well as the subscription capability of Reporting Services to automate the process. The stored procedure was created to execute the insert script and also returned the inserted data every time the report was executed. The subscription capability allowed me to schedule when the report would be executed, how it would be delivered and the specific format of the report. The end result of this process enabled me to get my log size information in an Excel file via email. A great advantage of this was the fact that I could receive the email on my phone and check the file even if I was out of office or away from my machine.

Subset of the Log File Information in the Excel File

While this process could have been done more easily back then and much more easily now, it was a great way for me to learn and test the new features of SQL Server 2005. Another benefit of this process was the fact that the information that I received from the DBCC statement encouraged me to learn and understand more about log files.

Continue Reading →

TRUNCATE TABLE: A possible alternative for the DELETE statement

While reviewing an archiving script at my company I realised that most of the time spent waiting for the script to complete was due to the deletion process. While trying to find a better way to perform the deletion of data from the database I came across the DDL statement: TRUNCATE TABLE.

The TRUNCATE TABLE and DELETE statements can be used to remove records from a table, the difference is that DELETE can be used to remove some or all of the data in the table while TRUNCATE TABLE can only be used to remove all the data from a table (no WHERE clause). However TRUNCATE TABLE is faster than the DELETE statement and requires fewer system and transaction logs resources because of the difference in how they execute and operate. TRUNCATE TABLE removes data by deallocating data pages instead of removing rows one at a time.

I decided to do a comparison of the two statements using a test table with 3.4 million rows.

The results for each script/statement had four grids:
  • The first result grid shows the size of the MDF and LDF before the process.
  • The second result grid shows the number of records in the table before the DELETE/TRUNCATE TABLE statement is executed.
  • The third result grid shows the number of records in the table after the DELETE/TRUNCATE TABLE statement is executed.
  • The fourth result grid shows the size of the MDF and LDF after the process.

DELETE Statement

Script

Results

Notice the increase sized of LDF after the process (from 5.5625 MB to 2321.375 MB). The script was executed three times and each time the LDF was the increased to the same size.

The execution time results:

 SQL Server Execution Times:
   CPU time = 6177 ms,  elapsed time = 114451 ms.

 SQL Server Execution Times:
   CPU time = 6349 ms,  elapsed time = 105675 ms.

 SQL Server Execution Times:
   CPU time = 6193 ms,  elapsed time = 105816 ms.


TRUNCATE TABLE Statement

Script

Results

Notice no change to the size of the MDF or LDF. The script was also executed three times.

The execution time results:

 SQL Server Execution Times:
   CPU time = 0 ms,  elapsed time = 140 ms.

 SQL Server Execution Times:
   CPU time = 15 ms,  elapsed time = 96 ms.

 SQL Server Execution Times:
   CPU time = 0 ms,  elapsed time = 191 ms.

Conclusion:
Based on the execution times results it is very clear that the TRUNCATE TABLE statement is faster than the DELETE statement.  It is also clear that the DELETE statement process of removing rows one at a time requires more transaction log space when compared to the TRUNCATE TABLE process.

See the following MSDN links to understand for more information about TRUNCATE TABLE and DELETE.
Continue Reading →

SQL Server 2008 R2 SP2

Microsoft just released Service Pack 2 for SQL Server 2008 R2 which includes product improvements based on requests from the SQL Server community and hotfix solutions provided in SQL Server 2008 R2 SP1 Cumulative Updates 1 to 5.

Both the Service Pack and Feature Pack updates are available for download:

Continue Reading →

Community Links