Establishes a new recording session.    


hs_create_recording_session monServerName, sample_interval[,dir_name][,start_time][,end_time]



name of the Monitor Server used to collect data from the Adaptive Server for which you want to collect historical data. The user name and password you used to connect to Historical Server must match a valid login account on the Adaptive Server being monitored by the Monitor Server you specify here.


determines the time between samples (in seconds). The shortest valid sample interval is one second; the longest valid sample interval is 86400 seconds, which is the number of seconds in one day.


path name of the directory where the historical data files resulting from this recording session will reside. The operating system account that started Historical Server must have search (execute) and write permissions on this directory.

The default is the Historical Server home directory, specified in the -D parameter to the Historical Server start-up command.


date and time at which recording is to start, using the format year/month/day  hour:minute[:second]  [time zone]. The default is to start immediately. The following time zone options are available:

Parameter value



U.S. Eastern Time zone, standard time.


U.S. Eastern Time zone, daylight saving time.


U.S. Central Time zone, standard time.


U.S. Central Time zone, daylight saving time.


U.S. Mountain Time zone, standard time.


U.S. Mountain Time zone, daylight saving time.


U.S. Pacific Time zone, standard time


U.S. Pacific Time zone, daylight saving time


Middle European Time zone, standard time


Middle European Time zone, daylight saving time


Western European (Greenwich) Time zone, daylight saving time


Greenwich Mean Time. This is equivalent to Western European (Greenwich) Time zone without regard to daylight saving time. All of the preceding time zone specifications, such as EST or EDT, can be supplied only in combination with dates and times when Standard Time or Daylight Savings Time is in effect. GMT can be paired with any date and time specification.


To specify any other time zone, where hours_offset is the number of hours that must be added to Greenwich Mean Time to derive the local time. The acceptable range of offset values is between +24 and -24 hours, inclusive. Fractional offsets such as +5.5 are valid.

If you do not specify a time zone, the local time zone of the Historical Server is used.

The start_time may not be more that 31 days from the present time.


time at which recording is to stop. The default is to stop the recording session 24 hours after the start_time. If you specify an end_time and do not specify a start_time, the start_time defaults to the present.


specifies whether the data files created in this recording session are password-protected or accessible to all users. The protection level controls viewing the metadata in the control file (using the hs_list command) and creating playback sessions with the data (using the hs_create_playback_session command).


specifies how you want Historical Server to handle non-fatal errors during a recording session. Valid values are:


specifies whether you want Historical Server to create a script file that creates tables from your the recording session view definitions.


Example 1

This example creates a recording session to capture data from the Monitor Sever called SERVER1_MON. The data is captured every 30 seconds and written to the data files in the /user/hist_dir directory, starting now and ending on August 8, 1997 at 10:30 a.m. EDT (Eastern Time zone, daylight saving time). The resulting files have private restrictions. The recording session continues if non-fatal errors are detected. A script file that creates an Adaptive Server table for each recorded view is created.

hs_create_recording_session SERVER1_MON,30,
 /user/hist_dir,NULL,"97/08/08 10:30 EDT",
 private,continue, sybase_script