update : 28-04-2017

DBA Script : example_transport_tablespace.sql

-- | FILE : example_transport_tablespace.sql |
-- +----------------------------------------------------------------------------+
-- | |
-- | |
-- | www.high-oracle.com |
-- |----------------------------------------------------------------------------|
-- | www.high-oracle.com |
-- |----------------------------------------------------------------------------|
-- | DATABASE : Oracle |
-- | FILE : example_transport_tablespace.sql |
-- | CLASS : Examples |
-- | PURPOSE : Example script that demonstrates how to use the transportable |
-- | tablespace feature. |
-- | NOTE : As with any code, ensure to test this script in a development |
-- | environment before attempting to run it in production. |
-- +----------------------------------------------------------------------------+
connect "/ as sysdba"
set serveroutput on
Prompt =====================================================
Prompt THE FOLLOWING EXAMPLE WILL TRANSPORT THE TABLESPACES
Prompt "users" and "users2" FROM DATABASE "CUSTDB" TO "DWDB"
Prompt =====================================================
Prompt
Prompt
Prompt ==========================================
Prompt VERIFY TABLESPACE(s) ARE SELF-CONTAINED...
Prompt ==========================================
Prompt
accept a1 Prompt "Hit to continue";
exec DBMS_TTS.TRANSPORT_SET_CHECK('users, users2', TRUE);
SELECT * FROM TRANSPORT_SET_VIOLATIONS;
Prompt ==========================================
Prompt GENERATE A TRANSPORTABLE TABLESPACE SET...
Prompt ==========================================
Prompt
accept a1 Prompt "Hit to continue";
ALTER TABLESPACE users READ ONLY;
ALTER TABLESPACE users2 READ ONLY;
!exp userid=\"sys/change_on_install@custdb_jeffreyh3\" transport_tablespace=y tablespaces=users,users2 triggers=y constraints=y grants=y file=users.dmp
!cp /u10/app/oradata/CUSTDB/users01.dbf /u10/app/oradata/DWDB/users01.dbf
!cp /u10/app/oradata/CUSTDB/users2_02.dbf /u10/app/oradata/DWDB/users2_02.dbf
ALTER TABLESPACE users READ WRITE;
ALTER TABLESPACE users2 READ WRITE;
Prompt ===============================
Prompt LOGGING INTO TARGET DATABASE...
Prompt ===============================
Prompt
accept a1 Prompt "Hit to continue";
connect sys/change_on_install@dwdb_jeffreyh3 as sysdba
Prompt ============================
Prompt IMPORT THE TABLESPACE SET...
Prompt ============================
Prompt
accept a1 Prompt "Hit to continue";
!imp userid=\"sys/change_on_install@dwdb_jeffreyh3 as sysdba\" transport_tablespace=y datafiles='/u10/app/oradata/DWDB/users01.dbf, /u10/app/oradata/DWDB/users2_02.dbf' file=users.dmp
Prompt =================================================
Prompt FINAL CLEANUP. ALTER TABLESPACES TO READ/WRITE...
Prompt =================================================
Prompt
accept a1 Prompt "Hit to continue";
ALTER TABLESPACE users READ WRITE;
ALTER TABLESPACE users2 READ WRITE;

End Script

Oracle Database Error Messages



Oracle Database High Availability Any organization evaluating a database solution for enterprise data must also evaluate the High Availability (HA) capabilities of the database. Data is one of the most critical business assets of an organization. If this data is not available and/or not protected, companies may stand to lose millions of dollars in business downtime as well as negative publicity. Building a highly available data infrastructure is critical to the success of all organizations in today's fast moving economy.

Well, the reason for above error is that i have taken the above script from a 11g database and running it on 10g database. 11g has bring some changes in password management. Below code is executed on 11g and user created successfully, which is expected result.