How to add a table to running SQL Server replication? First two points are generic. The last point - data instantiation - depends on the preferred tool - https://dbvisit.atlassian.net/wiki/spaces/ugd9/pages/128742098/Data+instantiation+for+non+Oracle+Creating+the+Starting+Point.
For this KB article, I chose SSMA application.
- pause apply process in dbvrep console
- prepare a table in dbvrep console
- Load the table into SQL Server using SSMA application
- resume apply process
Point 1 and 2:
dbvrep> pause apply
dbvrep> prepare table msi.test2 noddl rename to prod.dbo.test2
Copy the SCN number. You'll need it later on.
a) Download SSMA from https://blogs.msdn.microsoft.com/ssma/.
b) Open the SSMA tool and connect to Oracle and SQL Server. Connection to Oracle is easy. To SQL Server you need to know a value for variable Database. It should be a database where you want to load a data. In my case, it's PROD database.
c) Convert Schema (CTRL+R)
d) Synchronise with Database
e) Add migration settings if you don't have it yet.
SSMA can use Oracle SCN number, but you need to change default settings. To do that follow https://docs.microsoft.com/en-us/sql/ssma/oracle/data-migration-settings-oracletosql and https://docs.microsoft.com/en-us/sql/ssma/oracle/project-settings-migration-oracletosql. Or maybe better see the following picture:
f) Use customer query. Click on tab Data Migration Settings (the right one in the right panel).
g) migrate data.
dbvrep> resume apply
And that's all for today. You can add more than one table for the moment. If you get different SCN number during prepare phase, set the query in SSMA for each table appropriately.