Showing posts with label Oracle Utilities. Show all posts
Showing posts with label Oracle Utilities. Show all posts

Sunday, April 12, 2009

Exclude Database Objects From Datapump Import

You can exclude any database object from importing using a Datapump Import by using this commands

1-Export the whole Schema from a database
expdp system schemas=hr directory=hr_exp dumpfile=hr_exp.dmp

this dumpfile will contain all database objects like Tables,Indexes,Triggers.....

2-Now you can Exclude the objetcs you want with this command

impdp system schemas=hr directory=hr_exp dumpfile=hr_exp.dmp exclude=PROCEDURE,FUNCTION,TYPE,TRIGGER

so in this command you will Exclude PROCEDURE,FUNCTION,TYPE,TRIGGER from importing

Monday, January 28, 2008

Speedup Datapump Import

I found that running Datapump Import impdp with parameter exclude=statistics and then collecting statistics on the imported objects is significantly faster than waiting for impdp to import the statistics (at least in Oracle 10g 10.2)

Thursday, November 15, 2007

DB_VERIFY performs a physical structure integrity check against off-line database files

The utility runs perfectly well against on-line files as well, however, the manual is clear that it is an off-line utility. My assumption is that it may incorrectly report blocks as bad while I/O is taken place (fractured blocks).
DBA's should use this utility frequently to identify datafiles that are corrupted. Some times the database will perform normally until you address a particular block in the datafile, which may then result in ORA-600 errors.
DB_VERIFY is useful in these situations:
When block corruption is expected; Forecast any future problems w.r.t. database file/ block corruption; When you restore files from a tape. It will help knowing if the first file pulled from tape is corrupt, instead of spending hours to extract all of them. To access help on DB_VERIFY type:
dbv help=y

Example:
$ dbv file=/u01/oradata/o10gr2/example01.dbf
DBVERIFY: Release 10.2.0.1.0 - Production on Sat Jul 7 11:45:52 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.
DBVERIFY - Verification starting : FILE = /u01/oradata/o10gr2/example01.dbfDBVERIFY - Verification complete
Total Pages Examined : 12800Total Pages Processed (Data) : 4409
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 1264
Total Pages Failing (Index): 0
Total Pages Processed (Other): 1539
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 5588
Total Pages Marked Corrupt : 0
Total Pages Influx : 0
Highest block SCN : 470536 (0.470536)