cancel
Showing results for 
Search instead for 
Did you mean: 

Why is UNLOAD not creating 2 subdirs?

MCMartin
Participant
1,673

This is no real question, more something I stumbled upon:

Unload will create 1 subdir, but not a hierarchy of 2?

If directory X doesn't exist it is not created in the following statement:

unload select * from T into file 'c:\\\\X\\\\Y\\\\file.txt'
you get: ERROR Cannot access file 'c:\\X\\Y\\file.txt' -- No such file or directory

but if X exists the not existing Y will be created.

Accepted Solutions (1)

Accepted Solutions (1)

MarkCulp
Participant

For what ever reason, perhaps historical or perhaps a simple omission, the code that creates/opens the output file for the unload statement only attempts to create the parent directory ... and does not handle the case of a non-existent parent's parent directory.

It would be a reasonable (and fairly easy to implement) enhancement to create multiple levels of directories.

reimer_pods
Participant
0 Kudos

IIRC Backup Database is behaving identically, while dbbackup will prompt for creation of a single sub folder.

Answers (0)