1. Creating a staging table to store the SQL Profiles:
exec DBMS_SQLTUNE.CREATE_STGTAB_SQLPROF (table_name=>'SQL_PROFILES_TT',schema_name=>'SCOTT');
2. Select SQL profiles names available in the source database.
SELECT name FROM dba_sql_profiles;
3. Packing the SQL Profiles to the staging table
EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_name => 'SQL_PROFILES_TT',profile_name=>'SYS_SQLPROF_01601bcd34470000');
4. Export table using “exp” tool from the source database:
exp SCOTT/TIGER file=SQL_PROFILES.dmp tables=SQL_PROFILES_TT
5. Import table using “imp” tool into the target database:
imp SCOTT/REGIT file=SQL_PROFILES.dmp full=y
6. Unpack the SQL Profiles in the target database:
EXEC DBMS_SQLTUNE.UNPACK_STGTAB_SQLPROF(REPLACE => TRUE,staging_table_name => 'SQL_PROFILES_TT');