Base Datos Informix

Hola, quisiera pedirte un favor, no conozco mucho de informix y necesito hacer una copia de una base de datos para abrirla en otro equipo, me puedes por favor explicar como se hacer? La version es 7.2.
Gracias.
Marleny

1 Respuesta

Respuesta
1
Para poder realizar tu cometido necesitas ir a la pc con el informix y ejecutar el
COMANDO dbexport que Exporta la base de datos a un archivo de texto.
Aqui la sintaxis
dbexport [ -c ] [ -q ] database
[ -o directory-path | -t device -b blksize -s tapesize [ -f pathname ] ]
Dbexport es el comando.
-C Que siga si hay errores
-Q -que no muestre detalles del export en la consola
database -Nombre de la bd que vas exportar
-O Para que el archivo vaya a este dir \tu_directorio
-T Para guardar el export en cinta
-B blksize specifies the tape block size in kilobytes.
-S tapesize specifies the capacity of one tape reel.
-F pathname tells the program to write data definition statements to the
file pathname and not to the tape.
Notas
1. Debes entrar como DBA
2. La base de datos se lockea de modo exclusivo asi que conviene que no trabaje nadie mientras
3. Ese comando escribe un archivo dbexport. Out con el detalle de todo el export. Es lo mismo
que verias en la consola salvo que le pongas la opcion -q
5. The dbexport escribe muchos archivos con datos de la bd.
6. Si llegaras a marcar la -t option, hay que especificar tambien tape device, the block size, and the
volume capacity.
7. Cuando NO pones la -t option, el destino del export es un directory en el disco con el nombre
database. Exp. Si el directorio no existe el programa lo crea solo.
8. Por defecto te tira la bd en el directorio actual.
9. Cuando el destino del export es el disco, el archivo conteniendo los scripts de definicion de datos
y otros comandos para el dbimport es escrito al archivo database.sql en el directorio database. Exp
En tu caso puedes usar simplemente (-c ignora errores, tu_bd es el nombre de tu base de datos)
OSEA:
dbexport -c tu_bd
(Esto te creare tu dir tu_bd. Exp con todos los files)
OK AHORA Para reestablecer la base de datos EN TU SERVIDOR DESTINO necesitas tambien con el informix tirar
el comando dbimport desde la consola(que seria lo inverso)
COMANDO dbimport crea una base de datos apartir de un archivo ascii
Syntax
dbimport [-c] [-q] database
[-i directory-path |-t device -b blksize -s tapesize [-f pathname] ]
[-d dbspace] [-l [ logpath | buffered] ] [-ansi]
Detalles
-C de nuevo que siga si hay errores a menos que sea algo grave
-Q anula detalles de import en la salida estandar (consola)
Database es el nombre de la base de datos que vas a importar
-I path a un directorio de entrada
-T device specifies input from a particular tape device.
-B blksize specifies the tape block size in Kbytes.
-S tapesize specifies the capacity of one tape reel.
-F pathname tells the program to read data definition statements from the
file pathname and not from the tape.
-D dbspace when importing to INFORMIX-OnLine only, specifies the
dbspace where the new database is to go.
-L specifies that the imported database is to use transaction
logging.
Logpath when importing to the standard database engine only, specifies
the pathname of the transaction log file.
Buffered when importing to INFORMIX-OnLine only, specifies buffered
or unbuffered logging (unbuffered is the default).
-Ansi tells the program to create the new database as MODE ANSI.
The dbimport Utility
Notas
1. Siempre se crea un archivo dbimport. Out en el directorio actual con detalles del import
La persona que realiza el dbimport se le asigna permiso de dba
5. Use the -l option to establish transaction logging for the imported database.
This option is equivalent to the WITH LOG IN clause of the CREATE
DATABASE statement. A database created as MODE ANSI requires transaction
logging. In this situation, you must include the -l option.
6. The dbimport utility reads multiple files containing database data from
either disk or tape. Use the -t option to specify the source as tape; the
default is disk. When you include the -t option, you must also specify the
tape device, blocksize and volume capacity.
7. When you include the -t option, dbimport reads the data definition
statements and other dbimport commands from the tape. Use the
-F pathname option to instruct the program to read the database.sql file in
pathname (instead of the tape) for the data definition statements and other
commands.
To use the -f option you must have also used it when you executed the
dbexport program.
8. If you do not specify the -t option, the source of the database data is a disk
directory with the name database.exp. The dbimport program looks for
this directory in the current working directory, or on the path specified
with the -i option. In either case, the program takes data definition and
other commands from the file database.sql in the directory database.exp.
(This is why the name database must be the same as was given to
dbexport.)
Example
The following command imports the stores database from a tape with a
blocksize of 16 Kbytes and capacity of 24,000 Kbytes. The file of data definition
statements and other import commands was put in stores.imp in the
/tmp directory when dbexport was run.
dbimport -c stores -t /dev/rmt0 -b 16 -s 24000 -f /tmp/stores.imp
Tu debes usar por ejemplo este comando y parametros
dbimport -c tu_bd -i /tu_directorio_donde_esta_el_export
SI NO ENTIENDES EL INGLES NO TE PREOCUPES TE HE TRADUCIDO LO BASICO Y NECESARIO PARA QUE UTILICES.
Si quieres ampliar el comando dbimport y dbexport lo puedes encontrar en la pagina web
http://publibfi.boulder.ibm.com/epubs/pdf/7044.pdf
O Simplemente pegarme un grito.
Bueno amiga espero que esta info sea de tu ayuda. Estoy muy satisfecho de poder ayudarte.
Solo te pido que consideres mi esfuerzo.
Exitos
Kaos

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas