Monthly Archives: November 2012

Get Smart Online

Thumbnail for 573

Many people function under the belief system that if you are not good with computers, you are simply not technologically inclined, and you will never be able to learn. This is patently untrue. Computer skills can be learned, and like any other skill, take practice. However, a traditional classroom setting does not work for everyone. Don’t become discouraged because you are not able to move as fast as your classmates, or find yourself frustrated by a lack of workstations in a class that is too big. Instead, learn new, and useful, computer skills from the comfort of your own home. Here is a quick rundown of a few online courses that can make you seem like a technological wizard.

1. C# video course

A C# video course can put you on the cutting edge of programming languages. The latest version of C#, C# 5.0 became available in August of 2012, so understanding current C# protocols will put you ahead of the game.

2. HTML5 Tutorial

An HTML5 tutorial is a must. HTML5 is the most up-to-date version of HTML. The most recent version of the code can do many of the things that made Flash so popular, without the drag on a computer’s resources that has made Flash such a problem for mobile devices.

3. MVC 3 Tutorial

An MVC 3 tutorial can vastly increase your value at work with regards to developing web applications. With an understanding of MVC, you can have a direct impact on how your office operates online.

SQL Server Processors & Security Options

SQL Server 2012 supports multiple processors if they are available on the server. The Processors page, shown in the figure below on a dual-processor machine with the processor information expanded, lets you control how SQL Server uses multiple processors.

sql1ch02_blogprocessors page of server properties

The list of processors lets you specify which processors to use for this instance of SQL Server. You can change the Processor Affinity to dedicate one or more processors to SQL Server and reduce some of the overhead of moving threads between processors. This change can help the database server’s performance but may hinder Windows’ performance. I/O Affinity binds disk input/output operations to one or more processors. Using this option essentially binds I/O threads to the specified processors.

On multiprocessor machines, the check boxes below the list of processors save you time by letting you change the options for all processors. When you check either or both options, the corresponding options in the grid above are disabled.

The lower part of the page lets you control threading. You can set the maximum worker threads, which helps limit the resources consumed on servers with hundreds of client connections, since normally a new Windows thread is created for each connection. Setting a maximum can hurt performance because once the limit is reached, any new connection attempts must wait for another connection to close before accessing the server.

You can also boost the priority of SQL Server threads. This can result in more processor time relative to other processes on the server, but can actually hurt performance if essential Windows functions are unable to run efficiently.

Keep in mind that changing processor options reduces SQL Server’s ability to manage its own resources. You should consider doing so only when you have a situation that SQL Server does not seem to be handling appropriately.

Security Options

Security is a critical feature in SQL Server 2012, and the Security options page in Server Properties lets you configure a few settings, shown below. Probably the most important setting on this page is the server authentication mode, either Windows authentication alone or mixed mode in which both SQL Server and Windows authentication are available.

security options in server properties

The login auditing options control which authentication operations are logged in the Windows event logs. The default is Failed logins only, which is a great tool to alert you to some types of attacks, such as a dictionary attack on user names and passwords. The more information you log the better chance you have of troubleshooting, but the greater the effect on performance.

You can set up a proxy account for use when calling the xp_cmdshell extended stored procedure, which runs code in a Windows command shell. Code that runs in the command shell has the permissions of the specified user. Make sure that whatever account you specify here has the least privileges necessary for the tasks you’ll perform in the command shell. Otherwise, an attacker who gains control of SQL Server can run high-level operations from the command shell.

The C2 audit tracing option configures the server to record attempts to access Transact-SQL statements and database objects. This saves a huge amount of information, so you’ll need to monitor the disk files to make sure that you don’t run out of disk space, which can cause SQL Server to shut itself down to prevent attacks. The cross-database chaining option can enable ownership chaining across SQL Server instances. This is a potential security hole, so you should have a good reason to enable this option.

ldn-expertdkielyThis post is an excerpt from the online courseware for our SQL Server 2012: Installing course written by expert Don Kiely.

The 411 on SharePoint 2010

Thumbnail for 576

