Jump to content

Installing ESMC on application server gives Db_Invalid from SQL database server


Recommended Posts

This is my setting during installation of ESMC on our application server. Db is on another server. I put in a brand new name for the db and I use the sa account to set it up. See attached Pic1.
I get an error like in Pic2, saying 'The specified database was not used for this purpose before or it is corrupted.'. Which I think stands for "Db_Invalid".
I have tried as above but with preparing a db and another owner user (then sa) but wwhen I install with those settings it has not been working either! 

What am I missing? Why is the database not accepted? 

Here is the last part of the log produced by the installer;

Action start 10:06:26: CA_DbCheckConnection.
MSI (c) (B8:D4) [10:06:26:237]: Invoking remote custom action. DLL: C:\Users\ADMINI~1.HPT\AppData\Local\Temp\2\MSI9A8D.tmp, Entrypoint: DbCheckConnection
MSI (c) (B8!A8) [10:06:26:317]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Custom action 'CheckStringWithRegex' ended.'. Its new value: 'INFO: Custom action 'DbCheckConnection' successfully initialized.'.
MSI (c) (B8!A8) [10:06:26:317]: PROPERTY CHANGE: Deleting P_DB_CONNECTION_STATUS property. Its current value is '77701'.
MSI (c) (B8!A8) [10:06:26:317]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Custom action 'DbCheckConnection' successfully initialized.'. Its new value: 'INFO: (SetProperty) Successful SET property 'P_DB_CONNECTION_STATUS' with value - '.
MSI (c) (B8!A8) [10:06:26:317]: PROPERTY CHANGE: Deleting P_DB_STATUS property. Its current value is 'DB_INVALID'.
MSI (c) (B8!A8) [10:06:26:317]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: (SetProperty) Successful SET property 'P_DB_CONNECTION_STATUS' with value - '. Its new value: 'INFO: (SetProperty) Successful SET property 'P_DB_STATUS' with value - '.
MSI (c) (B8!A8) [10:06:26:317]: PROPERTY CHANGE: Deleting P_DB_UPGRADE property. Its current value is '0'.
MSI (c) (B8!A8) [10:06:26:317]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: (SetProperty) Successful SET property 'P_DB_STATUS' with value - '. Its new value: 'INFO: (SetProperty) Successful SET property 'P_DB_UPGRADE' with value - '.
MSI (c) (B8!A8) [10:06:26:317]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: (SetProperty) Successful SET property 'P_DB_UPGRADE' with value - '. Its new value: 'INFO: (SetProperty) Successful SET property 'P_DB_USE_FIRST_USER' with value - '.
MSI (c) (B8!A8) [10:06:26:317]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: (SetProperty) Successful SET property 'P_DB_USE_FIRST_USER' with value - '. Its new value: 'INFO: Successful GET property 'Installed' with value - '.
MSI (c) (B8!A8) [10:06:26:318]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'Installed' with value - '. Its new value: 'INFO: Successful GET property 'P_UPGRADE' with value - '.
MSI (c) (B8!A8) [10:06:26:318]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_UPGRADE' with value - '. Its new value: 'INFO: Successful GET property 'P_DB_TYPE' with value - MS SQL Server'.
MSI (c) (B8!A8) [10:06:26:318]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_DB_TYPE' with value - MS SQL Server'. Its new value: 'INFO: Successful GET property 'P_PRODUCT_NAME' with value - Server'.
MSI (c) (B8!A8) [10:06:26:318]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_PRODUCT_NAME' with value - Server'. Its new value: 'INFO: Successful GET property 'P_DB_CONNECTORS_DIR' with value - C:\Users\ADMINI~1.HPT\AppData\Local\Temp\2\EsetRemoteAdminServer\{22DBE555-DD68-4A8A-90D2-A2827D021097}\'.
MSI (c) (B8!A8) [10:06:26:318]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_DB_CONNECTORS_DIR' with value - C:\Users\ADMINI~1.HPT\AppData\Local\Temp\2\EsetRemoteAdminServer\{22DBE555-DD68-4A8A-90D2-A2827D021097}\'. Its new value: 'INFO: Successful GET property 'P_DB_SCRIPTS_DIR' with value - C:\Users\ADMINI~1.HPT\AppData\Local\Temp\2\EsetRemoteAdminServer\{22DBE555-DD68-4A8A-90D2-A2827D021097}\Database'.
MSI (c) (B8!A8) [10:06:26:318]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_DB_SCRIPTS_DIR' with value - C:\Users\ADMINI~1.HPT\AppData\Local\Temp\2\EsetRemoteAdminServer\{22DBE555-DD68-4A8A-90D2-A2827D021097}\Database'. Its new value: 'INFO: Successful GET property 'P_DB_DRIVER' with value - SQL Server'.
MSI (c) (B8!A8) [10:06:26:318]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_DB_DRIVER' with value - SQL Server'. Its new value: 'INFO: Successful GET property 'P_DB_HOSTNAME' with value - vi8srvdba004'.
MSI (c) (B8!A8) [10:06:26:318]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_DB_HOSTNAME' with value - vi8srvdba004'. Its new value: 'INFO: Successful GET property 'P_DB_PORT' with value - 1433'.
MSI (c) (B8!A8) [10:06:26:319]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_DB_PORT' with value - 1433'. Its new value: 'INFO: (SetProperty) Successful SET property 'P_DB_PORT' with value - 1433'.
MSI (c) (B8!A8) [10:06:26:319]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: (SetProperty) Successful SET property 'P_DB_PORT' with value - 1433'. Its new value: 'INFO: Successful GET property 'P_DB_NAME' with value - eset_smc_db'.
MSI (c) (B8!A8) [10:06:26:319]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_DB_NAME' with value - eset_smc_db'. Its new value: 'INFO: Successful GET property 'P_DB_ADMIN_USERNAME' with value - **********'.
MSI (c) (B8!A8) [10:06:26:319]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_DB_ADMIN_USERNAME' with value - **********'. Its new value: 'INFO: Successful GET property 'P_DB_ADMIN_PASSWORD' with value - **********'.
MSI (c) (B8!A8) [10:06:26:319]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Successful GET property 'P_DB_ADMIN_PASSWORD' with value - **********'. Its new value: 'INFO: (GetDatabaseServerConnectionStringWithoutEscape) Created connection string: 'Driver=SQL Server;Server=vi8srvdba004,1433;Uid=******;Pwd={******};CharSet=utf8;''.
MSI (c) (B8!A8) [10:06:26:319]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: (GetDatabaseServerConnectionStringWithoutEscape) Created connection string: 'Driver=SQL Server;Server=vi8srvdba004,1433;Uid=******;Pwd={******};CharSet=utf8;''. Its new value: 'INFO: Entering function: void __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::TestConnection(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class Era::Setup::Common::Database::Framework::ConnectOptions)'.
MSI (c) (B8!A8) [10:06:26:335]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Entering function: void __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::TestConnection(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class Era::Setup::Common::Database::Framework::ConnectOptions)'. Its new value: 'INFO: Leaving function: void __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::TestConnection(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class Era::Setup::Common::Database::Framework::ConnectOptions)'.
MSI (c) (B8!A8) [10:06:26:335]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Leaving function: void __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::TestConnection(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class Era::Setup::Common::Database::Framework::ConnectOptions)'. Its new value: 'INFO: Entering function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::GetVersionOfDbServer(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)'.
MSI (c) (B8!A8) [10:06:26:336]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Entering function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::GetVersionOfDbServer(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)'. Its new value: 'INFO: DatabaseReader: Recycling current DB connection.'.
MSI (c) (B8!A8) [10:06:26:336]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: DatabaseReader: Recycling current DB connection.'. Its new value: 'INFO: Leaving function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::GetVersionOfDbServer(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)'.
MSI (c) (B8!A8) [10:06:26:336]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Leaving function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::GetVersionOfDbServer(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)'. Its new value: 'INFO: SQL Database server version is '12.0.5223.6', which is considered as SUPPORTED.'.
MSI (c) (B8!A8) [10:06:26:337]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: SQL Database server version is '12.0.5223.6', which is considered as SUPPORTED.'. Its new value: 'INFO: DatabaseReader: Recycling current DB connection.'.
MSI (c) (B8!A8) [10:06:26:623]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: DatabaseReader: Recycling current DB connection.'. Its new value: 'INFO: Entering function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::GetDatabaseStatusForDBServer(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)'.
MSI (c) (B8!A8) [10:06:26:623]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Entering function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::GetDatabaseStatusForDBServer(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)'. Its new value: 'INFO: DatabaseReader: Recycling current DB connection.'.
MSI (c) (B8!A8) [10:06:26:634]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: DatabaseReader: Recycling current DB connection.'. Its new value: 'INFO: Entering function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::GetDatabaseStatus(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)'.
MSI (c) (B8!A8) [10:06:26:635]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Entering function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::GetDatabaseStatus(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)'. Its new value: 'INFO: Leaving function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::Ge
MSI (c) (B8!A8) [10:06:26:635]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Leaving function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::GetDatabaseStatus(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)'. Its new value: 'INFO: Leaving function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::Get
MSI (c) (B8!A8) [10:06:26:635]: PROPERTY CHANGE: Adding P_DB_STATUS property. Its value is 'DB_INVALID'.
MSI (c) (B8!A8) [10:06:26:635]: PROPERTY CHANGE: Modifying P_LAST_LOG_MESSAGE property. Its current value is 'INFO: Leaving function: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Era::Setup::Common::CustomActions::CDatabaseReader::GetDatabaseStatusForDBServer(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_t

 

