Hello.
Recently I discoverd SSMA to assis in data migration from Oracle to SQL Server. But since I started studying and experimenting with it I had terrible performances issues. I'm not talking about data migration poor performance, but in fact even connecting
with the target and source databases is painful.
The first connection to the source database takes about 30 minutes. Half an hour just to past connect to Oracle. I inspected the Oracle activity and I saw that SSMA bombs it with a series of queries on the system tables like all_columns, all_constraints,
all_objects FOR EACH SCHEMA. That's seems nonsense to since I connect directly to a specific user/schema, why does the thing needs to through every single schema on the database?
The connection to the target database is not better either, taking also about 30 minutes. Once again, I gave the database name to connect, why the heck does it need to go through every other database on the server?
Then it comes the migration phase. Note that I have precreated all the tables on the target database, so no conversions is being done here, just a data copy. Before effectivelly migrating the data I got several generic messages of "Object
passed as parameter table", one for each table. The problem here is that it takes about one minute on each table. At the moment I have a sample of 220 tables (the schemas have about 600 or 700), so I expect more than 3 hours just to pass these
tables as parameters? Really?
Once again, inspecting the Oracle side I see this same querie for each table being analyzed:
ELECT Ctrs.owner , Ctrs.constraint_name , Ctrs.constraint_type , Rcts.table_name AS r_table_name , Ctrs.delete_rule , Ctrs.search_condition , Ctrs.status , Ctrs.last_change , Ctrs.r_owner , Ctrs.r_constraint_name
FROM sys.all_constraints Ctrs ,
(SELECT DISTINCT Rcts.table_name , Rcts.owner , Rcts.constraint_name
FROM sys.all_constraints Rcts , sys.all_constraints Ctrs
WHERE Ctrs.owner = 'VIE2016' AND Ctrs.table_name = 'BI_COLUMN' AND Ctrs.r_owner = Rcts.owner AND Ctrs.r_constraint_name = Rcts.constraint_name) Rcts
WHERE Ctrs.r_owner = Rcts.owner (+) AND Ctrs.r_constraint_name = Rcts.constraint_name (+) AND Ctrs.owner = 'VIE2016' AND Ctrs.table_name = 'BI_COLUMN' AND Ctrs.constraint_type IN ('P', 'R', 'U', 'C')
So, what's the deal here? Didn't SSMA alread went through every object in every schema on the first connection? Why does it need to re-read each simple table for its constraints? Moreover,
why query the ALL views? Of course it will take forever, why don't it go to the simple USER views? It would be way faster.
I tested a data migration with fewer tables but it was also disconcerting: 220 MB copied in about 30 minutes - excluding the connection and parameter passing time. Although I think I can tweak some
options like fetch size and threading to help this part, but still the overall performance of the tool really dissapointed me.
So, is there a way to improve this? Are there some options to avoid having to re-read all the objects over and over again? A friend once told me about a technique consisting in creating a view on the Oracle schema to fool SSMA into thinking its
accessing the ALL views, but I didn't get it right, specially because I see it prefixing whith the SYS schema.
Could somebody give me some advice or hints?
Oh, also worthing noting that I'm using the console version since I have to script the migration process. But even with the graphical version the performance was similar terrible.
Thenaks in advance for your help.