Using 16.0.0.2798 This is more of a warning to others rather than a question, but please feel free to comment. It seems as if the dbunload utility when executed with the -e option to exclude a table, doesn't produce a complete rebuild script skipping users, functions etc. I don't understand this behavior, the help says
In my case the -d option was not included so I expected a complete reload script to be generated. I guess the only alternative is to delete the table prior to unload. asked 01 Oct '20, 05:45 JJ Diaz |
If memory serves, all my attempts to use dbunload -e for any purpose whatsoever have failed. A simple comparison of V16 demo database dbunload commands with and without -e GROUPO.MarketingInformation reveals that a lot of stuff is included, but even more is excluded. In particular, note that it's not just users and functions that are missing, but all the views and procedures: "%SQLANY16%\bin64\dbunload.exe"^ -c "ENG=demo;DBN=demo;UID=dba;PWD=sql;"^ -o dbunload_16_log_demo.txt^ -r reload_16.sql^ -v^ reload_16 "%SQLANY16%\bin64\dbunload.exe"^ -c "ENG=demo;DBN=demo;UID=dba;PWD=sql;"^ -e GROUPO.MarketingInformation^ -o dbunload_16_log_demo_e.txt^ -r reload_16_e.sql^ -v^ reload_16_e dbunload -e output omits these sections... -- Create dbspaces -- Create ldap servers -- Create login policies -- Create users -- Create role definitions -- Create user types -- Create spatial units of measure -- Create spatial reference systems -- Create remote servers -- Create dbspace permissions -- Create external environments -- Create external environment objects -- Create certificates -- Create text configurations -- Create materialized views -- Create immediate materialized views -- Create functions -- Create views -- Create user messages -- Create procedures -- Create SQL Remote definitions -- Create MobiLink definitions -- Create Synchronization profiles -- Create logins -- Create events -- Create services -- Create mirror options and servers -- Set DBA password -- Create options Other sections (like ALTER TABLE) appear in different orders so it's difficult to determine if they are the same. It is difficult to imagine how the output from dbunload -e could be useful for ANY PURPOSE without editing. answered 01 Oct '20, 09:48 Breck Carter |
I unloaded again without data and used this unload script to fix the first one generated to save the time of unloading all data again (this is a 1 TB replicating database). Verified both the call to SYS.sa_setsubscription and SYS.sa_setremoteuser.
Thanks for posting this warning.