Introduction• Peter Singh Customer Support Specialist• This session will provide details on tools for Monitoring, Tuning, Diagnosing, Creating. Editing, Debugging, and Reporting for Sage 300 ERP databases.• Follow Sage 300 ERP Customer Support: @sage300erpcs• Sage 300 ERP Community: http://community.sageaccpac.com/• Follow me on Twitter: <https://twitter.com/#!/sinpa01
Agenda• Sage 300 ERP Architecture• Application Object Model & UI Info• System Diagnostic• Spy Tools• Other Utilities• Q&A
Sage 300 ERP Architecture• Sage 300 ERP uses a “3-tiered layered architecture”• Meaning 3 distinct layers that interact with each other: • Screens for the user to interact with Sage 300 ERP User Interface • Business Logic to calculate values Views • Provides access to the underlying Data Database
Sage 300 ERP Architecture• Database Layer • Sage 300 ERP just saves and retrieves data to/from the Database • Layer just abstracts (hides unnecessary details) • View layer uses this layer to talk to the database
Sage 300 ERP Architecture• View Layer • A “View” is an specific term for the module of business logic that maps to a database table • Think of like a “black box” that gets input, processes it, and then outputs it input View output Cost = $10.00 (Processing) Tax = $1.20
Application Object Model• What is the Application Object Model? • Is a complete comprehensive structure of data dictionary • This doesn’t tell you how the tables are related or how data flows from one table to another as you post various transactions• Where Can I find the Application Object Model? • Application Object Model can be found on Sage Portal • Knowledge Base #210-30254 • UI Info Utility• How can the Application Object Model Help You? • Provides information on the fields included in Views/Tables • Shows which Views are related
Views Listed in AOM RotoIDs of ViewsRotoID is like Database The dll file for you can link to thisthe address for table this View this View View to share relatedthe View maps to (OEAUDD.dll) information
System Diagnostic• What is System Diagnostic? • Generates a log in the c:Windows folder • Log contains Information of the System • Operating System, Environment Variables • Sage 300 ERP Install and Previous Version • Crystal DLL etc.• How does it benefit you? • Compare workstation configurations • Information of Install
DBSPY Tool• Log Window shows when a database link (connection) is created• Shows error when connecting to a database with engine specific error code• Shows operations of each specific link in separate window (if created successfully)• Enhanced logging: – For SQL Server or Oracle – A4W.INI – [A4WSQLS] – Logdetails=271232
DBSPY Tool• Common functions: – OPEN-TABLE – SELECT – FETCH – Etc.• Return codes for functions could tell if there is a problem – DBS_NO_MORE_DATA • No more records to fetch, might not be a problem – DBS_NOT_FOUND • Cannot find a record requested, could indicate a problem
Database Layer Functions • Common DBSPY functions: Function Description GET Retrieves a specified record based on its key value SELECT Sets a criteria used for FETCH calls FETCH Retrieves records based on a specified criteria INSERT Adds a record to the database UPDATE Saves the changes to an existing record
RVSPY Tool Records all operations done to the application views: • AR Customers, IC Day End, etc. • Records 3rd Party Applications • Record is Read, Fields Value Retrieved, when updating happens • Output is nested if one view calls another • Can Include DBSPY output to show what database calls are made for a particular view call
RVSPY Tool • Views are identified by View IDs – AP0015: APVEN • AP Vendors – First 2 characters are always the application prefix so you can determine if a view is Sage Accpac’s or a 3rd party application • Each function has a corresponding return code:
View Layer Common Functions Function Description DB Function Read Gets the record specified by a key GET Browse Sets a criteria used for Fetch calls SELECT Fetch Retrieves records based on specified criteria FETCH Insert Inserts the current record INSERT Update Updates an existing record UPDATE Put Sets the value of a particular field Verify Verify this record follows data rules Compose Link other Views to this one Init Old way of clearing/creating records RecordClear Clears a record of all information RecordGenerate Creates a new record with default key values
Accpac SPY Tool • Tracks activity of various components that make up a Sage Accpac ERP screen • This is layer that user sees and interacts with • Use Accpacspy to find debug this layer • Screens (UIs) are made up of “Active X controls” including: • Text boxes (AccpacFieldControl) • Lists/Grids (AccpacViewList / AccpacGrid) • Buttons • Finders (AccpacFinder) • etc.
User Interface Controls Control Description AccpacDataSource The Datasource sends information to an attached View so that it can be processed and saved in the database. AccpacFieldEditControl Text boxes that allow user input. They send the input to an attached Datasource AccpacViewList A table that you can enter entries into and provide information in each cell. This information is sent to an attached Datasource
Other Utilities • Sysinternals: http://technet.microsoft.com/en-US/sysinternals • File and Disk, Network and Process Utilities • Process Explorer • Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. • Process Monitor • Monitor file system, Registry, process, thread and DLL activity in real- time.
Questions:• Presenter Contact Information: – Peter Singh – Peter.Singh@sage.com• Follow us on Twitter: @Sage300ERPCSThank you for your participation.