Use the following to set up variables that are based on values from sql output. Use the new_value option in the sqlplus column command. See the example below which grabs the instance name of the database that is being used.
SQL> set termout off timing off feedback off SQL> column instance new_value instance_name SQL> select instance_name instance from v$instance ; SQL> set termout on timing on feedback on SQL> prompt &instance_name note: The first set statement hides the output from running the v$instance sql query.
b If running this procedure by a user other than sys then ensure the user has dba privileges and PUBLIC SYNONYMS for the following following have been created.
DBMS_PLUGTS DBMS_TTS
1. Identify tablespaces that need to be migrated. note: Dependent data objects need to be incapsuated in the process. i.e.: Data + Index objects need to be included.