Welcome to Cach - PowerPoint PPT Presentation

1 / 178
About This Presentation
Title:

Welcome to Cach

Description:

Journaling is optional. ... Write Image Journaling refers to the interim step of ... Write image journaling is automatically enabled when you start Cach ... – PowerPoint PPT presentation

Number of Views:121
Avg rating:3.0/5.0
Slides: 179
Provided by: fiM2
Category:

less

Transcript and Presenter's Notes

Title: Welcome to Cach


1
Welcome to Caché
  • Summary overview of the system

2
Content
  1. Introduction
  2. Caché Interface
  3. Administration overview
  4. Installation
  5. Databases and namespaces
  6. Managing globals and routines
  7. User accounts
  8. Backup and restore
  9. Working with devices
  10. Monitoring system
  11. Networking with Caché
  12. Troubleshooting
  13. Programming with classes
  14. Programming with Caché Server Pages
  15. Programming with SQL
  16. National Language Support

3
Introduction to Caché

4
What is Caché?
  • An integrated solution of application
    development, deployment and system management
    tools including a
  • database
  • programming language
  • networking technology
  • development environment
  • run-time system

5
Post-Relational Database
  • Post-relational technology allows for better
    depiction of real-world issues through a
    combination of
  • Multidimensional data models
  • Object technology

6
Benefits of Caché
  • Scalability - easily adjusts to changes in sizing
    needs.
  • Performance - faster transaction processing.
  • Real-World Data Modeling - designed to work with
    object technology.
  • Rapid Application Development - quick and low
    maintenance development of applications.

7
Accessing Your Caché Database
  • Caché allows for many different methods of
    accessing its database
  • Objects - for development power and
    interoperability
  • SQL - for reporting and decision support
  • Direct - for easy migration and complete
    flexibility
  • XML universal format
  • SOAP Web Services

8
Caché Architecture
ActiveX
Web
VB Delphi
SQL
Java, C, EJB
Caché Server Pages
Client
Objects
SQL
XML
Projection
Multidimensional data storage and virtual machine
Engine
9
The Caché Interface

10
The Start Menu
  • Caché contains two system management interfaces
  • the Caché Start menu
  • command line interface
  • The Caché taskbar icon appears in your Start
    menu bar.
  • Right mouse click on the Caché taskbar icon to
    see the Start menu.
  • The Caché Start menu can only be used on a
    Windows 95/98 or Windows NT system.
  • Provides a rapid application development
    environment for creating, editing, deleting and
    compiling classes.

11
Caché Studio
  • Allows editing and compiling projects consisting
    of Caché Classes, routines and CSP pages.

12
Caché Terminal
  • Provides direct access to the ObjectScript
    programming environment.

13
Caché Explorer
  • Provides access to class, global and routine
    management functions.

14
Caché Control Panel
  • Provides an interface to modify management
    utilities on your preferred server.

15
Caché Configuration Manager
  • Provides an interface to create and modify
    configurations, namespaces, database and network
    information.

16
Remote System Access
  • Most of the utilities default to your preferred
    server.
  • Using the Remote System Access option allows
    management of multiple systems from a single PC.

17
Adding Remote Connections
  • Select the Add/Edit... option from the Preferred
    Server option in the startup menu.
  • Click Add from the Client Manager window.
  • Add the system name and IP address of the remote
    system.

18
The Documentation
  • The online documentation allows for indexed
    search for system-wide help.

19
Administration Overview

20
Overview
  • As a System Manager, there are several basic
    tasks that must be performed to get your Caché
    system installed and configured. These include
  • Installing the product
  • Setting up License Servers
  • Creating Namespaces and Databases
  • Managing Globals and Routines
  • Setting up User Accounts
  • Running Backups
  • Configuring Journaling
  • Setting Up Devices
  • Monitoring the Systems Performance

21
Install Caché
  • Caché needs to be installed on all machines which
    will store a database, any machine where the
    utilities need to be run and any machine where
    application development will take place.

22
Licensing
  • A License Key File must be entered on the machine
    designated as the License Server.

23
Databases and Namespaces
  • Data and programs are stored in Caché in
    Databases and Namespaces.
  • Databases are physical storage locations.
  • Namespaces are logical references to the data
    (globals) and programs (routines).

Databases
Customers
Airports
Airline Routes
TravelAgent
FlightSchedule
Namespaces
24
Globals and Routines
  • What are they?
  • Global data that resides in a database.
  • Routine an individual block of code that is
    created and edited in source form and compiled
    into object form.
  • Who works with them?
  • Globals and Routines are typically created,
    modified and deleted by the application
    developers.
  • System managers may be responsible for mapping
    globals and routines into specific namespaces,
    setting up separate databases for large globals
    or setting up journaling.

25
User Accounts
  • User accounts and/or device accounts can be used
    to facilitate better control over which users
    have access to specific routines, database and
    namespaces.
  • Allows users to log in to specific routines and
    namespaces on your system remotely and locally.
  • Device accounts allow LAT users, TELNET users,
    specific LAT servers or TELNET hosts, or specific
    terminals to log in to a preset routine and
    namespace when entering Application mode or
    Relational mode

26
Journaling
  • Journaling refers to the record of changes made
    to the database between backups.
  • Journaling is optional.
  • The user can restore the contents of the journal
    file to the database after a restore from backup
    takes place.
  • Write Image Journaling refers to the interim step
    of recording database modifications before the
    actual write into the database.
  • Write image journaling is automatically enabled
    when you start Caché
  • The Write image journal is automatically applied
    to the database upon startup after a system crash.

