Session 1: Creating and Scheduling a Collection

From DBArtisan
Jump to: navigation, search

Go Up to Capacity Analyst Tutorial

In Session 1, you will first ensure that you are properly set up to evaluate the Capacity Analyst. Subsequently, you will run the Capacity Analyst, build a small statistics collection, and ensure that it is updated on an hourly basis.

Getting Started with Capacity Analyst (Optional)

The following topics prepare you for first use of the Capacity Analyst:

When you have performed these tasks, or if you have already performed them, you can proceed to Creating and Scheduling a Capacity Collection Using Capacity Analyst.

Downloading and Installing DBArtisan

You can obtain the latest version of Capacity Analyst by downloading DBArtisan. Capacity Analyst runs fully-contained within DBArtisan so you will need the DBArtisan product to use Capacity Analyst.

To download and install DBArtisan

  1. Locate the download area of the Web site and follow the steps indicated.
  2. Save the file on your computer and then double-click to launch the self-extracting file that will guide you through the installation process.

When you first install an evaluation copy of DBArtisan, you can use the tool for the duration of the trial period. After that time, a permanent license is needed.

Starting DBArtisan and Connecting to a Datasource

After installing DBArtisan, you must set up datasources to establish reusable connections to your database servers. For now, you can establish a single connection to the database/server you will use to evaluate Capacity Analyst. DBArtisan can detect and let you register any datasource in your network.

To connect to a database/server

  1. Start DBArtisan. For a default installation, Start | Programs | IDERA DBArtisan 18.0.x > DBArtisan 18.0.x.
  2. On the Datasource menu, select Discover Datasources.
    The Discover Datasources dialog opens. After searching your network it lists all datasources to which you can connect.
  3. Select the check box corresponding to the target datasource and click Register.
    The datasource is added to the Datasource Navigator/Explorer, under the relevant DBMS folder. For example:
    bb154e12.jpg
  4. RIght-click the datasource and select Connect from the context menu.
    A login dialog opens.
  5. Provide valid user name and password credentials and click OK.

Installing the Capacity Analyst Repository

Capacity Analyst makes use of a repository to store historical statistics about your database. A repository is required for each database/server that you use with Capacity Analyst.

To install a repository on the datasource you connected to

  1. From the Analyst menu, select Capacity Analyst.
    OR
  2. On the Analyst Series toolbar, click the Capacity Analyst button.
    bb154e20.jpg
    DBArtisan opens Capacity Analyst. Capacity Analyst detects that no repository is present and opens the Analyst Repository Installation Wizard.
    Depending on the type of DBMS type of the datasource you connected to, specific options will differ. In general, the Wizard prompts for login/password credentials, as well as server, database, and storage details.
  3. Provide the information that the Wizard prompts you for and when complete, click the Install button and provide additional information when prompted.
    Capacity Analyst creates the necessary repository objects.

Creating and Scheduling a Capacity Collection Using Capacity Analyst

When you open Capacity Analyst, Capacity Analyst displays a simple Capacity Collection Manager interface that lets you view existing collections, create new collections, and perform many other management functions.

bb154e2d.jpg

Creating a New Capacity Collection Using Capacity Analyst

To get started collecting information for your database, you first need to create a new collection. A collection is essentially a set of related metrics or statistics that you want to report on. As you begin to make use of Capacity Analyst, you will develop a strategy for metrics you will store in each collection. For the purposes of this tutorial, you can build an arbitrary set of statistics into a collection.

You create a collection using the Capacity Collection Wizard.

To open the Capacity Collection Wizard

  1. On the Capacity Analyst toolbar, click the New Collection Wizard button.
    bb154e37.jpg
    Capacity Analyst opens the Capacity Collection Wizard.

bb154e3c.jpg::

The first panel is devoted to naming your capacity collection and specifying various collection properties like descriptions and optional job completion notifications.

