Follow below steps for migrating sql profiles from one database to another.

1. Create a staging table

1. Pack the profiles to the staging table 

3. Export the staging table:

4. copy the dump to target db and import the table.

5. Unpack the sql profiles