src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
Some day-to-day DBA tips:
DATA LOAD & IMPORT
Well I recommend starting using Data Pump and using import, exporting utilities just for backward compatibilities, or for structure usages only (create user, grants, etc..).
Now I answer another question.
Question: In the case you imported an existing schemas to a new schemas in the same database or another database instance, if these tables and indexes are created in the wrong tablespace, what to do??
Answer: For indexes it is very easy, you should not even bother modifying the “create script”, just create it where ever it is, then move them to the right location using
Alter index index_name rebuild new_tablespace_name
For tables,
If the original tablespace does not exit, the user have quota on a specific tablespace let’s call it APP_DATA, the tables will be created in user’s default tablespace APP_DATA, BUT If the original tablespace exit in the database (in this case OLD_DATA) then the tables will be imported to old_data, so in this case it will be need to modify the “creation script” and then pre-create all the tables and then move, import or load the data.
Question : Regarding the imp utilities and data pump utilities for Oracle 10g & 11g.
In some case the import is very slow and hang, this might happen if the tables are very large, I usually recommend the use of data pump rather than import, export.
Also have the adequate memory, increae the PGA if not set correctly, go to my memory setting section in this BLOG for memory tuning.
Also have the tablespace files for target in auto extend mode, locally managed.
Also use parallel exuction parameter (parfile), set status =10 (10- second ) to se the progress.
Also alter the table you are going to import to.
Alter table table_name parallel degree 4 ( 4 or any other number related to number of cpu’s).
Make sure you have granted the read and write.
SQL> grant read, write on directory export_dir to expuser, jaffray, userx, userx;
Also you must have EXP_FULL_DATABASE role.
If you get the utl.file error some thing like this:
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
ORA-29283: invalid file operation
The export_dir has or might have issues, it is not writing to the right place,
Check it out by:
select directory_name, directory_path from dba_directories;
Drop directory export_dir;
Create directory export_dir as ‘/u01/app/oracle/export’;
Grant read, write to export_dir
To be continued……