Pic1.png

Pic2.png

Link to comment
Share on other sites

  • ESET Staff

Unfortunately it seems that provided logs is not complete and I was not able to locate any reasonable error, but regardless of that, this errors in most cases means that database with provided name already exists and that is is not empty, but also it is not database that was created by installer. This might theoretically happen in case there were some installation failures previously and database was not created properly -> I would recommend to manually check that this database does not exist on target DB server. Any chance you tried to use new name for consecutive attempts?

Also probably not related to this issue, but I would recommend to use more recent ODBC driver, for example v17, instead of "SQL Server" which is fairly old one.

Link to comment
Share on other sites

You are right in presuming that I have tried many different names. And if those names did not work I deleted them again from the SQL server. I do get the installer to create a database, with the correct owner but still after creation the error shows up and says the db cannot be used. And that is although the installer has definitely created the database. 

I have since this also upgrade the odbc driver to version 17 but the same thing again. Still getting those error messages and in the log it says that the database is invalid. 

I have had suggestions on checking the listening port, which was correct, it was 1433, just as it should.

I have multiple other applications running on this server that has its database on the database server. They're really should be no reason for the application not to be able to talk to the database that it itself has created.

I also have this question as a ticket with ESET support and hopefully they can shed some more light on this.

Thank you for your help it is much appreciated

