Migrate EventLog Analyzer Data from MySQL to MSSQL Database


Post database change steps for Managed Server :

  • When the Managed Server is installed, it is registered with Admin Server as Managed Server with MySQL. If the database of the Managed Server is changed from MySQL to MSSQL, it has to be re-registered with Admin Server as Managed Server with MSSQL.
  • After changing the database, when the Managed Server is started as application, it will prompt the user to re-register with the Admin Server.
  • After changing the database, when the Managed Server is started as service, there will not be any prompt to re-register. The user has to ensure that the Managed Server is re-registered with the Admin Server.

 

EventLog Analyzer allows users to migrate the existing EventLog Analyzer data available in MySQL database to MSSQL database.

This procedure is applicable only if you are already using EventLog Analyzer with MySQL and you want to change the database to MSSQL.
If you want to configure the MSSQL for fresh installation of EventLog Analyzer server, please refer the Configuring MSSQL Database page and follow the procedure given there.

 

The steps to migrate and run the Eventlog Analyzer server with SQL SERVER as the database is given below:

  1. Stop the Eventlog Analyzer Server/Service.

  2. Invoke the <Eventlog Analyzer Home>tools backUpDatabase.bat in command prompt to backup the data available in the MySQL database and wait till the data backup is completed. By default, the backup file will be stored under <Eventlog Analyzer Home>/backup directory with the file name like 'backup_eventlog_<Build_Number>_MM_DD_YYYY_hh_mm.data'.

  3. From the installed MS SQLSERVER, copy the files bcp.exe and bcp.rll to <Eventlog Analyzer Home>/bin folder.

Note: If you are copying the above file from SQL server (Version 2005 and above) and EventLog Analyzer is installed in another machine, then install the following SQL native client as per the SQL version. For MSSQL versions below 2016, install the native client and for MSSQL version 2016, install ODBC driver 13.1.

MSSQL 2005 (32 and 64 bit)
https://www.microsoft.com/en-in/download/details.aspx?id=17943

MSSQL 2008 (32 bit)
http://go.microsoft.com/fwlink/?LinkId=123717&clcid=0x409

MSSQL 2008 (64 bit)
http://go.microsoft.com/fwlink/?LinkId=123718&clcid=0x409

For SQL Server 2014, install the ODBC Driver for SQL Server

https://www.microsoft.com/en-in/download/details.aspx?id=36434

For SQL Server 2016, install MS ODBC Driver 13.1

https://www.microsoft.com/en-in/download/details.aspx?id=53339

 

  1. Invoke the <Eventlog Analyzer Home>/tools changeDBServer.bat in command prompt to configure the MSSQL SERVER credentials like ServerName, Port, UserName and Password.

  2. Database Setup Wizard pops-up.

  3. In the wizard screen, choose the Server Type as SQL Server. Enter the Host Name and Port of the SQL Server. Select the instance from the available SQL Server Instances.

    Tips:
    1. Ensure that the server browser service is enabled as it provides information about the SQL Server instances.
    2. Ensure that TCP/IP are enabled under protocols in the SQL Sever Configuration Manager.

  4. Select the authentication type using the "Connect Using:" options.

  5. The options are:

 

For Windows Authentication, enter the Domain NameUser Name and Password. Ensure that both EventLog Analyzer server and SQL Server are in the same domain and logged in with the same Domain Administrator account.

 

                                 Win authentication

 

For SQL Server Authentication, enter the User Name and Password.

 

  SQL authentication

 

  1. Click Test button to check whether the credentials are correct. If the test fails, the credentials may be wrong. Recheck and enter the correct credentials.

  2. Click Save button to save the SQL Server configuration. Note that it will take a few minutes to configure the settings of the SQL Server database.

  3. Invoke the <Eventlog Analyzer Home>/bin/run.bat to start the Eventlog Analyzer server in the command prompt.

  4. After the server is started completely, stop the server by terminating the run.bat in the command prompt or invoke the <Eventlog Analyzer Home>/bin/shutdown.bat

  5. Invoke the <Eventlog Analyzer Home>/tools/restoreDatabase.bat. Browse and select the created backup file. Now click on 'OK' and wait till the database is completely restored.

Restore data

 

Executing the restoreDatabase.bat will delete the existing data, if any.
  1. Start the Eventlog Analyzer Server/Service to work with the MSSQL SERVER as the database.

Note: You can also change the backup directory. Execute the batch file to backup by passing the absolute path of the directory as argument in the command prompt. Example command execution is shown below.
<Eventlog Analyzer Home>tools:>backUpDatabase.bat D:Mysql
Get download link