27
Backup
  • Caché provides a concurrent backup utility that
    allows for three types of backups
  • Full provides a complete image of the
    directories backed up.
  • Cumulative tracks all changes since the last
    full backup.
  • Incremental Tracks all changes since last
    backup, regardless of the type of the previous
    backup.
  • Standard O/S level backup utilities may also be
    used, but require stopping Caché before backup to
    guarantee integrity.

28
Devices
  • Caché supports both physical and logical I/O
    devices
  • Physical terminals, printers, disk drives,
    magnetic tape, cartridge tape
  • Logical Principal device, spooler, sequential
    files, flat files, RMS files (OpenVMS) Interjob
    communication devices.
  • When you install Caché, default devices, device
    subtypes, and magnetic tape devices are defined.
  • Additional devices can be defined for the users
    specific environment.

29
Installing Caché

30
Overview for Windows
  • Before installing Caché, read the Installation
    Guide!
  • Check your system requirements
  • From the CD, run setup.exe
  • Install on all user, application development
    machines, database server machines, and any
    machines where the graphical utilities will be
    run.

31
Installation Restrictions
  • You cannot install Caché into a destination
    directory that
  • Has a caret () in the pathname
  • Is at the root level of a drive, such as D\
  • Is in the drive\Program Files directory
  • Has more than 32 characters in the root install
    pathname
  • For NT, you must have Administrator privileges to
    install
  • For UNIX, you must be login as root user

32
Installing Caché
  • If upgrading, stop Caché before doing an install
  • Select setup.exe from CD drive directory
  • Cache License Agreement -gt click Yes
  • Enter License Key (if not there already)
  • Select a location for the install, default is
    C\CacheSys
  • Select type of install Standard, Client or
    Custom
  • Select 8 bit or unicode
  • Select from list of components if doing a Custom
    install.
  • Setup Complete -gt click Finish

33
Running Setup
  • Select Install to run the installation program.
  • Browse the CD allows you to search the contents
    of the CD
  • Select Exit to exit the program

34
Install Location
  • After reading the Software License Agreement,
    Select YES to proceed.
  • Specify a name for the installation (default is
    CACHE).

35
Type of Install
  • Standard machines which will hold databases
  • Client machine can be used to access remote
    servers, but cannot support local databases.
  • Custom - allows you to select which components
    are installed.

36
Unicode Support
  • 8-bit - handles characters in an 8-bit format
  • Unicode - select if your application will be
    handling 16-bit languages, such as Japanese.
  • Always select Unicode in countries outside Latin1
    region!

37
Summary of Install Options
  • A summary of the options selected will be
    presented before the install begins.

38
Unix Installation
  • Read the Caché Installation Guide for UNIX and
    Linux first!
  • Login as root
  • Create the System Managers Directory with 755
    protections (/usr/cachesys by default)
  • cd to that directory
  • Transfer files from the distribution media
  • Execute cinstall procedure

39
Starting and Stopping Caché
  • From the Caché Cube, select Start Caché or Stop
    Caché
  • Upon startup, Caché will
  • allocate system resources
  • determine if recovery from the write image
    journal file is necessary
  • creates global and routine buffers
  • sets system variables
  • creates system processes
  • invokes the STU utility

40
Starting Caché on UNIX
  • UNIX users must be the superuser, or root user,
    or belong to a uid group which was named as
    having Caché start and stop privileges.
  • To start Caché from the command line
  • cd to the Caché directory
  • type ./cstart
  • To start Caché automatically, edit your system
    startup file to
  • cd to the Caché system directory
  • run cstart
  • cd to the appropriate working directory

41
Startup on OpenVMS
  • OpenVMS users need OpenVMS system manger
    privileges including CMKRNL, WORLD, BYPASS,
    SYSLCK, ALTPRI and OPER in order to use CSTART or
    CSTOP.
  • Load the shared image files
  • Run CACHESTARTUP.COM at the OpenVMS level when
    you reboot OpenVMS, as well as when you install
    or upgrade Caché
  • To start from the command line
  • switch to the Caché directory
  • type _at_CSTART.COM

42
Shut Down on UNIX and OpenVMS
  • UNIX Execute the cstop shell script from the
    system managers directory
  • OpenVMS Run CSTOP from the DCL prompt
    _at_CACHESYScstop
  • cstop will invoke the Caché Shutdown utility
    which will produce a report specifying any active
    processes
  • If any users are on the system, enter YES at the
    broadcast prompt
  • Enter the message you want to send and the
    terminal to which you want to send it
  • Specify whether or not to generate another system
    status report
  • Confirm that you want to halt

43
Exercise Summary
  • Install Caché on your local machine

44
Databases and Namespaces

45
Overview
  • Data and programs are stored in Caché in
    Databases and Namespaces.
  • Databases are physical storage locations.
  • Namespaces are logical references to the data
    (globals) and programs (routines).

Airports
Databases
Customers
TravelAgent
FlightSchedule
Namespaces
46
Database
  • Each Caché database is organized as a set of
    files and directories which consists of from one
    to eight extents.
  • The filename for the first extent is Cache.dat.
  • The filename for additional extents is Cache.ext
  • These file names are implicit the system manager
    or users never specify them.
  • Each database extent exists in a separate
    directory (and optionally, separate disks)
  • Only the system manager needs to be aware of the
    physical location of a database.

47
Predefined Databases
  • Caché installation creates your system manager's
    database, Cache.dat, in the directory specified
    during installation. (Default c\cachesys\mgr)
  • Additional predefined databases will
    automatically be installed into your system
    managers directory.
  • user
  • CacheLIB
  • cachetemp
  • You must create the Caché databases that will
    contain your own routines and data.

