Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Earlier I thought that it would not make sense to change the contents of the dbo-owner's procedures.
But it turns out (ASA 12.0.1.4436, 16.0.0.2419) that one can not create dba-"namesakes" for dbo-owner's procedures:

 - Create a dba-"namesakes" procedure (the reasons for this are omitted). Fоr example, call sa_make_object('function', 'xp_cmdshell', 'dba')
  ==> select creator, procname from sys.SYSPROCS ...
        creator,procname
        'DBA','xp_cmdshell'
        'dbo','xp_cmdshell'
 - Unload the database completely (all objects). For example, dbunload -v -c "DSN=SQL Anywhere 16 Demo;UID=dba;PWD=***" -r "reload16.sql" -n
- We do not find a new "dba"."xp_cmdshell"-procedure in the "reload16.sql"-file.

Is this correct behavior?

asked 20 Apr '17, 03:13

Ilia63's gravatar image

Ilia63
1.2k515782
accept rate: 44%

Seems like a bug to me...

FWIW: For the original dbo-owned objects, the doc page on the dbunload utitily states:

The dbo user ID owns a set of system objects in a database, including views and stored procedures.

The Unload utility does not unload the objects that were created for the dbo user ID during database creation. Changes made to these objects, such as redefining a system procedure, are lost when the database is unloaded. [...]

...so a modified dbo.xp_cmdshell would not be contained in the reload.sql file, but IMHO your DBA-owned one should be.

(20 Apr '17, 03:47) Volker Barth

This issue was fixed in December of 2015 and included in the v17 release.

If a user owned a table or procedure with the same name as a system table or procedure (eg. a user with an “sa_split_list” procedure), that object would not be included if the databases was unloaded with dbunload. This has been fixed.

Since the fix involves changes to the unload, upgrade, and database creation scripts, it will not be pushed back into existing branches.

permanent link

answered 20 Apr '17, 08:37

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297
accept rate: 41%

1

Thanks.
Of course, I'd like to see this fix in v16 :(

(21 Apr '17, 03:20) Ilia63
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:

×438
×261
×63

question asked: 20 Apr '17, 03:13

question was seen: 1,612 times

last updated: 21 Apr '17, 03:20