mknod is used to create special files,
* Create a block-type special file
* Create a character-type special file
* Create a FIFO (named pipe)
$mknod name b major minor
Creates a block-type special file
major, minor are device numbers
$mknod name c major minor
Creates a character-type special file
$mknod name p
Creates a FIFO named pipe.
Examples:
If datafiles are larger than 2GB, pipes can be used to read or extract information
from compressed datafiles.
In Oracle a table can contain more than 2GB of data, but lower versions of Solaris 2.x
doesn't support larger files. We can use unix pipes to export data and compress. Similar
way we can import data without uncomressing an export dump file.
Below is an example of how to use UNIX's named pipes for an exp/imp:
Creating a compressed export file
$ mknod /tmp/exp_pipe p # Create pipe
$ compress < /tmp/exp_pipe > export.dmp.Z & # Compress
$ exp file=/tmp/exp_pipe <other options> # Export to the pipe
Reading a compressed export file
$ mknod /tmp/imp_pipe p # Create pipe
$ uncompress < export.dmp.Z > /tmp/imp_pipe & # Uncompress
$ imp file=/tmp/imp_pipe < other options > # Import from the pipe
Exporting to tape via unix named pipes
$ mknod /tmp/exp_pipe p # Create pipe
$ dd if=/tmp/exp_pipe of=< tape device> & # Write from pipe to tape
$ exp file=/tmp/exp_pipe < other options > # Export to the pipe
Importing from tape via unix named pipes
$ mknod /tmp/imp_pipe p # Create pipe
$ dd of=/tmp/imp_pipe if=< tape device> & # Write from tape to pipe
$ imp file=/tmp/imp_pipe < other options > # Import from the pipe
SQL*Loading from tape via unix named pipes
$ mknod /tmp/ldr_pipe p # Create pipe
$ dd of=/tmp/ldr_pipe if=< tape device> & # Write from tape to pipe
$ sqlload data=/tmp/ldr_pipe < other options > # Load from the pipe
* Create a block-type special file
* Create a character-type special file
* Create a FIFO (named pipe)
$mknod name b major minor
Creates a block-type special file
major, minor are device numbers
$mknod name c major minor
Creates a character-type special file
$mknod name p
Creates a FIFO named pipe.
Examples:
If datafiles are larger than 2GB, pipes can be used to read or extract information
from compressed datafiles.
In Oracle a table can contain more than 2GB of data, but lower versions of Solaris 2.x
doesn't support larger files. We can use unix pipes to export data and compress. Similar
way we can import data without uncomressing an export dump file.
Below is an example of how to use UNIX's named pipes for an exp/imp:
Creating a compressed export file
$ mknod /tmp/exp_pipe p # Create pipe
$ compress < /tmp/exp_pipe > export.dmp.Z & # Compress
$ exp file=/tmp/exp_pipe <other options> # Export to the pipe
Reading a compressed export file
$ mknod /tmp/imp_pipe p # Create pipe
$ uncompress < export.dmp.Z > /tmp/imp_pipe & # Uncompress
$ imp file=/tmp/imp_pipe < other options > # Import from the pipe
Exporting to tape via unix named pipes
$ mknod /tmp/exp_pipe p # Create pipe
$ dd if=/tmp/exp_pipe of=< tape device> & # Write from pipe to tape
$ exp file=/tmp/exp_pipe < other options > # Export to the pipe
Importing from tape via unix named pipes
$ mknod /tmp/imp_pipe p # Create pipe
$ dd of=/tmp/imp_pipe if=< tape device> & # Write from tape to pipe
$ imp file=/tmp/imp_pipe < other options > # Import from the pipe
SQL*Loading from tape via unix named pipes
$ mknod /tmp/ldr_pipe p # Create pipe
$ dd of=/tmp/ldr_pipe if=< tape device> & # Write from tape to pipe
$ sqlload data=/tmp/ldr_pipe < other options > # Load from the pipe
No comments:
Post a Comment