IT tutorials
 
Technology
 

SQL Server 2012 : Data-Tier Applications (part 2) - Deploying a Data-Tier Application

10/9/2013 7:53:30 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

Deploying a Data-Tier Application

Now that we have created the dacpac file for our UsedCars application, let’s connect to another instance of SQL Server and deploy it. To start, connect to another SQL Server instance using SSMS. Navigate to the Management and then Data-Tier Applications nodes in Object Explorer. Right-click the Data-Tier Applications node, and select “Deploy Data-tier application” to launch a wizard that asks you which dacpac file to deploy. This wizard is shown in Figure 3.

images

Figure 3. The Select Package page of the Deploy Data-tier Application wizard

After the wizard inspects the package, it asks you for the name of the new database and location to store the database files (see Figure 4).

images

Figure 4. The Update Configuration page of the Deploy Data-tier Application wizard

Next, the wizard will provide you with a summary page and deploy your application. When the wizard completes, you will have a new node under “Data-tier applications” called UsedCars. Notice that you also have the UsedCars database created in this instance. At this point, our UsedCar application is deployed to the new server.

Registering an Existing Database as a Data-Tier Application

In the original SQL Server instance, we ran the Extract Data-tier Application wizard to create the dacpac file. If all you want to do is take an existing database and make a data-tier application on the same server, you can run the Register as Data-tier Application wizard. To help showcase the monitoring piece of data-tier applications, let’s register the UsedCar database on the original SQL Server instance we used to create the dacpac file. To do this, connect to the original instance of SQL Server, and navigate to the UsedCar database in Object Explorer. Next, right-click the database, and select Tasks and then “Register as Data-tier Application”. This will launch a wizard. The first page of this wizard will ask you to set the properties of the application. Much like we did in the wizard shown in Figure 1, we can enter a name, version number, and description. Once this wizard completes, our UsedCar application will appear in the Data-tier Application node of the Management node in Object Explorer for this instance of SQL Server as well.

Monitoring a Data-Tier Application Using the SQL Server Utility

Today, more applications in our datacenters need to be managed than in previous years. Not all of these are Tier 1, mission-critical applications. On the contrary, many are departmental Tier 2 and Tier 3 applications that support a subset of an organization. Data-tier applications allow the database administrator to focus on management at scale as opposed to micromanaging each individual application. In the example in this section, we have two instances of SQL Server: the default instance and an instance with a name of INST2. Since these applications are deployed, we can easily manage them through the SQL Server Utility.

In SQL Server 2008, the Performance Data Collector feature was introduced. This feature allowed DBAs to periodically poll a SQL instance for disk usage, query statistics, and server health information. Data from these queries would automatically be pushed into a database called the management data warehouse. This powerful tool gave DBAs a quick view of the health of a particular SQL Server instance. In SQL Server 2008 R2, this feature was expanded to include a concept called the utility control point (UCP). The UCP is a SQL Server instance designated as the central place to store and report on performance information. To create a UCP in SSMS, select the Utility Explorer menu item from the View menu in the SSMS toolbar. This will display a Getting Started document window containing a hyperlink to Create a Utility Control Point. Clicking this link will launch the Create Utility Control Point wizard. The first input screen is shown in Figure 5; it asks for a SQL Server instance to be used to create the UCP.

images

Figure 5. Specifying the SQL Server instance for the Create Utility Control Point wizard

The next page, shown in Figure 6, asks you for the Windows account that will be used to run the utility collect sets. Note that SQL Server Agent needs to be started on the instance you select to be the UCP. If you forget to start SQL Agent, the validation page will tell you and won’t allow you to proceed until you start the service. Once the wizard has passed the validation checks, the next page will create the UCP, as shown in Figure 6.

images

Figure 6. The Specify Account page of the Create Utility Control Point wizard

When the wizard has finished, it will bring you to the Utility Explorer Content document window. This window gives you a view of the overall health of all the managed instances and data-tier application components that the UCP is monitoring. Let’s go ahead and add a second instance of SQL Server to be monitored. Remember that the SQL Server Agent service must be started on any SQL Server instance that we want to monitor. To enroll a SQL Server instance, in the Utility Explorer Utility node, right-click the Managed Instances container node, and select Enroll Instance from the context menu. This will launch a wizard for which the first input is the name of the SQL Server instance to enroll. This page is shown in Figure 7.

images

Figure 7. Specifying the instance of SQL Server in the Enroll Instance wizard

Next, we specify the Windows credentials for the account that will be obtaining the data on that instance of SQL Server; this page is similar to Figure 6. The wizard will then perform checks, and if these are passed, it will enroll the instance.

The UCP will be updated periodically from all the managed instances. At first, the new managed instance will be shown, but since no data has been collected, the display will show a gray circle as opposed to a green or red circle. This initial state for the second instance, ROB-DENALI-1\INST2, is shown in Figure 8.

images

Figure 8. Managed instances

After a few minutes, both managed instances will report data to populate the Utility Explorer Content page. The real power of the UCP comes not only in its ability to get a snapshot of a server instance with respect to disk volume size and CPU trends over the past few days but in its ability to define a policy based on these statistics. For example, we can create a policy that says to mark a SQL Server instance as being overutilized if it’s CPU usage is over 70 percent when sampled four times an hour. These policies are flexible and can be managed by clicking the Utility Administration node in the Utility Explorer. If a policy has been violated, the green circle shown in Figure 8 would be red.

Up until now, we have been discussing using UCPs to manage instances of SQL Server. UCPs can also manage data-tier applications. Once you’ve enrolled a SQL Server instance into a UCP, any data-tier applications that were defined within that instance will show up in the Data-Tier Applications node in the Utility Explorer. Since we have registered the UsedCars application on both of our SQL Server instances, we can see the performance of this application by clicking the Data-Tier Application node. This node is shown in 9.

images

Figure 9. Data-tier Applications

We can now define policies like CPU and disk space limits to the application, just as we could for the instance.

Once we have all our managed instances enrolled, we can get a good, quick view of the health of our environment by clicking the Utility root node in the Utility Explorer. The resulting report is shown in Figure 10.

images

Figure 10. A utility node report

Since we only have two instances and not a lot of time has elapsed for data to be collected, this report looks fairly blank, but you can see the kind of content that you will be able to obtain from a real production environment.

 
Others
 
- SQL Server 2012 : Data-Tier Applications (part 1) - Defining a Data-Tier Application
- SQL Server 2012 : Touring SSMS Through the Eyes of a Developer (part 2) - Templates, Debugging in T-SQL
- SQL Server 2012 : Touring SSMS Through the Eyes of a Developer (part 1) - IntelliSense, Query Designer
- Windows 7 : Kernel Mode Installation and Build - Installing a KMDF Driver
- Windows 7 : Kernel Mode Installation and Build - Building Featured Toaster
- Windows 7 : Kernel Mode Installation and Build - WDK Build Tools, Build Environment, Building a Project
- System Center Configuration Manager 2007 : Using Microsoft Management Console 3.0 (part 3)
- System Center Configuration Manager 2007 : Using Microsoft Management Console 3.0 (part 2)
- System Center Configuration Manager 2007 : Using Microsoft Management Console 3.0 (part 1)
- Administering an Exchange Server 2007 Environment : Managing Exchange Server 2007 Remotely
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us