Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: didier.pironet on September 16, 2025, 09:54:52 pm

Title: user defined scripts gone
Post by: didier.pironet on September 16, 2025, 09:54:52 pm
Hi guys,
We have a lot of user-defined scripts but today they are all gone for whatever reason.
Built-in scripts still there thought...

Any tips what's the issue here and how to fix??

Thx a million

P.S. We found a table called t_script, query returns null but we see +600 scripts (lines) on this table...
 
Title: Re: user defined scripts gone
Post by: Geert Bellekens on September 16, 2025, 11:34:17 pm
Easiest fix: restore the backup somewhere, export all scripts (Settings | Transfer | Export Reference Data) and import them into your production model (Settings | Transfer | Import Reference Data)

User defined script are indeed stored in the table t_Script. I'm not sure what you mean by query returns null but we see +600 scripts (lines) on this table...
If you execute select * from t_script in the search window scratch pad, you should see the scripts (and groups, and debug artifacts)

Geert
Title: Re: user defined scripts gone
Post by: didier.pironet on September 17, 2025, 01:00:31 am
Thx Geert.
Investigation ongoing...
But I guess we will have to go thru a restore process!
Title: Re: user defined scripts gone
Post by: didier.pironet on September 17, 2025, 09:48:04 pm
investigation status:
Our DevOps did a select on the script table to find out which script was not returning a result: select * from table script id xxx  or > xxx < xxx
We found out that 2 scripts were not returning result in the query (reason still under investigation)
In the database directly we did a: delete from table where scriptid = xxx and xxx
This helped restore the hundreds user-defined scripts in the Scripting view
Title: Re: user defined scripts gone
Post by: Geert Bellekens on September 17, 2025, 10:14:47 pm
investigation status:
Our DevOps did a select on the script table to find out witch script was not returning a result: select * from table script id xxx  or > xxx < xxx
We found out that 2 scripts were not returning result in the query (reason still under investigation)
In the database directly we did a: delete from table where scriptid = xxx and xxx
This helped restore the hundreds user-defined scripts in the Scripting view
The investigation will probably not result to anything.
This might be caused by a something like a crash in the middle of saving a script or debugging.

Geert
Title: Re: user defined scripts gone
Post by: didier.pironet on September 29, 2025, 10:45:39 pm
investigation status:
Our DevOps did a select on the script table to find out witch script was not returning a result: select * from table script id xxx  or > xxx < xxx
We found out that 2 scripts were not returning result in the query (reason still under investigation)
In the database directly we did a: delete from table where scriptid = xxx and xxx
This helped restore the hundreds user-defined scripts in the Scripting view
The investigation will probably not result to anything.
This might be caused by a something like a crash in the middle of saving a script or debugging.

Geert

Root cause is a 'smiley' found in a script that the tool could not handle and crashed miserably...
Title: Re: user defined scripts gone
Post by: Geert Bellekens on September 29, 2025, 11:28:21 pm
Thanks for reporting back; and for the warning about smiley's  ???

Geert😍