Posts

Showing posts from May, 2011

Obtain DDL for objects/users in oracle

I recently came across situation where I needed to recreate a public database link in a non-prod database environment and application team didn't know the password required for this particular user being used for the db link. I did the following to obtain the DDL out of production: set long 999999 select dbms_metadata.get_ddl('DB_LINK', 'LINKNAME', 'PUBLIC') from dual; I had to do the same for a user that didn't get created that I wanted to quickly create myself without using exp/imp. select dbms_metadata.get_ddl('USER','&USERNAME') from dual;

11g active database clone failed

I recently experienced some type of a network hiccup of some sort resulting in a failed duplicate database using active database methodology for Oracle 11g.  The below error was the one I received for several datafile copies which is the first steps in the duplicate with active database process.  Some were missed/didn't get copied over for some reason. RMAN-03009: failure of backup command on prm2 channel at 05/01/2011 04:50:02 ORA-17629: Cannot connect to the remote database server ORA-17629: Cannot connect to the remote database server continuing other job steps, job failed will not be re-run This resulted in the below error: RMAN-03009: failure of backup command on prm4 channel at 05/01/2011 23:20:53 ORA-17629: Cannot connect to the remote database server ORA-17629: Cannot connect to the remote database server Here is how I manually completed the clone after the failure occurred: 1. Copy over the missing datafiles from primary via RMAN. connect target sys/password@prm