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 ?

asked 05 Feb, 04:52

Stalker's gravatar image

Stalker
300121425
accept rate: 12%

Below is the full text of the standard reload.cmd for database conversion

https://pastebin.com/5N63gjDs

(05 Feb, 05:00) Stalker

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.

(05 Feb, 15:24) Mark Culp
Replies hidden

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:

select operation, version
from SYS.SYSHISTORY
where operation in ('INIT', 'UPGRADE', 'LAST_START')

I'm asking as search results for "sa_exec_script" seem to relate to way older versions...

(06 Feb, 03:27) Volker Barth

At the time of launching "C:\SQLANY17\Bin64\dbunload", no other "SQL AnyWhere" servers were running on my computer.

(06 Feb, 04:56) Stalker

operation,version
'INIT','12.0.1.4134'
'LAST_START','12.0.1.4134'

(06 Feb, 04:58) Stalker

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...

(06 Feb, 05:30) Volker Barth
showing 5 of 6 show all flat view

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.

permanent link

answered 06 Feb, 06:08

Stalker's gravatar image

Stalker
300121425
accept rate: 12%

@Stalker: Glad you found the issue. I marked your answer as accepted, alright?

(06 Feb, 06:46) Volker Barth

I agree with your decision

(06 Feb, 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.

permanent link

answered 05 Feb, 16:47

lferreira's gravatar image

lferreira
26115
accept rate: 0%

Does not work. I get the same error about "sa_exec_script"

(06 Feb, 05:06) Stalker
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×44
×34
×3

question asked: 05 Feb, 04:52

question was seen: 63 times

last updated: 06 Feb, 07:46