2/18/2023 0 Comments Import from dbschema file informix![]() ![]() ![]() I thought I replied yesterday but do not see my response, sorry if this is a duplicate. Select aus_cmd_exe from aus_cmd_listwhere aus_cmd_type in ( "h", "H" ) Unload to current_high_update_statics.sql delimiter ' ' Select aus_cmd_exe from aus_cmd_listwhere aus_cmd_type in ( "m", "M" ) Unload to current_med_update_statics.sql delimiter ' ' Select aus_cmd_exe from aus_cmd_listwhere aus_cmd_type in ( "l", "L" ) Unload to current_low_update_statics.sql delimiter ' ' # Author: Lester Knutsen Email: # Advanced DataTools Corporation- # Update Statistics Webcast Sample Scripts This will unload the commads used by AUS. I did a Webcast on Informix Webcast 2019 – Informix Update Statistics – Best Practices for Informix DBAs last year which has a scrip on how to get them out of the sysadmin database is you are using AUS. ![]() Subject: how to grab the update statistics sql statements of a database Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. dbschema -d -hd can be a starting point.Ĭhecking this before starting one more perl utility :-)ĭisclaimer: My own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Is there a hidden option for that, or another way to get those statements ?īuilding it with from sysdistrib table won't be that easy. You could also consider an 'external table' ( CREATE EXTERNAL TABLE), but I'm not sure it is any better than the LOAD statement either with the formats it supports or with the ability to skip the first row of data.As you know, dbexport generates the UPDATE STATISTICS sql statements of the exported database, at the end of the dbname.exp/dbname.sql file, which is obviously useful for the import phase.Īs you would have noticed, dbschema does NOT generate those UPDATE STATISTICS statements, at least with the documented options of it. * Since SQLCMD is my program because I wrote it, any recommendation to use it is inherently biassed you were warned. You'll need to have Informix ClientSDK and a C compiler (and the rest of a C development system) installed to build SQLCMD. It handles things like stripping quotes from around fields that the full CSV standard supports. ![]() SQLCMD also has an option FORMAT CSV (amongst other formats) that might, or might not, be relevant. If you want to get exotic, the Informix High-Performance Loader (HPL) can either handle it natively or be trained to handle it.Īlternatively, you could consider using my * SQLCMD program (it has been called sqlcmd a lot longer than Microsoft's johnny-come-lately of the same name) which allows you to specify: LOAD FROM "file.csv" DELIMITER " " SKIP 1 INSERT INTO table_name(col1, col2, col3) You might be able to use the Informix DB-Load utility ( dbload) instead it depends on whether your data is simply using in place of Informix's default | delimiter, or whether you have more of the semantics of CSV such as quotes around fields that need to be removed. Note, too, that it won't remove quotes from around fields in CSV format and otherwise deal with things the way CSV format officially expects (though, since you have semicolon-separated values rather than comma-separated values, it is hard to know which rules are being followed - be leery of the treatment of backslashes too). No there isn't a way to tell standard Informix LOAD statement to skip a header line. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |