Migrate EventLog Analyzer Data from PGSQL to MS SQL Database
EventLog Analyzer allows you to migrate the existing EventLog Analyzer data available in the PGSQL database to the MS SQL database.
This procedure is applicable only if you are already using the EventLog Analyzer with PGSQL and you want to change the database to MS SQL.
Re-registering the Managed Server after the database has been changed:
- When the Managed Server is installed, it is registered with Admin Server as Managed Server with PGSQL.
- If the database of the Managed Server is changed from PGSQL to MS SQL, the database of the Admin server also needs to be changed from PGSQL to MS SQL.
- Then, the managed server has to be re-registered with the Admin Server with the help of <EventLog Analyzer Home>/troubleshooting/registerWithAdminServer.bat file (or registerWithAdminServer.sh file)
After changing the database, when the Managed Server is started as a 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.
If the user is migrating a distributed setup, the user needs to migrate the entire distributed setup to MSSQL. All Managed servers along with the admin server should be migrated to MSSQL.
If you want to configure MS SQL for a fresh installation of the EventLog Analyzer server, please refer to the Configuring MS SQL 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:
- Stop the EventLog Analyzer Server/Service.
- Invoke the <EventLog Analyzer Home>/tools/backUpDatabase.bat in command prompt to backup the data available in the PGSQL 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 'backup_eventlog_<Build_Number>_database_MM_DD_YY_hh_mm.data'.
- From the installed MS SQL SERVER, copy the files bcp.exe and bcp.rll to <EventLog Analyzer Home>/bin folder.
- Invoke the <EventLog Analyzer Home>/tools/changeDBServer.bat in command prompt to configure the MS SQL SERVER credentials like ServerName, Port, User Name and Password.
- Database Setup Wizard pops-up.
- In the wizard screen, select Server Type as SQL Server. Available SQL Server Instances are listed in a combo box. Enter the Device Name and Port of the SQL Server from the instances.
- Select the authentication type using the "Connect Using:" option.
- The options are:
Note: Ensure that both EventLog Analyzer Server and MS SQL Server are in the same domain and logged in with the same Domain Administrator credentials.
For EventLog Analyzer version 8.0 (Build 8010) onwards,
SQL Server Authentication
For SQL Server Authentication, enter the User Name and Password.
Click the Test button to check whether the credentials are correct. If the test fails, the credentials might be wrong. Recheck and enter the correct credentials.
Click the 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.
Invoke the <EventLog Analyzer Home>/bin/run.bat to start the EventLog Analyzer server in the command prompt.
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.
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.
Note: Executing the restoreDatabase.bat will delete the existing data, if any.
Start the EventLog Analyzer Server/Service to work with the MS SQL Server as the database.