Search This Blog

Tuesday, April 11, 2017

How To Move Maximo Database on SQL Server to AWS using Azure Tool

This article explains how to move Maximo database from SQL Server 2016 to AWS running on SQL Server 2008, using a simple tool provided by Azure platform.
image

Download the azure tool from the below path.
https://sqlazuremw.codeplex.com/

Open the tool SQLAzureMW.exe from the folder and run it.
Make sure you have SQL Server installed on the server, else this tool won’t run.






image

Select Migrate Database option.
Connect to your source server.
image

Select your DB,double click on the database
image

Select all objects

image


If your target is not the latest version or is older version, select SQL Server only instead of latest option , see below.

image

Generate script.
maximo azure aws sql server migrate

maximo aws database migration started

Now the azure tool is trying to create scripts from the tables, which will be run later on the EC2 AWS instance which is hosting our target Maximo database.

Sit tight, it will take a while.

aws maximo azure sql tool done

Now run these scripts against our target Maximo database.

image


Now choose SQL authentication because your AWS Database is on a remote server and you will not have a domain controller to use window authentication.
Also make sure you have Maximo user created who has full access to your maxdb76 database as shown below, if you don’t do this step you will face problems specified in the troubleshoot section.
image

There could be other reasons that you are not able to connect to this DB,some of them include:
  • Network problem from your machine, try telnet to AWS instance.
  • SQL Services not running on the AWS instance.
  • Password might be wrong.
  • You might be trying with windows authentication mode, which won’t work outside AWS intranet.
  • You have not created a user for Maximo or you are using SA login which doesn’t have permission for your newly created database.



Now lets come back to our main database wizard, if every thing is fine you will see this screen from the target database.

image

From now on, things are a little simple.
You are not connected to the target instance and now BCPData scripts which were recorded in earlier step will execute on target EC2 database.

Select and click next.
image

You might face an error shown below after this step.
image

This is because Maximo user only has public role and doesn’t have the admin role.
Go to Management studio and grant SYSADMIN role to Maximo user.
image


Now if you go back and try again, you will be able to proceed with the export.


You will soon start getting tables data in your maxdb76, checkout the tables in the database.

maximo export sucess aws via azure tool

Sit tight, it might take a while.
image

If it is success full, you are lucky else you might face the below error.
Troubleshoot
==========================================================

Error 1
In case you are transferring from the latest SQL Server version 2016 to SQL Server 2008, you might face an error for a missing system procedure.
sp_describe_first_result_set ( following stored procedure is missing)
You might face this issue,if your ODBC driver is not compatible for 2008.

Please uninstall the SQL ODBC driver and reinstall from the below URL.

Microsoft® ODBC Driver 13.1 for SQL Server® - Windows + Linux
https://www.microsoft.com/en-us/download/details.aspx?id=53339

image


Driver version 13.1 supports native ODBC to 2008 Server R2 and other platform, details on the description on Microsoft website.
Once this is installed, retry with the SQL Azure tool and it will succeed this time.


This time it is victory, its done and successfully migrated SQL server from one database to another database running different versions of SQL server
image


Error 2
Error:The network path was not found - SQL server
The reason could be that your instance is not reachable or you are using windows authentication
Error 3
Error: Login is from an untrusted domain and can not be used for windows authentications.

image

Reason: You might be using windows authentication, you need to use SQL authentication.

It ends here.

This document explained step by step execution and best practices about how Maximo database or any other database can be migrated from two different databases with different version of Microsoft SQL Server.

Any issues , please comment.

Keep Reading !

Action Item: Recommend & Subscribe !

No comments:

Post a Comment