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, 03:13

Ilia63's gravatar image

Ilia63
821303654
accept rate: 16%

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, 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, 08:37

Mark%20Culp's gravatar image

Mark Culp
23.4k9132275
accept rate: 40%

1

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

(21 Apr, 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:

×415
×210
×61

question asked: 20 Apr, 03:13

question was seen: 216 times

last updated: 21 Apr, 03:20