Informix Knowledge Highlights 1

xiaoxiao2021-03-06  17

How to use DBSChema tools to unload databases, for example: 1) Export all table structure in the database DB.SQL $> dbschema -d your_database -t all db.sql2) Export all stored procedures in the database DB.SQL $> dbschema -d your_database -f all db.sql3) Export all objects in the database (including tables, stored procedures, triggers ...) to file db.sql $> dbschema -d your_database db.sql4) Exporting Database Table structure to file db.sql $> dbschema -d your_database_name -t your_table_name db.sql5) Export a stored procedure definition to file db.sql $> dbschema -d your_database_name -f your_procedure_name db.sql6) If you export more tables Information (Extent ...) $> dbschema -d your_database_name -ss db.sql7) Export a Database $> dbschema -d your_database_name -p all $> dbschema -d your_database_name -r all8) Export Synonyms in the database $> dbsChema -d your_database_name -s all // ****************************************************** ****************************************** Query all users in a database Table Select * from Systables Where Tabid> 99 // TabName Save Table // TabType Save Table T = Table, E = External Table, V = View ... // SQL Reference Guide NROWS table The number of columns in the NCOLS table // ************************************************************ ******************************************** Onstat -d see how your database space is allocated of

If you don't specify a parameter when doing Dbimport, you will build the entire database on rootdbs. If the database space plan is quite fine, there should be dbspace dedicated to loading data. // ******************************************************** ***************************** Export Data Unload To Database.txtSelect ...... from ... Where ... Introduction data load from database * .txt insert inTo TableName // ***************************************************** ************************************************** Submitting the table script DBACCESS DB_DAS (Database Name) - <

Onspaces -c -d dbspaces1 -p d: /ifmxdata/ol_chinaren5/ol_chinaren5_dat.000 -o 0 -s 200000

In this example, the new DBSpace name is generated to DBSPACE1 and its initial block, allocated in disk D: /IFMXDATA/OL_CHINAREN5/OL_CHINAREN5_DAT.000, the offset is O. The initial length is 200MB (200000KB). // ******************************************************** ***************************** In dbspaces -a dbspace1 -p d: / ifmxdata / ol_chinaren5 / OL_CHINAREN5_DAT.000 -O 200000 -s 50000 Role: In the D: /IfmxData/ol_chinaren5/ol_chinaren5_dat.000, add 50M space for DBSPACE1, the size of the offset must be the size of the present existing space

// ******************************************************** *********************************************************************

Enter the directory to store the file space D: / ifmxdata / ol_chinaren5

Run the copy nul my_chunk_dat.000 newly created a file with a file with a MY_CHUNK_DAT.000 and then extended by Onspaces to spatially extended size and assign dbspace.

// ******************************************************** ***************************** Delete DBSPACE

Onspaces -d dbspace1 deletes dbspaces named dbspace1

// ******************************************************** ***************************** DBIMPORT import data

Running the Database Server DOS Interface Enter OnNit Entering the Database Server DOS Interface directly: dbexport -od: / informix db_das To export the database or: dbexport -c -od: / informix db_das export completion will prompt DBExport Completed ! The export process may have a bit slow (wait) after the export is complete, generate a folder DB_DAS.EXP (exported database name .exp) under .

Import database input: dbimport -c -i d: / informix db_das Imported database name or: dbimport -c -x -id: / informix / temp db_das -d Practice-c Indicates Dbimport to complete import Even if it encounters the full path name of the Database.exp directory on some non-fatal errors-I specify the Database.exp directory, the directory name should be the same as the database name -D specify the data space of the database.

Return the database first change the .exp directory name, change the .SQL mode file name directory name must be the same as the mode file name

If the import is complete, there will be prompts!

// ******************************************************** ****************************

转载请注明原文地址:https://www.9cbs.com/read-44064.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.037, SQL: 9