Monday 26 July 2010

Oracle : Impdp - objects that can be included/excluded

-- for database level export/import: 
SELECT named, object_path, comments 

  FROM database_export_objects 
 WHERE object_path NOT LIKE '%/%'; 


-- for table schema export/import: 
SELECT named, object_path, comments 

  FROM schema_export_objects 
 WHERE object_path NOT LIKE '%/%'; 


-- for table level export/import: 
SELECT named, object_path, comments 

  FROM table_export_objects 
 WHERE object_path NOT LIKE '%/%'; 

Thursday 22 July 2010

Oracle : Drop a temp tablespace temp file

 alter database tempfile '/u03/volnewdev7data/oradata/NEWDEV3/temp_02.dbf' drop including datafiles;

Wednesday 21 July 2010

Oracle : Password file

At command line
orapwd file=./PWDFILE password=password entries=10

In sqlplus:
select * from <a href="http://www.adp-gmbh.ch/ora/misc/dynamic_performance_views.html#pwfile_users">v$pwfile_users</a>;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
<a href="http://www.adp-gmbh.ch/ora/misc/sys_system_internal.html">SYS</a> TRUE TRUE

<a href="http://www.adp-gmbh.ch/ora/sql/grant.html">grant</a> <a href="http://www.adp-gmbh.ch/ora/admin/sysdba.html">SYSDBA</a> to USERNAME;
<a href="http://www.adp-gmbh.ch/ora/sql/grant.html">grant</a> <a href="http://www.adp-gmbh.ch/ora/admin/sysdba.html">SYSOPER</a> to USERNAME;


Thursday 15 July 2010

Oracle : Remove 11.1 RAC cluster

Use cluster remove tool found :

http://download.oracle.com/otndocs/products/clustering/deinstall/clusterdeconfig.zip

This is a command line tool - unzip on node and de-install database home then crs home

./clusterdeconfig -home /u01/app/crs/11.1.0/crs -checkonly
./clusterdeconfig -home /u01/app/crs/11.1.0/crs

 ./clusterdeconfig -home /u01/app/oracle/product/11.1.0/db_1 -checkonly
 ./clusterdeconfig -home /u01/app/oracle/product/11.1.0/db_1


Need to run a 3 root scripts on each node

Wednesday 14 July 2010

Thursday 1 July 2010

CVS : Pre-tag check failure

Very annoying and a completely useless error message

This may be caused by a validation rule being set up on tags - eg. disallowing them to be moved/deleted
Look at ../CVS/CVSROOT/taginfo which matches items being tagged to an executable to validate the action
eg a line like
DEFAULT /usr/local/bin/stop_tag_hack.sh
will redirect to the shell script which can contain something like the following to stop deletes or changes :
TAG_OP=$2
if [ "$TAG_OP" != "add" ]; then
   exit -1
   # exit 0
fi