当前位置:网站首页>Data import and export for gbase 8s

Data import and export for gbase 8s

2022-06-25 04:33:00 Eight delicacies tofu

         During data level migration , May adopt dbexport/dbimport To complete .dbexport Export schema scripts and table data files for all objects in the database , The schema script includes the creation script of tables and so on , It also contains the information of the exported table to the data file .dbimport Import according to the schema script , In the import process, first create objects according to the schema script , The process of importing corresponding data is similar to load The process . If you want to speed up the import , You can select the log mode of the database as nolog Pattern . After importing, change the log mode .

        dbexport Export the database to ASCII File or tape .dbimport Use dbexport The generated schema files and data rebuild the database . Users can edit the schema file to modify dbimport Generated database schema .

The following example is the database dbname Data exported to /data/dbname Under the table of contents :

dbexport dbnme -c -ss -o /data/dbname

         When the export is complete , stay dbname Create one in the directory dbname.exp The catalog of , Find... Under this directory

        dbname.sql Schema script file , You need to use tools to verify the correctness of the script Syntax ( The exported script may have syntax errors ), If necessary , Should be modified and corrected .

The following example is to import the above exported data in buffered log mode default_dbspacename in :

dbimport dbname -i /data/dbname -c -l buffered -d default_dbspacename

After import , Perform statistical updates at the database level :

update statistics

原网站

版权声明
本文为[Eight delicacies tofu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250244318424.html