Search:

How to Set Up and Test a Service Tier for Making a Recording

Overview: This provides step-by-step instructions for creating a Service Tier. Also included are examples to show what happens if the Service Tier is not restarted before each recording. To view the information in a video, please see:
Adding a Service Tier for Recording.


You can set various filters in the SQL Profiler so you record only information you want. First, there are a few things that need to be set up. NAV has a three part structure - a client, a service tier and a database. The Service Tier is what logs into the NAV database. And, by default, the Service Tier uses one account (Network Service) to connect all users to a database. In order to be able to set a filter at the Service Account level and record only one user, a Service Tier needs to be created and set up under a User Account, not the Network Service Account.

To create a Service Tier and run it under a User Account:

1. Open the NAV Administration Tool to view the existing Service Accounts. In our example, all Services are running under the same Service Account name of Network Service. This is the account that, by default, all users are logged into the NAV database as.



2. First we need to create a User to run the new Service Tier. Open Computer Management and add a new Local User. Our example calls the User NAVRecording. Enter a checkmark in the Password never expires field.



3. In SQL Server Management Studio, locate the database you are creating the new Service Tier for. Add the new user created earlier - NAVRecording. Give the User dbo_owner in Memberships.

4. Return to the NAV Administration Tool. Check the port numbers of the existing Service Tiers. Use different port numbers for the new Service Tier.

5. Add a new Service Tier with a unique Server Instance name and use available port numbers. Our example uses Recording as the Server Instance name. Set the Service Account: field to User Account. Enter the name of the User created earlier in the User Name: field. In our example - the User was called NAVRecording.



6. The new Service Tier called Recording should now display in the Service Tier list. Review the information to make sure it is correct. Start the Service Tier.

7. Open the NAV Client and enter the new port number and Service Tier name to connect to the NAV database. Open the company you wish to use to make a recording.



8. Open SQL Server Profiler and import the NAV Easy Security Template. The templates are included in the NAV Easy Security software package. The version of the SQL Profiler template should be equal to or be a newer version than the SQL version the NAV database is running on that you are recording against. The 2014 SQL Express Management Studio version has an option to include the SQL Profiler. The full version of the SQL Server Management Studio does not have to be installed in order to have the SQL Profiler.

9. Edit the template and set the Easy Security template to be the default template.

10. Start a New Trace. Connect to the server that has the NAV database that you will be working with.

11. Click on the Events Selection Tab. Click on the Column Filters button to open the Edit Filter window. Set a filter for the correct DatabaseName. The % sign is a wild card in SQL. You don't have to enter the full text in a filter. Also, upper and lower case letters do not have to be correct when using the % sign.



12. Click the Run button to start the trace. After some data has been captured, stop the trace file.

13. Check the resulting trace file to make sure that the recorded information is from the correct database. Because a filter was not set for a specific LoginName, The Network Service LoginName and the LoginName that is running the new Service Tier should display.



14. Start a New Trace and set a filter for the DatabaseName and for the LoginName that runs the new Service Tier.



15. Click the Run button to start the trace. The new trace file should be capturing only data for the LoginName that the filter was set for.

16. Go into NAV and open and close a Customer Card without making any changes. It is important to close the page to be sure to capture all objects. NAV does data validation when a page closes. You should see lots of activity in the trace file.

17. Stop the trace file and save it as a Trace XML File in a location that is accessible by the Service Tier.

18. Start another trace. Return to NAV and open and close a Customer Card again. Stop the trace and save the resulting file as a Trace XML File in the same location as the first file was saved.

19. Notice the difference in the size of the two files. The first file is much larger than the second file. This is due to NAV caching the objects that were used when editing the Customer Card during the first recording. Since the objects were stored in Cache, the second editing of the Customer Card did not have to call the objects again from the server. Therefore the second recording will not have the object information. That is why it is very important to restart the Service Tier before each recording is made. Restarting the Service Tier clears the objects and data from Cache and makes sure that all objects are called from the server during the next recording.



20. Restart the Service Tier. Restarting a Service Tier disconnects all users that are logged into NAV using that Service Tier. That is why it is important to have a Service Tier created just for making recordings. No other users should be logged into NAV using the recording Service Tier.

21. Start another trace. Return to NAV and open and close a Customer Card again. Stop the trace and save the resulting file as a Trace XML File in the same location as the first and second files were saved.

22. Notice that this time the size of the file is close to the size of the first file that was created. Restarting the Service Tier cleared the objects from Cache and the objects were called from the server again.

23. You can forward the connection string for the new Service Tier to other users and have them log into NAV using the recording Service Tier. They can then do the tasks that are being recorded.



Like   Don't Like

© 2024 Mergetool.com. All rights reserved.



Related resources

Download software from Mergetool.com