Exporting Data to an SCT File
Importing from an ODBC Data Source
Transferring Data via Named Pipes
SAND CDBMS supports the use of named pipes as a means of moving data between two ndlm processes. Named pipes use a client/server architecture to permit sharing of data between separate processes running simultaneously. When employing named pipes, an ndlm process running in EXPORT mode (the "server") writes data to the pipe using the same mechanism that the standard ndlm utility uses to write to a file, while another ndlm process running in IMPORT mode (the "client") reads the data from the named pipe, using the same mechanism employed by the standard ndlm to read from a file.
The exact method for transferring data through named pipes differs according to whether the platform is Windows or UNIX.
On Windows systems, the use of named pipes is indicated in the ndlm specification file by including the pipe symbol ( | ) after the IMPORT or EXPORT keyword, followed by the name of the pipe in the following format:
Specifies the host name of the server machine on which the pipe is created. When both ndlm processes are running on a single machine, a period ( . ) may be substituted for server-name. If the named pipe is being created by ndlm (only possible on the local machine), server-name must be replaced by a period ( . ).
Indicates that a pipe object is being used.
Can be any string (for example, test_data). When setting up data communication between two ndlm processes, the two load specification scripts must point to the same pipe instance, and the pipe names must match exactly. In the case of an export operation, ndlm creates the named pipe, whereas the named pipe must exist in the case of an import operation.
spec file 1 spec file 2 EXPORT |\\NTServer\PIPE\test_data IMPORT |\\NTServer\PIPE\test_data EXPORT |\\.\PIPE\test_data IMPORT |\\NTServer\PIPE\test_data EXPORT |\\.\PIPE\test_data IMPORT |\\.\PIPE\test_data
All the functionality available with the standard ndlm IMPORT and EXPORT operations is supported when transferring data via named pipes.
Once a named pipe is created by ndlm, a client must connect to it within 90 seconds or an error message is issued.
In UNIX, the named pipe is created with the system command mkfifo (refer to the operating system's man page for the full syntax). This pipe is then referenced as if it were a standard data output file (EXPORT operation) or input file (INPUT operation).
Unlike Windows, there are no timeout restrictions when transferring data with pipes in UNIX.
- On the system command line, create a pipe named "ndlpipe":
- Execute the ndlm EXPORT operation to write data to the pipe:
ndlm conn1 db1 DBA export.txt
The directive at the beginning of the export specification file (export.txt) must point to the pipe that was just created:
- Execute the ndlm IMPORT operation to read from the pipe:
ndlm -b conn2 db2 DBA import.txt
The directive at the beginning of the import specification file (import.txt) must point to the same pipe as above:
Related Error Messages
- ERROR 30110: cannot create EXPORT file '\\.\PIPE\pipe-name' or access denied
- ERROR 30101: IMPORT file '\\.\PIPE\pipe-name' not found
- ERROR 30152: writing to named pipe. Client connection was closed
- NDLERROR 0031. Invalid pipe name: 'pipe-name'.