$ rm -rf *.trc
-ksh: rm: /bin/rm: cannot execute [Argument list too long]
Following command will work
$ find . -name "*.trc" |xargs rm
Sunday, February 6, 2011
Delete files old than 30 Days
find . -mtime +30 -print | xargs rm
Saturday, February 5, 2011
Allow source server ssh/scp access without a password prompt to target server
If you need to add a host to ~oracle/.ssh/authorized_keys, all you need to do is append the source host's public key to the "authorized_keys" file of the target host, and you're all set.
On Source
scp ~oracle/.ssh/id.???..pub (??? = rsa or dsa, ssh public key) <target>:~oracle/.ssh/<source>.id.???..pub
On Target
cat <source>.id.???..pub >> authorized_keys(chmod 600 authorized_key if it is not)
If the source host doesn't have a public key, then run the following command to generate one:
ssh-keygen -t rsa or ssh-keygen -t dsa (press enter for all prompts. either key type will work).
If a ssh/scp has never been done from the source host to the target host, you will need to run a one time "ssh" command manually, so that the source known_hosts file can be updated with the target hosts name, since this isn't done automatically
On Source
scp ~oracle/.ssh/id.???..pub (??? = rsa or dsa, ssh public key) <target>:~oracle/.ssh/<source>.id.???..pub
On Target
cat <source>.id.???..pub >> authorized_keys(chmod 600 authorized_key if it is not)
If the source host doesn't have a public key, then run the following command to generate one:
ssh-keygen -t rsa or ssh-keygen -t dsa (press enter for all prompts. either key type will work).
If a ssh/scp has never been done from the source host to the target host, you will need to run a one time "ssh" command manually, so that the source known_hosts file can be updated with the target hosts name, since this isn't done automatically
Tuesday, February 1, 2011
11gR2 RAC BACKUP FAILS WITH "ORA-00245: CONTROL FILE BACKUP OPERATION FAILED"
In 11gR2 onwards, the controlfile backup happens without holding the control file enqueue. For non-RAC database, this doesn't change anything. But, for RAC database, the snapshot controlfile location must be in a shared file system that will be accessible from all the nodes. The snapshot controlfile MUST be accessible by all nodes of a RAC database.
Solution:
The snapshot controlfile MUST be accessible by all nodes of a RAC database, if the snapshot controlfile does not reside in on a shared device this error will raise.
1. Check the snapshot controlfile location:
rman>show all;
2. Configure the snapshot controlfile to a shared disk:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '<shared_disk>/snapcf_UNSID1.f'; # default
Reference [ID 1268725.1]
Solution:
The snapshot controlfile MUST be accessible by all nodes of a RAC database, if the snapshot controlfile does not reside in on a shared device this error will raise.
1. Check the snapshot controlfile location:
rman>show all;
2. Configure the snapshot controlfile to a shared disk:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '<shared_disk>/snapcf_UNSID1.f'; # default
Reference [ID 1268725.1]
Subscribe to:
Posts (Atom)