Hi All, There is a database created under server SA 12.0.1.4134, you need to convert it for server SA 17.0.9.4913. When trying to unload it into a file (reload.sql + *.dat) using the utility C:\SQLANY17\Bin64\dbunload -up -c "uid=dba;pwd=sql;dbf=d:\test" unload I get an error message SQL Anywhere Unload Utility Version 17.0.9.4913 Connecting and initializing ***** SQL error: Procedure 'sa_exec_script' not found Question: How to fix it so that I could convert the base for the new version of the server ? |
Found the reason for this error. In my database, the user "dba" for some reason was not included in the group "PUBLIC". As soon as I added it to this group, dbunload immediately began to work without this error. @Stalker: Glad you found the issue. I marked your answer as accepted, alright?
(06 Feb '19, 06:46)
Volker Barth
I agree with your decision
(06 Feb '19, 07:46)
Stalker
|
I used the rebuild method "2217114 - How to upgrade to SQL Anywhere 17" and it worked for me: call "%SQLANY17%\bin64\dbunload" -c "UID=DBA;PWD=sql;dbf=D:\test\dbname.db" -an "D:\test\Rebuild\dbname.db" Connect to the new DB "D:\test\Rebuild\dbname.db" and execute: select @@version and sp_disk_info (for example, this is a new sp in V17) to be sure you are in 17 version. Does not work. I get the same error about "sa_exec_script"
(06 Feb '19, 05:06)
Stalker
|
Below is the full text of the standard reload.cmd for database conversion
https://pastebin.com/5N63gjDs
FWIW: I've tried unloading a 12.0.1.x initialized database using 17.0.9.y software and it worked for me (where x and y are close, but not exactly, your versions) ... so I'm not sure how you could get this error.
Is it possible you already had a database server running at the time that you ran dbunload? I'm wondering if you inadvertently connected to an older (i.e. v12) server.
To clarify: Has the database been created with 12.0.1.4134, or has it been created with an older version and been used with 12.0.1.4134 - i.e. what does the following show:
I'm asking as search results for "sa_exec_script" seem to relate to way older versions...
At the time of launching "C:\SQLANY17\Bin64\dbunload", no other "SQL AnyWhere" servers were running on my computer.
operation,version
'INIT','12.0.1.4134'
'LAST_START','12.0.1.4134'
AFAIK, "sa_exec_script" is a procedure temporarily created during the unload so it looks strange that it cannot be found...
Can you add the -v and -o <console.log> options to your unload so we might know at what step this error appears?
Besides that, does it make a difference whether you call dbunload from the according directory as in your sample (i.e. without specifying a path) or when specifying its full path? (Just in case there might be several instances of v17 in your system...)
Apparently, I don't have a clue...