Skip to main content
Solved

Manual procedures on database outside the software factory


J. de Lange
Hero
Forum|alt.badge.img+4


Hi, we currently have some procedures on our project database which we’ve manually added to the database instead of through the Software Factory. We have several reasons for doing this.


I thought the Software Factory wouldn’t drop objects in schema’s other than dbo. I think I read some other question which mentioned objects in other schema’s wouldn’t be dropped but I can’t find it now. It’s also mentioned in this documentation:  https://docs.thinkwisesoftware.com/blog/2023.2#deployment---only-dropping-objects-in-dbo-schema
 
Our manual procedures exist in a different schema but the Software Factory still tries to drop them and this causes errors.


This is part of the code in execute source code which tries to drop our procedures:
 


/* Drop all procedures */

declare @procedure_name varchar(255)

declare drop_objects cursor fast_forward for
select quotename(s.name)
from sysobjects s
where s.type = 'P' 
  and s.name not like 'def$_%'  escape '$' -- Do not drop defaults.
  and s.name not like 'lay$_%'  escape '$' -- Do not drop layouts.
  and s.name not like 'ctx$_%'  escape '$' -- Do not drop contexs.
  and s.name not like 'task$_%' escape '$' -- Do not drop tasks.
  and s.name not like 'prc$_%'  escape '$' -- Do not drop processes.
  and s.name not like 'bdg$_%'  escape '$' -- Do not drop badges.
  and s.name not like 'chg$_%'  escape '$' -- Do not drop change detection.
  and s.name not like 'ins$_%'  escape '$' -- Do not drop insert handler.
  and s.name not like 'upd$_%'  escape '$' -- Do not drop update handler.
  and s.name not like 'del$_%'  escape '$' -- Do not drop delete handler.

...

This clearly gets all procedures in any schema. I can easily modify this to ignore our schema but next creation it will be back to how it was. I even tried searching for the code that generates the source code so I could add my exception on the Software Factory itself but I had no luck finding it.

 

How do I get the software factory to ignore my manual procedures?

Best answer by Jeroen van den Belt

Hi ​@J. de Lange,

This is indeed something the Software Factory should provide. If that’s not the case, we would appreciate receiving a ticket for it. May I ask you to report this in TCP?

View original
Did this topic help you find an answer to your question?

2 replies

Jeroen van den Belt
Administrator
Forum|alt.badge.img+9

Hi ​@J. de Lange,

This is indeed something the Software Factory should provide. If that’s not the case, we would appreciate receiving a ticket for it. May I ask you to report this in TCP?


J. de Lange
Hero
Forum|alt.badge.img+4
  • Author
  • Hero
  • 67 replies
  • April 22, 2025
Jeroen van den Belt wrote:

Hi ​@J. de Lange,

This is indeed something the Software Factory should provide. If that’s not the case, we would appreciate receiving a ticket for it. May I ask you to report this in TCP?

Thank you, Jeroen. I’ve raised a ticket: 11554S - The Software Factory also drops procedures in other schema's than dbo.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings