create tablespace SHAH_SHAKIR_DBF datafile
'D:\ORACLE\ORA92\MUJAZORC\KAFA_ITGFIN_DBF.DBF' size 5120m autoextend on;
2. Take Export of schema SHAKIR on Seperate drive:
EXP SYSTEM/SYSMAN@mujazorc OWNER=SHAKIR FILE=F:\Dump\kafafin_16022015.DMP GRANTS=Y BUFFER=10000 COMPRESS=Y ROWS=Y LOG= F:\Dump\shakir_16022015.log
3. Now create new schema or if you have already existing schema then drop and recreate it:
drop SHAKIR CASCADE;
CREATE USER SHAKIR
IDENTIFIED BY VALUES SHAKIR
DEFAULT TABLESPACE SHAH_ITGFIN_DBF
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
-- 1 Role for SHAKIR
GRANT DBA TO SHAKIR WITH ADMIN OPTION;
ALTER USER KSHAKIR DEFAULT ROLE ALL;
-- 1 System Privilege for SHAKIR
GRANT UNLIMITED TABLESPACE TO SHAKIR WITH ADMIN OPTION;
-- 1 Tablespace Quota for SHAKIR
ALTER USER SHAKIR QUOTA UNLIMITED ON SHAH_ITGFIN_DBF;
alter user SHAKIR quota 0 on SHAKIR_FIN_DBF quota unlimited on SHAH_ITGFIN_DBF;
alter user SHAKIR quota 0 on SHAH_FIN_DBF quota unlimited on SHAH_ITGFIN_DBF;
Note: Here in above example two different tablespace having the tables of same users.
In the case while changing the default tablespace for the user's in the same database, don't forget to assign
quota unlimited on new tablespace and revoke unlimited quota on old tablespace. This might not required while changing the tablespace of user's of different database.
revoke unlimited tablespace from SHAH_ITGFIN_DBF;
4. Now try to import the dump you have taken. Make sure dump is properly copied on the drive.
IMP SYSTEM/sysman@SHAHDB FILE=F:\Dump\shakir_16022015.DMP FROMUSER=SHAKIR TOUSER=AWAED LOG=F:\Dump\shakir_16022015.DMP.log
Don't forget to assign back quota unlimited on 'awaed' tablespace.
alter user shakir DEFAULT tablespace shakir_ts QUOTA UNLIMITED ON rahman;
Comments
Post a Comment