+ All Categories
Home > Technology > Na2009 enus sql_07

Na2009 enus sql_07

Date post: 11-May-2015
Category:
Upload: peter-muscat
View: 328 times
Download: 0 times
Share this document with a friend
Popular Tags:
10
Chapter 7: Appendix 7-1 CHAPTER 7: APPENDIX Objectives The objectives are: Define an adequate backup strategy. Set up a connection from Microsoft ® Office Excel ® to the Microsoft Dynamics ® NAV database and retrieve data for analysis. Introduction The purpose of making backups is to make sure that you always have an additional copy of your data. If a problem arises with the original data, you can import the backup data into the program. It is in your own interest to make backups, but the law also requires it. Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
Transcript
Page 1: Na2009 enus sql_07

Chapter 7: Appendix

7-1

CHAPTER 7: APPENDIX Objectives

The objectives are:

• Define an adequate backup strategy. • Set up a connection from Microsoft® Office Excel® to the Microsoft

Dynamics® NAV database and retrieve data for analysis.

Introduction The purpose of making backups is to make sure that you always have an additional copy of your data. If a problem arises with the original data, you can import the backup data into the program. It is in your own interest to make backups, but the law also requires it.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 2: Na2009 enus sql_07

SQL Server Installation and Optimization for Microsoft Dynamics® NAV 2009

7-2

Backup Facilities The following describes the tools that Microsoft Dynamics NAV Classic client provides for automatically exporting backups.

You can make backups by copying the database directly with an operating system command. But there are four main advantages to using the Microsoft Dynamics NAV backup function:

• The system tests the database for errors so that useless information is not copied to a backup.

• The data is packed so that it uses as little space as possible. • The system calculates how much space the backup will use. • A message will appear when a disk is full telling you to insert a new

one.

Whenever you create a new database, you must always restore a Microsoft Dynamics NAV database backup into it. When you do this the "data common to all companies" and the "application objects" are restored into the new, empty database. The data common to all companies includes the report list, permissions roles, user IDs and printer selections, but no real company data.

A database backup can consist of:

• Entire Database (including all companies in the database, data common to all companies, and application objects)

• All Companies (including data common to all companies) • Custom (whatever you select)

Microsoft Dynamics NAV Backup

If you are running on Classic client, you can choose between two kinds of backup: a client based backup and an SQL backup.

The Microsoft Dynamics NAV client based backup is initiated by clicking TOOLS→BACKUP.

You can make a backup while other users are using the database because, when you do, the program backs up the latest version of the database. If a user enters something into the database, a new version of the database will be generated, but the backup program will continue to back up the version that existed just before this new version of the database was created.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 3: Na2009 enus sql_07

Chapter 7: Appendix

7-3

Be aware that client-side backups can increase the network traffic and cannot be scheduled to run automatically in the standard application. Also keep in mind that, when carrying out a Microsoft Dynamics NAV backup in the SQL Server Option for Microsoft Dynamics NAV, every object that is backed up gets locked and other users are given read-only access. This means that , depending on what is being backed up, other users will not be able to work in the database.

Restore

Whenever you create a new database, you must always restore a Microsoft Dynamics NAV backup to retrieve the Data Common to All Companies and Application Objects, and place them in the new, empty database. Data common to all companies includes the report list, permissions groups, user IDs and printer selections, but no real company data.

Microsoft Dynamics NAV backups do not allow restore to a specific point in time. If the database fails, all modifications since the last successful backup are lost and must be reapplied after restoring the backup.

After the data is restored, Microsoft Dynamics NAV will start recreating the active secondary keys for all tables. Depending on the number of keys and data, this can take a considerable amount of time.

Summary For more information about backups in Microsoft Dynamics NAV, see the Installation and System Management manual for either Microsoft Dynamics NAV Database Server or the Microsoft Dynamics NAV SQL Server Option.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 4: Na2009 enus sql_07

SQL Server Installation and Optimization for Microsoft Dynamics® NAV 2009

7-4

Lab 7.1 - Set Up a Connection from Microsoft Excel The objective of this lab is to learn how to set up a connection from Microsoft Office Excel to the Microsoft Dynamics NAV database and retrieve data for analysis.

Scenario

Kevin, the sales manager, wants to have a statistical report on the sales achieved by the sales team. As Kevin is not a developer, he does not know how to design the report. Unfortunately, Mort, the business application developer, is currently not available. In addition, Kevin needs the figures for a management presentation that starts within 30 minutes. Kevin decides to use Microsoft Office Excel to retrieve the data from the Microsoft Dynamics NAV database.

Challenge Yourself!

Create a report in Microsoft Office Excel that shows the total profit amount (in local currency) and total sales amount (in local currency), grouped by currency code by salesperson code. The report is based on the Customer Ledger Entry table (table 21, Cust. Ledger Entry). Moreover, the report must have the following specifications:

• It must be possible to refresh the data in the report. • It must be possible to visualize totals and subtotals. • The data has to be visualized in a table and in a chart.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 5: Na2009 enus sql_07

Chapter 7: Appendix

7-5

The report should look as follows:

FIGURE 7.1 REPORT IN MICROSOFT OFFICE EXCEL

Need a Little Help?

1. Create a Database Connection from Microsoft Excel. 2. Configure Data Visualization.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 6: Na2009 enus sql_07

SQL Server Installation and Optimization for Microsoft Dynamics® NAV 2009

7-6

Step by Step

Create a Connection from Microsoft Office Excel toward Microsoft SQL Server.

1. Start Microsoft Office Excel. 2. On the Data tab, in the Get External Data group, click From Other

Sources, and then click From SQL Server.

FIGURE 7.2 GET EXTERNAL DATA

3. In the Data Connection Wizard window, enter the name of the computer that is running SQL Server (NAV-SRV-01) in the Server name box.

4. Under Log on credentials, click Use Windows Authentication to use your current Microsoft Windows user name and password.

5. Click the Next button. 6. In the Select the database that contains the data you want drop-

down list, select the Demo Database NAV (6-0) database. 7. Under Connect to a specific table, select the CRONUS

International Ltd_$Cust_ Ledger Entry table. 8. Click the Next button. 9. On the Save Data Connection File and Finish page, check the

Always attempt to use this file to refresh this data field to ensure that the connection file is always used when the data is updated.

10. Click Finish to close the Data Connection Wizard window. The Import Data dialog box appears.

11. Under Select how you want to view this data in your workbook, select the PivotChart and PivotTable Report option.

12. Under Where do you want to put the data? select the New worksheet option.

13. Click the OK button.

Now that you have connected the Excel worksheet to the Customer Ledger Entry table in the Microsoft Dynamics NAV database, you can configure how the data must be displayed in Office Excel.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 7: Na2009 enus sql_07

Chapter 7: Appendix

7-7

Configure Data Visualization

In step 11, you selected the Pivot Chart and Pivot Table Report option. As a result, the Excel worksheet will contain a placeholder for a pivot chart and a pivot table. At the lower right of the screen, in the PivotTable Field List pane, you can decide which fields to display in each area of the pivot table and pivot chart.

By default, the Pivot Chart object is selected. If you select the Pivot Table object, the name of the areas in the PivotTable Field List pane will change. However, the settings apply to both the pivot table and the pivot chart.

1. In the PivotTable Field List pane, select the Customer_No, Salesperson_Code, Currency_Code, Profit (LCY) and Sales (LCY) fields. To select the fields, place a checkmark in the check box in front of the corresponding fields. The selected fields will be added automatically to the areas at the bottom of the pane. You can now rearrange the fields to fit your needs by dragging the fields to one of the areas.

2. In the Axis Fields area, select the Customer No_ field and drag it to the Report Filter area.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 8: Na2009 enus sql_07

SQL Server Installation and Optimization for Microsoft Dynamics® NAV 2009

7-8

3. Leave the Salesperson Code and Currency Code fields in the Axis Fields area. The order of the fields in the Axis Fields area determines the different grouping levels of the data. In this example, Salesperson Code is the first grouping level, and Currency Code is the second. This means that Salesperson Code must be located above the Currency Code field in the Axis Fields area. To change the order of the fields in the Axis Fields area, click a field and drag it to the correct position. Alternatively, open the drop-down menu for the field and select Move Up, Move Down, Move to Beginning or Move to End.

FIGURE 7.3 PIVOT TABLE FIELD LIST

4. Leave the Sum of Profit (LCY) and Sum of Sales (LCY) fields in the Values area.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 9: Na2009 enus sql_07

Chapter 7: Appendix

7-9

The result should look like the figure at the beginning of this lab.

Quick Interaction: Lessons Learned Take a moment and write down three Key Points you have learned from this chapter

1.

2.

3.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 10: Na2009 enus sql_07

SQL Server Installation and Optimization for Microsoft Dynamics® NAV 2009

7-10

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement


Recommended