Link to comment
Share on other sites

  • ESET Staff

Could you possibly attach installation log for check? Part posted in previous comments seems to be not complete, and probably not even capturing moment when database was detected as invalid -> I think it is default state and log should possibly show why it's state was not changes. Unfortunately there might be multiple reasons: maybe it is not possible to create database due to collation configuration, etc.

Link to comment
Share on other sites

Thing is, as stated above, the db is created, ("I do get the installer to create a database, with the correct owner but..."). It is after creation the db is claimed to be DB_Invalid. I've attached a couple of the latest logs. 
Thank you very much for your efforts! Much appreciated.  

logs_forum_2020-10-08.zip esmcadministrator_odbc17.zip

Link to comment
Share on other sites

I tested running Installer directly on the database server. Got the same error again! Error is not between the servers. 

Then I checked one of the created databases and it is completely empty. No tables where created.
I tested creating a table then using this script below and it worked fine. The database does not seem to be corrupted. 

Then why does the installer not create the tables in the database? Anyone got any ideas? 

-- Create a new table called '[test001]' in schema '[dbo]'
-- Drop the table if it already exists
IF OBJECT_ID('[dbo].[test001]', 'U') IS NOT NULL
DROP TABLE [dbo].[test001]
GO
-- Create the table in the specified schema
CREATE TABLE [dbo].[test001]
(
    [Id] INT NOT NULL PRIMARY KEY, -- Primary Key column
    [ColumnName2] NVARCHAR(50) NOT NULL,
    [ColumnName3] NVARCHAR(50) NOT NULL
    -- Specify more columns here
);
GO

 

Link to comment
Share on other sites

  • ESET Staff

Could you please try to create with collation Latin1_General_CI_AI, i.e. using command like this:

CREATE DATABASE [era_db] COLLATE Latin1_General_CI_AI
GO
USE [era_db]
GO

Otherwise I am running out of ideas.

Link to comment
Share on other sites

It is a good idea but I'd say that is correctly set by the installer, as you see in attached pic of the db props...

Me too, giving up I mean, I think I need to go with the virtual appliance instead of installing the application on Win server and sadly pay the extra cash monthly for renting server space, it is not much since two cores and two GB RAM is enough for the VA, but it is still an extra cost not budgeted for in the project. 

Thanks for you input and ideas. I'll post if ESET Support Sweden solves it. 

Database Properties - era_db8 - 2020-10-12 15_09.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...