48
Caché Configuration Manager
  • Databases can be viewed from the Configuration
    Manager.
  • Select Caché Configuration Manager from the
    startup menu
  • Select the Databases tab
  • CACHESYS resides in the mgr directory
  • Other predefined database directories are
    relative pathnames with respect to the mgr
    directory.

49
Creating a Database Wizard
  • Click the Wizards button and select Create a
    Database, click OK
  • You will be prompted for
  • a database name
  • whether it is local or remote
  • the directory where the database will reside
  • the initial size in Mb

50
The Control Panel
  • The Control Panel is used to modify and maintain
    all local databases.

51
Editing Database Parameter Values
  • To edit the database parameters, select the
    database and the Editfrom the context menu
  • In most cases, you should accept the default
    values.

52
Mounting and Dismounting Databases
  • Mounting occurs at two levels
  • At the system level you mount disks that contain
    databases.
  • At the Caché level you mount databases.
  • You must mount a disk at the system level, before
    the databases on it can be mounted at the Caché
    level.
  • Databases are automatically mounted if they are
    visible from the Configuration Manager.

53
Expanding Databases
  • A Caché database can expand by any of three
    means
  • Caché dynamically expands a database
    automatically if it fills up and there is room to
    expand.
  • You can increase the size of a database in the
    of Mb field using the Edit option in the Database
    window of the Control Panel.

54
Deleting Databases
  • Databases can be deleted from the Configuration
    Manager.
  • The actions apply to all extents of that
    database. You cannot delete individual extents.
  • Deleting from the Caché utilities does not delete
    the physical directory structure. AFTER you
    delete from the utilities, you can remove the
    structures using system level commands.

55
Namespaces Overview
  • A namespace is a logical entity that groups Caché
    globals and routines, which may reside in
    different databases, into a single unit.
  • Information is mapped from a database into a
    namespace.

Databases
Customers
Travel Agent
Namespaces
56
Namespaces Tab
  • From the Namespaces tab, you can view which
    databases are being used within that namespace.
  • Individual Globals and Routines from other
    databases can be made accessible, or mapped, into
    a given namespace.

57
Creating Namespaces
  • Namespaces can be created by clicking the Wizards
    button from the Caché Configuration Manager
  • Enter Name of Namespace
  • Select a database or create a new one
  • Click Finish

58
Changing Namespaces
  • When a process enters Caché, it is associated
    with a particular namespace.
  • To change to a different namespace, use the
    ZNSPACE (or ZN) or CD commands
  • USERgt zn SYS
  • SYSgt
  • - OR -
  • SYSgt do CD
  • Namespace USER
  • You're in namespace USER
  • Default directory is c\cachesys\mgr\user\

59
Managing Globals and Routines
60
Overview
  • Global data that resides on disk.
  • Routine an individual block of code that is
    created and edited in source form and compiled
    into object form.
  • Globals and Routines are typically created,
    modified and deleted by the application
    developers.
  • System managers may be responsible for mapping
    globals and routines into specific namespaces,
    setting up separate databases for large globals
    or setting up journaling.

61
Global Variables
  • A global variable (global) is semi-permanent
    data. They exist until they are specifically
    deleted.
  • Stored in Caché database files (cache.dat or
    cache.ext).
  • Can be scalar or array.
  • Potentially available to all processes.
  • Name must begin with a caret (), then for
    library globals or an alphabetic character.
  • Maximum length of name is 31 characters.
  • Which of the following is not a valid global
    name?
  • myname ROUTINE
  • test123 x
  • SYS

62
Displaying Globals
  • From the Explorer, click on the Namespaces list
    item, select a namespace, click on Globals

63
Editing Globals
  • Select the global then Open from the context menu.

64
Creating Globals
  • Globals can be created through application
    development or via the Caché terminal.
  • Example
  • TESTgt SET myglobal1
  • TESTgt SET color(1)blue
  • test routine to test globals
  • set myglobaltest
  • write !,myglobal ,myglobal
  • quit

65
Referencing Globals in a Namespace
  • By default, globals are accessible within the
    namespace where they are first created.
  • Example
  • From the Namespace Test, create a global
    myname
  • TESTgt set mynamegeorgeTESTgt write
    mynamegeorge
  • From the Namespace App1, write the global
    myname
  • APP1gt write mynameWRITE MYNAMEltUNDEFINEDgt

66
Global Mapping
  • To make a global accessible to a different
    namespace, the global needs to be mapped into the
    new namespace.
  • Mapping allows for
  • Controlling access to information.
  • Splitting the physical storage of data over
    multiple databases, while giving transparent
    access to users.

67
Global Mapping
  • From the Configuration Manager, select
    Namespaces Tab.
  • Select the Namespace where you want to see the
    global.
  • Select Global Mapping, click Add.
  • Enter the name of the global in the Add New
    Global Mapping dialog box, click OK.
  • Select Data Location, click Change.
  • Select the database where the global is defined,
    click OK.

68
Data Replication
  • A global can be replicated into another database.
    This allows for less network traffic on reads,
    but writes still travel to both locations.
  • From the Configuration Manager, add the global
    mapping, then select the Data Replication item.
  • Select the database where the data should be
    replicated.

69
Subscript Level Mapping
  • Subscript Level Mapping enables system managers
    or application developers to store and access
    parts of a global from different namespaces.
  • From the Configuration Manager, select Global
    Mapping, click Add and specify the name of the
    global
  • Select the Subscript Level Mapping item and click
    Add
  • Specify the subscripts and the database where the
    mapping will take place
  • Note specifying (1)(10) means everything
    starting at, and including (1), up to, but not
    including (10).

