Moving the FACT table records in Microsoft SQL Server databases
Before you perform this task, make sure you have full access to the source and the destination databases (you need the database admin privileges).
- Connect to the source database.
- Move data.
If a table does not exist, execute the following script:
SELECT * INTO <TARGET_DATABASE>.<TARGET_SCHEMA>.PR_DATA_IH_FACT FROM <SOURCE_DATABASE>.<SOURCE_SCHEMA>.PR_DATA_IH_FACT
If a table exists with the exact same columns:
- Make sure there are no primary key (PK) constraints on the PXFACTID column in the destination database and do not move any constraints.
Execute the following script:
INSERT INTO <TARGET_DATABASE>.<TARGET_SCHEMA>.PR_DATA_IH_FACT (column1 [, column2 ...]) SELECT column1 [, column2 ...] FROM <SOURCE_DATABASE>.<SOURCE_SCHEMA>.PR_DATA_IH_FACT
Previous topic Applying interaction history scripts in Microsoft SQL Server Next topic Merging the dimension records in Microsoft SQL Server databases