archi-contribs / database-plugin

Database export/import plugin that store models in a central database repository
Other
81 stars 23 forks source link

SQL error when trying to import database #118

Closed stevek421 closed 3 years ago

stevek421 commented 3 years ago

Version of Archi v4.8.1

Archi Plug-ins Database plug-in v2.2.16

Operating System Windows 10

We have an Archi repository created under Archimate v4.6 that was last used several months ago and not updated since. As new member of the team, I installed Archimate v4.8.1 and v2.2.16 of the database plugin on my laptop. The MS JDBC driver is also the latest version. When I go to connect to the repository so I can update the model, I get the following error when trying to initiate the import:

_Failed to check the database. SQLServerException: Could not find stored procedure 'spRENAME'.

I'm able to connect to the SQL database. Tried reinstalling with a slightly older version of Archimate and the plugin, but see the same error. A couple of colleagues who had previously been able to connect under original version and have since upgraded to Archi v4.8.1 and the latest plug-in are also experiencing connection issues. Only person still able to connect is running Archi v4.6 and older plug-in.

Has anyone experienced anything similar or have suggestion as to what could be causing this? Thx.

herve91 commented 3 years ago

Could you please provide me with the version of SQL Server you're using ?

stevek421 commented 3 years ago

SQL Server 2017 v14.0.2027.2

herve91 commented 3 years ago

I did some more testing on my system and it definitively works.

You may enable the log file on the logger tab (choose "simple mode", activate "trace" level and choose a file location where you've got write access. image

Then, restart the update process and you'll have more details on the error.

What you can check is whether the user you're using to connect to your database is allowed to use the "sp_rename" stored procedure that allows to rename columns.

herve91 commented 3 years ago

Did you manage to update your schema ? Do you require further assistance ?

nodule7 commented 3 years ago

I work with stevek421. We reviewed the log and the error looks like an obscure bug in the code. Its failing during the upgrade as it calls sp_RENAME as one of the steps. We (for reasons I won't go into) have case sensitive database collation on the SQL Server so sp_RENAME does not exist as the db object is sp_rename.

herve91 commented 3 years ago

I submitted version 2.2.18 which is calling "sp_rename" in lowercase.

Does this fix your issue ?

nodule7 commented 3 years ago

Yes that has sorted it out

On Thu, 8 Apr 2021 at 04:48, Hervé Jouin @.***> wrote:

I submitted version 2.2.18 which is calling "sp_rename" in lowercase.

Does this fix your issue ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/archi-contribs/database-plugin/issues/118#issuecomment-815700763, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATSRZ6ZJOVB2FFYBSFLOGGDTHWJYLANCNFSM42NHMBIQ .

herve91 commented 3 years ago

Great, so I close the case.