70
Example
  • From the first Namespace (KAG1), map the number
    global subscript levels (1)(10) to a second
    namespace (KAG2).

71
Example (Cont.)
  • From the first namespace
  • KAG1gt do G
  • Global number
  • number(1) one (2) two (10)ten
    (count)one, two, three
  • From the second namespace
  • KAG2gt do G
  • Global number
  • number(1)one (2)two

All subscripts of the number global are visible
Subscripts (1) up to (but not including) (10) of
the number global are visible
72
Default Protections
  • Newly created globals are assigned an access
    level based on system-wide defaults that you can
    set.
  • From the Configuration Manager, select the
    Advanced Tab, the General list item, then Default
    Global Protection

73
Journaling Globals
  • Journaling refers to recording changes made to
    the database between backups.
  • The system manager can determine whether to
    journal all globals or selected globals.

74
Journaling Selected Globals
  • If selected globals are journaled, open the
    Properties page of the global from the Control
    Panel and toggle the Journal global option.

75
Global Buffers
Buffers are sections of memory that store globals
(and routines) for access by running processes.

USER
User reads and writes to buffer
Routine/Global Buffers
Cache.dat
Read and write from DB to buffer
76
Modifying Global Buffer Size
  • Global Buffer size is determined by the amount of
    memory allocated to the database cache.

77
Routines
  • An individual block of code that is created and
    edited in source form and compiled into object
    form
  • Routines can be created from the Caché Studio.

78
Mapping Routines
  • Routines are created within one namespace and can
    be mapped to others, just like globals.
  • From the Configuration Manager, select the
    Namespaces tab, select the namespace where you
    want to map the routine, then Routine Mapping,
    click Add from the context menu.
  • Specify the name of the routine, click OK
  • Change the Location to the original location of
    the routine from the context menu

79
Working with Routines
  • Right click on any routine in the Explorer to
    bring up this context menu.
  • Open - opens the routine in Caché Studio
  • FirstLine - will display the first line of any
    routine (usually has version information and
    comments)
  • Search - enables a text search within the body of
    the routine.
  • Export - copies the routine into a file which can
    then be imported into another database.
  • Compare - diffs two routines.

80
Export
  • Routines and Globals can also be exported from
    one database and imported into another.
  • Export
  • From the Caché Explorer, select the global or
    routine, then Export... from the context menu.
  • Click Save to Disk, and specify a filename for
    the global.

81
Import
  • Import
  • From the Caché Explorer, right click on the
    Globals (or Routines) list item under the
    database where the import should take place.
  • Select Import from Disk from the context menu
  • Select the filename of the global or routine and
    click OK.

82
Exercise
  • Create several globals in your new namespace
  • Map one global into a different namespace
  • Create a routine, map into a separate namespace
  • Export one global from the first database to the
    second
  • Use the Open, First Line, Search and Compare
    options

83
User Accounts
84
Overview
  • User accounts and/or device accounts can be used
    to facilitate better control over which users
    have access to specific routines, database and
    namespaces.
  • Allows users to log in to specific routines and
    namespaces on your system remotely and locally.
  • Device accounts allow LAT users, TELNET users,
    specific LAT servers or TELNET hosts, or specific
    terminals to log in to a preset routine and
    namespace when entering Application mode.

85
Default Account Names
  • There are predefined names that can be used for
    creating accounts on Windows platforms.
  • TRM - default device account
  • LAT represents a user account for all LAT
    (Local Area Transport on Digital systems) users
  • TELNET represents a user account for all TELNET
    users
  • Servername a variable representing the terminal
    server name of the LAT server, or fully qualified
    domain name of the TELNET host, which you must
    use as the account name
  • Servername/portname
  • sys (password XXX) -gt this is a default account
    that logs into the sys namespace.
  • Username - a variable representing any username

86
TRM Device Account
  • The default device account, TRM, opens the Caché
    terminal window to the namespace User.
  • Edit the account to add a password or change the
    default namespace.
  • Delete the account, and set up individual user
    accounts.

87
Creating a User Account
  • From the Control Panel, select the Security list
    item, then User Accounts and select New User
    from the context menu.

88
Deleting Accounts
  • From the list of User Accounts in the Control
    Panel, select Delete from the context menu.

89
Exercise
  • Add a password to the TRM account, open a
    terminal window.
  • Add a new user account, open a new terminal
    window.
  • Remove the TRM account, open a new terminal
    window.
  • Add the TRM account with no password, open a new
    terminal.

90
Backup and Restore

91
How Backups are Done
  • ALL backups can be performed while applications
    are running and while the database is changing.
  • Multiple passes allow for data integrity and a
    snapshot of the database in time
  • First passbackup all blocks and begin tracking
    any blocks that are changing from this point
  • Second, passbackup any of the blocks that
    were changed during previous pass
  • Last passmodifications are prohibited (users
    will be delayed, not terminated) while final
    blocks are being backed up.

92
Types of Backup
  • Caché provides a backup utility that allows for
    three types of backups
  • Full provides a complete backup of the
    database.
  • Cumulative tracks all changes since the last
    full backup.
  • Incremental Tracks all changes since last
    backup, regardless of the type of the previous
    backup.

93
Cumulative
  • Includes only changes since last full backup.
  • Short backup time initially, gets longer with
    each subsequent cumulative.
  • Restore time much faster, since you restore last
    full and last cumulative only.

94
Incremental
  • Includes changes since last backup, regardless of
    the type of the last backup.
  • Short backup time can perform backups more
    frequently.
  • Small files created from backup (could
    potentially backup to disk instead of tape).
  • More complex restore need to go back to last
    full backup then restore each incremental in
    order.

95
Backup Example
  • Backups are performed at 4 am daily according
    the following schedule
  • Sunday - Full
  • Monday - Incremental
  • Tuesday - Incremental
  • Wednesday - Cumulative
  • Thursday - Incremental
  • Friday - Incremental
  • If my machine crashes at noon time Friday, what
    do I need to restore?

96
Backup Strategy
  • Identify all databases to be backed up.
  • Perform a full backup on all databases on a
    weekly basis, on the same day each week.
  • Use a combination of incremental and cumulative
    incremental backups on all databases on all other
    days of the week.
  • Enable Journaling for all globals.
  • Select a name and location for the journal file
    for each computer in your system using the
    Journal utility.
  • Switch the journal file after each backup.

97
Creating a Database List
  • The Caché Backup utilities are run from the
    Control Panel.
  • Click on Backup, then right click on Database
    Lists and select Edit
  • Add or Remove any Databases you want included in
    the list of databases to be backed up.

98
Backup Tasks
  • A backup task is list of parameters for a
    particular backup.
  • From the Control Panel, select Backup, then
    double-click on Tasks
  • There are four predefined tasks
    FullAllDatabases, FullDBList, IncrementalDBList,
    CumalativeIncrementalDBList

99
Creating a Backup Task
  • From the Control Panel, select Backup, then
    right-click on Tasks and select New
  • NOTE Modify your database list to include the
    databases to be included in the backup task
    before creating the task!
  • Supply the backup task with a
  • name
  • description
  • type of backup (full, cumulative, incremental)
  • database list (supplied from the database list
    created earlier)
  • switch journal after backup toggle (recommended)
  • save to tape toggle, tape device number
  • directory path for backup

100
New Backup Task Form
101
Running the Backup
  • To run a backup, right click on the backup task
    name and select Run
  • The backup results will be displayed in a status
    window and saved to a log
  • Double click on the Logs button to view any log,
    or Show Last log to see the last log for the
    selected database set.

102
Restore Phase
  • Restore the last full backup of each database
    that is no longer accessible.
  • If you have done cumulative backups since the
    full backup, restore the last one.
  • Restore all incremental backups since the full
    backup or the last cumulative backup in the order
    in which the backups were performed.
  • Apply the changes in the journal file for the
    directories you restored.
  • If you restored ALL the directories on the
    system, clear the journal.
  • Perform a full backup of the restored system.

103
Restoring from Backup
  • Run BACKUP utility from the terminal window
  • SYSgt do BACKUP
  • Select the Restore ALL or Restore Selected

104
Restoring From Backup
  • The BACKUP utility will prompt you for
    information regarding the restore
  • Indicate whether you want to suspend Caché
    processes (set switch 10) while restoring takes
    place (recommended).
  • Specify the first file from which to restore.
  • Verify the information about the backup is
    correct.
  • Specify the input file for the next incremental
    backup to restore or enter STOP if there are no
    more files.
  • Indicate whether you want to restore other
    backups.
  • Specify which journal entries you want to apply
    to the restored databases, and the name of the
    journal file you are restoring.

105
Alternate Backup Methods
  • Caché databases can also be backed up using
    standard backup solutions provided by the
    hardware vendor, nothing in Caché has to be
    configured to deal with them.
  • Unix level backup
  • NT level backup
  • Open VMS Backup
  • Mirroring technologies
  • What to backup?
  • Each Cache.dat file, with any associated
    cache.ext files is an individual database.
  • All of a databases extents must be backed up
    together.
  • Caché configuration information is stored in a
    .cpf file. These files reside in the mgr
    directory and should be backed up occasionally.

106
Checking Database Integrity
  • To check database integrity, open the Local
    Databases folder in the Control Panel, then right
    click on the database to be checked and select
    Database Integrity Check

107
Exercise
  • Create a database list
  • Run a full backup on your test database
  • Make a change to the database
  • Restore from backup

108
Devices
109
Devices Overview
  • Caché supports both physical and logical I/O
    devices
  • Physical terminals, printers, disk drives,
    magnetic tape, cartridge tape
  • Logical Principal device, spooler, flat files,
    etc. Any device that will use a Caché device
    number to access, for example, 0 for the
    principle device.
  • When you install Caché, default devices, device
    subtypes, and magnetic tape devices are defined.
  • Additional devices can be defined for the users
    specific environment.

110
Using Devices
  • Developers can specify I/O devices at the Caché
    programmers prompt or from Caché applications in
    two ways
  • IS utility - a built-in general device selection
    utility for character-based applications.
  • Any character based utility that prompts for a
    device uses IS.
  • Users enter the device mnemonic that has been
    defined in the Configuration Manager, to specify
    where I/O operations should be directed.
  • OPEN, USE and CLOSE ObjectScript commands - can
    specify a device in one of three ways
  • device name i.e. gtOPEN com1
  • device id (or alias) i.e. gtOPEN 47
  • file name i.e. gtOPEN myfile.dat

111
Viewing Devices
  • Device information is found in the Configuration
    Managers Advanced Tab

112
Identifying Devices
  • Mnemonics
  • used at the IS device prompt
  • can be up to 8 numbers or upper case alphabetic
    characters
  • Device Ids
  • used in an OPEN command,
  • can be either a device number or name
  • Allowable device ids
  • Principal 0
  • Spooler 2
  • Magnetic tape 47-62
  • Other 1-2047 that isnt used by another device

