79 const char *exec_name;
81 exec_name =
basename ((
char *) argv0);
95 char output_filename_schema[PATH_MAX * 2];
98 char er_msg_file[PATH_MAX];
102 char *user, *password;
157 sizeof (output_filename_schema)) != 0)
164 snprintf (er_msg_file,
sizeof (er_msg_file) - 1,
"%s_%s.err",
database_name, exec_name);
172 if (user ==
NULL || user[0] ==
'\0')
174 user = (
char *)
"DBA";
217 fprintf (stdout,
"warning: '-ir' option is ignored.\n");
233 if (class_table ==
NULL)
241 if (req_class_table ==
NULL)
248 for (i = 0; i < class_table->
num; ++
i)
250 req_class_table[
i] =
NULL;
264 for (i = 0; req_class_table[
i]; i++)
272 ws_find (req_class_table[i], &
object);
289 char indexes_output_filename[PATH_MAX * 2];
290 char trigger_output_filename[PATH_MAX * 2];
293 sizeof (output_filename_schema)) != 0)
300 sizeof (trigger_output_filename)) != 0)
307 sizeof (indexes_output_filename)) != 0)
static void unload_usage(const char *argv0)
#define UNLOAD_INPUT_CLASS_ONLY_S
int get_requested_classes(const char *input_filename, DB_OBJECT *class_list[])
#define UNLOAD_HASH_FILE_S
#define PRINT_AND_LOG_ERR_MSG(...)
#define AU_SAVE_AND_ENABLE(save)
int sysprm_set_force(const char *pname, const char *pvalue)
#define UNLOAD_INPUT_CLASS_FILE_S
int extract_triggers_to_file(extract_context &ctxt, const char *output_filename)
TEXT_OUTPUT object_output
#define UNLOAD_OUTPUT_PATH_S
int extract_classes_to_file(extract_context &ctxt, const char *output_filename)
void locator_free_list_mops(LIST_MOPS *mops)
LIST_MOPS * locator_get_all_mops(MOP class_mop, DB_FETCH_MODE purpose, LC_FETCH_VERSION_TYPE *force_fetch_version_type)
int util_log_write_errid(int message_id,...)
int create_filename_trigger(const char *output_dirname, const char *output_prefix, char *output_filename_p, const size_t filename_size)
int db_set_lock_timeout(int seconds)
int er_init(const char *msglog_filename, int exit_ask)
const char * output_dirname
int utility_get_option_int_value(UTIL_ARG_MAP *arg_map, int arg_ch)
#define UNLOAD_OUTPUT_PREFIX_S
#define UNLOAD_ESTIMATED_SIZE_S
int db_restart_ex(const char *program, const char *db_name, const char *db_user, const char *db_password, const char *preferred_hosts, int client_type)
#define UNLOAD_KEEP_STORAGE_ORDER_S
const char * sm_ch_name(const MOBJ clobj)
bool utility_get_option_bool_value(UTIL_ARG_MAP *arg_map, int arg_ch)
int prm_get_integer_value(PARAM_ID prm_id)
int au_fetch_class(MOP op, SM_CLASS **class_ptr, AU_FETCHMODE fetchmode, DB_AUTH type)
#define UNLOAD_DATAFILE_PER_CLASS_S
int create_filename_indexes(const char *output_dirname, const char *output_prefix, char *output_filename_p, const size_t filename_size)
const char * db_error_string(int level)
int extract_objects(const char *exec_name, const char *output_dirname, const char *output_prefix)
int extract_indexes_to_file(extract_context &ctxt, const char *output_filename)
#define UNLOAD_USE_DELIMITER_S
int utility_get_option_string_table_size(UTIL_ARG_MAP *arg_map)
int unloaddb(UTIL_FUNCTION_ARG *arg)
static void error(const char *msg)
#define ER_AU_INVALID_PASSWORD
int locator_decache_all_lock_instances(MOP class_mop)
#define UNLOAD_INCLUDE_REFERENCE_S
#define UNLOAD_CACHED_PAGES_S
#define free_and_init(ptr)
bool prm_get_bool_value(PARAM_ID prm_id)
#define UNLOAD_DATA_ONLY_S
int util_log_write_errstr(const char *format,...)
char * basename(const char *path)
int create_filename_schema(const char *output_dirname, const char *output_prefix, char *output_filename_p, const size_t filename_size)
char * msgcat_message(int cat_id, int set_id, int msg_id)
const char * prm_get_name(PARAM_ID prm_id)
#define OPTION_STRING_TABLE
#define UNLOAD_LO_COUNT_S
#define UNLOAD_PASSWORD_S
int ws_find(MOP mop, MOBJ *obj)
DB_OBJECT ** req_class_table
const char * command_name
#define UNLOAD_SCHEMA_ONLY_S
char * utility_get_option_string_value(UTIL_ARG_MAP *arg_map, int arg_ch, int index)
#define MSGCAT_CATALOG_UTILS