Sharepoint is a program which was created and introduced by Microsoft more than ten years ago. It has become one of the most popular programs used by the most successful corporations in the world and has sold millions of copies since it was created. The latest version of the program is SharePoint 2010. If you are someone who is already in the business world or someone who is looking to get into it, one of the best ways to be prepared is by learning how to use Sharepoint. It is an excellent skill to have and an amazing attribute to add to your resume.

Sharepoint is among the top rated programs which is both easy to use as well as ensures that a company runs smoothly. The program is designed to make content management and intranet management within a company extremely easy. It works with other Microsoft programs and allows companies to create an internal portal that all employees can access and share important documents and information. Learning how to use the program is as easy as watching tutorials which teach you how to set up and navigate around the program in order to make the best use of the program. If you are looking to better your company, or if you are looking to broaden your knowledge of helpful company programs, SharePoint 2010 is one of the best options.


var s=’hubspotutk’,r,c=((r=new RegExp(‘(^|; )’+s+’=([^;]*)’).exec(document.cookie))?r[2]:”),w=window;w[s]=w[s]||c,
hsjs.type = “text/javascript”;hsjs.async = true;
hsjs.src = “//” + encodeURIComponent(c);
setTimeout(function() {try{”visible”;}catch(err){}}, 2500);


Installing Multiple Instances of SQL on a Single Computer



One of the most powerful features of SQL Server is the ability to install multiple instances of the SQL Server relational database engine on a single computer. Each instance of SQL Server consists of both shared and instance features, which can save resources on a single server machine. All of the database objects and many server objects—including security settings—are completely contained within each instance. However, there are a few things you need to know before you install multiple SQL Server instances.

You can install one default instance and multiple named instances, or multiple named instances with no default instance. The only difference between the default and the named instance is that to access the default instance you use only the machine name to access the instance; a named instance requires the machine name and the instance name.

Instances other than the default instance must be SQL Server 2012, but the default instance can be SQL Server 2005 or later. Here are a few examples of how you can configure a single computer:

  • A default instance of SQL Server 2005, with multiple named instances of SQL Server 2012. Only SQL Server 2012 can operate as a named instance.
  • A default instance of SQL Server 2012 with up to 49 named instances, depending on which SQL Server edition you are using.
  • No default instance and up to 50 named instances, depending on which SQL Server edition you are using.

NOTE: The limit on the number of SQL Server 2012 instances you can install no longer depends on which edition of the product you are using. All editions across the board now support and allow 50 instances. It used to be that some editions were limited to 16 editions.

Multiple Instance Scenarios

Implementing multiple instances of SQL Server gives you great flexibility in the kinds of SQL Server applications you can develop and distribute. Here are a few examples of how you might find multiple instances useful:

  • Continue to run existing applications on earlier versions of SQL Server side-by-side with a SQL Server 2012 server on the same machine at the same time.
  • Run multiple instances of SQL Server on the virtual server of a SQL Server failover cluster. When you install SQL Server on each computer in a cluster, you create a named instance to distinguish that installation from the other instances of SQL Server that are on the same virtual server. Clustering is described fully in Failover Clustering in SQL Server Books Online.
  • Maintain a separate independent SQL Server environment for development and testing on the same computer that holds your production server. This is not generally a good idea, but if resources are tight it is doable.
  • Roll out a secured SQL Server database in a sandbox environment where administrative rights are curtailed. Structure security differently for each instance, with different administrators. One of the problems in past versions of SQL Server for independent software vendors and application developers was that the system administrator in SQL Server is all-powerful. Multiple instances provide a way to curtail administration on a server instance.
  • Install software that comes bundled with the Express edition of SQL Server on a machine that already has a running server.

The principal drawbacks of multiple instances are that administration becomes more complex, and multiple instances consume more resources than a single installation.

ldn expertdkielyThis post is an excerpt from the online courseware for our SQL Server 2012: Installing course written by expert Don Kiely.

SQL Server Data Tools (SSDT): A Great Set of Tools for Database Dev

Thumbnail for 578

Microsoft introduced a new set of database development-oriented tools in SQL Server 2012, called SQL Server Data Tools. These tools are the latest in a long line of attempts to make creating database and database objects like creating software. Microsoft’s earlier attempts were credible and usable, but always seemed to fall short in one or more significant ways. We’re happy to report that with SSDT Microsoft nailed it, and both developers and administrators have a great set of tools for database development work.

Here is Microsoft’s description of the Data Tools:

SQL Server Data Tools (SSDT) transforms database development by introducing an ubiquitous, declarative model that spans all the phases of database development and maintenance/update inside Visual Studio. You can use SSDT TSQL design capabilities to build, debug, maintain and refactor databases whether working with a database project, or directly with a connected database instance located on or off-premise.

Every word of that description is true, but it certainly isn’t a good 60-second elevator talk about what the Data Tools are! What the Data Tools really does is to put database development into the context of writing software in VisualStudio, in every sense.

DBAs are probably going to want to stick to Management Studio for their daily work with databases and SQL servers, but developers, particularly seasoned Visual Studio developers, will be able to completely live in the Data Tools, except when they put on their DBA hats for smaller clients that don’t have full-time DBAs.

The crux of the matter is that for simple admin tasks, you can use the new dedicated SQL Server Object Explorer in the Data Tools and do most of what you need to do—from a developer’s perspective—instead of using Management Studio. And when you create a new database project, you can act as though it were a new software project, a nifty abstraction from one context to another.

The best part of Data Tools is that if you have experience with Visual Studio, you’ll feel right at home with the Data Tools. They have support for code navigation, IntelliSense, language support for T-SQL that is similar to C# and VB, platform-specific validation, debugging and declarative editing in the TSQL Editor, and plenty more. You can save database object definitions in source control, and when you’re ready to deploy the database you can publish the project like you do for a Web site, to any version of SQL Server from 2005 on and including SQL Azure.

Another use for the Data Tools is the replacement for the Business Intelligence Development Studio (BIDS) of earlier versions of SQL Server. BIDS was built using Visual Studio 2008, and provided templates for creating various Business Intelligence projects. Data Tools replaces BIDS and provides a much better development environment than BIDS did.

Installing SQL Server Data Tools

SQL Server data ToolsThe system requirements for Data Tools are the same as for Visual Studio 2010 SP1, so if you have that version of Visual Studio installed you’re good to go. There are four ways to install the Data Tools:

  • As part of a SQL Server 2012 installation
  • When creating a Visual Studio 2010 project
  • Platform Web installer
  • Administrative installation point

Data Tools doesn’t require prior installation of VS 2010. If you do not have Visual Studio 2010 Professional Edition or above installed, installing SSDT will automatically install the Visual Studio 2010 Integrated Shell, apply SP1, and install the SSDT components. The Integrated Shell will only contain SSDT tools, and does not include Visual Studio programming languages and the features that support their respective project systems.

If you do have VS 2010 Professional or better installed, Data Tools integrates into that installation and you’ll find that Visual Studio has new features and project templates.

When you install Data Tools as part of SQL Server 2012, and you don’t have Visual Studio pro installed, you won’t actually end up with Data Tools fully installed. Instead, you’ll have the Visual Studio shell installed with a project in the SQL Server node of Templates with a “SQL Server Data Tools (Web install)” item. When you create a project using that template, it will download and install the actual tools. This is kind of a funky way of doing things (and potentially VERY confusing), but we’re sure Microsoft had a great reason for doing it that way!

ldn-expertdkielyThis post is an excerpt from the online courseware for our SQL Server 2012: Installing course written by expert Don Kiely.

Finding SQL Server Problems

sql activity monitor

The Activity Monitor in SQL Server 2012 gives you a view into the current activity in the SQL Server instance. This can be of enormous help in finding problems before they get out of hand or finding a problem that causes slow server performance. In fact, any time a SQL Server instance is behaving oddly, you can often get right to the root of the problem, or at least get a good idea of what is going on, by viewing Activity Monitor.

You can view the Activity Monitor by right-clicking the name of the server instance in Object Explorer and selecting Activity Monitor from the pop-up menu.

The figure below shows the Activity Monitor on a lightly used server after running a few simple queries. The Overview section provides a graphical view into current server activity, with graphs for the percent of processor time being used, the number of waiting tasks, database I/O in megabytes per second, and batch requests in number per second. Click on each of the section headers to expand the section and view the data.

The other sections display tabular data about current activity:

  • Processes displays information about database connections and the types of tasks each performs. This data is listed by server process ID, or SPID. You can right-click on any of the SPIDs to launch SQL Server Profiler to trace the activity on that process.
  • Resource Waits indicates the amount of time that various threads are waiting for resources, such as memory and processor time.
  • Data File I/O shows database and log file input/output information, including statistics on the amount of data read from and written to disk. This information can help find databases that are being especially hard hit with activity, causing disk activity to be a bottleneck to performance.
  • Recent Expensive Queries displays information about recent queries that made the greatest demands on various server resources. This can help identify problem queries that are making unusually high demands on the system.

sql resource waits section

All of the tabular views let you search and filter the various columns. For example, to filter the list, click the down arrow to the right of the column name as shown in the Figure below and select the item to filter on. You can sort by clicking on the appropriate column header, repeating to reverse the sort order.

sql filtering resource wait items

TIP: Activity Monitor makes heavy use of Tooltips. Hover the mouse over the dark green portion of graphs or column headers in tabular data to get more information about that section of the view.

Thumbnail for 566This post is an excerpt from the online courseware for our SQL Server 2012: Installing course written by expert Don Kiely.

SQL Object Search Box: Finding a Needle in a Haystack Made Easy


A medium sized database can easily have hundreds or thousands of objects, and large databases can have even more. And if there are several databases in an instance of SQL Server, the number is magnified even more. When you need to find a specific object, such as a specific code module with “customer” in the name, finding a needle in the proverbial haystack can seem easy in comparison. It can be tedious to click around Object Explorer to find an object, particularly if you can’t remember the first few letters of the object name. It may have “customer” in the name, but it could start with other characters, such as GetCustomerList.

That’s when the Object Search box comes in handy. It’s not actually part of the Object Explorer Details view, but appears at the top of the view. The figure below shows a search for %customer% across all databases (the Databases node was selected in Object Explorer before performing the search). The % characters in the search string are wild card characters, so that any number of characters can appear in the name before and after “customer.” If you know the exact name of the object, you don’t have to use wild card characters.

The figure below shows the same search with the Northwind database node selected in Object Explorer. Because the search is looking in only a single database, the scope of the search is narrower and search returns fewer objects. Notice that the search result message near the top of the window indicates the scope, since it is no longer across all databases.

sql server

Thumbnail for 566This post is an excerpt from the online courseware for our SQL Server 2012: Installing course written by expert Don Kiely.

Windows 8 Progress Controls

windows 8 controls

XAML provides two controls specifically meant to indicate active progress, as some activity is running, to the user. The ProgressBar and ProgressRing controls can both display an indeterminate length for the activity, and the ProgressBar can display a specific value for its progress.

ProgressBar and ProgressRing

The ProgressBar control indicates the progress of an operation using one of two styles: Indeterminate, which displays a repeating pattern, or determinate, displaying specific values. Set the IsIndeterminate property to set the appearance of the ProgressBar control. When the property is False, the bar displays a specific value. In this state, you specify Minimum and Maximum properties for the ProgressBar. To specify progress, set the Value property.

The ProgressRing control works much like the ProgressBar control, except that it can only display in the indeterminate state. Use the IsActive property to control the visual state of the progress.

The figure below shows a determinate progress bar, with its value set for the purposes of the demo from a Slider control. The markup for those two controls looks like the following:


The figure below shows indeterminate ProgressBar and ProgressRing controls (it’s hard to capture these in action).


Windows8 progress bar


The following markup generated these controls:


Thumbnail for 559This post is an excerpt from the online courseware for our Windows 8 Applications Using XAML: Apps and UI course written by expert Ken Getz.