113
Identifying Devices (Cont.)
  • Type
  • TRM terminal
  • MT magnetic tape drive
  • BT cartridge tape drive
  • SPL spooling device
  • OTH any other device (printer or sequential file)
  • Sub-type
  • If the device is of type TRM or SPL, you must
    select an entry from the sub-type dropdown list.
  • Each sub-type is defined in the device sub-type
    list item in the Advanced tab of the
    Configuration Manager.
  • Sub-types define margins, screen lengths, cursor
    control and other specific formatting codes for
    the device.

114
Identifying Devices (Cont.)
  • Prompt - determines how the user is prompted for
    a device when an application calls IS
  • Open Parameter - You can optionally enter
    parameter values here that will be sent as the
    second argument for the OPEN command
  • Alternate Device - You can optionally enter the
    Device ID of another device defined at this
    panel, if the user enters A at the IS prompt,
    the alternate device will be used.
  • Location - This is informational only (i.e. a
    comment) to describe the location of a terminal
  • Alias - Enter an alternate device ID (numeric
    only) for this device, must be unique within the
    Alias column (and also not used as a device
    number)

115
Adding Devices
  • From the Advanced Tab in the Configuration
    Manager, right click on the Devices field and
    select Add.
  • A new entry will be created for the new device.
  • Click on each field to enter a value

116
Example
  • The mnemonic used for the IS utility would be
    MyPrinter
  • The device is PRN\\server1\development
  • The type is OTH, which is used for a printer
  • The Sub-type is P-DEC which specifies
  • The Open Parameter is W, since printers are
    write devices
  • The alias 300 allows this printer to be
    referenced by the name MyPrinter or the number
    300

117
Testing Your Devices
  • You can test to see if your device works properly
    by running any utility that prompts for a device
    name.
  • For example, do G will prompt for a device
    name, then a global name and will print the
    values of the global to the specified device.

118
Testing Your Devices
  • Devices can also be tested within routines
  • The following routine will send the output Hello
    world. to the printer defined with alias 300.

119
Exercise
  • Define a new printer device
  • Test to make sure your definition worked!

120
System Topics
121
Processes
  • User Processes
  • Background or JOBbed Processes
  • System Processes - CONTROL, WRTDMN, GARCOL,
    JRNDMN
  • Viewing Process Details
  • Process Termination

122
The Process Page
  • By default, this display includes the process
    number, namespace, routine name, lines of code
    executed, the number of globals referenced and
    the state of the process
  • To change what the process displays, Process
    Columns under the View menu.

123
System Viewer Overview
  • The Process Page - displays a list of all
    running Caché processes.
  • The Lock Table - shows all local and remote
    locks.
  • The Statistics View displays a summary of
    operating statistics.
  • The Performance Window shows graphs for logical
    (globals), physical, and routine I/O activity.

124
The Lock Table
  • By default this display includes the process id
    (PID) of the lock owner, the lock number, the
    item locked, flags and the clash list.

125
The Statistics View
  • Look at the Accesses/Physical Accesses at the
    bottom. Low numbers (25-30) could mean your
    Database Cache size is too low.

126
The Performance Window
  • If the Routine I/O is high, you may need to
    increase the routine cache
  • If the Logical is high, or the physical is close
    to the logical, you may need to increase the
    global cache

127
Configuration Files
  • A Caché configuration file will store information
    about a specific environment including namespaces
    that have been defined, journaling options,
    databases that have been defined, global and
    routine mappings, devices, etc.
  • The default configuration file is cache.cpf found
    in the managers directory (c\cachesys\mgr)
  • Although only one configuration file is
    necessary, a system manager may decide to create
    additional files
  • create a test configuration
  • different application development environments
    have different requirements

128
Configuration File Wizard
  • To create a new Configuration click the Wizards
    button on the Configuration Manager and select
    Create a Configuration File

129
Configuration File Management
  • To change configurations select the Configuration
    Files button on the Advanced tab in the
    Configuration Manager.
  • Open allows you to open and modify a
    configuration.
  • Active makes the local system use the selected
    configuration.

130
Networking
131
Network Processes
  • DMNNET System Process
  • At each node in the network, Caché runs either 1
    (on VMS and Windows 95/98/NT systems) or 2 (on
    UNIX systems) DMNNET system processes for each
    port type in the active configuration.
  • There is a separate DMNNET process (or 2
    processes on UNIX systems) created for each
    network interface device you define in your
    configuration.
  • A pair of DMNNET processes is present for each
    port you define in the Namespace/Network
    Configuration editor.

132
Processes
  • RECEIVE System Process
  • On all platforms, one RECEIVE process is created
    at each computer. The RECEIVE process waits to
    receive messages from other nodes indicating they
    have joined or left the network. It then updates
    the network node table.
  • There is one RECEIVE system process per node. The
    RECEIVE process monitors the network for any
    changes to the configuration, such as the loss of
    a node.
  • DCPDMN System Process
  • DCPDMN processes are present on systems that
    function as servers. One or more DCPDMN processes
    are created for each client that makes a remote
    request to the server system. The actual number
    of DCPDMN processes created depends on the number
    of users for which each client is licensed.

133
Network Configurations
  • The Caché Configuration Manager defines the
    location of data within your network, and the
    relationships among the various components of the
    network and the relationships among the various
    components of the network for your Caché system.
  • The network configuration you set is both the
    description that you produce and the actual
    network components and relationships.
  • You can define several configurations to describe
    different subsets of your network however, only
    one configuration can be active at a time.
  • Most modifications to a configuration will not
    require restarting Caché. The Configuration
    Manager will display a dialog box stating if a
    restart is necessary.

