"Unable to connect to the SQL database." When Using LocalDB
CNCKevin
Posts: 2 New member
My company is using SmartAssembly as part of its automated build
processes. We recently upgraded to 6.12.7.1100 which forced us to start
using an SQL Database, when we used to be able to do an mdb file. We
don't even use the Error Reporting tool, we only use SmartAssembly for
obfuscation, but no matter what without a proper SQL Database the whole
process breaks.
To counteract this, as we don't
want our build process dependent on an SQL Server being online, we
tried using the LocalDB method as documented on your forums. The issues
is, if our server is running and comes to the SmartAssembly process,
everything crashes with the following error:
</code><code>Failed: SmartAssembly.InformationException: Unable to connect to the SQL database.<br> at ?..(String )<br> at ?..(TypeAndMethodObfuscator , IEnumerable`1 , Boolean )<br> at SmartAssembly.Processors.PruningObfuscation.Obfuscator.AdvancedTypeAndMethodObfuscator.(TypeDefinition , TypeDefinitionBuilder )<br> at SmartAssembly.Processors.PruningObfuscation.Obfuscator.()<br> at ?..(Obfuscator )<br> at ?..(ProcessingAssemblyHelper , )<br> at ?..(ProcessingAssemblyHelper )<br> at SmartAssembly.ProcessingProjectHelper.()If I open up SmartAssembly on that machine, it immedatly yells at me that the database cannot be connect to. However, if I go into the settings, change the name of the database, then change it back to what it should be, it all connects. In addition, after that, if I keep SmartAssembly open in the background on that server then the automated process works fine. This is not a sustainable solution however, as if we need to reboot and forget to do this "revalidation" process then everything stops working.
My first question is, is there
any way we can shut off the SQL Database requirement, considering we
don't utilize the feature? If not, can we get that option in a future
version? If not, why? My second question is, what can I do in the
meantime to fix this issue?
Tagged:
Best Answer
-
Jessica R Posts: 1,319 Rose Gold 4Hi @CNCKevin,
Thanks for your post!
Version 7 of SmartAssembly was released last week and it allows the use of a SQLite database file (similar to how mdb worked) so that you don't need to use SQL Server. Can you kindly upgrade (Tools>Check for updates) and give this a try?
If you have any information from the SQL Server db that you need to move, kindly take a look at the steps here: https://documentation.red-gate.com/sa7/upgrading/migrating-your-smartassembly-database/migrating-between-sqlite-and-sql-server
Hope that helps!
Answers
It should only need to store information in the SQL Server database if you use any of the following features: error reporting, feature usage reporting, or the lower levels of obfuscation--ASCII or unprintable characters and/or a one-to-one naming scheme. (Using the lower levels or obfuscation allows you to use the Decode Stack Trace feature, and SmartAssembly needs to store the decoding information in the database when they're used.)
Just to be sure, are you using ASCII or unprintable characters and/or a one-to-one naming scheme?
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?