OWSUG.ca

Welcome to Ottawa's Windows Server User Group Community!
Welcome to OWSUG.ca Sign in | Join | Help
in Search

Canadian IT Pro Blog

February 2012 - Posts

  • Windows 8 Consumer Preview is Here! Now What?

    ms376608_bnr-win8-2(en-ca,MSDN_10)Today is a really important date in the evolution of Windows. Today we released the Consumer Preview of Windows 8 , and Windows Server “8” beta. I’m sure that many of you are as excited as I am to download both of these (almost done as I write this post), but a thought struck me as soon I watch the download progress bar. Now What? Sure, like most of you, I’m going to find a machine to install each of them on, but then what else can I do to understand how both of these new operating system versions will impact our organizations?

    Let’s Start With Windows “8” Consumer Preview

    We’re all consumers which means that the excitement level around the Windows 8 Consumer Preview is way up there! Once you download it, many of you will probably just start playing with it. To help make your experience better, you should check out the resources on the Windows 8 Consumer Preview site to help you get started.  As IT Professionals and looking further down the road to when you will be asked to provide guidance to your organization on adopting Windows “8” and deploying it in your environments, you will want to check out the Springboard Series content on Windows 8 including the Windows 8 Consumer Preview Product Guide.  I suggest you start there to help make your time with Windows 8 Consumer Preview much more effective.

    One thing to remember is that it will be a while before Windows 8 is released so you want to take your time to evaluate how it will work with your existing applications and infrastructure.  The best way to get ready for Windows 8 is to ensure your environment is on Windows 7 today and not running Windows XP or earlier editions of Windows. Support for Windows 2000 has already ended and Windows XP extended support will end on April 8, 2014 – that’s coming up faster than you think. A great resource to help you plan, deploy and manage Windows 7, Office 2010 as well as learn how to ensure your in-house applications are ready is the Springboard site on TechNet. Like I said before, the best way to get ready to deploy Windows 8 on your client machines is to move off Windows XP and deploy Windows 7 now!

    The Real Excitement for Me is in Windows Server “8”!!

    On the server side, Windows Server “8” beta has just so much!! I have been in this industry a very long time (remember, I have NO hair left on my head!), and I can honestly say that Windows Server “8” is the most exciting release of a server operating system since Windows NT 3.1!!! (Told you I’ve been doing this a long time!!). The most exciting new features for me center around Private Cloud and virtualization including things such as shared-nothing Live Migration, Storage Live Migration, new storage options, NIC teaming in the OS, extensible virtual networking and more!  To learn what’s new in Windows Server “8” beta and find out how to configure your own Windows Server “8” beta test lab and more, check out the Windows Server “8” beta page on TechNet.  Another good place to go is the Windows Server “8” beta Library on TechNet

    You should not wait until Windows Server “8” ships to start to take advantage of Hyper-V and our Private Cloud offerings. Implement Windows Server 2008 R2 Hyper-V in your organization and download and take advantage of System Center 2012 to deploy, monitor, and manage your Private Cloud infrastructure right from the bare metal! 

    Key Thing to Remember!

    Like I said before, Windows 8 won’t be officially released for a while so prepare to integrate it in your environment in the future, but implement Windows 7, Windows Server 2008R2 SP1, and System Center 2012 today.  The great thing is that most of what you learn with these products will help you to deploy Windows 8 in the future.  Nothing like gaining skills you can re-use!

    Now, if you will excuse me, I have to start my own journey with Windows 8.  The downloads have just completed!!

    DamirB-BlogSignature

  • “The SQL Guy” Post #18: Spying on User Activity Using Logon Triggers

    Ever felt the need for knowing who is logging on to your SQL Server and at what time? Ever felt like restricting some of the specific users for certain time-period or firing a trace to track down user activity? Ever felt like limiting the number of concurrent connections from specific users?

     

    Well, you can do all that now with SQL Server.

     

    SQL Server introduced a new feature called Logon Triggers that allows you to fire a T-SQL, or a stored procedure in response to a LOGON event. You may use logon trigger to audit and control users by tracking login activity, restricting logins from accessing  SQL Server, or by limiting the number of sessions for specific logins. Logon Triggers are fired only after a login is successfully authenticated but just before the user session is actually established. All messages originating from inside the trigger (ex: messages, errors) from the PRINT statement are sent to the SQL Server error log.

     

    NOTE: If the user authentication fails for any reason, then the Logon triggers are not fired.

     

    Below example shows you how you can create a Logon trigger and send a message to SQL Server error log as soon as any user logs in:

     

    CREATING A SERVER WIDE LOGON TRIGGER

    CREATE TRIGGER OPS_LOGON

    ON ALL SERVER

    AFTER LOGON

    AS

    BEGIN

    PRINT SUSER_SNAME() +' HAS JUST LOGGED IN TO '+UPPER(LTRIM(@@SERVERNAME))+' SQL SERVER AT '+LTRIM(GETDATE())

    END

    GO

     

    LIMITING A LOGIN TO 5 CONCURRENT SESSIONS

    CREATE TRIGGER OPS_LOGON

    ON ALL SERVER WITH EXECUTE AS 'TORONTO\DAMIR'

    FOR LOGON

    AS

    BEGIN

    IF ORIGINAL_LOGIN()= 'TORONTO\DAMIR' AND

        (SELECT COUNT(*) FROM SYS.DM_EXEC_SESSIONS WHERE IS_USER_PROCESS = 1 AND ORIGINAL_LOGIN_NAME = 'TORONTO\DAMIR') > 5

        ROLLBACK;

    END;

     

    QUERYING SERVER LEVEL TRIGGERS

    SELECT * FROM SYS.SERVER_TRIGGERS

    GO

     

    DROPPING OPS_LOGON SERVER LEVEL TRIGGER

    DROP TRIGGER OPS_LOGON ON ALL SERVER

    GO

     

    DamirB-BlogSignature

  • Connecting to an iSCSI SAN Using Command Line Options on Hyper-V Server & Server Core

    Many of you (thousands, impressively!) read the three articles that Mitch Garvis wrote in April about Microsoft’s Software iSCSI Target 3.3. If you didn’t, you can read them all now by clicking below:

    In the months since, and more recently as both Mitch and I have been delivering IT Virtualization Boot Camps (register for Montreal, and Saskatoon now) a lot of people have asked us if this would work with Microsoft Hyper-V Server, and if so… how? The answer, of course, is YES it will work, but as with all things command-line, you cannot simply rely on the GUI and as such, there is another layer of complexity involved. Mitch outlines the steps you will need to follow to be able to configure your Hyper-V Servers (as well as your Windows Server Core boxes) as nodes in a failover cluster.

    DamirB-BlogSignature


    clip_image002

    In the Server Core and Hyper-V Server Server Configuration menu there is an option (number 11) to enable the Failover Clustering Feature. This takes a few seconds, and you are off to the races. You will also have to use Option 4 to Configure Remote Management; although I am sure it is all configurable by command line, I would much rather create my Failover Cluster using the Failover Cluster Manager. You can do this either from a server with the Failover Clustering feature enabled, or from a system with the Remote Server Administration Tools (RSAT) installed. That server does NOT need to be a node of the cluster.

    Unfortunately before you proceed with all of that great and simple GUI driven stuff, we have to present your iSCSI target to the Hyper-V Servers. This we will do locally from the command line:

    1) Start the Microsoft iSCSI Initiator Service:

    net start msiscsi

    2) Configure the Microsoft ISCSI Initiator to start automatically when you start up:

    sc config msiscsi start= auto

    (note the space after the = sign. that is intentional and required)

    3) Connect to the Target and set up a persistent login to same:

    iscsicli QAddTargetPortal 172.16.10.5

    (note the address I used is the IP address of the server that is running the iSCSI Software Target)

    iscsicli ListTargets

    clip_image004

    We see here that I have a single target available to me, with the IQN (Internet Qualified Name) of iqn.1991-05.com.microsoft:swmi-storage-target1-target – which shows that my SAN provider is Microsoft, that my server is called swmi-storage, and that my target (LUN) is called Target1 (I have a great imagination for names).

    iscsicli QloginTarget iqn.1991-05.com.microsoft:swmi-storage-target1-target

    This logs my server in to the target that was listed.

    iscsicli PersistentLoginTarget <target_iqn> T * * * * * * * * * * * * * * * 0

    This will make sure that the login is persistent – whenever you reboot.

    iscsicli ListPersistentTargets

    This will confirm that your target is persistent, and will list:

    • Target Name
    • Address and Socket
    • Session Type
    • Initiator Name
    • Port Number
    • Security Flags
    • Version
    • Information Specified
    • Login Flags
    • Username

    Admittedly, much of the information found therein will not be helpful. However it will determine that your target is persistent.

    iscsicli ReportTargetMappings

    clip_image006

    In this screenshot you can see the session ID, Target Name, Initiator, Initiator SCSI device, Initiator bus, target ID, and target LUNs – in this case, there are four LUNs.

    Now that you have presented your target (or targets) to the servers you are ready to continue remotely with the GUI… the easy part, which you can review in the blogs posted up top.

    Remember, managing your servers via command line may be daunting, but it pays off. Not only does it usually give us better control over what we are doing, but by using Server Core (or Hyper-V Server) you can take back a lot of resources that would otherwise be wasted on the GUI.

    Have fun and have a great week!

  • Microsoft Online learning opportunities: March 2012

    Hello folks,

    This is my compilation of some of the online resource available to you in March 2012.312px-RCA_Indian_Head_test_pattern

    This list featuring both live and on-demand content including webcasts, videos, virtual labs, and podcasts by product and topic.

    this is not the WHOLE list of the available content. but these are the ones i thought were relevant to customers and IT pros.

    Microsoft webcasts are 30-90 minutes in length and feature interactive presentations, product demonstrations, and question-and-answer sessions. Virtual labs give you an opportunity to test drive Microsoft’s newest products in an online environment. It's simple—no complex setup or installation is required. Stream or download audio podcasts and quickly access content with RSS feeds.

    Microsoft podcasts are free — just click and Learn!

    You can View all the podcasts for IT professionals here.

    Or visit the Interactive IT Professional Webcast Calendar.


    Live Webcasts:

    Business Insights Webcast: Office 365: Getting the Most out of Exchange Online (Level 200)
    Wednesday, March 07, 2012 - 10:00 AM - 11:00 AM Pacific Time
    https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032506155&Culture=en-US

    Business Insights Webcast: Office 365: Transforming Your Business with Lync Online (Level 200)
    Wednesday, March 21, 2012 - 10:00 AM - 11:00 AM Pacific Time
    https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032506157&Culture=en-US

    TechNet Webcast: Information about Microsoft Project and Project Server February 2012 Software Update (Level 200)
    Tuesday, March 13, 2012 - 8:00 AM - 9:15 AM Pacific Time
    https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032493966&Culture=en-US

    TechNet Webcast: Information about Microsoft Security Bulletins for March (Level 200)
    Wednesday, March 14, 2012 - 11:00 AM - 12:00 PM Pacific Time
    https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032499508&Culture=en-US

    Microsoft Office System Webcast: Word 2010: Gather Information through Forms, and Use Mail Merge to Produce Mass Mailings (Level 200)
    Wednesday, March 14, 2012 - 9:00 AM - 9:45 AM Pacific Time
    https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032503409&Culture=en-US

    Microsoft Office System Webcast: OneNote 2010: Work with Specific Controls (Level 200)
    Wednesday, March 14, 2012 - 11:00 AM - 11:45 AM Pacific Time
    https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032503411&Culture=en-US

    Microsoft Dynamics Webcast: Leveraging Microsoft Dynamics GP Light User to Give People More Insight (Level 100)
    Thursday, March 08, 2012 - 10:00 AM - 11:00 AM Pacific Time
    https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032501467&Culture=en-US

    Microsoft Dynamics Webcast: Integrating Microsoft Dynamics ERP and Microsoft Dynamics CRM with the Microsoft Dynamics CRM Connector (Level 100)
    Tuesday, March 27, 2012 - 10:00 AM - 11:00 AM Pacific Time
    https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032501471&Culture=en-US

    Microsoft Dynamics Webcast: Elevate Your Bottom Line with Microsoft Dynamics GP (Level 100)
    Tuesday, March 27, 2012 - 10:00 AM - 11:00 AM Pacific Time
    https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032501469&Culture=en-US

    Microsoft Dynamics Webcast: What Is the Microsoft Dynamics SL 2011 Connector for Microsoft Project Server 2010? (Level 100)
    Wednesday, March 28, 2012 - 10:00 AM - 11:00 AM Pacific Time
    https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032501542&Culture=en-US

    Highly Rated On-Demand Webcasts:

    TechNet Webcast: From Virtualization to Private Cloud with System Center 2012 Virtual Machine Manager

    TechNet Webcast: Becoming the Next Private Cloud Expert Now (Level 300)

    IT Manager Webcast: How Microsoft IT Takes Initial Steps Toward the Consumerization of IT (Level 200)

    Microsoft Office Tips and Tricks: Create Easy to Use Notebooks for Gathering Information

    Microsoft Office Tips and Tricks: Outlook 2010: Use Contacts as More Than Just an Address Book

    Microsoft Office Tips and Tricks: Do More with Data in Excel 2010

    Popular Virtual Labs:

    TechNet Virtual Lab: SQL Server 2012: Exploring Transact-SQL Improvements in SQL Server 2012

    TechNet Virtual Lab: SQL Server 2012: Managing Rich Unstructured Data in SQL Server 2012

    TechNet Virtual Lab: SQL Server 2012: Exploring SQL Server 2012 Integration Services

    TechNet Virtual Lab: Office Compatibility: User Adoption Resources

    TechNet Virtual Lab: System Center 2012 Configuration Manager: Settings Management

    New Videos:

    TechNet Radio: How to Transition from GroupWise to Office 365

    TechNet Radio Community Corner John White MVP Office 365, BI, SharePoint and Lync

    TechNet Radio: IT Time – Windows, iPad and Android - Managing and Using Your Office Assets in a Tablet World (Part 1)

    TechNet Radio: IT Time – Preparing for Your Transition to Office 365

    TechNet Radio: IT Time – How to Add a Vanity Domain for your Office 365 Account

    New Podcasts:

    TechNet Video: TechNet Radio: Cert Talk - New Private Cloud Certification Exam and 20 Year Anniversary of the MCP
    WMV | WMA

    TechNet Radio: IT Time – Inside Microsoft IT - Patch Management in Virtual Machine Manager 2012
    WMV | WMA

    TechNet Radio: Virtual Lab Insider: Building Your Cloud Infrastructure with System Center  2012
    WMVWMA

    TechNet Radio: Virtual Lab Insider: Building a Service Template in System Center 2012
    WMV | MP4

    TechNet Radio: Virtual Lab Insider: Infrastructure and Application Performance Monitoring with System Center 2012
    WMV | WMA

    Business insights, Microsoft Dynamics, IT talk shows, and small business content:

    Getting the Most Out of Your Business With Office 365
    Microsoft Office 365 is Microsoft Office collaboration with productivity tools created to improve business potential. In this series of Office 365 webcasts focuses on Microsoft SharePoint Online, Microsoft Lync and Microsoft Exchange. Office 365 can revolutionize your organization by helping to empower individuals through the best productivity experience, deliver business insights quickly, support compliance requirements, connect various devices, and cut costs for maintenance and training.

    Business Ready Licensing, Get the Most Out of Your Investment
    In this webcast, learn how to take your business solution to the next level and expand the functionality of your current system by transitioning from Module Based Licensing (MBL) to Business Ready Licensing (BRL). BRL offers you the choice of two license editions—Business Essentials Edition and Advanced Management Edition—to best support your business processes and needs.

    How to with “ITProGuru”, Dan Stolts
    Are you required to keep your infrastructure humming?  Keep up with the systems management expert and ITProGuru as he teaches you how to overcome challenges you face in your business. He will focus most of the content on systems management, security, virtualization and cloud.  However, more topics that include other technologies and the IT community will be addressed as well.  Learn how to leverage community to grow and streamline your business, your department, your career, and your sphere of influence.

    IT Time with Blain Barton: Get IT from the Source
    Blain Barton and other Microsoft IT Pro Evangelists invite IT guests to join their online radio show to discuss Information Technology topics. System Administrators, IT Engineers, Product and Program Managers, and other guests from inside and outside Microsoft join the broadcasts to share their insights on topics like Windows Deployment, Cloud Computing, Windows Azure, Virtualization, Web, SQL Server, Exchange Server, and other resources from Microsoft.

    Deployment Essentials with John Baker: Tools to Help Solve Your Deployment and Operational IT Problems
    Need help in deploying Windows 7 and Office 2010? You've come to the right place! We have a variety of resources for the wide range of tools available from Microsoft to assist you in your deployment efforts. John Baker, a Senior IT Pro Evangelist with Microsoft, will host a series of videos taking a detailed look at the Microsoft Deployment Toolkit 2010 Update 1 and the Application Compatibility Toolkit, both free toolsets. Future videos will also look at System Center Configuration Manager and System Center Essentials to see how they can be used to manage deployments.

    TechNet Radio: The Mic is Yours
    TechNet Radio is an Internet Radio show with content for IT professionals. TechNet Radio features the latest information from Microsoft insiders and industry luminaries, as well as profiles of leading companies. We bring you the trends and technologies that are shaping our industry, and offer perspectives from your peers.

     


    Please let me know if this is something you find valuable. or if there is something specific you’re looking for.

    There is so much to learn. we should take advantage of every opportunities.

    As always, please contact me should you have any comments or questions.

    Cheers!

    Signature

    Pierre Roman, MCITP, ITIL | Senior Technical Account Manager | Directeur de Compte Technique Senior
    IT Pro blog | Twitter | Facebook | LinkedIn

     

    This article also appears on Thoughts and After thoughts

  • Managing Your Servers Remotely using the RSAT Tools

    While delivering IT Virtualization Boot Camps across the country, Mitch Garvis and I often get asked about how to administer Windows Server 2008 R2 computers running Hyper-V or other services remotely.  This is especially true if you want to administer computers running Hyper-V Server or Windows Server 2008 R2 Server Core install.  Mitch put together information on how to do this, so here it is.

    DamirB-BlogSignature


    In this day and age of virtualization it is not that it is getting harder to sit down at a server to administer it… it is just getting easier to administer it remotely. Where it does get easier is when you have several servers – often a mix of physical and virtual – that you need to manage. Sure, you can still sit down at the physical servers… you could even open an RDP (Remote Desktop Protocol) session to administer them individually from your desktop. However with each of those you are going to have to manage them all individually.

    Enter the Remote Server Administration Toolkit (RSAT).

    Unless you are using System Center to administer your servers, chances are you are either using PowerShell or, more likely at this point, MMC (Microsoft Management Console) consoles. As we learned in Microsoft Windows 2000 Server, MMC consoles can connect to remote servers (or desktops) as long as Windows Remote Management (WinRM) is enabled (Actually WinRM and the Windows Firewall were only introduced in Windows Server 2003 R2 if memory serves, but MMC consoles were remoteable clip_image002).

    You can enable WinRM in Windows Server 2008 R2 from the Server Manager main screen (as shown):

    clip_image004

    clip_image006

    clip_image008

    (Note: For those of you running Server Core installations… good for you! you can do all of this with a simple command line: WinRM /quickconfig)

    Now that we can remotely manage our servers, we can do so from any Windows Server 2008 R2 box by adding the appropriate feature from the Add Feature Wizard:

    clip_image010

    I should mention that you will not be able to manage systems on which you do not have credentials, and although the RSAT tools can work in a workgroup, they are much more fluid and trouble-free in a domain environment. Also remember that adding the role or feature under RSAT does not install the actual role or feature, only the consoles required to manage them.

    This is great for administrators who want to manage their servers remotely from another server… but what about managing them from your desktop? There’s a simple solution for that. Simply download the Remote Server Administration Tools (RSAT) for Windows 7 (http://www.microsoft.com/download/en/details.aspx?id=7887) from the Microsoft Download Center. Using another version of Windows? There is an RSAT download available for WIndows Vista, but if you are still running Windows XP then I am afraid you are out of luck (…and have 777 days until #EndOfDaysXP!).

    Once you have downloaded and installed RSAT into your Windows 7 machine you will see no difference. However if you go to Turn Windows features on or off, things start to change. To get there, open Windows Explorer and navigate to Computer. If you do not see the option to Uninstall or change a program chances are you have not clicked on Computer.

    clip_image012

    You should see a list of your installed programs on the right, but to the left there should see an option ‘Turn Windows features on or off (shown). Click there.

    clip_image014

    clip_image016

    It will take a couple of minutes, but when it is done you are ready to start administering your servers from Windows 7… just click on the Start pearl, expand Administrative Tools, and the new consoles should be there.

    clip_image018

    You can load any of them up (for this example we will use Hyper-V Manager) and you have… nothing. However you can right-click on Hyper-V Manager in the Navigation pane, and click Connect to Server…

    clip_image020clip_image022

    You can add multiple remote servers to the same MMC console (seen below), including full installations of Windows Server, as well as Server Core installations and (in the case of Hyper-V hosts) Windows Hyper-V Server, which have to be managed remotely as they have no graphical user interface (GUI).

    clip_image024

    So go ahead… manage your servers from your desktop without ever having to leave your office/cubical/desk/cafeteria. Wherever you like to work from!

    This post also appears on garvis.ca

  • “The SQL Guy” Post #17: Recovering Data Using SQL Server Emergency Mode

    Remember those days when the database would go in to suspect mode and you had to perform various steps to recover the database by putting the database in the emergency mode and then extracting the data out of that emergency database?

     

    These are the high level steps you had to perform in previous (<SQL2K5) versions of SQL Server

    1.       Enable modifications to system catalogs.

    2.       Change the status of the database in SysDatabases system object to 32768

    3.       Restart SQL Server services (Once restarted database would appear in Emergency mode)

    4.       You would then transfer the data from your database in to another database

     

    This process was not an easy process and involved manually updating system tables. Often this information was not publicly available.

     

    This process has changed since the release of SQL2K5 onwards, putting the user database in EMERGENCY mode is now a supported and documented feature in the current release of SQL Server (unlike SQL Server 2000/7.0/6.x where you had to change the status of SYSDATABASES)

    With the release of SQL2K5, SQL Server no longer allows making any changes to the system tables even by SA’s. Making even a slightest change to system objects is restricted. However, there may be situations when you would need to put the database into EMERGENCY mode and export/extract the data out of the corrupt database in to another database and in order to do that, SQL Server now provides a new feature as part of the ALTER DATABASE statement that would enable System Administrators to put the database in to EMERGENCY mode.  

    In the below example, we will see how this can be done using the ALTER DATABASE statement. Note: This is simply an example of how to put the database in emergency mode and how to bring it back to its normal state. In a real life scenario, once the database is in suspect mode and you put it in EMERGENCY mode, you may not be able to put it back in the normal state due to corruption. In this situation, you must export the data to another database.

     

    IMPORTANT: It is strongly recommended that you perform regular backups of your database to avoid any data loss.

     

    PUTTING SALES DATABASE IN EMERGENCY MODE

     

    ALTER DATABASE SALES SET EMERGENCY

    GO

     

    Once the database is in emergency mode, you should now export the data from the SALES database in to some other database.

     

    PUTTING THE DATABASE BACK TO NORMAL STATE

     

    ALTER DATABASE SALES SET ONLINE

    GO

     



    NOTE: One of the good feature of SQL Server EMERGENCY mode is that when you run DBCC CHECKDB on a user database that doesn’t have a log file (ex: disk on which log file(s) were residing crashed and can’t be recovered), CHECKDB will rebuild the log file automatically for that user database when it is run while the database is in EMERGENCY mode.

     

    THINGS TO KEEP IN MIND:

    When the database is put in the EMERGENCY mode, it is marked as READ_ONLY and logging is disabled. Only members of SYSADMIN role can set and are allowed to access the database when in emergency mode.

     

    You can verify if the database is in emergency mode or not by examining the “STATE” and “STATE_DESC” columns in the sys.databases catalog view or from the “STATUS” property of the DATABASEPROPERTYEX function.

     

    IMPORTANT: It is strongly recommended that you perform regular backups of your database to avoid any data loss.

    DamirB-BlogSignature

  • Microsoft Private Cloud Part 1: What is a Private Cloud?

    A new whitepaper was released in January comparing private cloud solutions from Microsoft and VMware, taking a look at the functionality, benefits and economics of each solution. This series of blog posts breaks down the components of the whitepaper into consumable chunks and I’ve added my own commentary.

    Starting with the basics, what is a private cloud?

    From the whitepaper:

    Private cloud is a computing model that uses resources which are dedicated to your organization. A private cloud shares many of the characteristics of public cloud computing including resource pooling, self-service, elasticity and pay-by-use delivered in a standardized manner with the additional control and customization available from dedicated resources.     

    image

    Fig. 1: Private Cloud Attributes

    So what does that mean? Basically, you’re building a more dynamic IT infrastructure that needs less of the network admin’s day to day attention for mundane tasks. The infrastructure has many of the characteristics and benefits of a public cloud but stays in your control.

    Say, for example, you are an organization that has a team of developers working on internal applications. These applications may run parts of your financial operations, human resources or inventory control among other things. The developers routinely request computers for testing their applications which requires IT staff to take in the requirements, get a quote (sometimes several), and make the purchase. Once the hardware arrives on site, it needs to be configured and then deployed out to the floor. It could take weeks to months from the time the request is submitted to the time the hardware is ready to be used.

    By building out a private cloud infrastructure, you could have an environment where the development team goes to a web portal to put in their request, specifying the number of CPUs, memory and storage needed. A virtual machine is then provisioned and the test environment is available to the development team in a matter of hours (if not sooner) rather than weeks or months.

    Behind the covers, virtual machines can be allocated as needed and shifted to make the best use of the hardware resources available. The environment is managed to be scaled up and down as necessary depending on the needs and requirements of the business. Inter-company payments can be made based on which business units are using what resources. The infrastructure is managed, secured and customized by the internal IT team.

    So now that we have the basics, the next post will detail what Microsoft’s private cloud solution looks like. Stay tuned!

    signature2 (100x78) 

    [This article also appears in the IT Manager Connection blog]

  • Things NOT To Take Away from the IT Virtualization Boot Camp

    donotenterAs I listen to Mitch Garvis today it occurs to me that there are some things we need to make clear to those who have participated in Mississauga, Vancouver and Ottawa, or will be participating in IT Virtualization Boot Camps in Montreal, Calgary, Edmonton (registration link coming soon), and Saskatoon

    When we developed the IT Virtualization Boot Camps we had several discussions around what hardware we should use to deliver the sessions. Theoretically we wanted server-grade hardware but we couldn’t get anyone to donate it… and frankly the idea of carrying a populated half-rack around did not appeal to me or Mitch. We briefly discussed the possibility of building it in a remote datacentre but decided against it because of potential Internet connectivity issues.   We ended up building the environment on laptops.  In fact, we built a special case to ship the 20 computers we use around the country (as well as a second one for the machines we use to deliver the sessions).  It is not an ideal solution, but it allows us to do everything we wanted to do when we land in a city. 

    After the first couple IT Virtualization Boot Camps both Mitch and I started getting questions from attendees that we had not expected… asks for support on the most ridiculous scenarios, to which we would usually respond ‘Why would you ever want to do that in a production environment?’ The answer kept coming back ‘Well, isn’t that how you told us to do it?’ Of course it wasn’t, but as we both thought about, we began to understand where some of the miscommunications came from. Based on that, Mitch compiled a list of  what NOT to do in production in your environments!

    DamirB-BlogSignature


    1. Your laptop is NOT a server!

    2. Your desktop is NOT a server!

    I have met people over the years – especially in the SMB space – who feel that because a computer is based on x86 hardware and the specs are similar they can run their production servers on any hardware. This is WRONG! Just as there is a difference between corporate-grade and consumer-grade hardware, servers should only be run on server-grade hardware – whether you prefer HP, Dell, or Intel OEM machines.

    3. You should have multiple domain controllers!

    4. If you have only ONE domain controller, and it is virtualized, there are risks in joining the virtualization host to that domain. I am not saying that it will not work – it will – as long as you are careful about it. Remember, do it carelessly at your peril!

    5. When using a Storage Area Network (SAN), which is highly recommended for virtualization environments, use a proper physical SAN device. Trying to do things ‘on the cheap’ with software SAN solutions may work… but use them as a last resort. Remember, they will not have the flexibility or power of a physical SAN, nor the management tools.

    6. If you do decide to use a Software SAN (such as Microsoft iSCSI Software Target 3.3), DO NOT UNDER ANY CIRCUMSTANCES BUILD IT IN A VIRTUAL MACHINE.

    What software SANs do in order to ensure that the volume is not shared is it creates a fixed-size VHD. If you create a 100GB LUN (Logical Unit Number) then a 100GB VHD is created on the volume. Creating a VHD within a VHD not only slows things down, it also has the potential to… well, make things go bad.

    7. Don’t (on a daily basis… or EVER!) turn your Hyper-V hosts off, disconnect them and all of your networking components, put them into a roller-board suitcase, and travel with them. Your servers should only move if your company sells your building and moves to a new one. Otherwise they should stay put and always stay on! In fact, there should be careful planning for UPS requirements and generators in the event of power outages. Remember… when I am finished at your site at the end of the day… I ‘destroy’ the demo environment and rebuild it before going to my next session!

    8. YOU NEED MORE THAN ONE NETWORK CARD RUNNING ON A CHEAP D-LINK SWITCH TO MAKE YOUR VIRTUALIZATION ENVIRONMENT WORK!!! This is not a commentary on D-Link hardware… for home and SMBs they probably work pretty well (I use them for some things). When planning the network architecture of your virtualization environment you should do some serious planning around networking requirements, including how many NICs for production, how many for iSCSI, how many for Clustering, will your Production vNetwork be shared with your Management vNetwork? The answer to all of these questions depends on your requirements… but it is ALWAYS more than one. Remember: More NICs=More Better!

    9. Your iSCSI (Storage) network should not be on the same wire as your Production network, and if it is out of necessity then you should at the very least implement vLAN tags to segregate the traffic. Remember, the only encryption you can put on an iSCSI network (and few people seem to…) is CHAP – not very good.

    10. YOUR LAPTOP AND DESKTOP ARE NOT SERVERS! Of course this is the same as Points 1 & 2, but important enough a message that it warrants repeating.

    11. VM Snapshots are great for labs and testing, but are not recommended for your production environment, and are NEVER a long-term solution. In fact this is STRONGLY discouraged by both Microsoft, VMware, AND SWMI Consulting Group They should be used in production sparingly and carefully, and only with very careful planning and monitoring. Remember, when you delete a snapshot… NOTHING HAPPENS. The VHD and AVHD files only merge when you shut down the virtual machine, and can take a lot of time!

    12. Breaking any of these rules in a production environment is not just a bad idea, it would likely result in an RGE (Resume Generating Event). In other words, some of these can be serious enough for you to lose your job, lose customers, and possibly even get you sued. Follow the best practices though and you should be fine!

    PLEASE take away these lessons as well as the ones we conveyed to you in the IT Virtualization Boot Camp.

  • “The SQL Guy” Post #16: Using the Special Admin Connection to SQL Server

    There are times when SQL Server may be so busy processing requests that it can no longer allocate memory or processor resources to even allow an SA to connect. This has been an issue with older versions of SQL Server.

     

    SQL Server solves this problem by introducing a feature called "Dedicated Administrator Connection” (DAC).

     

    DAC uses a specific TCP endpoint in a SQL Server instance that is always attached to a dedicated UMS (User Mode Scheduler). DAC provides a connection that can be used by a member of the sysadmin role to access a SQL Server instance, thereby guaranteeing that an administrator could not be locked out of SQL Server due to resource allocation issues.

     

    DAC connection is similar to a regular SQL Server connection except that it has only one worker thread to serve requests. It cannot run any queries that require parallel work/multiple threads such as BACKUP or parallel query plan. It will use the regular system memory and in case of failure, it will use its reserved memory. Only a single connection of DAC is allowed at a time and if a connection is already being used, any subsequent connections are refused.

     

    Due to the limitation in available resources (One thread and limited amount of memory), you must be very careful of the types of queries you run. You MUST use DAC connection exclusively for diagnostic purposes to resolve a condition that cannot normally be resolved through a regular connection.

     

    You can create a connection to DAC in two ways:

     

    1) Using SQLCMD from the Command Prompt

    2) Using SQL Server Management Studio

     

    *You must use -A parameter when using SQLCMD to use Dedicated Administrator Connection.

     

    THINGS TO KEEP IN MIND:

    1.       DO NOT USE DAC FOR EVERYDAY WORK. IT IS EXCLUSIVELY RESERVED FOR EMERGENCY PURPOSES ONLY.

     

    2.       ONLY ONE DAC CONNECTION IS ALLOWED PER INSTANCE. IF SOMEONE ELSE IS CONNECTED TO SQL SERVER USING DAC CONNECTION OR HAS LEFT THE CONNECTION OPEN, YOU WILL NOT BE ABLE TO CONNECT TO SQL SERVER USING DAC UNLESS THE OTHER CONNECTION IS CLOSED.

     

    3.       BY DEFAULT, DAC CONNECTION IS ALLOWED ONLY ON A LOCAL SERVER CONNECTION. YOU MUST ENABLE IT FOR REMOTE CONNECTION IF YOU WISH TO USE IT REMOTELY. (BY DEFAULT IT IS NOT ON FOR A CLUSTERED INSTANCE)

     

    CONNECTING TO DAC FROM COMMAND PROMPT

    C:\> SQLCMD –S SERVERNAME –E –A

     

    * The administrator can now execute queries to diagnose the problem and possibly terminate the unresponsive sessions.

     

    RECOMMENDED QUERIES AND COMMANDS FOR DAC

    1.       KILL COMMAND

    2.       DBCC TRACEON/TRACEOFF

    3.       DMV/BASIC SINGLE TABLE QUERIES

    4.       SET OPTIONS

    5.       SP_CONFIGURE/RECONFIGURE (OPTIONS THAT DO NOT REQUIRE RESTARTING SQL SERVER)

     

    AVOID QUERIES AND COMMANDS FOR DAC

    1.       BACKUP/RESTORE

    2.       DBCC CHECK COMMANDS

    3.       AVOID ANY COMMANDS THAT REQUIRE MULTIPLE THREADS

    4.       MULTIPLE TABLE JOINS

    5.       AVOID STATEMENTS THAT MAY GENERATE LOTS OF IO

    6.       AVOID ANY DDL STATEMENT

     

    DamirB-BlogSignature

  • How To Clean Up Cluster Nodes from Destroyed Clusters

    OopsWhile delivering IT Virtualization Boot Camps and taking the participants through the process of creating a failover cluster, Mitch Garvis and I found that a couple of times some of the individuals ran across issues when creating a Windows Failover Cluster from both nodes at the same time – you only need to create the cluster from one node and it does all the work for you on both!  The end result was that in order to fix the issue it was necessary to destroy the cluster and start again.  In some cases, this process required some manual clean-up.  Mitch, having experienced the issue himself while working with a Partner, decided that this is a great topic for a blog post – and I agreed!

    BTW, IT Virtualization Boot Camps are coming to Ottawa (Feb 17/18), Montreal (March 2/3), and Calgary (March 12) with Edmonton and Saskatoon in the works so sign up today!

    DamirB-BlogSignature


    There are things that you just shouldn’t do in real life. While many of them involve cold lamp posts and electric sockets, there are many in the IT field that inexperienced pros do that are avoidable, but once done seemingly impossible to recover from.

    I came across one such issue some time ago when resetting my Virtual Partner Technology Advisor Toolkit (blog on this to follow). I visited a partner with only two of my server-laptops, and they asked me to demonstrate creating a Failover Cluster. I destroyed my existing Cluster and did just that. Unfortunately the next day I discovered that my third server-laptop, which had been a node on the now destroyed Failover Cluster. When I tried to join it to the new cluster I got a message that ‘This computer ‘Host1.alpineskihouse.com’ is joined to a cluster.’

    clip_image002[6]

    Failover Cluster Service is so much better than its predecessor, and this is a very simple fix. However if you don’t know it you can end up banging your head against the wall and assuming you have to reinstall your OS. Not the case. It is a simple command line:

    cluster node <computername> /forcecleanup

    so in the case of my alpineskihouse.com laptop-server, I would open a command prompt (Run As Administrator) and type:

    cluster node host1.alpineskihouse.com /forcecleanup

    It only takes a few seconds… it cleans out the registry and allows that server to be joined to a new cluster.

    I thought of this because I encountered the situation in the Virtualization Boot Camp Challenge at Microsoft Canada on Saturday. If I hadn’t found that link, one of the teams (the team that was until the last challenge in first place!) would not have been able to complete the challenge, and would not have finished in Second Place.

    One of the teammates asked me how they could have achieved the same results using the GUI (Graphical User Interface) but you can’t… the GUI tools are great for day to day tasks, and even a lot of the more complicated stuff, but the truth is there are just some things that you have to do ‘under the hood’… in the Command Prompt.

    I repeat over and over the importance of knowing the command line tools for the common tasks that we do every day. While I always tell them that they have to know them for exams, the truth is that sometimes we need to use them in our jobs. When they argue that they shouldn’t need to learn command line tools I tell them (and am not lying) that the command line tools often separate the ‘computer guys’ from the IT Professionals… if you are going to have the respect to learn your profession and be able to do things right, then you have to know at least some of the command line tools, and if you don’t know them then you have to at least know how to find them and use them.

    Now go forth and Cluster… or I guess cluster.exe clip_image004[4]

  • Why We Love Our MVPs!

    My colleague, Paul Laberge, posted this article on the Canadian Developer Connection Blog and I had to share it.  We here on the IT Professional side love our MVPs as well.  Many of them allow us to provide you with the great content on this blog as well as through our various online and in-person events.  We can’t do what we do without our MVPs and others in the community who are always there to help.

    DamirB-BlogSignature


    MVPBannerThe Microsoft MVP programme is an award programme that recognizes individuals who are active in online and local communities that show the value of Microsoft products and the Microsoft platform in general.  The individuals who receive this designation are some of the most hard-working and knowledgeable technology professionals in Canada.  If you have followed a tutorial on a Microsoft product or read a blog post about a Microsoft technology, there is a good chance that at least one MVP is involved in with it, either by delivering the content or adding to the conversation around it. If you’re an MVP, feel free to comment on this post on what the MVP programme means to you.  If you’re interested in becoming an MVP, read on for more information!

    I have had the great pleasure in meeting and working with some amazing people in my career.  Certainly, my co-workers are people I count in that group, but there is an extended family of technology professionals that I also count in that group as well – the Canadian Microsoft MVP community.  The men and women in this group not only know their craft inside out, but also share that knowledge with Canadians interested in technology at-large.  In fact, many have garnered global recognition and are sought after for speaking engagements in every province in Canada and many countries around the world.

    They also provide their knowledge to you online through a number of channels including their blogs, Twitter feeds, LinkedIn groups, video tutorials and pretty much every other online media type available.  They are great resources for you if you’re learning a new technology or if you know a technology inside out but you’re running into a brick wall trying to solve something.

    So what exactly is a Microsoft MVP anyway?

    Glad you asked.  The best place to learn about the MVP programme is here.  This site basically answers the What, Who and How of the MVP programme.  In essence, an MVP is someone who is active in the community that helps others understand Microsoft technologies and how to use them.  An MVP is not a Microsoft employee – they are technology professionals that use Microsoft technologies everyday and are therefore in a position to provide you with not only an objective opinion on the good and the bad of the technology, but chances are if you’re having a problem with a given technology, an MVP in that technology expertise has probably already been there and knows the answer how to fix it.

    Who are the Canadian MVPs?

    The list of Canadian MVPs can be found here (it’s the first page of 5 – just click through the pages to see them all).  This is a dynamic list and will change over time.  As you can see, each MVP has an area of expertise.  Every MVP has demonstrated leadership in their area of expertise and has been recognized by Microsoft not only for their knowledge but also their willingness to share that knowledge with others.

    What benefits do MVPs receive?

    When you become an MVP, Microsoft sends you a letter telling you that you have been accepted into the MVP programme, along with a plaque or trophy that you can adorn your home trophy case (or work shelf) with.

    You also receive an MSDN (for developer-focused MVPs) or TechNet (for IT Pro-focused MVPs) subscription for the duration of your tenure as an MVP (some MVPs have been in the programme for over 10 years!).

    In addition to this, you get an invite to the exclusive and very prestigious MVP Summit.  The MVP Summit is an annual event that happens in Redmond where only MVPs attend and are invited to sit in on sessions given by product groups talking about the future of various technologies.  Better yet, the product teams are looking for your input as an MVP given your expertise in using these technologies in real-life situations.  You actually can get a say in how the products might be shaped!

    But most importantly, as an MVP you are recognized in the community as a leader in your chosen field of expertise and that recognition can create new and strong relationships with others in the community, which can be both personally and professionally rewarding.

    I want in.  How do I become an MVP?

    As you might imagine, becoming an MVP is not a particularly easy journey, but it is a rewarding one.  If you would like to nominate yourself or someone else, you should visit this page.

    There are several considerations that Microsoft reviews and assesses each MVP nomination against.  Some of them include:

    • Proven technical expertise in a specific Microsoft product or platform
    • Strong track record in presenting in front of the community on your technology area
    • Consistent and positive community engagement on your area of technical expertise
    • Strong online presence across social networking and blogging, specifically talking about your area of technical expertise
    • Willingness to share your expertise with others and an openness to discussion with others on your experience
    • Sharing tangible experience with others, in the form of materials like tutorials, forum/blog posts and the like

    If you are an MVP, why not share your experiences on being a Microsoft MVP and what it means to you by posting a comment on this blog post?  If you are interested in becoming an MVP, why not share your reasons why here as well?

    Or better yet, why not join the conversation on LinkedIn?

  • IT Virtualization Boot Camp Events in Vancouver A Huge Hit!

    VantugYesterday in Vancouver Mitch Garvis and I wrapped up the second set of IT Virtualization Boot Camps.  Like the ones we delivered in Mississauga, the overwhelming feedback we received has been positive with everyone attending liking the format and the skills being gained around Hyper-V, failover clustering, and Microsoft’s virtualization platform.  The next set of IT Virtualization Boot Camps are scheduled for Ottawa on February 17 & 18 as well as Calgary on March 12.  If you have not yet registered for either of these camps, do so now before they sell out – all of the previous events have.  Register for the Ottawa and Calgary events now!

    techdays_canada_3I also want to announce that we will be bringing the IT Virtualization Boot Camp to Montreal on March 2 & 3.  Register now to reserve your seat and help out your local user group.  Don’t forget that proceeds from all the IT Virtualization Boot Camps go directly to your local user group to allow them to continue to bring you great programs to help you learn new skills and create networking opportunities.

    Mitch and  I look forward to seeing all of you registered for the Ottawa event later this week.  In the meantime, here are some photos from the Vancouver event.

    DamirB-BlogSignature

    img_7774

    Students worked in teams to accomplish a series of challenges for points.

    img_7777

    Proctors like Dana Epp and Steve Syfuhs (both MVPs) were ready to lend a hand when teams had issues.

    img_7782

    Mitch Garvis, who is a VMware Certified Professionl (VCP) as well as an MVP debunks some VMware claims.

    img_7785

    A full house on both days got to experience Microsoft’s Virtualization Platform hands-on!!

  • “The SQL Guy” Post #15: Best Practices For Using SQL Server Service Accounts

    Securing SQL Server is one of the top priorities of any SQL Server DBA. It is extremely important for DBA’s and system admins to make sure that SQL Server is TIGHTLY SECURED and is not exposed to users that don’t need access to SQL Server. Only valid and required users MUST be granted “required” permissions.

     

    Apart from configuring the right security/permissions for SQL Server users/logins, it is also very important to select the right account to run SQL Server services. In today’s tip, we will explore when to use what service accounts for running SQL Server services.

     

    WHEN TO USE DOMAIN USER ACCOUNT?

     

    If your SQL Server interacts with other servers, services or resources on the network (ex: Files Shares, etc.) or if your SQL Server services uses linked servers to connect to other SQL Servers on the network, then you may use a low privileged domain user account for running SQL Server services. Domain user account is the most recommended account for setting up SQL Server services that interact with other servers on the network. One of the plus points of using a Domain User Account is that the account is controlled by Windows active directory therefore, domain level policy on accounts  apply to SQL Server service account as well.

     

     

    WHEN TO USE NETWORK SERVICE ACCOUNT?

     

    NEVER should you use Network Service Account for running SQL Server services. Network Service accounts are shared with other services running on the local computer. Network Service Account is a built-in account that has more access to server resources and objects than users accounts of local user groups.

     

    Any SQL Server services that runs on Network Service Account, can access network resources by using the credentials of the computer account. This account shows up as “NET AUTHORITY\NETWORK SERVICE” when configuring SQL Server Services.

     

     

    WHEN TO USE LOCAL USER ACCOUNT?

     

    If your SQL Server DOES NOT interact with other servers, services or resources on the network (ex: Files, Shares, Linked Servers, Etc.) then you may use a low privileged local user account for running SQL Server Services.

     

    NOTE: You are not required to use the local user account with administrative privileges to run SQL Server services.

     

     

    WHEN TO USE LOCAL SYSTEM ACCOUNT?

     

    NEVER should you use local system account for running SQL Server services. Local System Account has more permissions than you would think. It is a very high-privileged built-in account created by Windows O/S.

     

    Local System Account has extensive privileges on the entire local system and acts as a computer on your company’s network. This account shows up as “NT AUTHORITY\SYSTEM” when configuring SQL Server services.

     

     

  • Hands-On With Private Cloud Technology - IT Virtualization Boot Camp Dates for Ottawa & Calgary

    MS Private CloudGetting hands on with Private Cloud technologies and one of its key technical elements – virtualization – is turning out to be pretty popular with many of you out there.  When I first announced the IT Virtualization Boot Camps we kicked off in Toronto on January 20 and 21 those events sold out within days.  Immediately we heard from many of you asking for IT Virtualization Boot Camps in your area and we are delivering.  We have managed to organize additional IT Virtualization Boot Camps in Vancouver on February 10 and 11, as well as Ottawa on February 17 and 18, and Calgary on March 12.  We are also looking to organize dates in Winnipeg and Montreal and will announce those once we have them firmed up.

    For Vancouver, the response was so phenomenal that within a few days of getting a blog post up, the Vancouver IT Virtualization Boot Camps both sold out!!  Wow!!  Thanks for the great interest shown!!  Maybe we need to schedule a second set in Vancouver sometime in April?  If you are interested, let the folks at VANTUG know.

    There is still plenty of room for those in the National Capital Region to attend the IT Virtualization Boot Camps there on February 17 & 18 so sign up today to reserve your seat.  It’s a great value for $25 and proceeds from the event help the Ottawa Windows Server user Group (OWSUG) organize other activities to benefit you and your peers.  If the Toronto and Vancouver events are any indicator, these events will sell out pretty quickly.

    For those in Calgary, looks like the event is selling out fast with the number of seats dwindling quickly.  Register today to reserve your spot and also help Calgary IT Pro Community (CIC) to continue to put on other great activities for you in the future. 

    Remember, IT Virtualization Boot Camps provide a hands-on experience with the Microsoft Virtualization Platform where you will gain skills allowing you to learn how to implement a highly-available fault-tolerant virtualization infrastructure with software you already are licensed for or available for free!!  This means that organizations of all sizes can start to take advantage of Private Cloud technologies to gain greater efficiencies from their technology investments.   Well worth the investment in time – whether during the work week or on a weekend since most events will be run on a Friday and a Saturday.

    Look forward to seeing you there!

    DamirB-BlogSignature

  • Busting the Myth: You cannot cluster Windows Small Business Server

    The following article is written by Mitch Garvis (@MGarvis) and also appears on The World According to Mitch.

    DamirB-BlogSignature


    Microsoft created Windows Small Business Server as a one-box solution for companies that did not need more. It has always been a hobbled product, based on Windows Server Standard, but limited in things like domain trusts, FSMO roles, and more.

    Of course even if it were based on Windows Server Enterprise, the idea of creating a failover cluster for a product designed to be a single-server solution seems a little silly… or at least it would have in the late 1990s, when SBS was first delivered.

    Welcome to the world of virtualization and the free Windows hypervisor.

    Over the past several months I have written several articles on using free tools from Microsoft to create a failover cluster using the free Hyper-V Server 2008 R2 SP1 as the hypervisor, and the free Microsoft iSCSI Software Target 3.3 as the Storage Area Network (SAN) device (see the articles outlined in IT Pro Connection & the TechNet Flash for details).

    While it is not licensed to be a virtualization host, there is no reason why Microsoft Windows Small Business Server cannot be a virtualization guest. Of course, it would require a little extra planning – if you plan to use the Fax service, for example, or if you rely on USB hard drives for your backup – but other than that, I am not aware of any limiting factors.

    clip_image002

    In this diagram you see the physical infrastructure required; the Virtual SBS box resides on the iSCSI Target and is homed by one of the nodes in the cluster at any given time. It should be noted that this can be expanded to up to 16 cluster nodes, but two is not uncommon for smaller organizations.

    This solution, it should be mentioned, it not free. There are a number of costs involved, which I will outline. However for a small organization that knows the dangers of their entire business relying on a single piece of hardware, the costs involved are often less than the potential downtime should your physical server fail.

    Costs:

    • Instead of a single server to run SBS you need three: two virtualization hosts and one for the software iSCSI target.
    • One license of Windows Server 2008 R2 SP1 (to run the software iSCSI target)

    While there are other costs involved (storage, networking) they are all a big ‘it depends’. If you do have a SBS box that your business relies on, and you cannot afford downtime (who really can?) then these costs should be factored into the cost of doing business, and should be considered business critical. In other words, invest in proper server hardware (HP ProLiant is a good choice!) rather than trying to do it on the cheap with white boxes or even worse, workstation-class hardware. You may not think to thank me for it when everything is running smoothly, but you will remember reading this and regret not following my advice if you do not heed it and everything comes crashing down!

    One more thing you should always remember: Take the time to familiarize yourself with all of the tools involved. Build it in a lab environment that you can try out and make mistakes on before finally implementing the real thing. When you do build it, TEST IT… Failover Cluster Manager has a feature to simulate cluster node failures… or if you want to really test it, try unplugging the network cable from the owner node. Your Highly Available SBS should restart within seconds on the second node.

    Remember that you are now adding a level of complexity to your SBS environment that you never had before, and one for which SBS was not designed; it will work, but as you are now working outside of the box, you have to start monitoring outside the box. Make sure that your cluster is healthy every day; if you have a tool such as Microsoft System Center Essentials 2010 that monitors your network, implement the Clustering Management Pack. If you use a third-party managed service provider (such as CharTec) then make sure that they know to monitor this solution for you.

    Now that you know how to do it… Plan, Implement, and Enjoy! I always welcome your comments on how you loved – or hated – my recommendations clip_image004

  • “The SQL Guy” Post #14: The Myth Behind Stored Procedure Behaviour

    You are a trusted database developer for your company. You developed a Stored Procedure that will perform some important functions on the database. You tested the Stored Procedure and everything looks great. The Stored Procedure runs the way you expected and within the anticipated timeframe. Everything looks great and now you are ready to deploy the code to the production environment. The production environment has same hardware as development/test environment therefore, you are confident that your procedure will run just fine.

     

    Deployment day approaches and you or your DBA team deploy the code to the production environment. The Stored Procedure is live but it is not performing the way you had expected. You are now wondering “what went wrong?”.

     

    You may have experienced something similar where the stored procedure/query performs bad when deployed on the production SQL Server and the same stored procedure/query works perfectly fine in the test/development environment.

     

    POSSIBLE CAUSE

    It is possible for Stored Procedure/queries to behave differently in Dev/Test and Production environments if you have not cleaned up the query execution plan cache from the dev/test environment while performing tests.  Stored Procedures or queries will first try to use an existing plan cache at every execution and in the above scenario that may very well be happening.

     

    BACKGROUND

    When any SQL statement is executed, SQL Server first looks through the procedure cache (by querying SYS.DM_EXEC_CACHED_PLANS) to verify that an existing execution plan for the SQL statement exists. SQL Server reuses any existing plan it finds, saving the overhead of recompiling the same SQL statement. If it cannot find an execution plan, it generates a new execution plan for that query.

     

    BEST PRACTICE

    The best practice for deploying the code in your production environment is to make sure you first test the code in the test / development environment by removing cached query plans so that you know how your stored procedure or queries would perform in "Cold" cache which is almost like reproducing the cache as though SQL Server had just been started.

     

    CAUTION

    DO NOT USE THE BELOW COMMANDS IN THE PRODUCTION ENVIRONMENT, AS YOU COULD BE FLUSHING OUT SEVERAL CACHED QUERY EXECUTION PLANS THAT MAY PERFECTLY BE WORKING FINE.

     

    HOW TO:

    Please use the below commands on the test/development environment to clear out the cached plans for queries/stored procedures.

     

      CLEARNING A SPECIFIC QUERY CACHED PLAN:

     

    Steps

    Action

    1

    EXECUTE THE QUERY YOU WOULD LIKE TO CLEAR THE CACHE FOR.

    SELECT * FROM CUSTOMERS

    2

    OBTAIN THE PLAN_HANDLE FOR THE ABOVE QUERY

    SELECT PLAN_HANDLE, ST.TEXT

    FROM SYS.DM_EXEC_CACHED_PLANS

    CROSS APPLY SYS.DM_EXEC_SQL_TEXT(PLAN_HANDLE) AS ST

    WHERE TEXT LIKE 'SELECT * FROM CUSTOMERS%'

    GO

    3

    TAKE THE PLAN HANDLE FROM THE ABOVE QUERY AND CLEAR THE CACHE

    DBCC FREEPROCCACHE (<PLAN_HANDLE>)

     

      CLEARING ALL CACHED PLANS

     

    Steps

    Action

    1

    CLEARNING THE CACHE AND LOGGING THE MESSAGE IN ERRORLOG

    DBCC FREEPROCCACHE

     

     

    CLEARNING THE CACHE WITHOUT LOGGING THE MESSAGE IN ERRORLOG

    DBCC FREEPROCCACHE WITH NO_INFOMSGS;

     

      HOW TO QUERY ALL CACHED PLANS FROM LOCAL INSTANCE OF SQL SERVER?

     

    Steps

    Action

    1

    QUERY TO LIST ALL CACHED PLANS

    SELECT * FROM SYS.DM_EXEC_CACHED_PLANS

     

This Blog

Syndication

Powered by Community Server, by Telligent Systems