134
Communication Protocols
  • Caché transfers data between computers on a
    network according to a set of conventions called
    communications protocols.
  • The protocol determines the way your system
    identifies sending and receiving data from
    network nodes. The choices depend on platform
    and include
  • UDP
  • Raw Ethernet
  • DTM-Netbios
  • DDP
  • ECP

135
Message Format Protocols
  • Information moves across a network as messages
    sent from one machine to another. Typically,
    these messages are composed of smaller packets of
    information.
  • The term message format protocol refers to a
    particular way of arranging the data in a network
    message packet. The message format protocol you
    can select is limited by the underlying
    communication protocol you are using DCP,
    DSM-DDP, DTM-Netbios
  • Distributed Caché Protocol (DCP) is a proprietary
    protocol used by Caché. DCP message format
    protocol can be used with UDP or Ethernet
    communication protocols.
  • Enterprise Cache Protocol (ECP) is new, very
    efficient networking protocol, implemented in
    Caché 4.1. It is client/server based

136
Caché to Caché Networking
  • ECP is the preferred connection between clients
    and servers for this network configuration.

137
Setting Up a ECP Connection
  • From the Configuration Manager, select the ECP
    tab.
  • Click Add and specify the remote system name and
    address.
  • Click OK. A restart will be required to activate
    the change.

138
Network Performance
  • Network performance is measured by the time it
    takes to send and receive network message
    packets. Factors that affect performance include
  • Transmission rate limitations of network hardware
  • Local and remote system loads - Since the DMNNET
    processes must compete for time with all other
    processes, the busier a node is, the longer
    DMNNET must wait to do its work.
  • Amount of network traffic

139
Maximizing Network Performance
  • To maximize performance, aim to meet these goals
  • Obtain the most efficient network hardware you
    can
  • Improve local performance on each node
  • Minimize network traffic

140
Troubleshooting
141
Log Files
  • Log files can be viewed from the Control Panel

142
Diagnosing Startup Problems
  • Simple Startup
  • When starting Caché, the service will start
    several system jobs ranging from TCP processes to
    file handlers. Since Caché starts complex
    processes, a startup failure could result from
    any number of possibilities. Thus, sometimes it
    is better to start from a simple point of
    reference and work toward the complete and
    sometimes more complex full configuration.
  • Networking Startup
  • Potentially, processes started under Caché may
    relate to networking. These processes can have
    dependencies on TCP, Netbios/NetBEUI, or
    InterSystems proprietary protocols. It is
    important to identify which network(s) the active
    configuration relies on.

143
Getting Your System Back On-Line
Hardware Errors?
Replace damaged or faulty components.
Y
Check O/S logs to identify potential hardware
failures
N
Database Errors?
Y
Restore from backup or repair database
Check physical integrity of all databases
N
System Functioning Properly?
Y
Test the system for stability
Start Using System
N
Contact your Caché vendor for assistance.
144
Identifying License Related Problems
  • TCP Dependent
  • TCP networking must be properly installed on the
    license server and any license clients connecting
    to the license server.
  • If TCP networking is configured correctly, other
    things to look for
  • Is the license server enabled under the Advanced
    Tab in the Configuration Manger? Is the real IP
    address of the license server being used?
  • Is the license server using a TCP port that is
    not in use. The license server is assigned 4001
    by default.

145
Techniques for Maximizing Performance
  • Balance workloads spread data that is
    frequently accessed, whether locally or across
    the network, among all nodes
  • Store data locally if needed by users at that one
    node only
  • Organize data in globals efficiently - if
    multiple pieces of data are likely to be accessed
    together, put them in one global instead of
    several (Ex. Name, address, DOB as one global
    Person is better than three separate)
  • Provide an ample number of global buffers
    (increase database cache size)
  • Efficient use of replication for data that is
    updated infrequently but which is needed by users
    at more than one node, you can use replication to
    provide local access to updated data without
    creating much network traffic
  • Efficient global mapping moving frequently
    accessed or large globals to separate disks will
    speed access time.

146
Troubleshooting Network Problems
  • Physical Network Level
  • Check that cables a secured on each machine,
    network devices such as hubs or routers are
    plugged in and setup correctly.
  • Use a network sniffer to determine if there is
    too much network congestion or utilization.
  • Logical Network Level
  • use tools (ping, Network Neighborhood) to check
    communications between machines.
  • Caché Level
  • DCP configuration error
  • License issue
  • InterSystems Packet Driver configuration

147
Help is Available
  • InterSystems World Wide Response Center
  • technical support is available to 24 hours a day,
    7 days a week to all clients with a support
    contract.
  • Support Database Access
  • Clients can search our live support database by
    visiting our web site at www.intersys.com.
  • Useful Documents
  • Also available on the World Wide Web are a number
    of useful documents. You will find configuration
    guides, product specific FAQ listings (frequently
    asked questions), and much more. This
    information is updated regularly so visit
    frequently.

148
Useful Diagnostic Information
  • It may become necessary to involve InterSystems
    support in diagnosing a problem. There are tools
    provided with Caché to capture information
    before, during, or after a system failure.
  • Log Files
  • Configuration Definition Files
  • CSTAT printouts

149
Working with Caché Studio
  • Developing complex applications

150
Designing Caché Classes
  • Wizards for properties, methods, queries ...
  • Import / export from Rational Rose (UML)
  • SQL (Data Definition Language - DDL)
  • Manual editing using Class Definition Language
  • Copy Paste
  • References
  • Constrains
  • Relations
  • Parameters
  • Stored Procedures
  • Projections
  • XML data

