Example - Sybase 12.5.1 User Manual

Historical server
Table of Contents

Advertisement

Bulk copy example

Example

100
sqlserver is the name of Adaptive Server.
-t, specifies the column terminators as being commas.
The default row terminator when using the
used by data files. Therefore, you do not need to specify the
specify the record terminator option (
significance the backslash (\) character has by including another backslash, i.e.,
.
-r\\n
For more information about
Suppose you want to record, once every second, the reads, writes, and total I/O
per device on an Adaptive Server that is monitored by the SMS1100 Monitor
Server. You can use the following steps to record the data, create a table to
accept the data, and then use the
this example, the view data file that is created by Historical Server for the view
is d1_1_device_io.
1
Use
to log in to Historical Server.
isql
2
Record the data by using the following commands:
hs_create_recording_session SMS1100, 1
go
hs_create_view device_io,
"device name", "value for sample",
"device reads", "value for sample",
"device writes", "value for sample",
"device i/o", "value for sample"
go
hs_initiate_recording
go
3
Use
to log in to Adaptive Server. Because the recording session
isql
contains only one view ("device_io"), create just one table in the
database to store data for that view by using the following Transact-SQL
commands:
use pubs2
go
create table device_io
(
sample_time
option is a \n (new line) character
-c
), be sure to avoid the special
-r
, see the Utilities Guide.
bcp
utility to import the data into the table. In
bcp
datetime
option. If you do
-r
pubs2
not null,
Historical Server

Advertisement

Table of Contents
loading

Table of Contents