cancel
Showing results for 
Search instead for 
Did you mean: 

Unload stored dba-procedures that have the same name as the dbo-owner's procedures.

1,876

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?

VolkerBarth
Contributor
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

MarkCulp
Participant
0 Kudos

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.

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

Answers (0)