cancel
Showing results for 
Search instead for 
Did you mean: 

dbUnload and unprocessed.sql

0 Kudos
831

Hi,

I have a problem with the dbunload and the unprocessed.sql file.

I use SQL Anywhere Version 17.0.8.4003 on macOS.

With this version when I try to do an unload througth my App executing the sfollowing shell command :

/Applications/8sens\\ sybase/SetupSyb/System/bin64/dbunload -ar -bp -l -c "UID=DBA;PWD=****;DBF=/Applications/8sens sybase/Databases/Demov8.db"

SQLA try and fail to create the unprocessed.sql file in my Home directory. According to the documentation it shouldn't try to create this file, because unprocessed.sql is created only if the option -ae is specified and it is not the case here.

Is there a way to block the creation of unprocessed.sql or to specifiy where it should be created ?

Thanks in advance.

VolkerBarth
Contributor
0 Kudos

I don't use MacOS, so that's just a wild guess:

See this note from the v17 read me, a bug fixed slightly after your build:

    ================(Build #4020  - Engineering Case #810172)================

    When dbunload version 17 is run, it creates an unprocessed.sql file in the 
    current working directory. If that directory is not writable, then dbunload 
    will fail.

    This problem has been fixed. 

    A new option -ru is provided to specify the location and name of the unprocessed 
    SQL statements file. It is similar to the -r option which is used to specify 
    the location and name of the “reload.sql” file.

    -ru <file>     path of unprocessed SQL file (default "unprocessed.sql")

    Also, if the unprocessed SQL statements file cannot be written to the current 
    working directory or the directory specified by -ru, then it is written to 
    the temporary files folder specified by either the dbunload -dt option or 
    by one of the SATMP, TMP, TMPDIR, and TEMP environment variables.
0 Kudos

Thanks I will try this options.

VolkerBarth
Contributor
0 Kudos

According to the documentation it shouldn't try to create this file, because unprocessed.sql is created only if the option -ae is specified and it is not the case here.

IMHO, that's a misunderstanding: That file is always created when a unload via internal rebuild using -ar or -an fails. The -ae flag just tells the dbunload process to skip the failing statement(s) and to continue, whereas without -ae the process would stop.

VolkerBarth
Contributor
0 Kudos

Hm, as they were introduced with 17.0.8.4020, I'm not expecting them to work with your 17.0.8.4003 build...

0 Kudos

I tried all the option, -ru doesn't work because it is not in my version of SQLA.

I tried the -r and -dt options but it doesn't work neither.

I tried to create the unprocessed.sql by my self and put full rigth on it. With the real shell it using it but not with my app :(.

I can't change the version of SQLA rigth know.

If anybody has an idea ...

VolkerBarth
Contributor
0 Kudos

Have you made sure that the dbunload process is allowed to write in the current working dir?

As stated, I don't use Mac OS, so just another wild guess: May this be due to "sourcing" the according shell script?

Accepted Solutions (0)

Answers (0)