Creating State Handling Markup with XAML


When you create an application, your goal (besides ensuring that the application does what it needs to do) is to make sure that it looks good, and works well across a variety of form factors, display sizes, and view states. Your app should look good and work well on an 11″ tablet, a laptop screen, or a 30″ desktop monitor. It should look good and work well whether the screen is in portrait or landscape mode, whether it’s zoomed or not.

View States

In order to transition between views using XAML, you must use the ViewStateManager to define VisualState elements. The template includes four visual states:

  • FullScreenLandscape: Applies when the app is in full screen landscape mode. The application is designed for this layout, so you’ll rarely require any specific changes for this state.
  • Filled: Applies when the user has another application in Snapped view. For the sample application, there are no changes required for this state, either, although some applications might need specific markup for this state.
  • FullScreenPortrait: Applies when the user has rotated the screen to portrait mode. You might find that you need to modify your application to make the best use of this layout (that is, a screen that is taller than it is wide).
  • Snapped: Applies when the user has opened the application in Snapped view, taking up the smaller portion of a landscape screen. The Basic Page template provides different Back button and title styles for this mode. For the sample application, you will need to alter the layout to fit this view state.

The VisualStateManager element in XAML was created to support animations, but that’s not the point here. In other words, the Windows 8 designers doubledup on existing functionality, and it feels somewhat clumsy and overly complex. (Compare this mechanism to the similar functionality in JavaScript applications and you’ll certainly agree.)

One important thing to note: Changing state using the VisualStateManager mechanism only allows you to change property values of existing elements. You cannot add or delete elements using this infrastructure. Every element you’ll need, in any view, must exist in the markup before you run the application.

TIP: You can certainly write your own code to effect view state changes. The VisualStateManager element and its children only applies to declarative view state changes—that is, to choices you make at design time that don’t require any programming code.

Modifying Properties When State Changes

In order to modify properties when the view state changes, first find the VisualState element that corresponds to the new view state. Add a StoryBoard element if one doesn’t already exist, and within the StoryBoard element, add an ObjectAnimationUsingKeyFrames element for each property you want to change because the application has changed to the new view state.

As attributes of the ObjectAnimationWithKeyFrames element, set the StoryBoard.TargetName and StoryBoard.TargetProperty attributes, indicating the name of the element and the name of the property you want to change.

Finally, within the ObjectAnimationWithKeyFrames element, create a DiscreteObjectKeyFrame element describing the time for the change (generally, 0 seconds) and the new value of the property, in the KeyTime and Value attributes. (As you can see, this is possibly the most complex and unintuitive means of indicating a property change possible.)

Below, you’ll find markup which sets the Style property of the backButton element to the SnappedBackButtonStyle, when the view state changes to Snapped.

TIP: What if you need to add or remove controls? You can’t, at least, not using this mechanism. Instead, set the Visibility property of the element. Create all the markup you’ll ever need at design time, and show and hide things based on the view state.

Thumbnail for 557This post is an excerpt from the online courseware for our Windows 8 Applications Using XAML: Apps and UI course written by expert Ken Getz.

The Magic of HTML

Thumbnail for 587

When people first began working with HTML, it seemed like magic. The fact that anyone could type a bunch of seemingly random directions and symbols into a computer, and suddenly shapes and images would appear, was something that some people could not fathom. As HTML, or hypertext markup language, evolved over the next few years, the power of the language grew. Fast-forward to today, and HTML is all around us. It is present, in some form, in every website we visit, every app we use, and every social media platform we update.

It is currently in its fifth iteration, and HTML5 is more powerful, robust, and flexible than any previous version of HTML. Knowing how to use it puts a powerful tool at your fingertips. An online HTML5 tutorial can help you learn the language quickly and easily, ensuring that you can put your new knowledge to use immediately. Combine your HTML5 tutorial with a C# video course, and not only will you be able to create an attractive website for your employer or your own small business, but you will also be able to network it, and set up intranet communications between everyone who may need access to it. HTML is not magic, but when used properly it can do almost magical things. Master it, and you will have a skill that many, many people will want.