Skip to main content

Move a Project's Data to Another redcap_dataX Table

This page allows administrators to move the data stored in a given REDCap project to another redcap_dataX table in the database in order to improve the general performance of the project. The performance improvement will depend greatly on the size and structure of the project and will also depend on many things in the overall system, such as the current size of the redcap_data table and the power of the database server. Note: This process will perform multiple checks to ensure that all data gets moved successfully, and if anything goes wrong, it will automatically roll back all changes.
Enter the PID of a project to move their data from the redcap_data table to another database table:
- or - - or -

PID 17: "Stillbirth Reduction (Baseline Survey)"

WARNING: This project (PID 17) is currently in ONLINE mode and thus could potentially have users using it right now. It is highly recommended to go to the Edit Project Settings page, and set it to OFFLINE before proceeding below. This will ensure that this process will not cause any issues with the project's data. Once you've moved the project's data, be sure to set it back to ONLINE mode again, or instead you may check the checkbox below to bring it back ONLINE automatically.
SQL to be executed to move the project's data:
You can manually execute the SQL below using a MySQL client OR you can click the blue button to have REDCap do it. Run this SQL manually:
SET AUTOCOMMIT=0; BEGIN;
INSERT INTO redcap_data3 SELECT * FROM redcap_data WHERE project_id = 17;
UPDATE redcap_projects SET data_table = 'redcap_data3' WHERE project_id = 17;
DELETE FROM redcap_data WHERE project_id = 17;
COMMIT; SET AUTOCOMMIT=1;
- OR -