To complete the Wizard

  1. Provide the information in the fields provided and click the Next button to continue.
    Capacity Analyst opens the Selection Types panel of the Capacity Collection Wizard. The second panel asks you what type of information you would like to collect for your database. While this panel prompts you to choose general categories, subsequent panels will let you provide more specific information about the choices you make here.
    The specific options differ according to the type of DBMS datasource you are connected to, but in general the categories are:
    • Storage structures - Depending on the DBMS you are working with, your analysis and reports can contain space and usage statistics on items such as databases and database devices, logs and backup space, partitions, tablespaces, filegroups, and files.
    • DB objects - Your analysis and reports can contain space and usage statistics on tables, indexes, and for some supported DBMS types, other database objects.
    • Performance-based statistics - if available for the DBMS you are connected to, this lets you use product-specific performance-based statistic packages.
    • Wait events - if available for the DBMS you are connected to, this lets you work with wait-based event information provided by the DBMS.
  2. For the purposes of this tutorial, select all options on the panel and then click Next.
    The next set of panels let you select specific details. Each panel corresponds to one of the options you chose on the Selection Types panel.
    Most panels offer categories that let you drill down by expanding the category to expose specific options. You can then select specific options and move them from the Available list to the Selected list and then click Next to move to the next panel.
  3. Complete all panels up until the Statistics tab is displayed.
    Tip: Since table and index statistics are supported for all DBMS, as an aid in subsequent sessions, select a variety of indexes and tables on the DB Objects panel.
    The Statistics tab prompts you to update the statistics you chose. In order to use the analysis tools offered by Capacity Analyst, you must execute the collection. This performs calculations and rollups on the metrics in the collection, letting you produce up-to-date reports and charts.
  4. Look over the options available on the Statistics panel, enable statistics update and select one or more update options, and then click Next.
    The AutoPurge panel is displayed. It offers the option to delete older data, each time that you execute a collection.
  5. Enable AutoPurge and click the Finish button.

Scheduling a Collection in Capacity Analyst

Immediately after your collection has been saved to the repository, Capacity Analyst prompts you if you would like to schedule the collection to run at specified intervals. It is not necessary that you schedule your collection to actually collect statistics in the repository. You can execute a collection in an ad-hoc manner at any time through the Capacity Collection Manager.

Depending on your requirements however, scheduling a collection may be the preferred route. For example, if you want to run packaged reports on a scheduled basis, scheduling collection of your collections will ensure up-to-date statistics in your scheduled reports.

For the purposes of this tutorial, you want the statistics in your collection updated every hour.

To schedule updates for your new collection

  1. Select Yes when asked if you would like to schedule your new collection
    The Microsoft Task Manager scheduler opens.
  2. Click Advanced to open the Advanced Schedule Options dialog.
  3. Select Repeat task, specify that the tasks is to be repeated every hour, ensure that the task is repeated until a time at least four hours from now, and click OK to close the Advanced Schedule Options dialog.
  4. Click OK to schedule your collection and dismiss the dialog.
    Tip: You can add, edit, or remove any schedule for any collection at a later time by using the management functions supplied in the Capacity Collection Manager interface.

Reviewing Other Collection Management Functions

While you have completed all required tasks for Session 1, it is worthwhile looking at some of the options Capacity Analyst offers in creating and updating collections. Later, as you develop a strategy for setting up the collections for your enterprise, you will use additional Capacity Analyst features in managing your collections. With respect to maintaining your collections you have the following options:

Editing collections

After creating a collection, you can modify general settings and the AutoPurge option. Since a collection stores totals and rolled up statistics that can be compromised, you cannot modify your choice of statistics or the objects you generate those statistics against.

Cloning collections

Cloning lets you create a collection based on an existing collection and modify the metrics used and options specified in the original.

Deleting collections

If you no longer have use for a collection or you are going to replace it, you can delete that collection.

Similarly, when you created your collection, you selected the option to update your statistics on an hourly basis. In some cases, you may require ad hoc reports or analysis. If so, you can update your collection manually.

To manually update a collection

  1. In the Capacity Collection Manager, select a collection.
  2. On the Capacity Analyst toolbar, click the Execute button.
    bb154e72.jpg
    Depending on the volume of statistics you specified when creating the collection, this may take a few seconds. When complete the Last Run field will reflect the update.

There are other functions contained inside the Capacity Collection Manager, however those described above are likely the ones you will use the most often when managing your capacity collections. You will gain experience using these features as you learn more about Capacity Analyst.