Skip to main content

Posts

Showing posts from January, 2019

Copying SQL Profiles from one database to another

Creating a staging table to store the SQL Profiles Packing the SQL Profiles to the staging table Export the table using Datapump or Export/Import Importing the SQL Profiles to the target database Unpack the SQL Profiles in the target database  1. Creating a staging table to store the SQL Profiles SQL> exec DBMS_SQLTUNE.CREATE_STGTAB_SQLPROF (table_name=>'SQL_PROFILES_TT',schema_name=>'SCOTT'); 2. Packing the SQL Profiles to the staging table --Select SQL profiles names available in the source database. SQL> SELECT name FROM dba_sql_profiles; NAME --------- SYS_SQLPROF_x SYS_SQLPROF_x SYS_SQLPROF_x SYS_SQLPROF_x SQL> EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_name => 'SQL_PROFILES_TT',profile_name=>'SYS_SQLPROF_x'); EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_name => 'SQL_PROFILES_TT',profile_name=>'SYS_SQLPROF_x'); EXEC DBMS_SQLTUNE.PACK_STGTAB_SQLPROF (staging_table_n...