151
Caché ObjectScript
  • Simple, powerful
  • standalone routines
  • bodies of class methods
  • procedures
  • methods
  • procedure blocks
  • new syntax elements
  • eXecute statement
  • macros

152
Caché Basic
  • New in Caché 5
  • Similar to VBScript / Visual Basic
  • Compiles into OBJ code as well as Caché
    ObjectScript
  • Specific syntax elements to handle persistent
    data - globals
  • Can be used in both standalone routines and in
    class methods

153
Customizing Studio
  • Templates
  • Hooks to Version Management Systems (e.g. MS
    Visual SourceSafe)

154
Caché Studio Templates
  • Designed for greater user comfort
  • Can be interactive / non-interactive
  • Can be used in CSP, classes definitions and in
    standalone routines
  • Users can define their own templates
  • Based on CSP rules (XML)

155
Integrated Debugger
  • Setting project debugging targets and breakpoints
  • Watches
  • Invocation from
  • Caché routine
  • Executable program
  • CSP page

156
Developing Web Applications
  • CSP Technology

157
CSP Tags
  • Enhancements to HTML
  • Similar to ASP, PHP,
  • ltcspxxxx attr1val1 attr2val2 gt format
  • All system CSP tags are created as rules
  • Rule based on XML
  • Examples ltcspclassgt, ltcspifgt
  • Caché as web scripting language
  • ltscript languagecache runatservergt
  • All CSP pages are compiled into Caché classes
  • ltscript languagecache methodMyMethod.gt
  • Invoked as .csp or .cls URLs

158
Object Linking Tags
  • ltcspclass superNameOfSuperClassesInListgt
  • ltcspobject nameFormId classnameMyClass
    objid(..)gt
  • cspbind attribute

159
Data retrieval Tags
  • ltcspquery classname cursorname queryname
    parametersgt

160
Program Flow Control Tags
  • ltcspif conditiongt
  • ltcspelseif contitiongt
  • ltcspelsegt
  • lt/cspifgt
  • ltcsploop counterCounterName fromfrom
    stepstepvaluegt
  • ltcspwhilegt

161
CSP Form Wizard
  • Enables easy form definition using step-by-step
    guide
  • Create new CSP Page, position cursor into ltbodygt
    section,
  • run Insert-gtForm Wizard

162
Session Management
  • Implemented session and request objects
  • Session ID generated automatically, passed in
    encrypted tokens
  • Session automatically starts by first hit to .csp
    (.cls) page
  • Terminates by timing out or explicitedly by
    setting session.EndSession property
  • Grace period
  • session keeps info during sessions lifetime,
    used to retain application semipersistent data
  • request reset as soon as new page is loaded,
    used to pass data between pages
  • Property Data, multidimensional

163
System Web Packages
  • CSP
  • Net
  • FTP handdling
  • Email handling
  • response class
  • Custom HTTP requests, e.g. using to transfer SOAP
    request as HTTP payload

164
Custom Tags (Rules)
  • Based on XML, defined in files with .csr suffix
  • Csr file structure
  • ltcsrrule name matchgt
  • ltcsrattribute name required description typegt
  • ltcsractiongt
  • ltscript languagecache runatcompiler/servergt
    (repeatedly..)
  • lt/scriptgt
  • lt/csractiongt
  • lt/csrrulegt

165
WAP
  • Similar to CSP/HTML, just using WML tags with csp
    tags
  • ltcspcontent typegt

166
XML
  • Similar to WAP, just need to supply proper
    content type
  • XSLT transformations

167
Using SQL with Caché
  • SQL projection
  • SQL Gateway

168
Classes as tables
  • Each persistent Caché class is automatically
    projected as SQL table.
  • Each Registered class is automatically embedded
    into table created for its owner.
  • Each property of Array type is projected as
    separated table
  • Default SQL schema SQLUser (for User package)

169
Configuring Caché SQL
  • Configuration Manager
  • At Runtime using
  • system.SQL class
  • User defined types

170
Caché SQL enhancements
  • -gt syntax for foreign keys
  • Example select Person.name, Address.street from
    Person,Address where Person.AddressAddress.ID
  • is equivalent to
  • Select name, address-gtstreet from Person
  • Custom stored procedures
  • Queries without using SQL
  • startswith keyword etc

171
SQL Gateway
  • Enables connection to legacy relational databases
  • Data is in relational database, table and class
    definition in Caché
  • gt Data stored in relation database are available
    as objects!

172
Embedded SQL
  • sql block within Cache ObjectScript
  • SQLCODE return value of embedded SQL call
  • SQL cursors
  • Transaction processing within SQL
  • (It is possible and better to use while
    command introduced in Cache 5)

173
Class definitions by DDL
  • Classes can be defined/modified using DDL
    language, issue standard DDL command like create
    table etc
  • In this case, DDL is translated into CDL and
    class is generated on the fly

174
National Language Support
175
Working with national collations
  • If you need different than default (US) locale
    you must run NLS utility (cnls.exe)
  • Select either existing locale or create new one
  • Validate local if you created new one
  • Install new (or selected) locale
  • Restart Caché to activate new locale

176
NLS Main page
Change translations to ones suitable for you
177
Working with NLS
  • Define your patterns
  • Define translation tables (between character
    sets)
  • Define screen handling characters (CR,EOL, etc)
  • Ask InterSystems Support if you need custom
    alphabetic collation

178
Working with collations in Caché
  • Create globals with non standard collation
  • Use DM API (CreateGlobalDM)
  • Use GUI Control Panel-gtLocal Databases-gtNew
Write a Comment
User Comments (0)
About PowerShow.com